1 Introduction

Energy management and occupant’s comfort index are two important design objectives in future energy management. Reason is that, energy consumption increases day by day while its sources of generations are less and expensive is well. On the other side occupants wants to consume less energy without compromising the comfort index. This requirement of minimum energy consumption without compromising users comfort index is a challenging problem to the research community. This leads to the trade-off between energy consumption and occupants comfort index [13]. To address this trade-off, a control system is required to maintain both energy consumption and occupants’ comfort index.

The basic three parameters which determine occupant’s quality of lives in residential buildings are thermal comfort, visual comfort and air-quality [4]. Temperature indicates the thermal comfort of the occupant’s in a building. The auxiliary heating or cooling system is applied to preserve the temperature in building’s comfortable area. The illumination level is used to indicate the visual comfort of the occupants in a residential building [5]. The electrical lighting system is used to manage the visual comfort. CO2 concentration is used as an index to measure the air-quality in the building. Ventilation system is utilized to keep low CO2 concentration [6]. So the combination of these three parameters can serve as occupant’s comfort index. We have considered these three parameters to evaluate the occupant’s comfort index and energy savings.

In the literature many works have been presented in the area of energy savings and some valuable energy management systems have been proposed. Approaches based on conventional control systems have been introduced in prior works [79]. These conventional controllers consist of Proportional Integral Derivative (PID) controllers, optimal controller and adaptive controller respectively. Designers used PID controllers in order to overcome the overshoot of temperature. These conventional controllers have some disadvantages, like they need a model of the building, they are not user friendly and there are many difficulties in monitoring and controlling the parameters caused by nonlinear features. An optimized fuzzy controller applied for the control of environmental parameters at the building zone level has been proposed in [10]. In this method the occupants’ preferences are monitored via a smart card unit.

Other proposals in this connection are predictive control approaches [11, 12], where weather predictions has been applied to heating, ventilating and air-conditioning system. A multi-agent control system with information fusion has been devised in [13]. They proposed a building indoor energy and comfort management model based on information fusion using ordered weighted averaging (OWA) aggregation. They achieve a high level of comfort with minimum power consumption. Perceived comfort in office buildings is strongly influenced by several personal, social and building factors. The relationship between these factors are complex, so to get a better understanding of the relationships between these factors a proposal has been presented in [14]. A method presented in [15] proposed a comfort classification indexes suitable for both single environment and whole buildings. The methodology allows evaluation of both energy consumption and polluting impacts and takes into account comfort conditions of indoor environment and outdoor climate. An approach based on artificial network for energy management and control has been proposed in [16]. The artificial neural network based energy management and controller provides efficient and effective operation of wind, solar, and hydrogen energy-based hybrid renewable stand-alone structure.

Genetic Algorithm (GA) has been applied for energy management in many ways, like GA adopted for heating, ventilation and air-conditioning (HVAC) control problems [17]. This method also being applied to the control problems of energy systems consisting of fuel cells, thermal storage, and heat pumps [18]. Another author applied GA to investigate multi-objective (building energy cost and occupant thermal discomfort) problems to identify the optimal pay-off characteristics [19]. One of the authors applied GA to mixed integer and nonlinear programming problems in an energy plant in Beijing and made a detailed economic investigation by changing the economic and environmental legislative contexts [20]. Application of GA for the optimization of the control parameters in parallel to hybrid electric vehicles (HEV) described in [19]. The optimization problem was formulated for an electric assistant control strategy (EACS) in order to meet the minimum fuel consumption and emissions while maintaining the vehicle performance requirements. Another work proposed integrated algorithm based on GA, simulated-based GA, time series and DOE (ANOVA and DMLT) to forecast electricity energy consumption [21]. A method which demonstrated the application of GP to learn occupancy behavioral rules that predict the presence and absence of an occupant in a single-person office was proposed in [22]. An optimum scheduling strategy of cold water supply system in an intelligent building has been proposed in [23]. An integrated GA and artificial neural network (ANN) to estimate and predict electricity demand using stochastic procedures has been proposed in [24].

Optimal control strategies of variable air volume and air-conditioning system was proposed in [25]. The control strategies included a base control strategy of fixed temperature set point and two advanced strategies for insuring comfort and indoor air-quality (IAQ). The optimization problem for each control strategy was formulated based on the cost of energy consumption and constrained by system and thermal space transient models. They used GA to solve the problem of optimization. Supervisory control for hybrid solar vehicles proposed in [25], and some beginning tests have been performed on the road. An optimal design method for energy system of single building has been developed for the first time by establishing optimal design method for distributed energy system [26].

In this study, we propose an optimize methodology for users comfort index and energy saving using GA. Our proposed technique addresses both energy savings and occupants comfort index simultaneously. GA integrates in its fitness function the indoor occupants’ comfort index and the corresponding energy consumption. GA targets to satisfy the occupant’s requirements along with minimal energy consumption. A range of user set parameters (temperature, illumination, air-quality) which constitute occupants’ comfort index in building [3] are selected and then optimized using GA according to the user’s comfort index.

The error difference of optimal parameters and real environmental parameters is input to the fuzzy controller. The output of the fuzzy controller is the minimum required power according to the user’s comfort index. Coordinator agent takes required power (fuzzy controller output) and optimal parameters from the GA as input. The coordinator agent adjusts the input power of the building on the basis of available power, required power and user comfort index. The adjusted power is compare with the required power to get the actual consume power. The consumed power is input to the Kalman filter to predict consume power. The predicted consume power is used by the actuators.

All the work discussed above except [13] either addressed users comfort index in the building or consumed minimum energy, but not both. In [13], a multi-agent control system is proposed with information fusion. It addressed both issues occupant’s comfort index and energy consumption. The system they proposed is based on multiple agents and information fusion as compared to our proposed single agent based system. They used two optimizers one for optimizing user’s set points and other for determination of degree of BUM function as opposed to our proposed model in which we used only one optimizer which is based on GA and which optimizes user’s set points according to the environmental parameters and user’s comfort index. Our proposed model is simple and maintains the user’s comfort index similar to [13], and minimized the power consumption without compromising the comfort index as compare to our previous work [1].

2 Propose Optimized Energy Management Methodology

2.1 System Diagram

Figure 1 shows optimized system diagram for the energy management. Environmental parameters (Temperature, Illumination and Air-quality) and user set points are input to the GA optimizer for optimization. Then optimized parameters are used as user comfort index to calculate the occupant’s comfort index. Three fuzzy logic based controllers are used to control temperature, illumination and air-quality. Coordinator Agent adjusted the power according to the optimized required power from the fuzzy controllers and available power from the external power grid or internal local power sources. Coordinator agent performs the function of coordination among the three fuzzy controllers based on the required power and available power. It also provides maximum comfort index according to the user requirements and available power. Building actuators are the devices which actually utilizes the power.

Fig. 1
figure 1

System diagram of a residential building energy management

2.1.1 Optimization Algorithm Using GA

GA [27] steps for parameters optimizations and comfort index are:

  1. 1.

    Initial random population

  2. 2.

    Calculate fitness function for user comfort using Eq. (1)

  3. 3.

    Select best individuals using any of three selection criteria (Rank, Roulette wheel or Tournament selection), we used rank based selection

  4. 4.

    Perform ‘one point’ crossover of the selected individuals

  5. 5.

    After crossover, we get off-springs

  6. 6.

    Now calculate comfort for the off-springs

  7. 7.

    Combining populations of step (3) and (5)

  8. 8.

    If mutation criteria meet, then perform mutation

  9. 9.

    Repeat above eight steps until required number of iterations

  10. 10.

    Then after arrival of termination criteria select best fitted chromosome.

These parameters were selected after running the algorithm for λ times to get optimal results. GA stops either when the maximum number of generation’s Ω met, or no significant change is observed in the fitness for µ (few successive) generations. The maximum population size selected is 100. The conventional single point crossover is performed with the probability of 0.9 and mutation rate of 0.1. GA parameters (population size, crossover rate and mutation rate) have been set after running GA for number times. The experimentations are performed using Latitude D620 laptop of 2.00 GHz with 2 GB RAM. The C # 2008 is used for the simulation. When GA evaluation process finishes, best fitted chromosome is to be selected to get optimal parameters and comfort index.

2.1.2 User Comfort Index

The comfort index can be calculated by using Eq. (1) [1].

$$ Comfort = \beta_{1} \left[ {1 - \left( {e_{T} /T_{set} } \right)^{2} } \right] + \beta_{2} \left[ {1 - \left( {e_{L} /L_{set} } \right)^{2} } \right] + \beta_{3} \left[ {1 - \left( {e_{A} /A_{set} } \right)^{2} } \right] $$
(1)

where “comfort” is the overall comfort level of the user and is ranged between [0, 1]. β1, β2, β3 are the user defined factors which solve any possible conflict between the three comfort factors (temperature, illumination and air-quality). e T , is the error difference between optimal parameter of GA (temperature in this case) and actual sensor temperature. e L , is the error difference between optimal parameter of GA (illumination in this case) and actual sensor illumination. e A , is the error difference between optimal parameter of GA (air-quality in this case) and actual sensor air-quality. T set , L set , A set are the user set parameters of temperature, illumination and air-quality.

2.1.3 Coordinator Agent

Coordinator agent takes the required building power from fuzzy controller and optimal parameters according to the user comfort index as input. It adjusted the building power on the basis of available power, required power and optimal parameters of comfort index. The adjusted building power is compared with the required power to get the actual consume power. The consumed power is input to the Kalman filter to predict consume power. The predicted consume power is given to the actuators for usage. The predicted consume power is the power to be consumed in the building.

In Eqs. (2), (3), and (4) P (k) is the required power, which is the sum of power demands from temperature, illumination and air-quality. P required , is the total energy source (outside grid-power or internal local power source). P max (k) is the maximum input power either from the power grid or from the local micro sources to the building.

$$ P_{T} (k = 1) = P_{T} (k) $$
(2)
$$ P_{L} (k = 1) = P_{L} (k) $$
(3)
$$ P_{A} (k = 1) = P_{A} (k) $$
(4)
$$ P_{T} (k) + P_{L} (k) + P_{A} (k) = P_{required} (k) $$
(5)
$$ P_{required} (k) \le P_{available} (k) $$
(6)
$$ P_{available} \le P_{\hbox{max} } $$
(7)

2.1.4 Fuzzy Logic Based Controllers

The concept of Fuzzy Logic (FL) was introduced by L. A. Zadeh a professor in the University of California at Berkley [28].

The real parameters, optimal parameters and rate-of-change in these parameters are passed as input to fuzzy controller. Fuzzy controllers produce results based on the membership functions. The output of the fuzzy controller(s) is the required power to control temperature, illumination and air-quality inside building. This required power is input to the coordinator agent.

The input to the fuzzy controller for temperature is the error difference between optimal parameters of GA and real environmental parameters along with the rate of change of temperature. For efficient control, both error difference e T and change in error ce T (difference between current and previous error) is used. Fuzzy controller rules for temperature control and input/output membership functions for temperature, illumination and air-quality control are described in our previous work [2]. Table 1 shows fuzzy controller rules for illumination control. The input to the fuzzy controller for illumination is the error difference between optimal parameter of GA and real environmental illumination parameter. When the input error is ‘HS’, the required output power would be ‘OLittle’. For error ‘MS’, the output power would be ‘OMS’, for ‘BS’ the required power would be ‘OBS’, for ‘OK’ the output power would be ‘OOK’, for ‘SH’ the required output power would be ‘OSH’ and for ‘H’ the required power would be ‘OH’. Table 2 shows the fuzzy controller rules for air-quality control. The input to the fuzzy controller for air-quality is the error difference between optimized air-quality parameter of GA and real environmental air-quality parameter. If the input error is ‘Little’ the required output power would be ‘OFF’. For ‘OK’ the output power would be ‘ON’, for ‘LH’ the required power would be ‘OL’, for ‘MH’ the required power would be ‘OLH’ and for ‘HIGH’ the required would be ‘OHIGH’.

Table 1 Fuzzy controller rules for illumination control
Table 2 Fuzzy controller rules for air-quality control

In Eqs. (8), (9) and (10) \( \gamma_{T} ,\gamma_{L} \) and \( \gamma_{A} \) are the temperature, illumination and air-quality increment relationship with consumed power P in time k respectively. \( \vartheta \) is the weight factor to balance the relationship. The value of \( \vartheta \) is between [0, 1] and “\( d \)” is the basic operation power of ventilator.

$$ \gamma_{T} = \vartheta \times P_{T} /K $$
(8)
$$ \gamma_{L} = \vartheta \times P_{L} /K $$
(9)
$$ \gamma_{A} = \vartheta \times P_{A} /K \times d $$
(10)

2.1.5 Kalman Filter

A Kalman filter is one of the optimal estimators. It gathers parameters of interest from indirect, inaccurate and uncertain observations. It is recursive in nature so that new measurements can be processed as they reached. The Kalman filter addresses the general problem of trying to predict the state xЄRn of a discrete-time controlled process that is governed by the standard linear stochastic difference equation.

$$ X_{t} = A_{x(t - 1)} + P + m_{(t - 1)} $$
(11)
$$ Z_{t} = \, H_{x(t)} + n_{t} $$
(12)

In Eqs. (11) and (12), the random variables m t and n t represent the process and measurement noise respectively.

The process noise covariance Q and measurement noise covariance R matrices are change with each time step, however here we assume both as constant. The matrix A in the difference Eq. (11) relates the state at the previous time step t − 1 to the state at the current step t in the absence of process noise. In practical the value of A might change with each time step t, but here we assume it as constant. The matrix P relates the optional control input to the state x. The matrix H in the measurement Eq. (12) relates the state to the measurement z t . In practical value of H might change with each time step t, but here we assume it as constant.

2.1.6 Switching Controller

The switching controller manages the available power sources. When the external power source unable to provide enough power to the building or its price is high, then it switch to the internal power sources.

2.1.7 Building Actuators

Building actuators are the devices which actually use the power inside the building. The common actuators are AC (cooling), heater (heating), refrigerator (cooling) and oven (heating). Sensors devices are used to get updated environmental information’s regarding temperature, illumination and air-quality level.

3 Simulation and Results Discussion

Matlab/Simulink used for input/output membership functions construction. While actual simulation carried out in C# 2008.

User preference set parameters range was T set  = [66, 78] (Kelvin), L set  = [720, 880] (lux) and A set  = [700, 880] (ppm).

Figure 2 shows the comparisons of power consumption. X-axis shows the time in seconds while Y-axis shows the predicted power consumption in kilowatts and comfort index between 0.0 and 1.0 is the minimum and maximum comfort index respectively. From the results of Fig. 2a it can be evident, that in case of power consumption for temperature, system with GA based prediction method consumes less power as compared to the system with PSO based prediction. This is due to the fact that GA based optimized parameters are more optimal than PSO based optimized parameters. So when environmental disturbance occur GA based predicted method consume less power as compare to PSO based predicted method. Less power consumption is guaranteed by the decision of coordinator agent on the basis of optimized parameters. Similarly for illumination as shown in Fig. 2b, GA based predicted method confirmed to consume less power as compared to the PSO based prediction method.

Fig. 2
figure 2

Comparison of predicted power consumption with GA based system and PSO based system. a Temperature, b illumination

Figure 3a shows the results for the air quality control. Here once again GA based predicted system consumes less power as compared to its counterpart PSO based prediction system. Figure 3b shows the total predicted power consumption in case of GA based optimized system and PSO based optimized system. The total power consumption of GA based system is less than PSO based system.

Fig. 3
figure 3

Comparison of predicted power consumption with GA based system and PSO based system. a Air-quality, b total predicted power consumption

First time power disturbance occurs at time 82 s. At that time comfort level of GA based prediction system goes down to 0.970 while at the same time PSO based system comfort level to 0.965. GA based prediction system recovers soon than its counterpart PSO based system and immediately improving comfort index as compared to PSO based system. So whenever there is an environmental disturbance, GA based prediction system recovered the environment immediately as compare to its counterpart PSO based system. Table 3 shows the comparison of power consumption in case of GA based system and PSO based system. It is clear that GA based system consumed les power in all three cases of temperature, illumination and air-quality.

Table 3 Power consumption comparison

Figure 4 shows the results of user comfort index in case of GA based prediction system and PSO based prediction system. With GA based estimated power consumption, user comfort index is improved as compare to the PSO based prediction system. Although in GA based prediction system less power is consume as compare to that of PSO based prediction system, but still it achieved improved comfort level. The comparison of power consumption is shown in Table 3. From Table 3 we can see that in all the three cases GA based system consumed less power as compare to the PSO based system.

Fig. 4
figure 4

Comparison of predicted GA and PSO based comfort index

4 Conclusions

In this paper, we propose an optimized power control methodology for occupants comfort index, energy saving and energy prediction using genetic algorithm (GA). We address both the energy efficiency and user comfort index. Users set parameters are also considered in deciding the comfort index. The focus of our study is to increase occupants comfort index, minimize energy consumption and comparison of two optimization algorithms with respect to its efficiency in the context of power consumption. For this purpose we optimize the input parameters of fuzzy logic using GA and predict using Kalman filter. The parameters we optimized are temperature, illumination and air-quality which reflect the occupant’s comfort index in building environment. The proposed GA based optimized model produces over all improved comfort index as compare to our previous work PSO based system [1]. Similarly, GA-based system also enables to consume less power as compare to PSO based optimization. So using GA based optimized model for users comfort index and energy savings, the building environment can be made user friendly. Our proposed GA based optimized model improved the occupants comfort index and consumed minimum power as compare to our previous work. The proposed GA based comfortable and energy saving system can be integrated with SCADA software of buildings for real-world applications.