NONLINEAR MODEL PREDICTIVE CONTROLLER FOR HEATING SYSTEM PIOTR BANIA1 WOJCIECH GREGA2 Department of Automatics, AGH University of Science and Technology, 30-059 Kraków, Poland, Al. Mickiewicza 30,
[email protected],
[email protected] Abstract. The principle of the energy saving algorithm in buildings is based on lowering the night-time temperature and increasing (preheating) it in the morning. One important problem of this strategy consists in keeping peek demand of energy below the maximum power of the central energy source. A model-reference nonlinear predictive control algorithm is studied and the effects of peak power demand reduction are compared with linear control method. Stability of the predictive control system is analyzed. Key Words. Predictive control, heating systems 1. INTRODUCTION Adequate control of energy consumption and distribution is one of the most significant means of power consumption optimization, besides methods such as thermal insulation of buildings. Energy consumption for heating purposes accounts for a significant part of the budgets of individual and collective users. This increases the importance of issues related to the monitoring of heating energy flows, analysis of flow parameters, verification of fees and, in the first place, minimization of energy consumption [1], [2]. Early publications dealing with heat control focused on proportional-plus-integral (PI) controllers. More recently, a number of advanced HVAC control methodologies have been proposed. Zaheer-Uddin [3] used linear models in designing controllers using optimal theory and adaptive methods. In simulation tests, the performance of the controllers in response to disturbances emphasized the benefits gained by advanced control techniques.
Optimal linear quadratic Gaussian (LQG) and optimal preview controllers, regulating building and greenhouse temperature and humidity, were developed and verified, both in simulation and experimentally [4]. During the last years other control techniques such as linear predictive algorithms have been successfully applied [5]. More recently, neural networks and fuzzy controllers [6] have been proposed as a means of implementing adaptive controllers for heating system control. As with all controllers adapting within a control loop, ensuring the stability of the system is essential. A technique based upon the synthesis of robust control theory and reinforcement learning [7] has been proposed by several authors for resolving this issue. The system under investigation is the heat distribution network servicing from the central heating substation a number of buildings of the AGH University of Science and Technology campus in Kraków. During the heating season the buildings are consuming up to 20 GJ/h. The demand depends, in the first place, on the outdoor temperature and time of the day or season but also on the accumulation capacity of the heating system. The control of a
heating system is aimed at minimizing the difference between the current demand for heating energy and the supply. The core principle of the energy saving algorithm is based on lowering the night-time temperature and increasing (preheating) it in the morning. Increasing the temperature causes energy losses but reinstates thermal comfort in the heated facilities. An important problem of this strategy consists in keeping peek demand of power consumption below the maximum power of the central energy source, in order to avoid high peak demands (Fig.1).
uzco – related position of the main input valve [0100%], cw – specific heat of water 0.00418 [GJ t-1 K-1], P – temporary power consumed by the building system, Ts – sampling period . uzco
Fco Tpco
saturation
Iinput valve Tco
P Tpom
P o w e r c o n s u m p t io n C O [ G J / h ]
20
model of the building and heating installation
P ea k d em an d
18 16 14 B1(z)
12
A(z) GFzco
Fco
10 8
cw
6
Product
B2(z)
4
Tco
A(z) GTzco
Tpom
A(z) GTpom
P
Tpco
2 0
0
1
2 3 4 5 2 0 0 2 .0 1 .2 8 0 0 :0 0 - 2 0 0 2 .0 2 .0 3 2 3 :5 9
6
B3(z)
7
Fig. 1 Power consumption, all buildings.
This can be achieved by application of a proper local control algorithms and adequate coordination between supervisory and local control actions. The focus of the of paper is development of the stable, model-based predictive algorithm controlling power consumption for the separate buildings during the preheating period. The remaining parts of the paper are outlined as follows. The simplified model of the building is described in section II. Section III presents results for controlling the building using linear controller. The main results are included in Sections IV and V: development of predictive controller (IV) and stability analysis (V). Simulation and experimental results are given in section VI. 2. DIRECT CONTROL: MODEL OF THE BUILDING The building under consideration includes about 80 office rooms and five big laboratories and lecture rooms. Inflow of the heating water is controlled by the input valve (uzco). Temperatures of the input and output water as well as flow of the water are measured and are transmitted to the controller. The model of the building consists of the linear and nonlinear components (Fig.2). The following notations are used in Fig.2, and next in the related formulas Tzco – supply water temperature [°C], Tpco – return water temperature [°C], Tpom – avarage room temperature [°C], Fco – flow of the heating water [t/h],
Fig.2. Models of heating installation and of the building.
The linear part of the building model is described by a standard ARMA discrete model T pco (i ) =
B B1 − k1 B z Fco (i ) + 2 z − k 2 Tzco (i ) + 3 z − k 3T pom (i ), A A A
(1) 1 − nB1 A = 1 + a1 z −1 + ... + anA z − nA , B1 = b01 + b11 z −1 + ... + bnB , 1z 2 − nB 2 3 − nB 3 B2 = b02 + b12 z −1 + ... + bnB , B3 = b03 + b13 z −1 + ... + bnB . 2z 3z
The following structure of the model was assumed for this application: nA=2, nB1 = 2, nB2 = 2, nB3 = 2, k1 = 2, k2 = 1, k3 = 6, Ts = 10 min, where the parameters of the polynomials were estimated with the Prediction Error Method [8], and are given by the following expressions A = 1 - 1.731 z -1 + 0.753 z -2 , B1 = 0.2111 - 0.3024 z -1 + 0.1 z -2 , B2 = 0.1171 - 0.1265 z - 1 + 0.0217 z - 2 , B3 = 0.0564 - 0.0880 z -1 + 0.0392 z - 2 .
The polynomials A, B1, B2, B3, are asymptotic stable i.e. theirs roots are in the unit circle. The valve nonlinear characteristic was modeled by the following function FCO (u ) =
A1 − A2
1 + (u / u 0 )
p
+ A2
(2)
where u is % of maximal flow of the main input valve and A2=10.22443, u0=74.0276, p=8.92594. Therefore, the power consumption of the building during i step is modelled by P(i ) = Fco (i )c w (Tzco (i ) − T pco (i )) .
(3)
Results of the model verification using one-step prediction of the power consumption have shown good performance of the model. 2.1. Steady-state characteristic of the building Analysis of the steady-state process data have given information about power consumption of the building, as the function of outdoor temperature (Table 1). Table 1. Steady-state power consumption of B1 building Average outdoor temperature [°C] 5÷10 0÷5 -5÷0 < -5
Steady-state power consumption, for 19 °C indoor [GJ/h] 0.2 0.5 0.7 Pmax
R = 1.0000 - 1.8960 z -1 + 0.8960 z -2 , S = 25297.78 z -1 - 16264.18 z - 2 ,
T = 10037.34 - 1003.73z-1 . Fig. 3 shows results of the controller operation. The reference action of the control loop is satisfied. The controlled output P reaches the set-point when there is a change of input variable, however peak demands during the morning preheating period are very high. It was not possible to reduce them by settings of the controller parameters. The total peak demand accumulated from buildings gives the effects presented in Fig.2. Therefore, one way of morning peak demand reduction of the central energy source is a reduction of the peak demand of separate buildings, by using more sophisticated local control algorithm. 0.5
The data from Table 1 will be used as the set-points for controller action.
0.4 P 0.3 [GJ/h] 0.2
3. GENERALIZED DIGITAL CONTROLLER FOR LINEARIZED MODEL
0.1 0 100
The linearized, simplified version of the model (1), (2) was assumed in the form [9] A = 1 + a1 z −1 + a 2 z − 2 , B1+ = b0 + b1 z −1 , Ag = 1 − z, −1 1, i = 1 δ (i ) = 0, i > 1. P(i ) =
B1+ d u (i ) + δ (i ), A Ag
where d
δ (i) term was used for modeling of the
Ag deterministic
disturbances
with
the
generation
S T P(i ) + Pref (i ), R R R = Ag B1+ , S = A0 Am − AAg , T = A0 Bm .
(4)
Pref is a reference power calculated from table 1. If the design parameters of the closed-loop system were assumed as A0 = 1 − αz −1 , α = 0.1, Am = 1 − qz −1 , q = 0.5, Bm = 1 − q,
the parameters of the controller were calculated as
500
600
700
800
900
1000
0.8 [GJ/h] 0.6
0.2
u (i ) = −
400
During the experiments it has been also observed, that the linear controller is not able to cope with changing temperature of supply water, saturation of the control signal and fast changing of the reference signal. Consequently, stability of the closed loop system can be lost. This effect is presented in Fig.4.
main input valve. In this case the identification procedure gives
The following generalized digital control algorithm was applied [10].
300
Fig. 3. Power consumption for single building, daily behavior (experiment).
f 0.4 e r
A = [1.00, -0.86], B1+= 10-4 [ 0.4981, -0.4463].
200
i
Ag , u is % of maximal flow of the
polynomial
P
0 48
P Pref
50
52
54
56
58
60
Fig. 4. Oscillations observed after step changing of Pref.
4. PREDICTIVE CONTROLLER It is assume that steady-state, set point power consumption is know a priori in this application. Therefore, nonlinear predictive control seems to be an excellent method in this case [11], [12]. First step is to construct models for disturbances that permit a proper formulation and efficient solution of the prediction control problem. The disturbances under consideration are: room temperature (Tpom) and supply water temperature Tzco. It is assumed for the discrete model (1) that the average room temperature (Tpom) is a slow varying variable. Experiments have shown that change of 20±3°C in the rooms as a result of power control action can be observed in time
longer than several hours. Therefore, this dynamics can be neglected and instead of the term B3 ( z ) − k the simplified expression z Tpom (i ) A( z ) B3 (1) T pom (i ) ≈ k p T pom (i ) was used. A(1) Let Tb (i ) = [Tzco (i − N b ), Tzco (i − N b + 1),...., Tzco (i )] be a vector of the measured values of the supply water temperature. Based on the data available at time i, the polynomial prediction Wb (k ) of supply water 3
k = i − N b , i − N b + 1,...., i is constructed in the form: ˆ ˆ , for the Tzco (i + 1) = Wb (i + 1),...,Tzco (i + N w ) = Wb (i + N w ) time horizon N w . The polynomial Wb (k ) is of the third order in this case, calculated by least-square approximation method. The same polynomial approximation procedure was applied for reference power Pref(i). The user-defined set points (Table 1) were considered. For solution of the prediction control problem the following time horizons were assumed temperature
for
Nb =30, Nw = 4, for k>i+Nw, Tˆzco (i + k ) = Tˆzco (i + N w ) . The following state and output vector for the system (1), (2), (3) were defined x1 (i ) = Tpco (i ), x2 (i ) = Tpco (i − 1), x3 (i ) = Fco (i − 1),
x4 (i ) = Fco (i − 2), x5 (i ) = Fco (i − 3), x6 (i ) = Tzco (i − 1), x7 (i ) = Tzco (i − 2), x8 (i ) = u (i − 1), y (i ) = P(i ) , w(i ) = Tzco (i ), T pom (i ), Pref (i ) T ,
[
where ϕ (u ) is nonlinear model of the valve (2). The process under control (1), (2), (3) can be described, for i > t , by the discrete time, nonlinear model
[
]
x1 (i + 1) = − a1 , − a 2 , b01 , b11 , b21 , b12 , b22 , 0 x(i ) + + b02 w1 (i ) + k p w2 (i ), x 2 (i + 1) = x1 (i ), x 3 (i + 1) = ϕ ( x8 (i )), ( ) ( ) x 4 i + 1 = x3 i , x 5 (i + 1) = x 4 (i ), x 6 (i + 1) = w1 (i ), x 7 (i + 1) = x 6 (i ), x8 (i + 1) = u (i ), y (i ) = ϕ ( x8 (i ))c w (w1 (i ) − x1 (i )).
(5)
subject to input constraints u (i ) ∈ [0, 100] . The last state equation models one-step delay necessary for predictive control calculation. Model (5) can be re-written in more compact form as x(i + 1) = f ( x(i ), u (i ), w(i )) , y (i ) = g (x(i ), u (i ), w(i )) ,
e(i ) = h(x(i ), u (i ), w(i )) = w3 (i ) − y (i )
To have the control structure which guarantees asymptotic zero error regulation the integrator is plugged into the model [12] z (i + 1) = z (i ) + δu (i ) ,
where δu (i ) is the control increment. The control is now u (i ) = z (i ) , and model (5) can be rewritten as x 1 (i + 1) = f 1 (x 1 (i ), δu (i ), w(i )) , y (i ) = g 1 (x 1 (i ), δu (i ), w(i )) ,
(
)
e(i ) = h 1 x 1 (i ), δu (i ), w(i ) = w3 (i ) − y (i ) ,
(6) (7) (8)
where x1 (i )T is the extended state vector in the form x 1 (i ) = [ x (i ) z (i )]T , T
and f1, g1, h1 are the appropriate functions re-defined for the extended state vector. Let wˆ (i ) = [w(i ), wˆ (i + 1), wˆ (i + 2), ..., wˆ (i + N p )]T denotes prediction of disturbance obtained by the method described in the beginning of this section. The input constraints given as 0 ≤ z (i + k ) ≤ 100, k = 1,2,...N c can be reformulated to the incremental form and given as
(100 − z (i ))I Nc where J , − J δu i , Nc −1 ≤ z (i )I Nc
]
Fco (i ) = ϕ (u (i − 1)) ,
where f(x,u,w), g(x,u,w) are the appropriate functions defined by (5). The control error is defined as
1 1 J = 1 M 1
(9)
0 0 L 0 1 1 1 0 L 0 , and , I Nc = 1 1 1 0 M M O 0 M 1 1 1 L 1 ( Nc , Nc ) ( Nc ,1)
δu i , Nc −1 = [δu (i ), δu (i + 1), δu (i + 2), ..., δu (i + N c − 1)]T . For the system (6) - (8) the predictive control problem was defined as problem of minimizing
(
)
Np
N c −1
Q δui , Nc−1 , x1 (i ), wˆ (i ) = ∑ (e(i + k ) + d (i )) + ∑ ρ (k )δu 2 (i + k ) + 2
k =1
k =0
+ V ( x1 (i + N p )) 2 V ( x1 (i + N p )) = x1 (i + N p ) − x 1 ( w ) , P
x1 (i + N p ) ∈ Ω , under the constraint (9), with the control computed as u (i ) = u (i − 1) + δu (i )
were
N p = 6, N c = 4, ρ (k ) = 0,001 . Introduction of
terminal
cost
V ( x1 (i + N p ))
and
terminal
constraint Ω is standard technique described in [14]. 5. STABILITY ANALYSIS The stability of the closed – loop system can be proved after adding to cost functional the terminal penalty term and/or by introducing the terminal constraints [12, 13,14].
k ≥ i + N p signal w(i+k) is known and constant w(i + k ) = w .
From (5) we have for y (k ) = w3 : ϕ ( x8 )c w ( w1 − x1 ) = w3 , x1 = k1ϕ (u ) + k 2 w1 + k 3 w2 ,
x2 = x1 , x3 = ϕ (u ) , x4 = ϕ (u ) , x5 = ϕ (u ) , x6 = w1 , x7 = w1 , x8 = u ϕ (u )c w ((1 − k 2 ) w1 − k 3 w2 − k1ϕ (u )) = w3 . From these equations we can calculate unique u and x , hence the assumption A.3 holds. Stability of the closed loop system follows from Theorem 1.
6. SIMULATION RESULTS AND EXPERIMENTS
Assumption A.1 For
1
Assumption A.2 Let x ( w ), u ( w ) denote an equilibrium of (6), (7), (8) and
A=
∂f 1 ∂f 1 , , B = ∂x1 x1 ( w ),u ( w ) ∂u x1 ( w ),u ( w )
C=
∂h1 . The linear system (A, B, C) is ∂x1 x 1 ( w ),u ( w )
stabilizable, detectable and does transmission zeros equal to one.
not
posses
Assumption A.3 Consider system (6), (7), (8) with δu (k ) = 0 , ∀k ≥ i ; if y (k ) = w3 , ∀k ≥ i , then
The performance of the predictive controller is shown in Figures 5-8. By comparing the reference and actual response it can be seen that tracking performance is very good and steady-state error is reduced to zero. Fig. 5 (simulation) demonstrate how the peak-demands are reduced. Experimental results are show in Fig. 6-8. Fig. 6. illustrates tracking capability of the controller. Fig. 7 demonstrates the control action in case of saturation of the control signal. The tracking error observed during first 12 h of the experiments results from too low temperature of supply water. However, the system is stable opposite to the behavior of the linear controller, Fig. 4. 0.4 P
x (t ) = x ( w ) . 1
0.3 P [GJ/h]
1
P
0.2
Theorem 1 [12] Under assumption A.1, A.2, A.3
ref
0.1
1
x ( w ) , is an exponentially stable equilibrium point
0 0
1
2
3
4
5 t [h]
6
7
8
9
10
5 t [h]
6
7
8
9
10
for the system (6), (7), (8). 60 u 55
T
zc o
,[C] u[% ]
Proof: Linearization of the model (6), (8) have the form
− a1 1 0 0 A= 0 0 0 0
− a2 0 0 0
b01 0 0 1
b11 b21 0 0 0 0 0 0
b12 0 0 0
0 0 0 0
0 0 0 0
1 0 0 0
0 0 1 0
0 0 0 0
B = [0 0 0 0 0 0 0 1] ,
b22 0 0 0 0 ϕ ' (u ) 0 0 , 0 0 0 0 0 0 0 0
[
An analysis of the model matrices gives the following result. Pair (A,B) is stabilizable but not controlable, (A,C) is detectable but not observable. Assumption A.2 is fulfill for system (6), (8).
40
30 0
1
2
3
4
Fig.5. Tracking of the constant desired power (Pref). At t=6h 40min the a2 coefficient of the valve model was disturbed (1.1a2) to demonstrate the integral action of the controller. 0.9 0.85 P re f 0.8 0.75
[GJ/h]
]
Tz c o 45
35
T
C = cw ϕ (u ) 0 0 0 0 0 0 ϕ ′(u )( x11 − w1 ) .
50
0.7 P
0.65 0.6 0.55 0.5 0.45 0
20
40
60
80 t [h]
100
120
140
Fig. 6. Experiment results. Tracking of the desired power (Pref).
160
Temperature Controllers for intelligent Buildings, Building and Environment, 28(3), July 1993, pp. 311-322.
100 95 90
[4] Tap F., Willigenburg L.G., Straten G.: Receding Horizon Optimal Control of Greenhouse Climate Based on the Lazy Man Weather prediction, 13th IFAC World Congress, San Francisco, 1996, pp. 387 – 392.
85
[%]
80 75 70 65 60 55 50 0
20
40
60
80 t [h]
100
120
140
160
Fig. 7. Experiment results. Controller action.
[5] Lute P., van Paassen D.: Optimal Indoor Temperature Control Using a Predictor, IEEE Control Systems, 12, 1995, pp. 4-9. [6] Morel N. A., Bauer M. B., El-Khoury M., Krauss J.: Neurobat, A Predictive And Adaptive Heating Control System Using Artificial Neural Networks, International Journal of Solar Energy, 21, April 2001, pp. 161-201.
75
70
Tzco
65
[7] Kasahara M., Matsuba T., Kuzuu Y., Yamazaki T., Hashimoto Y., Kamimura K., Kurosu S.: Design and Tuning of Robust PID Controller for HVAC Systems, ASHRAE Transactions, 105(2): 1999, pp.154-166.
[C]
60
55
50 Tpco 45
[8] www.mathworks.com, Identification Toolbox
40 0
20
40
60
80 t [h]
100
120
140
160
Fig. 8. Experiment results. Inlet and outlet temperature.
6. CONCLUSIONS A model-based, nonlinear predictive controller for heating system of commercial buildings has been developed and tested. Nonlinear model of the process was composed of nonlinear steady-state model and linear dynamic model. It has been shown that the proposed controller is stable under the assumptions given in Section 5. Unlike the linear controllers the proposed algorithm reduces peak power demand of the buildings. This result makes it possible to apply a peak-hour supervisory control strategy under the constraints imposed on the central energy source.
7. REFERENCES [1] Grega W., Kołek K.: Monitoring and Control of Heat Distribution, in Proc. of International Carpathian Control Conference ICCC’2002, Malenowice, Czech Republic, May 27-30 2002, pp. 439-444. [2] Pargfrieder J., Jorgl H.P.: An Integrated Control System for Optimizing the Energy Consumption and User Comfort in Buildings, in Proc. of IEEE International Symposium on Computer Aided Control System Design, Glasgow 2002, pp. 127132. [3] Zaheer-Uddin M.: Optimal, Sub-optimal and Adaptive Control Methods for the Design of
[9] Goodwin G.C., Sin K.S.: Adaptive Filtering, Prediction and Control, Prentice-Hall, New York, 1984. [10] Aström K.J., Wittenmark B.: Computer Controlled Systems, Prentice Hall, London 1997. [11] Magni L., De Nicolao G., Scattolini R.: Output Feedback and Tracking of Nonlinear Systems with Model Predictive Control, Automatica 37, (2001) pp.1601-1607. [12] Scattolini R., Magni L., De Nicolao G.: Output Feedback and Tracking in Nonlinear Model Predictive Control, Proc. of Sixth International Conference on Methods and Models in Automation and Robotics, (2001) pp.1601-1607. [13] Maciejowski J. M.: Predictive Control with Constraints, Prentice Hall 2002. [14] Chen H., Algöwer F.: A Quasi-infinite Horizon Nonlinear Model Predictive Control Scheme With Guaranted Stability, Automatica, 34, 1998, pp. 1205-1217.
Acknowledgements This paper was supported by the UMM research grant.