An Efficient Approach for Energy Consumption Optimization and Management in Residential Building Using Artificial Bee Colony and Fuzzy Logic

The energy management in residential buildings according to occupant’s requirement and comfort is of vital importance. There are many proposals in the literature addressing the issue of user’s comfort and energy consumption (management) with keeping different parameters in consideration. In this paper, we have utilized artificial bee colony (ABC) optimization algorithm for maximizing user comfort and minimizing energy consumption simultaneously. We propose a complete user friendly and energy efficient model with different components. The user set parameters and the environmental parameters are inputs of the ABC, and the optimized parameters are the output of the ABC. The error differences between the environmental parameters and the ABC optimized parameters are inputs of fuzzy controllers, which give the required energy as the outputs. The purpose of the optimization algorithm is tomaximize the comfort index andminimize the error difference between the user set parameters and the environmental parameters, which ultimately decreases the power consumption. The experimental results show that the proposed model is efficient in achieving high comfort index along with minimized energy consumption.


Introduction
For every residential building, it is the most important issue to effectively manage the energy as well as achieve higher occupant's comfort.The reason behind the fact is that the energy consumption increases rapidly with the passage of time and becomes more and more expensive and the user cannot compromise on his/her comfort.Therefore, the energy consumption minimization and user comfort maximization need to be balanced to achieve both goals.Therefore, a trade-off is required between the user comfort and the energy utilization [1][2][3].In any residential building, we need a control system for maintaining user comfort as well as energy consumption minimization.In order to determine the user comfort, we need three basic comfort parameters, namely, visual comfort, thermal comfort, and air quality [4].The thermal comfort is represented by temperature inside the building.In order to preserve the temperature in the comfortable area of the building, the auxiliary cooling or heating system is required.For maintaining the visual comfort of the user in the residential building, the illumination is considered [5].For managing the user visual comfort, the electrical lighting system is used.For the measurement of air quality in the comfort zone of the residential building, CO 2 concentration is measured.The ventilation system keeps the concentration of CO 2 as low as possible [6].In order to maintain the comfort of residential building according to user demand, these three parameters are considered.We have also considered these three parameters to maintain the user comfort in residential building.
Many energy management systems have been proposed in the literature for energy savings and consumption.In previous works, many approaches have been introduced which are based on conventional control systems [7][8][9].Some of these controllers are optimal controllers, adaptive controllers, and PID (Proportional Integral Derivatives).There are many disadvantages associated with these conventional controllers.For example, these controllers were not user friendly and it was difficult to monitor and control the parameters.In order to control the environmental parameters in the building, the application of optimized fuzzy controllers has been proposed in [10].In order to control heating, air-conditioning, and ventilation, many other predictive control approaches apply weather prediction [11,12].The authors in [13] used multiagent control system in which information fusion has been used.The authors have used ordered weighted averaging aggregation for indoor energy and control management.They have maximized user comfort and minimized energy consumption.Many different types of factors including social factors, personal factors, and buildings factors have strong influence on user comfort.In order to understand the complex relationship among these different factors, a model has been proposed by the authors in [14].The authors in [15] have presented a methodology in which they have considered both the indoor and outdoor environmental factors and user comfort and energy utilization management.Many types of different classification, prediction, and optimization algorithms have been used in the literature for different purposes related to energy control and management systems.As compared to other optimization algorithms, artificial bee colony algorithm is a new algorithm, which has been previously used in few proposed methods for energy management and control related applications.The authors in [16] applied artificial bee colony optimization algorithm for optimal management of micro grid.Keeping in consideration different parameters, the objective was to give scheduling of short-term load forecasting using minimized operation cost of micro grid.The aim of the paper was to minimize the total operating cost of the micro grid using different types of optimization algorithms and the authors concluded that artificial bee colony algorithm provided the best results.In order to bring optimization in process placement schemes of energy efficient data centers, the authors in [17] applied multiobjective artificial bee colony.The objective of the paper was to minimize energy cost for effective and efficient control and management of data centers as the cost of energy is higher in data centers as compared to office buildings.The authors in [18] applied artificial bee colony for temperature dependent optimal power flow.The objective was to minimize the fuel cost, minimize power loss, and improve voltage profile.Artificial bee colony was applied by [19] for energy management system in combination with Markov chain.
In this paper, we propose an optimization methodology for maximizing user comfort and minimizing power consumption using multiobjective artificial bee colony optimization algorithm.Our proposed system is used for energy saving and achieving user comfort simultaneously.The aim is to integrate the fitness function of artificial bee colony with user comfort index and energy utilization.Artificial bee colony algorithm targets the user comfort and energy consumption for maximizing the first and minimizing the latter.User set parameters including temperature, illumination, and air quality are used as basic parameters in user comfort.These parameters are selected and then optimized using artificial bee colony according to the user comfort index.After ABC does the optimization, the error difference is found between the optimal parameters and the actual environmental parameters.This error difference is entered to fuzzy controllers as input and the output of the fuzzy controllers is the minimum power required for achieving the user comfort.The coordinator agent takes the output of the fuzzy controller (required power) as its inputs.Based on the available power from the power sources and required power from the fuzzy controllers, the coordinator agent adjusts the actual consumed power and gives this power to the actuators to change their status accordingly.The block diagram of energy efficient building is shown in Figure 1.

Proposed Methodology
In the proposed architecture, the temperature, illumination, and air quality from environment as well as from the user (user set temperature, illumination, and air quality) are entered to ABC optimizer.The ABC optimizer optimizes the environmental parameters according to user preferences to maximize the comfort index.The input to the fuzzy controllers (temperature fuzzy controller, illumination fuzzy controller, and air quality fuzzy controller) is the error difference between the environmental parameters and the optimized parameters.The output of the fuzzy controllers is the required power for controlling the status of the actuators (cooling/heating, lighting, and ventilation).The coordinator takes the required power as input and checks the availability of power from the power sources and provides the power to all the actuators according to status provided by the fuzzy controllers.The inputs of the fuzzy controllers are not only the ABC optimized values but also the environmental temperature, illumination, and air quality values.The output values generated by the fuzzy controllers depend upon the error differences between the environmental temperature, illumination, and air quality and the ABC optimized values for these three parameters.The main aim of the ABC optimization is to minimize these error differences.Without applying the ABC optimization process, the error differences are high, which ultimately generate higher output values causing higher energy consumption.After applying optimization, the error differences decrease causing optimized energy consumption.The proposed architecture is shown in Figure 2.

Optimization Using Artificial Bee Colony Optimization.
Artificial bee colony (ABC) is a nature inspired optimization algorithm which is based on the foraging behavior of bees.For the last few decades, many algorithms have been developed which have nature inspired behaviors.Some of them are evolutionary algorithms [21], ant colony optimization [22], harmony search [23], and particle swarm optimization (PSO) [24].These algorithms can be applied in a variety of problems and therefore are known as multipurpose algorithms.Artificial bee colony is also an optimization algorithm like other optimization algorithms initially introduced by Karaboga as a technical report in 2005 for solving numerical optimization problems [25].Artificial bee colony is advantageous over (i) ABC is simple, robust, and flexible as mentioned by [26,27].
(ii) As compared to other optimization techniques, ABC has few control parameters [28].
(iii) ABC can be easily used in hybridization with other optimization techniques [27].
(iv) ABC has the capability to cope with objective function having stochastic nature [20].
The major steps of artificial bee colony optimization for optimization problem are described in the following section [29].The pseudocode for ABC is as follows.
Step 1: Initialization of ABC parameters and problem specific parameters Step 2: Initialization of food source Repeat Steps 3 to 6 Step 3: Employed bees are sent to the food source Step 4: Onlooker bees are sent for selection of food source Step 5: Scout bees are sent for the search of new food Step 6: Best food source is memorized While (Objective is achieved or termination criterion is met) Step 1 (parameters initialization).( 1) Number of parameters (): this shows the number of parameters to be optimized.
(2) Upper bound (UB  ): UB  represents the upper bounds of parameter , where  = 1, 2,  and  represents total number of parameters to be optimized.The upper bound of temperature ( max ) is 78, illumination ( max ) is 880, and air quality ( max ) is 880.
(3) Lower bound (LB  ): LB  represents the lower bounds of parameter , where  = 1, 2,  and  represents total number of parameters to be optimized.The lower bound of temperature ( min ) is 68, illumination ( min ) is 720, and air quality ( min ) is 700.
(4) Range (): range represents the difference between the upper bounds and lower bounds of the parameters given by UB  − LB  .The temperature range (  ) is 10, the illumination range (  ) is 160, and the air quality range (  ) is 180.
(5) Colony size (SN): it represents the total number of solutions (food sources) in the population.This number is equal to total employed bees or onlooker bees.The algorithm has been tested for different number of colony sizes to find the best colony size to get best performance results.
(6) Foods: food represents the total population of the food source.The total population has been varied for getting the best optimization results.
(7) Maximum cycles (MC): They represent the maximum number of generations in algorithm run.The algorithm has been tested for different number of cycles.
(8) Limit (): if a food source is not improved, the limit represents the number of generations for which the food source is abandoned by employed bees.The limit has been set to different values to get best performance results.
(9) Objective function: this is the function we need to optimize.The algorithm has been developed to maximize the value of comfort index formulated in (4).(10) Objective value: objective value represents value of objective function associated with each food source.Step 2 (food source initialization).In order to initialize food source, we need , LB  , UB  , , and FN parameters explained above.Food source is a matrix of size SN × D in which each row represents a food source.Each vector is generated by using (1) [20].Consider ∀ ∈ (1, 2, . . ., SN), ∀ ∈ (1, 2, . . ., ), where  ∼ (0, 1) generates a uniform random number between 0 and 1.
Step 4 (sending onlooker bees).The employed bees and onlooker bees have equal number of food sources.Initially, the selection probability of each food source generated by the employed bees is calculated by the onlooker bee.It then selects the best food source using Roulette selection method.The complete process in the onlooker bee phase takes place in Pseudocode 2.
In this pseudocode,  prob represents the accumulated probability of all employed bees.
Step 5 (scout bees phase).The scout bees use (2) for the replacement of abandoned food sources after carrying out a random search.A food source that cannot be improved after a predefined number of cycles is called abandoned food source.The scout bee algorithm is given in Pseudocode 3.
Step 6 (memorize the best source food).In this phase, the source food and their position are memorized which gives maximum objective value.
Stopping Condition.Steps 3 to 6 are repeated until maximum number of cycles is specified by MC.
where CI is the comfort index of the user. [20].
the optimized illumination and environmental illumination, and the error difference between optimized air quality and environmental air quality, respectively.The maximum value of CI is 1.   is the user set temperature,   is the user set illumination, and   is user set air quality value.The purpose of optimization is to maximize the value of CI and minimize the values of  1 ,  2 , and  3 .

Fuzzy Controllers.
The concept of fuzzy has been introduced by Zadeh, a professor at California University at Berkley [30].In our proposed architecture, we have three fuzzy controllers, namely, temperature fuzzy controller, illumination fuzzy controller, and the air quality fuzzy controller for controlling cooling/heating, lighting, and ventilation systems, respectively.Every fuzzy controller used in the proposed system consists of four main components, namely, fuzzifier, rules, inference engine, and defuzzifier.The fuzzifier calculates its membership function based on its inputs.The output membership values are calculated by applying the rules stored in rule base and the inference process.The defuzzifier calculates the actual power required for cooling/heating (temperature fuzzy controller), lighting (illumination fuzzy controller), and CO 2 concentration (air quality fuzzy controller).All the fuzzy controllers used in the proposed architecture follow the same structure shown in Figure 3.

Temperature Fuzzy Controller.
In the proposed architecture, the input to the temperature fuzzy controller is the error difference between the optimized temperature values from the optimizer and the environmental temperature.The output of the temperature fuzzy controller is the required power for cooling/heating system.The status of the cooling/heating actuators is changed according to the error differences between the actual environmental parameters and the artificial bee colony optimized parameters in which the output of the temperature fuzzy controller is the required power for the actuator status.The rules for temperature fuzzy controller are as follows and these are represented in Figures 12, 13, and 14: In these rules,  1 represents the error difference between the environmental temperature and the ABC optimized temperature and this error difference is the input of temperature fuzzy controller.Based on this error difference, the temperature fuzzy controller generates the energy as its output represented by RP1 (required power 1) to provide it to the cooling/heating actuators.NH represents minimum error difference between the environmental temperature and ABC optimized temperature followed by NM, NL, ZE, PL, PM, and PH.So, as we go from NH towards PH, the error difference increases and vice versa.Accordingly, the required power (RP1) for cooling/heating control is minimum (RP1 = R1NH) for error difference NH and maximum for error difference PH, that is, RP1 = R1PH.So, NH represents minimum error difference between the environmental temperature and ABC optimized temperature and PH represents maximum error difference between the environmental temperature and ABC optimized temperature.Accordingly, R1NH represents minimum power required for cooling/heating system and R1PH represents maximum power required for cooling/heating system control.

Illumination Fuzzy Controller.
The input to the illumination fuzzy controller is the error difference between the optimized illumination from the ABC optimizer and the environmental illumination.The output of the illumination fuzzy controller is the required power for lighting system.The status of the lighting actuators is changed according to the error differences between the actual environmental parameters and the artificial bee colony optimized parameters in which the output of the illumination fuzzy controller is the required power for the actuator status.The rules for illumination fuzzy controller are as follows and these are represented in Figures 15,16 In these rules,  2 represents the error difference between the environmental illumination and the ABC optimized illumination and this error difference is the input of illumination fuzzy controller.Based on this error difference, the illumination fuzzy controller generates the energy as its output represented by RP2 (required power 2) to provide it to the lighting system.HS represents minimum error difference between the environmental illumination and ABC optimized illumination followed by MS, BS, OK, SH, and H. So, as we go from HS towards H, the error difference increases and vice versa.Accordingly, the required power (RP2) for lighting control is minimum (RP2 = R2HS) for error difference HS and maximum for error difference H, that is, RP2 = R2H.So, HS represents minimum error difference between the environmental illumination and ABC optimized illumination and H represents maximum error difference between the environmental illumination and ABC optimized illumination.Accordingly, R2HS represents minimum power required for lighting system and R2H represents maximum power required for lighting system control.

Air Quality Fuzzy Controller.
The input of the air quality fuzzy controller is the error difference between the environmental air quality and the optimized air quality from the ABC optimizer.The output of the air quality is the required power for ventilation system.The status of the ventilation actuators is changed according to the error differences between the actual environmental parameters and the artificial bee colony optimized parameters in which the output of the ventilation fuzzy controller is the required power for the actuator status.The fuzzy rules for air quality fuzzy controller are as follows and are shown in Figures 18,19 In these rules,  3 represents the error difference between the environmental air quality and the ABC optimized air quality and this error difference is the input of air quality fuzzy controller.Based on this error difference, the air quality fuzzy controller generates the energy as its output represented by RP3 (required power 3) to provide it to the ventilation system control.LOW represents minimum error difference between the environmental air quality and ABC optimized air quality followed by OK, SH, LH, and HIGH.So, as we go from LOW towards HIGH, the error difference increases and vice versa.Accordingly, the required power (RP3) for ventilation control is minimum (RP3 = R3LOW) for error difference LOW and maximum for error difference HIGH, that is, RP3 = R3HIGH.So, LOW represents minimum error difference between the environmental air quality and ABC optimized air quality and HIGH represents maximum error difference between the environmental air quality and ABC optimized air quality.Accordingly, R3LOW represents minimum power required for ventilation system and R3HIGH represents maximum power required for ventilation system control.

Coordinator.
The coordinator takes the total power required for controlling the cooling/heating, lighting, and ventilation and provides the power available from the power sources.The total required power is computed by the following formula: where TRP is the total required power, RP1 is required power for cooling/heating system, RP2 is required power for lighting, and RP3 is required power for ventilation.
2.5.Actuators.These are the devices inside buildings that actually use the energy.Examples of these actuators are AC (for cooling), heater (for heating), refrigerator (for cooling), and freezer (for cooling).The status of the actuators is changed according to the error difference between the environmental parameters and the ABC optimized parameters.

Experimental Results and Discussion
All the experiments were carried out on Intel(R) core(TM) i5-3570 CPU @ 3.40 GHz with MATLAB R2010a installed on it.Figure 4 shows the user set temperature parameters, the environmental temperature parameters, and the temperature parameters after optimization by ABC. Figure 5 shows the user set illumination parameters, the environmental illumination parameters, and the illumination parameters after optimization by ABC. Figure 6 shows the user set air quality parameters, the environmental air quality parameters, and the air quality parameters after optimization by ABC.For each of the three parameters, if the value of the parameter is in the range of user comfort, the ABC does not make any change to the values of the parameter but when the values of the parameters are outside the comfort zone of the user, the ABC optimizes the values to bring them to the user comfort zone.The values of the parameters within the comfort zone for temperature, illumination, and air quality have been already discussed.
Figure 7 shows the comfort index values for both without optimization and after applying ABC optimization algorithm.It is evident from the figure that the comfort index values for optimized parameters are higher than that without optimization which shows that the ABC optimized parameters provide higher comfort index to the occupant.The figure also shows that there are some fluctuations in the comfort index value of ABC optimization but overall the comfort index value of ABC optimization is higher than that without optimization.
The second aim of the ABC algorithm is to minimize power consumption.This is achieved by minimizing the error differences between the user set parameters and the environmental parameters.show the power consumption for temperature, illumination, air quality, and total power consumption before the optimization and after ABC optimization.All the figures show that the power consumption has been minimized using ABC.The figures show that there are some fluctuations in power consumption using ABC algorithm but overall the consumption has been decreased.
The error difference between the user set temperature and the ABC optimized temperature is input to the temperature fuzzy controller and the output of the temperature fuzzy controller is the minimum required power for temperature.The cooling/heating actuator status is changed according to this error difference.The error difference between the user set illumination and the ABC optimized illumination is input to the illumination fuzzy controller and the output of the illumination fuzzy controller is the minimum required power for illumination.The lighting actuator status is changed according to this error difference.The error difference between the user set air quality and the ABC optimized air quality is input to the air quality fuzzy controller and the output of the air quality fuzzy controller is the minimum required power for ventilation.The air quality actuator status is changed according to this error difference.

Comparative Analysis of Optimization Results of Artificial Bee Colony with Genetic Algorithm and Particle Swarm Optimization
The authors in [1] applied genetic algorithm and particle swarm optimization to minimize the power consumption and maximize user comfort index using the same data set  applied in this proposed work.The authors have given the graphical representation for minimizing power consumption and maximizing user comfort.The power is consumed for temperature control and illumination control and the authors have computed air control.In this section, we compare the computed power consumed for temperature control, illumination control, and air quality control by artificial bee colony with genetic algorithm and particle swarm optimization as described by the authors.The power consumed for temperature control by artificial bee colony is more than the power consumed by genetic algorithm and particle swarm optimization whereas the power consumed for both the illumination control and the air quality control by artificial bee colony is less than the power consumed by both the genetic algorithm and particle swarm optimization.The total power consumed by artificial bee colony (ABC) is less than the power consumed by genetic algorithm (GA) and particle swarm optimization (PSO) as shown in Table 1.
It is evident from the facts and figures given by the authors in [1] and our proposed model that ABC consumes less power as compared to GA and PSO.The reason for this less power consumption is that the ABC generates more optimal parameters than both the GA and PSO.The artificial bee colony is also advantageous over genetic algorithm and particle swarm optimization in optimizing the parameters  in a smooth manner whereas there are more fluctuations in the parameters optimized by genetic algorithm and particle swarm optimization as described by the authors in [1].The second aim of the ABC optimization algorithm in this work is to maximize the user comfort index.The minimum value of comfort index achieved by ABC is more than the minimum value of comfort index achieved by both the genetic algorithm and particle swarm optimization which shows that the artificial bee colony is more efficient in maximizing user comfort index than the genetic algorithm and particle swarm optimization.

Conclusions
In this paper, the issue of maximizing user comfort and minimizing power consumption in residential buildings using artificial bee colony optimization algorithm and fuzzy controller has been addressed.The whole architecture of the proposed system consists of different components including environmental parameters (temperature, illumination, and air quality), ABC optimizer, comfort index, fuzzy controller, coordinator, and different types of actuators.The inputs to the ABC optimizer are environmental parameters (temperature, illumination, and air quality) and user set parameters (temperature, illumination, and air quality).The outputs of the ABC optimizer are the optimized temperature, illumination, and air quality parameters.The inputs to the fuzzy controllers are the environmental parameters and the ABC optimized parameters and the outputs of the fuzzy controllers are the minimum power required to set the environment according to user preferences.The coordinator calculates the total power required sent by the fuzzy controller and checks the availability of required power.The statuses of the actuators are changed according to this power sent by the fuzzy controllers.The user comfort index has been increased and the power consumption has been decreased.

Figure 4 :
Figure 4: User set, environmental and optimized temperature values.

Figure 8 :
Figure 8: Power consumption for temperature using ABC and without using ABC.

Figure 10 :
Figure 10: Power consumption for air quality using ABC and without using ABC.

Figure 11 : 1 Figure 12 :
Figure11: The total power consumption using ABC and without using ABC.

Figure 13 :
Figure 13: Output membership function for temperature (required power for temperature).

Figure 19 :
Figure 19: Output membership function for air quality (required power for ventilation).

Figure 20 :
Figure 20: Example of fuzzy rule applied to air quality.

Table 1 :
Power consumption comparison of ABC with GA and PSO.