Proceedings of the 1st IFAC Conference on Embedded Systems, Computational Intelligence and Telematics in Control - CESCIT 2012 3-5 April 2012. Würzburg, Germany
Model based predictive control of HVAC systems for human thermal comfort and energy consumption minimisation ? Pedro M. Ferreira ∗,∗∗,∗∗∗ Sergio M. Silva ∗∗∗ Ant´onio E. Ruano ∗∗,∗∗∗ ∗ Algarve
Science and Technology Park, Campus de Gambelas, Pav. A5, 8005-139 Faro, Portugal (e-mail:
[email protected]) ∗∗ Centre for Intelligent Systems, IDMESC, IST (e-mail:
[email protected]) ∗∗∗ University of Algarve, 8005-139, Faro, Portugal (e-mail:
[email protected]) Abstract: The problem of controlling a heating ventilating and air conditioning system in a single zone of a building is addressed. Its formulation is done in order to maintain acceptable thermal comfort for the occupants and to spend the least possible energy to achieve that. In most operating conditions these are conflicting goals, which require some sort of optimisation method to find appropriate solutions over time. In this work a model based predictive control methodology is proposed. It consists of three major components: the predictive models, implemented by radial basis function neural networks identified by means of a multi-objective genetic algorithm; the cost function that will be optimised to minimise energy consumption and provide adequate thermal comfort; and finally the optimisation method, in this case a discrete branch and bound approach. Each component will be described, and experimental results obtained within a classroom will be presented, demonstrating the feasibility and performance of the approach. Keywords: Predictive control; Neural networks; Thermal Comfort; Branch and Bound; Optimisation. 1. INTRODUCTION In European Union (EU) countries, primary energy consumption in buildings represents about 40% of the total energy consumption (Poel et al., 2007; Balaras et al., 2007; Parliament and Council, 2010), and, with variations from country to country, half of this energy is spent for indoor climate conditioning. It is estimated that the use of efficient energy management systems in buildings can save up to 8% of the energy consumption in the entire EU (Dexter, 1996). Around 83% of the EU dwellings were constructed before 1990 and about 50% of them before 1970 (Poel et al., 2007). Therefore it is of fundamental importance to control efficiently the existing HVAC systems, in order to decrease energy usage and increase compliance with the European Directive (2010/31/EU) on the energy performance of buildings (Parliament and Council, 2010). This paper proposes the application of a Model Based Predictive Control (MBPC) methodology formulated with the purpose of efficiently controlling existing HVAC systems in public buildings. The objective is the minimisation of the energy required to maintain a desired comfort level for the occupants. The perception of comfort is related to several environmental factors such as lighting, temperature and air quality, therefore being a multi-dimensional feature. In this work only the thermal comfort conditions aspect is addressed. 1.1 Thermal comfort The American Society of Heating Refrigerating and Air Conditioning Engineers (ASHRAE) proposed the thermal sensation ? The authors would like to thank the Portuguese National Science Foundation (FCT PTDC/ENR/73345/2006) for funding this work. The first author thanks the European Commission for the grant PERG-GA-2008-239451.
978-3-902661-97-5/12/$20.00 © 2012 IFAC
scale with the purpose of quantifying people’s thermal sensation (ANSI and ASHRAE, 2004). It uses a numerical coding with the following meaning: -3 for cold, -2 for cool, -1 for slightly cool, 0 for neutral, 1 for slightly warm, 2 for warm, and 3 for hot. An index, designated Predicted Mean Vote (PMV), was proposed by Fanger (1972) in order to predict the average vote of a large group of persons on this scale. The index depends on six factors: metabolic rate, clothing insulation, air temperature and humidity, air velocity, and the mean radiant temperature. The PMV index is employed in this work to predict the thermal comfort provided by the control system. 1.2 Predictive models MBPC requires the use of models to obtain predictions of controlled variables. The PMV index depends on air temperature and humidity which in turn are affected by the HVAC system and outside weather. Consequently, predictive air temperature and humidity models are required to forecast these quantities as functions of the HVAC controls and outside weather variables. Because of this dependency, models are also necessary for variables used as inputs to the inside air temperature and humidity models. For this purpose Radial Basis Function (RBF) Artificial Neural Networks (ANNs) were employed. Designing such models, involves determining the number of neurons and the set of relevant inputs to be used. This was accomplished by means of a Multi Objective Genetic Algorithm (MOGA) as described in Ferreira and Ruano (2011). 1.3 Model based predictive control In MBPC (Clarke et al., 1987) the controllers employ predictive plant models to obtain predictions of the future system be-
236
10.3182/20120403-3-DE-3010.00085
External HVAC units
Internal HVAC units in independent zones room 1
Communications, HVAC system interface, and data acquisition Wireless sensor network central node database Activity, temperature, humidity, mean radiant temperature, doors/windows state
room 2
Execution of models and control algorithms Control systems laboratory PC station - Predictive models - Control loop
Weather station - Solar radiation - Temperature - Relative humidity
room n
TCP/IP University Campus network
HVAC management PC station
LonWorks bus
Figure 1. Overview of the experimental set up used. haviour, which form the basis for computing the future control actions minimising a pre-defined objective function. Once the control actions are determined over a given prediction horizon, the first one is applied to the system, a strategy known as the receding horizon principle. Most times, existing HVAC systems are actuated manually by the building occupants using an operating unit which enables basic actions such as turning the system on or off, or setting a desired temperature set-point. The latter is commonly specified as an integer number within a restricted range, therefore defining a finite number of control alternatives. An approach to non-linear MBPC consisting of discretising the control space into an appropriate finite set of control actions and performing a search for the optimal future control trajectory within the available set of control options. In this case the MBPC problem may be solved by means of discrete optimisation methods. Branch-and-Bound (BB) has been proposed (Sousa et al., 1997) and applied in practice to this type of discrete (or discretised) non-linear MBPC problems (Roubos et al., 1999; Berenguel et al., 2004; Mendonc¸a et al., 2004; Ferreira and Ruano, 2008b; Ferreira, 2008), and are employed in this work. 2. EXPERIMENTAL SET UP The HVAC control experiments were conducted in three areas, each on a different floor, of the building used by the Faculty of Economics of the University of Algarve, in the south of Portugal. In total, 17 rooms are now equipped with wireless data acquisition devices and internal HVAC units which may be independently controlled and monitored. A weather station located in the campus provides air temperature (Tao ), air humidity (Hao ), and global solar radiation (Rsg ) measurements. All the elements involved are connected to the TCP/IP network, enabling a PC station in the control systems laboratory to monitor and control any of the rooms. Figure 1 provides an illustration of the system integration. CESCIT 2012 3-5 April 2012. Würzburg, Germany
2.1 Wireless sensor networks Each of the three areas has one Wireless Sensor Network (WSN) with sensors in all rooms to monitor the air temperature (Tai ), air humidity (Hai ), mean radiant temperature (Tmr ), the state of windows and doors (open/closed), and movement using a passive infra-red activity monitor. Tmr is measured by a temperature sensor enclosed in a matte-black sphere. The WSNs have a star topology, where each unit is collecting information once per minute and sending it to a central node with storage and database capabilities. Each node is composed of one Tmote Sky platform connected with the required sensors. This platform is an IEEE 802.15.4 standard compliant device that uses the TinyOs (1999) operating system, a component based operating system for low power wireless devices. 2.2 HVAC system The HVAC system is composed of a number of external units located on the building roof, at least one internal unit in each independent room with the corresponding operating unit, and a PC management station to which all the units are connected via a LonWorks communication bus. This station is able to monitor and control many aspects of all the HVAC system. Those of major interest for the experiments are: specifying a temperature set-point for a given room, switching the internal unit on or off, and disabling the operating unit so the occupants can not change the operation of the internal unit while experiments are being conducted. 3. PREDICTIVE MODELS All the models were implemented by RBF NNs whose inputoutput structure was identified by means of a MOGA. The NNs were trained using a Levenberg-Marquardt algorithm and a modified training criterion. A complete description of the model identification procedure and neural network training method is beyond the scope of this paper, the interested reader
237
Temperature (ºC)
Table 1. Input-Output structure for room climate models. Tai model input delays 0,1,6,7,8,10,11 0,1,2,7,9 2,3,4,5,8 – 7 0,1,4
Hai model input delays 1,6,8 0,1,4,6,7,8,9,10 – 3,5,6,8,11 6,8,11 0,1,2,3,6,9,10,11
Time (samples)
Figure 2. Sample of PRBS sequence applied to HVAC system and the resulting temperatures and humidities. should consult Fonseca and Fleming (1998); Ferreira et al. (2003, 2005); Ferreira and Ruano (2011) for the first and Marquardt (1963); Ruano et al. (1991); Ferreira and Ruano (2000); Ruano et al. (2002); Ferreira et al. (2002); Ruano et al. (2005) for the second. Three non-linear auto-regressive predictive models were selected by MOGAs for Tao , Hao , and Rsg . These are employed when forecasts of these quantities become necessary to obtain temperature and humidity model predictions for one room. To obtain predictive air temperature and humidity models for a specific room, the first step was the preparation of control input signals for the HVAC internal unit. For that, the room was controlled randomly by varying the temperature set-point within the range [18, 19, . . . , 27] or by switching off the unit for varying time intervals. This task was accomplished by means of Pseudo Random Binary Signals (PRBS) as described in Ferreira and Ruano (2008a). Using this technique 4416 data patterns were generated, corresponding to approximately 15 days of data at 5 minutes sampling interval. Different timesof-day were covered and distinct days (concerning the outside weather) were considered, all during early summer. Figure 2 shows a sample PRBS sequence of set-points and the resulting room air temperature and relative humidity. Using the MOGA and the techniques referenced above, predictive models for the room air temperature and humidity were selected. The first uses 14 neurons, the second uses 11. The input variables and delays used by the selected models are detailed in table 1. As expected there is some delay from the outside variables to the room climate models, as opposed to the inside variables and HVAC temperature set-point. Within the model identification procedures the models were evaluated for long-term prediction capabilities using a subset of data. They were simulated for prediction over a horizon of 48 steps, which corresponds to 4 hours. Figure 3 illustrates the predictive performance of the selected models by presenting the evolution of the root mean square of the error taken at each instant within CESCIT 2012 3-5 April 2012. Würzburg, Germany
Relative humidity (%)
Relative humidity (%)
Temperature (ºC)
Input variable Tai Hai Tao Hao Rsg Tsp
Prediction horizon (samples)
Figure 3. Evolution of RMS error over the prediction horizon with model identification data. the prediction horizon. The minimum error prediction approach was followed, which means that measured values were used every time that future values of exogenous variables were necessary at the model inputs. Considering a 4 hours prediction horizon, the error values may be considered quite small and adequate for the purpose of inclusion in a MBPC scheme. 4. DISCRETE MBPC USING BRANCH AND BOUND As mentioned in the introduction, when the control space is discretised it becomes possible to employ search techniques such as the BaB method in order to find an optimal sequence of control actions that minimises a cost function. BaB methods are structured search techniques commonly used to solve complex discrete optimisation and combinatorial programming problems by dividing them into smaller sub-problems using a tree structure. In a discrete MBPC formulation, the global problem is to find the optimal sequence of control actions over the prediction horizon. The choice of an adequate control action at every instant of the prediction horizon constitute the various sub-problems to be solved. Assuming A is a vector of n possible control actions, at the initial step of the optimisation, in time instant k, the BaB method creates the initial tree node corresponding to the decision of what action should be taken at that time step. As n control combinations are available, the corresponding number of branches is created by computing the predicted system output, yˆ (k + 1), and for each branch the cost function, J (k + 1), is evaluated. In the
238
next prediction step, for k + 1, the process is repeated for the nodes created in each branch resulting from the previous step, creating n2 new branches. The whole process is repeated until time instant k + PH − 1 is reached, where the number of created branches is nPH . The exponential nature of the whole process is clear and even for a small number of control options and not too large prediction horizons, the number of available solutions quickly becomes prohibitively large. The optimal solution is chosen by selecting the control trajectory, U (k) = [u (k) u (k + 1) · · · u (k + PH − 1)], that minimises the estimated accumulated cost from time instant k + 1 to k + PH: k+PH
J1:PH (k) =
∑
J (i)
(1)
i=k+1
The description above assumes unrestricted branching and results in an enumerative search over the entire space of control solutions spanned by A over the prediction horizon PH. As already pointed out this type of search easily becomes computationally prohibitive and in order to reduce the number of solutions enumerated, two approaches are taken: the use of bounds to restrict branching and performing the search over a control horizon, CH < PH. As formulated in Sousa et al. (1997), two bounds are employed: an upper bound on the total cost from instant k + 1 to k + PH, and a lower bound on the cost from instant k + i to k + PH. At time step i in the optimisation a branch is followed only if the cumulative cost from step 1 to step i − 1, J1:i−1 (k), plus the lower bound on the cost from i to PH, Jˆi:PH (k), is smaller than the upper bound on the total cost, Jˆ1:PH (k). Thus the branching rule is given by: J1:i−1 (k) + Jˆi:PH (k) < Jˆ1:PH (k) (2) This rule may be further decomposed by noting that its second term on the left hand side of the condition equals the cost of using a control profile A j at step i, J (k + i)|u(k+i−1)=A j , plus the estimated cost from step i + 1 to PH: J1:i−1 (k) + J (k + i)|u(k+i−1)=A j + Jˆi+1:PH (k) < Jˆ1:PH (k) (3) When the rule does not hold the branch is not followed because it does not contain an optimal solution, thus pruning all the tree nodes that would be created from the current node. The bounds estimation method and availability are problem dependent, although a basic approach is suggested by Sousa et al. (1997): at each instant k, before the optimisation starts, a first search on the tree of possible solutions is done by successively choosing the control action giving the smallest values of J (k + i)PH i=1 , a search usually called ”greedy”. The total cost found is the initial estimated upper bound, Jˆ1:PH (k). If at a later stage in the optimisation a smaller value, is found it replaces the previous one. Regarding the lower bound, Jˆi+1:PH (k), if an adequate estimate may not be computed, it is suggested that it is set to 0 for all steps i of the optimisation. In the typical formulation, branching is only performed until the control horizon is reached, therefore the remaining cost must be estimated, for example, using the greedy approach just described for all instants from CH + 1 up to PH. It’s worth noting some advantages of the BaB method over other non-linear optimisation techniques when applied to MBPC: • The optimal solution is always found. This guarantees that the controller is optimal in the discrete space of control alternatives. Importantly, no assumptions need to be made on the formulation of the cost function. • The method implicitly deals with constraints without being negatively affected. Constraints will most certainly CESCIT 2012 3-5 April 2012. Würzburg, Germany
improve the efficiency of bounding by eliminating those alternatives that lead to constraint violation. • As opposed to other iterative optimisation methods, the algorithm outcome is not negatively influenced by a poor initialisation, although the time spent to find the optimum may be greater. 5. PROBLEM FORMULATION The HVAC control problem, for maintenance of occupants thermal comfort while minimising energy spent, may be formulated as follows. The cost of selecting one control action, Tsp , at instant i is defined as, Tsp − Tao , Tsp > 0 Jˆ(i) = 1 + (4) λ 0 , Tsp = 0 where Tsp = 0 encodes the action of switching off the HVAC unit. The λ scaling factor is used only to make that term small when compared to 1. In practice it should be chosen by taking into account an estimate of the maximum value of Tsp − Tao . The term itself reflects the notion that the higher the difference Tsp − Tao , the bigger is the energy required to achieve Tsp . Using the definition (4) the HVAC control problem is simply, ! k+PH minimise J1:PH (k) = Jˆ(i) ∑ U(k) , (5) i=k+1 U(k) ˆ (i) < ΘT subject to Θ ˆ (i) is the estimated PMV index resulting from selecting where Θ the set-point Tsp at time instant i. ΘT is a threshold value for the PMV index which should guarantee acceptable thermal comfort for the occupants of the space. The ASHRAE standard recommends a value of 0.5 which predicts that less tahn 10% of the occupants will be dissatisfied. 6. RESULTS Using the methodologies described in previous sections, a number of experiments have been carried out to test the functionality and assess the correctness and robustness of the control system. Future work will be devoted to the assessment of the energy savings achieved. The results that will be presented and discussed were obtained in a classroom equipped with computers, where students have a number of courses on different computer science topics. After making a number of systematic measurements on the air velocity within the room for different settings of the HVAC fan speed, it was concluded that, excluding the vicinity of the air ducts, the velocity was on average below 0.1ms−1 . When computing the PMV index, a value of 0.65 was used for the clothing insulation and a value of 1.0 (Met) for the metabolic rate. Regarding the MBPC system parameters, the control horizon, CH, was set to 5 samples (25 minutes) and the prediction horizon to 48 samples (4 hours). Figure 4 presents one situation of a hot summer day where the room was in use when the system started operation. The initial thermal comfort index, Θ, is above the 0.5 threshold and the HVAC takes almost 2 hours at 18 oC set-point to bring the room to acceptable thermal comfort conditions. Beyond this point, with the room with no load, the system is able to maintain the desired conditions by using higher set-points and by switching off the HVAC when possible, therefore consuming less energy.
239
Activity
Predicted Mean Vote
Relative humidity (%)
Temperature (ºC)
Activity Relative humidity (%)
Temperature (ºC) Predicted Mean Vote
Time (hours)
Time (hours)
Figure 4. HVAC control for thermal comfort. Room is in use when system starts.
Figure 5. HVAC control for thermal comfort. Pre-emptive control improves performance. Colours and labelling were used as in Fig. 4.
The room air temperature model does not have an input accounting for the room usage, consequently the control algorithm is not able to foresee and act pre-emptively to counteract the strong impact caused by a class entering the room. Figure 5 presents a second situation, on an even slightly hotter day, where after a first time span of room occupancy ending with acceptable thermal conditions, the system was able to maintain those conditions on a second class with less effort than that of the first case. This would be the expected behaviour if the system could predict the room occupancy. Regarding the room air temperature and relative humidity models, it may be seen that the predictions are quite accurate, resulting in a good forecast of the PMV index and correct operation of the system through time. This is confirmed by the results in figure 6, which give good indications regarding robustness. The system operated for about 48 hours maintaining good thermal conditions and showing excellent room climate modelling. These results suggest that the outside weather models are also of good quality. If they would not provide sufficiently accurate predictions the room climate models accuracy would suffer. 7. CONCLUSIONS AND FUTURE WORK A model based predictive control methodology using the branch and bound method was formulated and proposed to control existing HVAC systems in buildings. To the extent the models accuracy allow, the formulation guarantees that an optimal control trajectory is computed in order to maintain a desired level of thermal comfort and to minimise the energy spent in doing so. The system is conceptually simple and may easily integrate with existing HVAC systems. The feasibility and robustness have been demonstrated experimentally by presenting CESCIT 2012 3-5 April 2012. Würzburg, Germany
results obtained in one class room. Future work will focus on improving the room air temperature predictive model by adding an input for the occupancy schedule, and on quantifying the energy savings achieved. REFERENCES ANSI and ASHRAE (2004). Thermal environmental conditions for human occupancy. Balaras, C., Dascalaki, E., Gaglia, A., Droutsa, K., and Kontoyiannidis, S. (2007). Energy performance of european buildings. In Proceedings of the Energy Sustainability Conference, 387–396. Long beach, USA. Berenguel, M., Rodr´ıguez, F., Aci´en, F.G., and Garc´ıa, J.L. (2004). Model predictive control of ph in tubular photobioreactors. Journal of Process Control, 14, 377–387. Clarke, D.W., Mohtadi, C., and Tuffs, P.S. (1987). Generalized predictive control – part i. the basic algorithm. Automatica, 23(2), 137–148. Dexter, A. (1996). Intelligent buildings: fact or fiction? HVAC&R Research, 2(2), 105–106. doi:10.1080/10789669. 1996.10391336. Fanger, P.O. (1972). Thermal comfort: analysis and applications in environmental engineering. McGraw-Hill, New York. Ferreira, P.M. (2008). Application of computational intelligence methods to greenhouse environmental control. Ph.D. thesis, Faculty of Sciences and Technology, University of Algarve, Faro, Portugal. Ferreira, P.M., Faria, E., and Ruano, A.E. (2002). Neural network models in greenhouse air temperature prediction. Neurocomputing, 43(1-4), 51–75. doi:10.1016/S0925-2312(01) 00620-8.
240
Activity Relative humidity (%)
Temperature (ºC) Predicted Mean Vote
Time (hours)
Figure 6. HVAC control for thermal comfort. About 48 hours of operation. Colours and labelling were used as in Fig. 4. Ferreira, P.M. and Ruano, A.E. (2000). Exploiting the separability of linear and non-linear parameters in radial basis function neural networks. In IEEE Symposium 2000: Adaptive Systems for Signal Processing, Communications, and Control, 321–326. Canada. doi:10.1109/ASSPCC.2000.882493. Ferreira, P.M. and Ruano, A.E. (2008a). Application of computational intelligence methods to greenhouse environmental modelling. In (WCCI 2008) IJCNN 2008. (IEEE World Congress on Computational Intelligence). 2008 IEEE International Joint Conference on Neural Networks, 3582–3589. doi:10.1109/IJCNN.2008.4634310. Ferreira, P.M. and Ruano, A.E. (2008b). Discrete model based greenhouse environmental control using the branch & bound algorithm. In Proceedings of the 17th IFAC World Congress, volume 17. Seoul, Korea. doi:10.3182/ 20080706-5-KR-1001.00494. Ferreira, P.M. and Ruano, A.E. (2011). Evolutionary multiobjective neural network models identification: Evolving task-optimised models. In New Advances in Intelligent Signal Processing, volume 372/2011 of Studies in Computational Intelligence, 21–53. Springer. doi:10.1007/ 978-3-642-11739-8 2. Ferreira, P.M., Ruano, A.E., and Fonseca, C. (2003). Genetic assisted selection of rbf model structures for greenhouse inside air temperature prediction. In IEEE Conference on Control Applications, 576–581. Istambul, Turkey. doi:10. 1109/CCA.2003.1223500. Ferreira, P.M., Ruano, A.E., and Fonseca, C. (2005). Evolutionary multi-objective design of radial basis function networks for greenhouse environmental control. In The 16th IFAC World Congress on Automatic Control, volume 16. Prague, Czech Republic. doi:10.3182/20050703-6-CZ-1902.00871. Fonseca, C. and Fleming, P. (1998). Multiobjective optimization and multiple constraint handling with evolutionary algorithms i: A unified formulation. IEEE Transactions on Systems, Man and Cybernetics - Part A: Systems and Humans, 28(1), 26–37. doi:10.1109/3468.650319. CESCIT 2012 3-5 April 2012. Würzburg, Germany
Marquardt, D.W. (1963). An algorithm for least-squares estimation of nonlinear parameters. Journal of the Society for Industrial and Applied Mathematics, 11(2), 431–441. Mendonc¸a, L.F., Sousa, J.M., and S´a da Costa, J.M.G. (2004). Optimization problems in multivariable fuzzy predictive control. International Journal of Approximate Reasoning, 36, 199–221. Parliament, E.U. and Council, E.U. (2010). On the energy performance of buildings. doi:10.3000/17252555.L 2010. 153.eng. Poel, B., van Cruchten, G., and Balaras, C.A. (2007). Energy performance assessment of existing dwellings. Energy and Buildings, 39, 393–403. doi:10.1016/j.enbuild.2006.08.008. Roubos, J.A., Mollov, S., Babuˇska, R., and Verbruggen, H.B. (1999). Fuzzy model-based predictive control using takagisugeno models. International Journal of Approximate Reasoning, 22, 3–30. Ruano, A., Jones, D., and Fleming, P. (1991). A new formulation of the learning problem of a neural network controller. In Proceedings of the 30th IEEE Conference on Decision and Control, volume 1, 865–866. doi:10.1109/CDC.1991. 261439. Ruano, A.E., Ferreira, P.M., Cabrita, C., and Matos, S. (2002). Training neural networks and neuro-fuzzy systems: A unified view. In Proceedings of the 15th IFAC World Congress, volume 15. doi:10.3182/20020721-6-ES-1901.00722. Ruano, A.E., Ferreira, P.M., and Fonseca, C. (2005). An overview of non-linear identification and control with neural networks. In A.E. Ruano (ed.), Intelligent Control Using Soft-Computing Methodologies, volume 70 of Control Series, 37–87. IEE Publishing. Sousa, J.M., Babuˇska, R., and Verbruggen, H.B. (1997). Fuzzy predictive control applied to an air-conditioning system. Control Engineering Parctice, 5(10), 1395–1406. TinyOs (1999). Tinyos operating system. URL http://www. tinyos.net/.
241