Building power control and comfort management using genetic programming and fuzzy logic

In the last couple of years, energy management in the building environment has been a topic of interest to the research community. A number of renowned methods exist in the literature for energy management in buildings, but the trade-off between occupants comfort level and energy consumption is still a major challenge and needs more attention. In this paper, we propose a power control model for comfort and energy saving, using a fuzzy controller and genetic programming (GP). Our focus is to increase the occupants’ comfort index and to minimize the energy consumption simultaneously. First, we implemented a Genetic Algorithm (GA) to optimize the environmental parameters. Second, we control the environment using fuzzy logic and third, we predict the consumed power using GP. The environmental and comfort parameters considered are temperature, illumination and air quality. At the end of the work we compare the power consumption results with and without prediction. The results confirmed the effectiveness of the proposed technique in getting the solution for the above mentioned problem.


Introduction
Energy conservation and the user comfort index are two significant design objectives in the future building sector.The reason is that, in the energy consumption sectors, buildings is one of the main stakeholders of energy consumption.The energy consumption increases day by day while its sources of generations are less and expensive as well.On the other side occupants of a building want to consume less energy without compromising the comfort index.This requirement of minimum energy consumption without compromising users comfort index is a challenging task to the research community.This leads to the trade-off between energy consumption and occupants comfort index (Owen, 2009).To address this trade-off, an efficient and effective control system is required to maintain both energy consumption and occupants' comfort index in a building environment.
The fundamental three parameters which control occupant's quality of lives in a building environment are thermal comfort, visual comfort and air quality (Wang et al., 2010;Dounis and Caraiscos, 2009;Peeters et al., 2009).Temperature indicates the thermal comfort of the occupants in a building environment.The auxiliary heating and cooling system is applied to preserve the temperature in a comfortable area of the building.The illumination level is used to indicate the visual comfort of the occupants in building environment (Wang et al., 2010).The electrical lighting system is used to manage the visual comfort.CO 2 concentration is used as an index to measure the air quality in the building environment (Emmerich and Perily, 2001).The ventilation system is utilized to keep a low CO 2 concentration.The combination of these three parameters can serve as an occupant's comfort index in buildings and will be used to evaluate it.
The research community has been presented with many approaches in the area of energy savings and some valuable energy management systems have been devised.Approaches based on conventional control systems have been introduced in previous works.Designers used Proportional Integral Derivative Controllers in order to overcome the overshoot of temperature (Levemore, 1992).Other conventional controllers proposed in the literature were optimal control (Bernard et al., 1982) and adaptive control (Curtis et al., 1996).There are some drawbacks of these approaches, such as 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.
Other proposed methods in this connection are predictive control methods (Kusiak et al., 2010;Siroky et al., 2011), where predictive control with weather predictions has been applied to heating, ventilating and air-conditioning systems.Previously we have proposed a predictive control model for building energy management (Safdar and DoHyeun, 2013;Safdar and DoHyeun, 2015).A multi-agent control system with information fusion has been proposed by (Wang et al., 2012).They proposed an 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 by Bluyssen et al. (2011).A method presented by Marino et al., (2012) proposed singular comfort classification indices suitable for both a single environment and whole buildings.The methodology allows evaluation of both energy consumption and polluting impacts and takes into account the comfort conditions of the indoor environment and outdoor climate.
Genetic Algorithm (GA) has been applied for energy management in many ways, e.g.GA proposed for heating, ventilation and air-conditioning (HVAC) control problems (Huang and Lam, 1997).This technique is also applied to the control problems of energy systems consisting of fuel cells, thermal storage, and heat pumps (Obara and Kudo, 2003).(Wright et al., 2002) applied GA to analyse multi-objective (building energy cost and occupant thermal discomfort) problems to classify the optimal pay-off characteristics.Hongwei et al. (2006) applied GA to mixed integer and nonlinear programming problems in an energy plant in Beijing, and made a comprehensive economic analysis by changing the economic and environmental legislative contexts.(Montazeri et al., 2006) proposed an application of GA for the optimization of the control parameters in parallel to hybrid electric vehicles (HEV).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.Azadeh and Tarverdian, (2007) proposed an integrated algorithm based on GA, simulated-on GA, time series and DOE (ANOVA and DMLT) to forecast electricity energy consumption.A technique which demonstrated the application of GP to learn occupancy behavioural rules that predict the presence and absence of an occupant in a singleperson office was presented by (Yu, 2010).An opti-mum scheduling approach of a cold water supply system in an intelligent building has been presented by (Ming and Qing-chang, 2010).
The combination of GA and Artificial Neural Network (ANN) to estimate and predict electricity demand using stochastic procedures has been presented by Azadeh et al. (2007).Optimal control approaches of variable air-volume and air-conditioning systems were proposed by Mossolly et al. (2009).The control approaches included a base control approach of a fixed temperature set point and two advanced approaches for ensuring comfort and Indoor Air Quality (IAQ).The optimization problem for each control approach 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 by Sorrentino et al. (2010), and some initial tests have been performed on the road.An optimal design method for the energy system of a single building has been implemented for the first time by establishing an optimal design technique for a distributed energy system (Kayo and Ooka, 2009).
In this work, we proposed a power control model for users' comfort index and energy saving using fuzzy logic, GP and GA (Holland, 1975).Our proposed technique addressed both energy savings and occupants comfort index.GA assimilates, in its fitness function, the indoor occupants' comfort index and the corresponding energy consumption.A range of user set parameters (temperature, illumination, air quality) which constitute occupants' comfort index in building (Wang et al., 2010) 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 then fed to the fuzzy controller.The output of the fuzzy controller is the minimum required power according to the user's comfort index.A software based coordinator agent takes the required power (fuzzy controllers output) and available power from the switching control unit as input.It then adjusts the input power of the building on the basis of available power and required power.The adjusted power is then compared with the required power to get the actual consumed power (measured power).The measured power is then used as input to the GP to get the predicted power for the building.

Proposed power control model for energy management 2.1 System diagram of the proposed power control model
Figure 1 shows the system diagram of the proposed energy management system for building environment using fuzzy controllers, GP and GA.In Figure Environmental and user set parameters are inputted to the GA optimizer to get optimal parameters.Then optimal parameters were used to calculate the occupant's comfort index with respect to the user set points.The coordinator agent adjusted the power according to the user comfort index, using the required power in conjunction with available source power from the power grid or local energy sources.The coordinator agent performs the function of coordination between the three controllers on the basis of required power of the building and available power to provide a maximum comfort index according to the user requirements, while keeping energy consumption as low as possible.These parameters were selected after running the algorithm for λ times to get optimal results.The GA stops either when the maximum number of generation's Ω is 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 δ times.The experiments were performed using a Latitude D620 laptop with a 2.0GHz processor and 2GB of RAM.The C # 2008 was used for the simulation.When the GA evaluation process finishes, the best fitting chromosome is selected to get optimal parameters and comfort index.

Comfort index
The comfort index can be calculated by using equation (1) (Safdar, DoHyeun, 2013) (1) Where 'comfort' is the overall comfort level of the user and is ranged between [0, 1], β 1 , β 2 and β 3 are the user defined factors which solve any possible conflict between the three comfort factors (temperature, illumination and air quality).Their values fall in the range [0, 1].Also β 1 + β 2 + β 3 = 1 which means that at any time addition of these values should not exceed '1' so that value of comfort is scaled down to in between [0,1].err T is the error difference between environmental parameter (temperature in this case) and actual sensor temperature.err L is the error difference between environmental parameter (illumination in this case) and actual sensor illumination.err A is the error difference between environmental parameter (air quality in this case) and actual sensor air quality.T setpoint , L setpoint and A setpoint are the user set parameters of temperature, illumination and air quality.

Fuzzy logic controller
The concept of Fuzzy Logic (FL) was introduced by Zadeh, (1968), a professor at the University of California at Berkley.The real parameters, optimal parameters and rate-of-change in these parameters are passed as input to the fuzzy controller.The fuzzy controllers produce the 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 the 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 err T and change in error cerr T (difference between current and previous error) is used.The input/output membership functions for the temperature controller are shown in Figure 2. Table 1 shows the fuzzy controller rules for temperature control.It is a 7 x 7 matrix.Each entry in Table 1 is the error difference err T and change in error cerr T .The required power is the power to fulfil the user requirements inside the building.
The input to the fuzzy controller for illumination is the error difference between optimal parameter of GA and real environmental illumination parameter.The input membership/output membership functions for illumination are shown in Figure 3.The input membership function is for the error err L , which is the only input error.In equations (2, 3 and 4) λ T , λ L , and λ A are the temperature, illumination and air quality increment relationship with consumed power P in per unit time K respectively.θ is the weight factor to balance the relationship.The value of θ can be between [0, 1] and d is the basic operation power of ventilator.
Table 2 shows fuzzy controller rules for illumination control.Here 'HS', 'MS' and 'BS' means High Small, Medium Small and Basic Small respectively.'OK' means no change, 'SH' and 'H' means Small High and High respectively.'OLittle', 'OMS', 'OBS', 'OOK', 'OSH' and 'OH' means Output Little, Output Medium Small, Output Basic Small, Output OK, Output Small High and Output High.
The input to the fuzzy controller for air quality is the error difference between optimized air quality parameter of GA and the real environmental air quality parameter.The input/output membership functions for air quality are shown in Figure 4.The input membership function is for the error err A which is the only input to the air quality fuzzy controller.Table 3 shows the fuzzy controller rules for air quality control.Here 'LH' means Little High, 'MH' means Medium High, 'OL' means Output High, 'OLH' means Output Little High.

Coordinator agent
The coordinator agent takes the required building power from the fuzzy controller, according to the comfort index and available power from the switching controller, as input.It adjusted the building power on the basis of available power and required power for the comfort index.The adjusted building power is compared with the required power to get the actual consumed power.The actual consumed power is given to the actuators for usage.The measured power is then passed to the GP and predicted power for the building is determined.
In equations 5, 6 and 7, parameters G 1 , G 2 and G 3 are small optional values for compensating the power losses in distribution.These parameters range between [0,1].P (K) is the required power, which is the sum of power demands from temperature, illumination and air quality.P available (K) is the total energy source (outside grid-power or internal local power source).P max_power (K) is the maximum input power either from the power grid or from the local micro sources to the building.K, is the sample time variable.P T (K+1) = P T (K) + G 1 (5) P T (K) + P L (K) + P A (K) = P required (K) (8) P available (K) <= P max_power (9) 2.1.5.Genetic programming GP is an evolutionary approach based on the concept of natural evaluation (Koza, 1992).It searches computer programs that perform a user-defined function.It is a specialized version of GA where each individual is a computer program.It is a machine learning approach used to optimize a large set of individual's population.GP evolves computer programs which are conventionally stored in the memory as a tree like constructions.

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

Building actuators
Building actuators are the devices which use the energy inside the building.That is, AC (cooling), heater (heating), refrigerator (cooling) and oven (heating).The sensors provide temperature, illumination and air quality information.

Simulation and results discussion
Matlab/Simulink was used for input/output membership functions construction.The simulation was carried out in C# 2008.User preference set points ranges are T setpoint = 66, 78 K, L setpoint = 720, 880 lux and A setpoint = 700, 880 ppm.
Figure 5 shows the comparisons of power consumption.From the results of Figure 5a, it is evident, that in case of power consumption for temperature, the system with prediction method consumed less power as compared to the non-predicted system.This is due to the fact that the predicted method makes use of previous information and Output membership function consumed power accordingly.So when environmental disturbance occurs, the predicted method consumes less power.Lower power consumption is guaranteed by the decision of the coordinator agent on the basis of required power and available power in accordance with comfort index.
Similarly for illumination as shown in Figure 5b, the predicted based method confirmed to consume less power as compared to the without-prediction method.Figure 5c shows the results for the air quality control.Here, once again, predicted based system consumed less power as compared to its counterpart without-prediction.
Figure 5d shows the results of user comfort index in case of prediction based system and nonpredicted based system.With prediction based estimated power usage, user comfort index is the same as that of without prediction based system.Although in the prediction based system less power is consumed as compared to that of non-predicted system, but maintained its required comfort level.The first power disturbance occurs at 82sec.At that time, the comfort level of the prediction based system goes down to almost 0.97 similar to that of non-predicted based system.The prediction based system recovers soon similar to that of its counterpart and immediately provides the same comfort level as compared to non-prediction.During environmental disturbance, the prediction based system recovered soon, similar to its counterpart and without compromising the comfort index.

Conclusion
In this study, we presented a power control model for comfort and energy saving in a building environment using fuzzy logic, GP and GA.We addressed both the energy efficiency and user comfort level.User set points are considered in deciding the comfort level.The focus of our study is to increase occupants comfort index and minimize energy consumption simultaneously.To achieve this, GA was implemented to optimize the environmental parameters with respect to the user set points and comfort index.Secondly, we applied fuzzy logic to control the environment and thirdly, we predict the consumed power using GP.The parameters we considered are temperature, illumination and air quality.We compared the power consumption results with and without prediction.
The results proved the effectiveness of the proposed technique in acquiring the solution for the problem.The proposed prediction method for building energy management produces overall exactly the same comfort level as compared to without prediction method.The main benefit of our proposed predicted approach is that it consumed less power when compared to its counterpart technique where no prediction is applied while maintaining the same required comfort level of the occupants.Using a prediction based system for users comfort index and energy savings, the building environment can be made user friendly.Our proposed approach for comfortable and energy saving system can be incorporated with SCADA software of buildings for practical applications.
1, USP means User Set Points/Parameters, AP means Adjusted Power, CP means Consumed Power, RP means Required Power, PCP means Predicted Consumed Power, T, L and A means Temperature, Illumination and Air quality respectively.
2.1.1.Optimization using GA GA steps for parameter optimization and comfort index are: 1.Initial random population 2. Calculate fitness function for user comfort using equation (1) 3. Select best individuals using one of the three selection criteria (Rank, Roulette wheel or Tournament selection), we used rank based selection 4. Perform 'one point' crossover of the selected individuals 5.After crossover, we get offspring 6. Calculate user comfort index for the offspring using equation (1) 7. Combine populations of step (3) and (5) 8.If mutation criteria meet, then perform mutation 9. Repeat above eight steps until required numbers of iterations have been performed 10.After arrival of termination criteria select best fitting chromosome.

Figure 1 :
Figure 1: System diagram of proposed power control model

Figure 2 :
Figure 2: Input/output membership functions for temperature: (a) Input membership function of err T , (b) Input membership function of cerr T , (c) Output membership function

Figure 3 :
Figure 3: Input/output membership functions for illumination: (a) Input membership function of err L (b) Output membership function

Figure 5 :
Figure 5: Comparison of power consumption and comfort index in case of GA based prediction system and GA based without prediction system