Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Abstract: We study the problem of heating, ventilation, and air conditioning (HVAC) control in
a typical commercial building. We propose a model predictive control (MPC) approach which
minimizes energy use while satisfying occupant comfort constraints. A sequential quadratic
programming algorithm is used to efficiently solve the resulting bilinear optimization problem.
This paper presents the control design approach and the procedure for computing its solution.
Extensive numerical simulations show the effectiveness of the proposed approach. In particular,
the MPC is able to systematically reproduce a variety of well-known commercial solutions for
energy savings, which include demand response, “economizer mode” and precooling/preheating.
The building sector consumes about 40% of the energy The system considered in this work, known as variable air
used in the United States and is responsible for nearly volume (VAV) with reheat, is depicted in Fig. 1. This type
40% of greenhouse gas emissions, see McQuade (2009). of HVAC system provides cooling using a variable speed
It is therefore economically, socially and environmentally supply fan and a cooling coil (water-to-air heat exchanger)
significant to reduce the energy consumption of buildings. located in a central air handling unit (AHU). A cold water
Previous work by Henze et al. (2004); Ma et al. (2010); valve controls the cooling coil outlet air to a setpoint
Oldewurtel et al. (2010) has evaluated the energy saving temperature, and the supply fan distributes the cold air
potential of model predictive control (MPC) for heating to every thermal zone served by the same AHU. The AHU
ventilation and air conditioning (HVAC) in buildings. supply fan speed determines the total flow rate to all zones.
The main idea of MPC is to use a model of the plant The supply air flows from the AHU into each thermal zone
to predict the future evolution of the system, see Borrelli through a “VAV box” which consists of a damper and a
(2003); Mayne et al. (2000). At each discrete sampling heating coil. The damper regulates the flow rate to the
time, an open-loop optimal control problem is solved over a thermal zone and the heating coil reheats the supply air
finite horizon starting from the current state. The optimal to a higher temperature, if required.
command signal is applied to the process only during the
first sampling interval. At the next time step a new optimal Supply Cooling
control problem based on new measurements of the state Fan Coil
Outside ...
is solved over a shifted horizon. Model predictive control Air
has become the accepted standard in the process industry Heating
for solving complicated constrained multivariable control AHU Coils
problems, see Qin and Badgwell (2003). The success of Dampers Zone
Zone Zone Zone
MPC is largely due to its ability to simply and effectively Dampers ...
1 2 3
handle hard constraints on states and control inputs.
Exhaust
Section 2 of this paper introduces the common type of Air
Return Air
HVAC system we focus on, then derives low-order models
for the temperature dynamics and energy costs. Section
3 outlines the MPC control algorithm and presents a Fig. 1. VAV with reheat HVAC system schematic
tailored sequential quadratic programming (SQP) method
which exploits the bilinear structure of the optimal control The mixed exit air from all zones recirculates back to the
problem. Simulation results presented in Section 4 show AHU through a return duct. A set of dampers in the AHU
good performance and computational tractability of the controls the mix of outside ambient and recirculated air
resulting scheme. Additionally, the model predictive con- used as the source for supply air. Usually the return air
troller exhibits desirable control behaviors that resemble will be cooler than ambient temperature on a hot day when
modern advanced heuristic strategies for HVAC control, cooling is required, or warmer than ambient on a cold day
reproducing those strategies in a systematic manner. when heating is required. So conventional practice is to
recirculate as much air as possible, while maintaining a We can use a weighted undirected graph representation in
minimum fraction of fresh air for acceptable indoor air order to describe the coupling between zones. In that case,
quality. However, the opposite scenario of cooling when −R is equal to the weighted Laplacian matrix of the zone
return air is warmer than ambient (or heating when return connectivity graph plus a diagonal matrix.
air is cooler than ambient) can occur, and in that case
The compact form of (1) for all zones together is then
using 100% outside air consumes the least total coil energy.
This is known as “economizer” operation. d
M Tz = R Tz + Q̇offset + cp ṁz ◦ (Ts − Tz ), (2)
dt
In order to develop a low-order control-oriented building where M = diag((mc)1 , . . . , (mc)n ), Tz = [Tz1 , . . . , Tzn ]0 ,
thermal model, we make the following assumptions. ṁz = [ṁz1 , . . . , ṁzn ]0 , Ts = [Ts1 , . . . , Tsn ]0 , and ◦ denotes
A1 The average air temperature dynamics of the thermal the elementwise product.
zones can be reasonably approximated as first-order. Assuming ṁz and Ts are zero-order held at sample rate ∆t,
We therefore combine the thermal capacitance of the we discretize (2) using the trapezoidal method to obtain
air, walls, furnishings, etc. of zone i is combined into
a single lumped parameter denoted (mc)i . Tz+ − Tz T + + Tz Q̇+ + Q̇offset
M =R z + offset (3)
A2 Humidity is not explicitly modeled. 1 ∆t 2 2
A3 All dynamics except those of the thermal zones are Tz+ + Tz
neglected. Actuators are assumed to instantly meet + cp ṁz ◦ Ts − ,
2
their control setpoints.
A4 Predictions of outside ambient temperature Toa and where Tz+ and Q̇+ offset denote the corresponding values at
the thermal loads Q̇i in each zone due to occupants, the next discrete time step t + ∆t. We choose the trape-
equipment, and all heat transfer to or from ambient zoidal discretization as a compromise between simplicity
and other zones are known in advance. 2 and stability (which some methods lack when ∆t is large).
Q̇n Tzn Assuming there is no heat loss or gain in the return duct,
Tr is a flow-weighted average of the zone temperatures,
where n is the number of thermal zones served by the same Pn
AHU, R is a symmetric n×n matrix and Q̇offset is an n×1 i=1 (ṁzi Tzi )
Tr = P n . (4)
time-varying vector. The elements of R are given by i=1 ṁzi
i 6= j An energy balance of the AHU then gives
UAij
i−1 n Tm = (1 − dr )Toa + dr Tr . (5)
Rij = X X
−UAoi −
UAik − UAik i = j
k=1 k=i+1 2.3 Cost Function
where UAij = UAji is the heat transfer coefficient times
area between zones i and j. Zone i and zone j have no heat We will consider energy use of the cooling and heating
transfer between them when UAij = UAji = 0. The heat coils in terms of air-side thermal power, which we can
transfer coefficient times area between zone i and specified directly calculate from the models in the previous section.
external temperatures (such as Toa ) is denoted UAoi . We represent all of the operating characteristics of the
cold and hot water circuits with two constant parameters:
1 Humidity and latent heat can be important factors affecting HVAC efficiency ηh for the hot side, and coefficient of performance
design and actual energy use, but they are not typically directly ηc for the cold side. So power used by the heating coils and
measured or controlled. We will deal with this thermodynamic sim- cooling coil are given respectively by Ph and Pc where
plification indirectly: throughout this entire work, every temperature n
is meant to represent an equivalent dry air temperature, i.e. the cp X
Ph = (ṁzi (Tsi − Tc )), (6)
temperature at which dry air would have the same specific enthalpy ηh i=1
as the actual moist air mixture. !
2 This is a strong assumption, since load and weather predictions are n
cp X
not perfectly accurate. We are investigating extensions of this MPC and Pc = ṁzi (Tm − Tc ). (7)
ηc i=1
scheme to robustly account for prediction and model uncertainty.
Remark 1. A higher-fidelity model would include ancillary Z t+N ∆t
equipment such as water pumps and cooling towers, and J= (re Pf + re Pc + rh Ph )dτ
t
a detailed water-side energy balance.
+ max (φ(τ )(Pf + Pc )), (9)
τ ∈[t,t+N ∆t]
The electrical power Pf used by the supply fan is equal to
! where N is the prediction horizon length.
n
X ∆p
Pf = ṁzi , Note that the cooling coil power (7) depends on the
i=1
ρ ηf cooling coil inlet air temperature Tm , which depends (5)
where ∆p is the pressure difference across the fan, ρ is on return air temperature Tr , which depends (4) on zone
the air density, and ηf is the efficiency of the fan. If all temperatures Tz , so this utility cost integral is a function
zone dampers were held atP fixed positions, incompressible of the state variables and all of the control inputs. The
flow would give ∆p ∝ ( ṁzi )2 . However, when zone integral in (9) is approximated numerically according to
dampers open, the pressure drop for a given flow rate the trapezoidal discretization for consistency with the
decreases. As an average trend direction, increasing total discrete state dynamics (3).
flow will correspond to more-open zone dampers. So we
expect pressure drop to increase more slowly than total 2.4 Constraints
flow squared. For simplicity we restrict P our model to
polynomial form, so we take ∆p = ρ ηf κf ṁzi . Recorded The system states and control inputs are subject to the
data for a representative AHU supply fan shows in Fig. 2 following constraints due to control requirements and
that fan power versus fan flow fits a quadratic model. actuator limits.
C1: T zi ≤ Tzi ≤ T zi ∀ i ∈ {1, . . . , n}, comfort range.
C2: ṁzi ≤ ṁzi ≤ ṁzi ∀ i ∈ {1, . . . , n}, minimum ventila-
tion requirement and maximum VAV box capacity.
C3: Tsi ≥ Tc ∀ i ∈ {1, . . . , n}, heating coils can only
increase temperature.
C4: Tsi ≤ T h ∀ i ∈ {1, . . . , n}, heating coil capacity.
C5: Tc ≤ Tm , cooling coil can only decrease temperature.
C6: Tc ≥ T c , cooling coil capacity.
C7: 0 ≤ dr ≤ dr , minimum is no recirculation, maximum
set by required fresh air for indoor air quality.
In all of the above constraints, limit values denoted by ?
and ? may be time-varying and are assumed to be known
in advance. These constraints must hold at all times t.
Fig. 2. Recorded data from an AHU supply fan in the Due to the trapezoidal discretization of the system dy-
Bancroft Library at University of California, Berkeley namics, we approximate the time variation of the zone
temperatures Tzi as piecewise linear between discrete time
With this form of fit and simplification, we have
!2 steps t and t + ∆t. We treat the disturbance inputs Q̇offset
n
X and Toa the same way, as continuous piecewise linear
Pf = κf ṁzi , (8) functions of time. All of the control inputs are zero-order
i=1 held so they are discontinuous piecewise constant functions
where κf is a parameter that captures both the fan of time. Due to (5), cooling coil inlet temperature Tm
efficiency and the duct pressure losses. is therefore discontinuous and piecewise linear in time.
To enforce constraint C5 at all times we introduce the
We introduce several parameters to reflect utility pricing. following additional variables
The cost in currency per unit energy content is denoted Pn +
re for electricity and rh for heating fuel (typically gas, or i=1 (ṁzi Tzi )
Tr = P
e n , (10)
steam from a central plant). These costs may vary in time, i=1 ṁzi
especially for electricity, to reflect time-of-use or dynamic +
Tem = (1 − dr )Toa + dr Ter , (11)
utility pricing. We assume time variation of utility rates n
!
occurs in a zero-order hold manner at sample rate ∆t. cp X
Pec = ṁzi (Tem − Tc ), (12)
ηc i=1
We also incorporate a feature of some utility structures
wherein peak electric power use is penalized. Some utilities and corresponding constraint
only implement this peak-use charge during certain hours
of the day, so we express this feature by defining a C8: Tc ≤ Tem .
windowing function φ(t). The value of φ(t) equals the given
P
Multiply both sides of (4) and (10) by ṁzi :
cost per unit peak power during restricted time intervals, n
! n
and zero elsewhere.
X X
ṁzi Tr = (ṁzi Tzi ), (13)
Assuming cold water is produced immediately on demand i=1
! i=1
by electric chillers, and likewise for hot water by a fuel- Xn Xn
+
powered boiler or district steam heat exchanger, the total ṁzi Ter = (ṁzi Tzi ). (14)
utility cost from time t to time t + N ∆t is i=1 i=1
P
Note that when ṁzi = 0, the HVAC system consumes where Ut = {u0|t , . . . , uN −1|t } is the set of predicted
no energy and the system dynamics evolve only according control inputs at time t, Xt = {x1|t , . . . , xN |t } is the set
to thermal loads Q̇i . In that case the return temperature of predicted system states at time t, starting from initial
is not important, so enforcing (13) and (14) is equivalent state x0|t = Tz (t) and applying the input sequence Ut to
for our purposes to enforcing (4) and (10). the system model (3), and Vt = {v0|t , . . . , vN −1|t } is the
corresponding set of predicted auxiliary variables at t.
3. OPTIMAL CONTROL FORMULATION
Let the optimal solution of problem (19) have input
Let xk|t be the value of the state vector Tz at time sequence denoted by U?t = {u?0|t , . . . , u?N −1|t }. Then, the
t + k∆t predicted at time t, uk|t be the value of the first step of U?t is input to the system, u(t) = u?0|t . The
combined control input vector [ṁ0z , Ts0 , dr , Tc ]0 at time t + optimization (19) is repeated at time t + ∆t, with the
k∆t predicted at time t, and vk|t be the value of the updated new state
vector of auxiliary variables [Tr , Tm , Ph , Pc , Pf , Ter , Tem , Pec ]0 x0|t+∆t = Tz (t + ∆t)
at time t + k∆t predicted at time t. yielding a moving or receding horizon control strategy. The
values of bk|t+∆t , dj,k|t+∆t , ej,k|t+∆t , Fk|t+∆t , and rk|t+∆t
The system dynamics (3), and auxiliary-variable equalities
may change relative to the previous time step due to time-
(5)-(8) and (11)-(14) can all be expressed in the following
varying constraints, predictions, and utility costs.
bilinear form.
0
xk|t xk|t xk|t
3.1 Sequential Quadratic Programming Approach
1 uk|t uk|t 0 uk|t
v Cj,k|t v + dj,k|t v + ej,k|t = 0
2 k|t k|t k|t The optimization problem (19) is nonconvex due to the
xk+1|t xk+1|t xk+1|t nonlinear equality constraints (15). The method of se-
∀ j ∈ {1, . . . , n + nv }, ∀ k ∈ {0, . . . , N − 1} (15) quential quadratic programming (SQP) is applied here by
The matrices Cj,k|t are symmetric and indefinite, and linearizing (15) and adding a convex quadratic term to
nv = 8 is the number of auxiliary variables. the cost that approximates the Hessian of the Lagrangian
function, see Han (1977); Nocedal and Wright (2006).
We cannot influence whether the given initial conditions
x0|t = Tz (t) satisfy the comfort constraints C1, so we Let λj,k|t be the Lagrange multiplier corresponding to
compactly represent the constraints C1-C8 as equality constraint j of step k in problem (19) at time
t. The Hessian of the Lagrangian of problem (19) is then
uk|t n+n 0
Ak|t vk|t ≤ bk|t , ∀ k ∈ {0, . . . , N − 1}. (16) Xv 0 λ C 0
0
n×(n+nu +nv )N j,0|t j,0|t n×(n+nu +nv )N
xk+1|t I(n+nu +nv )N 0 0 I(n+nu +nv )N
j=1
−1
N
" #!
Let rk|t be the value of the vector [0, 0, rh , r2e , re , 0, 0, r2e ]0 X 0(n+nu +nv )k−n 0 0
at time t + k∆t. Then by the trapezoidal discretization, + 0 λj,k|t Cj,k|t 0
k=1 0 0 0(n+nu +nv )(N −k−1)
Z t+N ∆t N −1
X
0 (20)
(re Pf + re Pc + rh Ph )dτ = ∆t rk|t vk|t . (17)
t k=0
where nu = 2n + 2 is the number of control inputs. The
first n rows and first n columns of Cj,0|t for constraints at
Lastly, we introduce an epigraph variable βt to represent time step k = 0 are removed because the initial state x0|t
the peak power
term in (9). is a known quantity. Since each matrix Cj,k|t is indefinite,
0 0 0 φ(τ ) φ(τ ) 0 0 0 this exact Hessian of the Lagrangian is also indefinite.
Let Fk|t = evaluated at
0 0 0 0 φ(τ ) 0 0 φ(τ ) We can efficiently calculate the smallest eigenvalue and
τ = t + k∆t. Then we have the equivalence that corresponding eigenvector of this Hessian using an Arnoldi
βt iteration, see Lehoucq et al. (1998). We construct a posi-
max (φ(τ )(Pf + Pc )) = min βt s.t. Fk|t vk|t ≤ ,
τ ∈[t,t+N ∆t] βt tive semidefinite approximation of the Hessian by adding a
∀ k ∈ {0, . . . , N − 1}. (18) multiple of the identity to (20). Using the available second
derivative information in this manner was observed to
The constrained finite time optimal control (CFTOC) reduce the number of iterations required for convergence
problem at time t is then relative to the quasi-Newton approaches of the commercial
N −1 SQP routines we tested.
X
0
min βt + ∆t rk|t vk|t (19)
Xt ,Ut ,Vt ,βt 4. SIMULATION RESULTS
k=0
s.t, ∀ j ∈ {1, . . . , n + nv }, ∀ k ∈ {0, . . . , N − 1}, We present simulation results for the following cases:
0
xk|t xk|t xk|t
1 uk|t (1) Nominal case, re uses “low” value from Table 2 and
uk|t 0 uk|t
v Cj,k|t v + dj,k|t v + ej,k|t = 0 φ(t) = 0 at all times.
2 k|t k|t k|t
(2) Modified electric rate schedule: re uses “high” value
xk+1|t xk+1|t xk+1|t
between 12 noon and 4:30 PM and the “low” value
uk|t at all other times. No peak power charge, φ(t) = 0.
1
Ak|t vk|t ≤ bk|t , Fk|t vk|t ≤ β , x0|t = Tz (t) (3) Peak power charge: φ(t) = 1 $/kW and re uses “low”
1 t
xk+1|t rate at all times.
Table 2. Parameter values used
Zone temperature ( C)
35
o
30 Zone 1
Parameter Value Units Zone 2
25
n 5 zones Zone 3
20 Zone 4
N 48 steps Zone 5
15
∆t 1800 s
10
cp 1 kJ/(kg·K) 00:00 06:00 12:00 18:00 00:00
rh 5 · 10−6 $/kJ
Supply temperature ( C)
40
o
T0 18 ◦C
n 30 Zone 1
6:30 AM to 6:30 PM = 21 ◦C Zone 2
T zi 20 Zone 3
n 7 PM to 6 AM = 12 Zone 4
6:30 AM to 6:30 PM = 24 ◦C 10 Zone 5
T zi
7 PM to 6 AM = 32 0
n 00:00 06:00 12:00 18:00 00:00
6:30 AM to 6:30 PM = 0.025 Time (hh:mm)
ṁzi kg/s
7 PM to 6 AM = 0
ṁzi 1.5 kg/s
◦C Fig. 4. Case 1 zone results. Shown dashed in the first plot
Tc 5
◦C are T zi and T zi .
Th 40
dr 0.9 dimensionless
30
Recirculation fraction
Temperature (oC)
0.5
3 0
00:00 06:00 12:00 18:00 00:00
30
Zone Thermal Load (kW)
Temperature (oC)
2 20
Tc
10 T
m
1
0
00:00 06:00 12:00 18:00 00:00
0
2 Pc 6
−1 Zones 1−4 Pf
Zone 5 1 Ph 3
−2
00:00 06:00 12:00 18:00 00:00 0 0
00:00 06:00 12:00 18:00 00:00
Time (hh:mm) Time (hh:mm)
ACKNOWLEDGEMENTS
Zone temperature (oC)
30 Zone 1
Zone 2
25 Zone 3
Zone 4
Zone 5
This work was supported by the Department of Energy
20
under grant number ???. We thank Allan Daly and Yudong
15 Ma for discussions regarding HVAC modeling and opti-
10 mization.
00:00 06:00 12:00 18:00 00:00
REFERENCES
2 6
Borrelli, F. (2003). Constrained Optimal Control of Linear
Heating power (kW)
Electric power (kW)
30 Zone 1
Zone 2 Ma, Y., Borrelli, F., Hencey, B., Coffey, B., Bengea, S.,
25 Zone 3
Zone 4 and Haves, P. (2010). Model predictive control for the
Zone 5
20 operation of building cooling systems. In 2010 American
15 Control Conference, 5106 – 5111.
10
Mayne, D., Rawlings, J., Rao, C., and Scokaert, P. (2000).
00:00 06:00 12:00 18:00 00:00
Constrained model predictive control: Stability and op-
timality. Automatica, 36(6), 789 – 814.
McQuade, J. (2009). A systems approach to high perfor-
2 6 mance buildings. Technical report, United Technolo-
Heating power (kW)
Electric power (kW)
Pc
Pf
gies Corporation. http://gop.science.house.gov/
P
h
Media/hearings/energy09/april28/mcquade.pdf.
1 3
Mészáros, C. (1996). Fast cholesky factorization for inte-
rior point methods of linear programming. Computers
0 0 & Mathematics with Applications, 31(4-5), 49 – 54.
00:00 06:00 12:00 18:00 00:00
Time (hh:mm) Nocedal, J. and Wright, S.J. (2006). Numerical Optimiza-
tion, chapter 18. Springer-Verlag.
Fig. 7. Case 3 overview. Note the timing of the precooling Oldewurtel, F., Parisio, A., Jones, C., Morari, M., Gyalis-
and the intentional plateau in cooling power. tras, D., Gwerder, M., Stauch, V., Lehmann, B., and
Wirth, K. (2010). Energy efficient building climate
control using stochastic model predictive control and
5. CONCLUSIONS weather predictions. In 2010 American Control Con-
ference, 5100 – 5105.
This MPC algorithm has shown encouraging results in a Qin, S. and Badgwell, T. (2003). A survey of industrial
few interesting cases for a sample problem. The control model predictive control technology. Control Engineer-
performance, entirely from an optimization origin, exhibits ing Practice, 11, 733 – 764.
aspects of heuristic HVAC control such as economizer