# PID-MPC Implementation on a Chiller-Fan Coil Unit

Authors: C. Sanama; X. Xia; M. Nguepnang
Journal: Journal of Mathematics
 (2022)

---

## Abstract

A proportional, integral, and derivative-model predictive controller (PID-MPC) is implemented to enhance the performance of a chiller-fan coil unit with regards to temperature, humidity, and CO2 level control. The sublayer PID is implemented for outdoor air processing to level out fresh and room air temperatures. Precooled outdoor air prevents from imbalanced loads due to fresh air intake that could delay set point tracking and increase the compressor and supply fan speeds. The upper layer MPC is implemented to control temperature, humidity and CO2 level simultaneously. The coupling effect between temperature and humidity is considered, whilst an optimal control action is determined. The MPC is also implemented to withstand disturbances. The PID performance was satisfactory in terms of settling time and maximum overshoot. The MPC performance was satisfactory in terms of set point tracking and disturbance rejection.


---

## Body

## 1. Introduction

Proportional, integral, and derivative (PID) controllers are commonly implemented on heating ventilation and air conditioning (HVAC) systems for their simplicity. They adjust input signal [1] through gains tuning which might alter performances such as overshoots, settling time, and disturbance rejection. Dynamic HVAC processes could alter PID performances [2]. However, the study in [3] reported some satisfactory PID performance for temperature and humidity control. Poor PID performance [4–7] is addressable with a new tuning. PID lacks robustness with changing temperature and humidity conditions. Additionally, coupling effect between temperature and humidity demotes the performance further. Robustness and coupling effect as well as time-delay are addressable using advanced schemes such as the model predictive controller (MPC), the artificial neural network (ANN), and fuzzy logic (FL) [8–14].MPC implementation enables multivariable control and integrates [15] coupling effect eventually. It defines the constraints for cost function’s optimization [16] to determine an optimal control input enabling energy saving for HVAC systems subject to disturbances under wide operating conditions [17–21]. MPC predictions are performed at a time setting with past recorded data. Output and disturbance rejection could be adjusted by the computed control input at each time setting. MPC could be developed from any data-oriented models such as grey and black box models [22–24] suitable for data assessment. MPC implementation on a solar-powered HVAC system [25] demonstrated satisfactory performance using weather forecast (see Table1).MPC implementation on a HVAC system is reported [26] to improve the set point tracking and disturbance rejection. Simultaneous temperature and humidity control with the MPC achieved satisfactory performance [27] without indoor comfort deterioration. MPC reviews on HVAC systems [28, 29] presented its energy saving features. Meanwhile, PID-MPC controllers for processing and purification of active pharmaceutical ingredients [30] demonstrated better performance compared to the PID controller only. MPC implementation on a direct expansion (DX) air conditioning (AC) for simultaneous CO2 level, temperature, and humidity control [31, 32] has been adopted considering the coupling effect between temperature and humidity [33]. Set point tracking and disturbance rejection were satisfactory.The PID limitation is obvious when coupling effect between temperature and humidity is considered. Moreover, disturbance requires a new PID gain tuning. The MPC brings a solution to consider coupling effect and withstand disturbance. Simultaneous temperature, humidity, and CO2 level control are possible with the MPC. However, effective CO2 level control requires fresh air temperature control to prevent imbalanced loads. For instance, the study in [31] suggested an optimal set point along with the MPC to control the temperature, the humidity, and the CO2 level simultaneously; however, an optimal fresh air volume was considered without temperature control and in case of high temperature difference between fresh air and room air, the compressor and supply fan speeds might eventually increase using additional energy to overcome imbalanced loads with consequences on controller performance such as delayed set point tracking.A separate PID loop for fresh air temperature control is likely the easiest solution to overcome imbalanced loads due to fresh air intake. A combination of PID-MPC might be worth investigating as this hybrid scheme could provide tremendous performance for systems such as the chiller-fan coil unit (FCU). This work intends to implement a sublayer PID and an upper layer MPC on a chiller-FCU to control the temperature, the humidity, and the CO2 level simultaneously without imbalanced loads due to fresh air intake and with optimal control actions.The contribution of this work is twofold. Firstly, a fresh air processing system controlled with a sublayer PID loop is implemented on a primary heat exchanger for fresh air temperature control preventing from imbalanced loads with the outdoor and room air temperatures being level out to reduce the compressor and supply fan speeds subsequently improving energy saving. Secondly, the temperature and humidity coupling effects are controlled simultaneously along with the CO2 level with a proposed upper layer MPC loop using optimal control actions. The PID-MPC loops put together enable to achieve satisfactory performances by simulations.


## 2. Chiller-FCU Setup

Figure1 represents the setup of a chiller-FCU. Outdoor air travels through a primary heat exchanger connected to a chiller with cold water circulating through its pipes. Heat transfer occurs between outdoor air and cold water so that fresh and room air temperatures could be identical in the mixing zone. The primary heat exchanger is adopted for outdoor air cooling to ensure fresh air supply without additional loads preventing from imbalanced loads subsequently increasing the compressor and supply fan speeds. More heat removal occurs further downstream as mixed air travels through the secondary heat exchanger to reach the room air settings. The secondary heat exchanger is adopted for air cooling with dehumidification.Figure 1
Chiller-FCU setup.Chiller-FCU is mostly used in large cooling applications such as high-rise office buildings and large theatres, whereby cooling with dehumidification and fresh air renewal are utterly required. Equivalent setups are reported in [3, 34–36] for dynamic control and fault detection.


## 3. Sublayer PID

The control goal is to maintain fresh air temperature closer to room temperature by adjusting the chiller’s control valve.


### 3.1. Primary Heat Exchanger

The dynamic equation at the primary heat exchanger could be expressed as follows:(1)CairρairVair,freshdTair,freshdt=CairρairV˙air,freshTair,out−Tair,fresh−CwaterρwaterV˙waterTwater,in−Twater,out.Laplace transformation considering steady state conditions on equation (1) yields to(2)CairρairVair,freshsTsair,fresh+CairρairV˙air,freshTsair,fresh=CairρairV˙air,freshTsair,out+CwaterTwater,out−Twater,inm˙swater.The transfer function within the primary heat exchanger model betweenm˙swater and Tsair,fresh could be expressed as follows:(3)Ghxps=CwaterTwater,out−Twater,inCairρairV˙air,freshVair,fresh/V˙air,freshs+1.Equation (3) could be rewritten as follows:(4)Ghxps=K1τ1s+1,where K1=CwaterTwater,out−Twater,in/CairρairV˙air,fresh is the gain and τ1=Vair,fresh/V˙air,fresh is the thermal time.


### 3.2. The Room Model

Within the thermal room, the energy conservation could be expressed as follows:(5)CairρairVair, supplydTair,supplydt=CairρairV˙air,freshTair,fresh−Tair,supply+Qair,fresh.Laplace transformation considering steady state conditions on equation (5) leads to(6)CairρairVair, supplysTsair,supply+CairρairV˙air,supplyTsair,supply=CairρairV˙air,supplyTsair,fresh+Qair,fresh.The transfer function of the room model betweenTsair,fresh and Tsair,supply could be expressed as follows:(7)Grooms=1Vair, supply/V˙air,supplys+1.Equation (7) could be rewritten as follows:(8)Grooms=K2τ2s+1,where K2=1 is the gain and τ2=Vair, supply/V˙air,supply is the thermal time.


### 3.3. The Plant Model

The transfer function of the plant model betweenm˙swater and Tsair,supply could be defined as follows:(9)Gplants=Grooms×Ghxps=K1K2τ1s+1τ2s+1.Using Table1, Gplants could be expressed as follows:(10)Gplants=5.741.09×10−4s2+0.039s+1.09×10−4.Table 1
Parameters of the plant model [37–39].
Cair1.005kJ/kg℃ρair1.2kg/m3Vair, supply360m3V˙air,supply1.1m3/sVair,fresh84.56m3V˙air,fresh3.02m3/sCwater4.184kJ/kg℃Twater,out−Twater,in5℃Tair,out28℃The block diagram of the open loop plant model is represented in Figure2.Figure 2
Block diagram of the open loop plant.


### 3.4. PID Implementation

The PID transfer function could be expressed as follows:(11)Gcs=GcKp,Ki,Kd,s=Kds2+Kps+Kis.The PID gain coefficientsKp, Ki, and Kd could be obtained by Ziegler-Nichols tuning, which requires to obtain an opened loop response of the system to determine the gain coefficients so that the proportional, derivative, and integral actions could respectively improve the rising time, reduce the overshoot, and reduce the steady state error.The PID and plant models are in series, therefore, the overall transfer function could be expressed as follows:(12)Goveralls=Gcs×Gplants,where m˙swater is the input and Tsair,supply is the output.The block diagram of the closed loop sublayer controller is represented in Figure3.Figure 3
PID block diagram.We have(13)Y=s+0.21s+0.001s+0.003s2+0.023s+0.0005.


## 3.1. Primary Heat Exchanger

The dynamic equation at the primary heat exchanger could be expressed as follows:(1)CairρairVair,freshdTair,freshdt=CairρairV˙air,freshTair,out−Tair,fresh−CwaterρwaterV˙waterTwater,in−Twater,out.Laplace transformation considering steady state conditions on equation (1) yields to(2)CairρairVair,freshsTsair,fresh+CairρairV˙air,freshTsair,fresh=CairρairV˙air,freshTsair,out+CwaterTwater,out−Twater,inm˙swater.The transfer function within the primary heat exchanger model betweenm˙swater and Tsair,fresh could be expressed as follows:(3)Ghxps=CwaterTwater,out−Twater,inCairρairV˙air,freshVair,fresh/V˙air,freshs+1.Equation (3) could be rewritten as follows:(4)Ghxps=K1τ1s+1,where K1=CwaterTwater,out−Twater,in/CairρairV˙air,fresh is the gain and τ1=Vair,fresh/V˙air,fresh is the thermal time.


## 3.2. The Room Model

Within the thermal room, the energy conservation could be expressed as follows:(5)CairρairVair, supplydTair,supplydt=CairρairV˙air,freshTair,fresh−Tair,supply+Qair,fresh.Laplace transformation considering steady state conditions on equation (5) leads to(6)CairρairVair, supplysTsair,supply+CairρairV˙air,supplyTsair,supply=CairρairV˙air,supplyTsair,fresh+Qair,fresh.The transfer function of the room model betweenTsair,fresh and Tsair,supply could be expressed as follows:(7)Grooms=1Vair, supply/V˙air,supplys+1.Equation (7) could be rewritten as follows:(8)Grooms=K2τ2s+1,where K2=1 is the gain and τ2=Vair, supply/V˙air,supply is the thermal time.


## 3.3. The Plant Model

The transfer function of the plant model betweenm˙swater and Tsair,supply could be defined as follows:(9)Gplants=Grooms×Ghxps=K1K2τ1s+1τ2s+1.Using Table1, Gplants could be expressed as follows:(10)Gplants=5.741.09×10−4s2+0.039s+1.09×10−4.Table 1
Parameters of the plant model [37–39].
Cair1.005kJ/kg℃ρair1.2kg/m3Vair, supply360m3V˙air,supply1.1m3/sVair,fresh84.56m3V˙air,fresh3.02m3/sCwater4.184kJ/kg℃Twater,out−Twater,in5℃Tair,out28℃The block diagram of the open loop plant model is represented in Figure2.Figure 2
Block diagram of the open loop plant.


## 3.4. PID Implementation

The PID transfer function could be expressed as follows:(11)Gcs=GcKp,Ki,Kd,s=Kds2+Kps+Kis.The PID gain coefficientsKp, Ki, and Kd could be obtained by Ziegler-Nichols tuning, which requires to obtain an opened loop response of the system to determine the gain coefficients so that the proportional, derivative, and integral actions could respectively improve the rising time, reduce the overshoot, and reduce the steady state error.The PID and plant models are in series, therefore, the overall transfer function could be expressed as follows:(12)Goveralls=Gcs×Gplants,where m˙swater is the input and Tsair,supply is the output.The block diagram of the closed loop sublayer controller is represented in Figure3.Figure 3
PID block diagram.We have(13)Y=s+0.21s+0.001s+0.003s2+0.023s+0.0005.


## 4. The Upper Layer MPC

The control goal is to maintain the indoor temperature, the humidity, and the CO2 level simultaneously within settings, by adjusting the compressor, supplying fan speeds, and intake of fresh air.


### 4.1. Dynamic Modelling

Indoor temperature is(14)CairρairVair, roomdTair,roomdt=CairρairV˙air,supplyTair,supply−Tair,room+Qair,room.Air temperature in dry cooling zone is(15)CairρairVhx,drydThx,drydt=CairρairV˙air,supplyTair,room−Thx,dry+αhx,dryAhx,dryThx,wall−Thx,dry+Tair,room2.Supply air temperature and humidity is(16)CairρairVhx,wetdTair,supplydt+ρairVhx,wethlatent,vapdWair,supplydt=CairρairV˙air,supplyThx,dry−Tair,supply+ρairV˙air,supplyhlatent,vapWair,room−Wair,supply+αhx,wetAhx,wetThx,wall−Thx,dry+Tair,supply2.Wall temperature is(17)CρVhx,walldThx,walldt=αhx,dryAhx,dryThx,dry+Tair,room2−Thx,wall+αhx,wetAhx,wetThx,dry+Tair,supply2−Thx,wall+m˙refhref,hx,out−href,hx,in.Indoor humidity is(18)ρairVair, roomhlatent,vapdWair,roomdt=ρairV˙air,supplyhlatent,vapWair,supply−Wair,room.The relationship between supply air temperature and moisture [40, 41] could be expressed as follows:(19)dWair,supplydt=3.96×10−5dTair,supplydt+8.5×10−5.Indoor CO2 level is(20)Vair, roomdCair,roomdt=V˙air,supplyCair,supply−Cair,room.


### 4.2. State Space Formulation

The state space formulation could be expressed as follows:(21)DX˙=FX,U+GZ.The measured outputs of this model are the room temperatureTair,room, the indoor relative humidity Wair,room, and the indoor CO2 level Cair,room.The decoupling matrixD, which is a matrix with diagonal entries that enables to measure each of the state variables independently without any knowledge about the others, could be defined as follows:(22)D=D110000000D220000000D3300D360000D440000000D550000D6300D660000000D77.The components ofD are given in Table 2:Table 2
Components of theD matrix.
D11=CairρairVair,roomD22=CairρairVhx,dryD33=CairρairVhx,wetD44=CρVhx,wallD55=ρairVair, roomhlatent,vapD36=ρairVhx,wethlatent,vapD63=3.96×10−5D66=1D77=Vair,roomThe functionF could be defined as follows:(23)F=F1F2F3F4F5F6F7T.The components ofF are given in Table 3.Table 3
Components of theF matrix.
F1=CairρairV˙air,supplyTair,supply−Tair,roomF2=CairρairV˙air,supplyTair,room−Thx,dry+αhx,dryAhx,dryThx,wall−Thx,dry+Tair,room/2F3=CairρairV˙air,supplyThx,dry−Tair,supply+ρairV˙air,supplyhlatent,vapWair,room−Wair,supply+αhx,wetAhx,wetThx,wet−Thx,dry+Tair,supply/2F4=αhx,dryAhx,dryThx,dry+Tair,room/2−Thx,wall+αhx,wetAhx,wetThx,dry+Tair,supply/2−Thx,wall+m˙refhref,hx,out−href,hx,inF5=ρairV˙air,supplyhlatent,vapWair,supply−Wair,roomF6=8.5×10−5F7=V˙air,supplyCair,supply−Cair,roomThe state variableX could be defined as follows:(24)X=Tair,roomThx,dryTair,supplyThx,wallWair,roomWair,supplyCair,room.The inputU could be defined as follows:(25)U=V˙air,roomm˙refV˙air,supply.The functionG could be defined as follows:(26)G=Qair,room000000T.Here, the disturbance Z=Qair,room


### 4.3. MPC Implementation

The nonlinear state space formulation could be linearized around a specific operating pointX0,U0 following the suggestion of [32] using the Taylor first-order approximation, whilst the deviation created by the approximation could be reduced with a dynamic closed loop MPC, assuming that the three output components are the room temperature, the room humility, and the CO2 level.(27)Xk+1=AXk+BΔUk,Yk=CXk,where A=Ad07TCAdI3×3 is the state matrix where Ad is 7 × 1 matrix and CAd is 3 × 1 matrix, B=BdCBd is the input matrix where Bd is 7 × 1 matrix and CBd is 3 × 1 matrix, and C=100000000001000000001 is the output matrix.(28)Ad=∂F∂X|X=X0,U=U0,Bd=∂F∂U|X=X0,U=U0.The predicted output vector could be expressed in compact form as follows:(29)Yk+i|k=HXk+i|k+ΦΔUk+i|k,where(30)H=CACA2CA3⋯CANpT,Φ=CB00⋯0CABCB0⋯0CA2BCABCB⋯0⋮⋮⋮⋮⋮CANp−1BCANp−2BCANp−2B⋯CANp−NcB.With the prediction horizonNp=24 and the control horizon NC=3, the data vector containing the set point information could be expressed as follows:(31)Rs=111Trk+i|k,where R¯s=111T and rk+i|k is a step value.The set point is selected according to the American society of heating, refrigerating, and air-conditioning engineers (ASHRAE) comfort zone between 24°C–26°C temperature and 50%–60% relative humidity along with satisfactory fresh air volume. MPC’s objective is to minimize errors between the predicted output and set point. This objective is formulated into a cost function to determine an optimal control action defined following [42] as follows:(32)J=∑i=13Rs−Yk+i|kTRs−Yk+i|k+ΔUk+i|kTR¯ΔUk+i|k.The first term carries the objective to minimize error whilst the second term considers control action weighting for large or small error.Inserting equation (29) into equation (32) leads to(33)J=∑i=13Rs−HXk+i|k−ΦΔUk+i|kTRs−HXk+i|k−ΦΔUk+i|k+ΔUk+i|kTR¯ΔUk+i|k.The first derivative of the cost function could be expressed as follows:(34)∂J∂ΔUk+i|k=∑i=13Rs−HXk+i|k−ΦΔUk+i|kT−Φ+ΔUk+i|kTR¯.Setting the derivative equals to zero yields to(35)ΦTΦ+R¯∑i=13ΔUk+i|kT=Φ∑i=13Rs−HXk+i|kT.Therefore,(36)∑i=13ΔUk+i|k=ΦTΦ+R¯−1ΦT∑i=13Rsrk+i|k−HXk+i|k.


## 4.1. Dynamic Modelling

Indoor temperature is(14)CairρairVair, roomdTair,roomdt=CairρairV˙air,supplyTair,supply−Tair,room+Qair,room.Air temperature in dry cooling zone is(15)CairρairVhx,drydThx,drydt=CairρairV˙air,supplyTair,room−Thx,dry+αhx,dryAhx,dryThx,wall−Thx,dry+Tair,room2.Supply air temperature and humidity is(16)CairρairVhx,wetdTair,supplydt+ρairVhx,wethlatent,vapdWair,supplydt=CairρairV˙air,supplyThx,dry−Tair,supply+ρairV˙air,supplyhlatent,vapWair,room−Wair,supply+αhx,wetAhx,wetThx,wall−Thx,dry+Tair,supply2.Wall temperature is(17)CρVhx,walldThx,walldt=αhx,dryAhx,dryThx,dry+Tair,room2−Thx,wall+αhx,wetAhx,wetThx,dry+Tair,supply2−Thx,wall+m˙refhref,hx,out−href,hx,in.Indoor humidity is(18)ρairVair, roomhlatent,vapdWair,roomdt=ρairV˙air,supplyhlatent,vapWair,supply−Wair,room.The relationship between supply air temperature and moisture [40, 41] could be expressed as follows:(19)dWair,supplydt=3.96×10−5dTair,supplydt+8.5×10−5.Indoor CO2 level is(20)Vair, roomdCair,roomdt=V˙air,supplyCair,supply−Cair,room.


## 4.2. State Space Formulation

The state space formulation could be expressed as follows:(21)DX˙=FX,U+GZ.The measured outputs of this model are the room temperatureTair,room, the indoor relative humidity Wair,room, and the indoor CO2 level Cair,room.The decoupling matrixD, which is a matrix with diagonal entries that enables to measure each of the state variables independently without any knowledge about the others, could be defined as follows:(22)D=D110000000D220000000D3300D360000D440000000D550000D6300D660000000D77.The components ofD are given in Table 2:Table 2
Components of theD matrix.
D11=CairρairVair,roomD22=CairρairVhx,dryD33=CairρairVhx,wetD44=CρVhx,wallD55=ρairVair, roomhlatent,vapD36=ρairVhx,wethlatent,vapD63=3.96×10−5D66=1D77=Vair,roomThe functionF could be defined as follows:(23)F=F1F2F3F4F5F6F7T.The components ofF are given in Table 3.Table 3
Components of theF matrix.
F1=CairρairV˙air,supplyTair,supply−Tair,roomF2=CairρairV˙air,supplyTair,room−Thx,dry+αhx,dryAhx,dryThx,wall−Thx,dry+Tair,room/2F3=CairρairV˙air,supplyThx,dry−Tair,supply+ρairV˙air,supplyhlatent,vapWair,room−Wair,supply+αhx,wetAhx,wetThx,wet−Thx,dry+Tair,supply/2F4=αhx,dryAhx,dryThx,dry+Tair,room/2−Thx,wall+αhx,wetAhx,wetThx,dry+Tair,supply/2−Thx,wall+m˙refhref,hx,out−href,hx,inF5=ρairV˙air,supplyhlatent,vapWair,supply−Wair,roomF6=8.5×10−5F7=V˙air,supplyCair,supply−Cair,roomThe state variableX could be defined as follows:(24)X=Tair,roomThx,dryTair,supplyThx,wallWair,roomWair,supplyCair,room.The inputU could be defined as follows:(25)U=V˙air,roomm˙refV˙air,supply.The functionG could be defined as follows:(26)G=Qair,room000000T.Here, the disturbance Z=Qair,room


## 4.3. MPC Implementation

The nonlinear state space formulation could be linearized around a specific operating pointX0,U0 following the suggestion of [32] using the Taylor first-order approximation, whilst the deviation created by the approximation could be reduced with a dynamic closed loop MPC, assuming that the three output components are the room temperature, the room humility, and the CO2 level.(27)Xk+1=AXk+BΔUk,Yk=CXk,where A=Ad07TCAdI3×3 is the state matrix where Ad is 7 × 1 matrix and CAd is 3 × 1 matrix, B=BdCBd is the input matrix where Bd is 7 × 1 matrix and CBd is 3 × 1 matrix, and C=100000000001000000001 is the output matrix.(28)Ad=∂F∂X|X=X0,U=U0,Bd=∂F∂U|X=X0,U=U0.The predicted output vector could be expressed in compact form as follows:(29)Yk+i|k=HXk+i|k+ΦΔUk+i|k,where(30)H=CACA2CA3⋯CANpT,Φ=CB00⋯0CABCB0⋯0CA2BCABCB⋯0⋮⋮⋮⋮⋮CANp−1BCANp−2BCANp−2B⋯CANp−NcB.With the prediction horizonNp=24 and the control horizon NC=3, the data vector containing the set point information could be expressed as follows:(31)Rs=111Trk+i|k,where R¯s=111T and rk+i|k is a step value.The set point is selected according to the American society of heating, refrigerating, and air-conditioning engineers (ASHRAE) comfort zone between 24°C–26°C temperature and 50%–60% relative humidity along with satisfactory fresh air volume. MPC’s objective is to minimize errors between the predicted output and set point. This objective is formulated into a cost function to determine an optimal control action defined following [42] as follows:(32)J=∑i=13Rs−Yk+i|kTRs−Yk+i|k+ΔUk+i|kTR¯ΔUk+i|k.The first term carries the objective to minimize error whilst the second term considers control action weighting for large or small error.Inserting equation (29) into equation (32) leads to(33)J=∑i=13Rs−HXk+i|k−ΦΔUk+i|kTRs−HXk+i|k−ΦΔUk+i|k+ΔUk+i|kTR¯ΔUk+i|k.The first derivative of the cost function could be expressed as follows:(34)∂J∂ΔUk+i|k=∑i=13Rs−HXk+i|k−ΦΔUk+i|kT−Φ+ΔUk+i|kTR¯.Setting the derivative equals to zero yields to(35)ΦTΦ+R¯∑i=13ΔUk+i|kT=Φ∑i=13Rs−HXk+i|kT.Therefore,(36)∑i=13ΔUk+i|k=ΦTΦ+R¯−1ΦT∑i=13Rsrk+i|k−HXk+i|k.


## 5. Results and Discussion

### 5.1. Sublayer PID

The sublayer controller was adopted for fresh air temperature control. The plant model was stable since the roots of its characteristic equation (12) were both negative with the values respectively equal to −0.035 and −0.003. The opened loop or uncontrolled plant’s transient response (Figure 4) had a small steady state error of −4.74 and a settling time of 21 min showing that adequate PID tuning could provide satisfactory performance. The closed loop’s transient response (Figure 5) to a step input was determined by MATLAB following the convolution theorem [43].Figure 4
Open loop’s response.Figure 5
Closed loop’s response.Table4 presents the PID gains determined with Ziegler-Nichols table [44, 45] using the parameters L, T and R [46].Table 4
Ziegler-Nichols parameters and gains.
ParametersL0.5minGainsKp9.3T22.8minKi0.02R0.004Kd0.06The transient responses of the opened and closed loops are represented and validated with the work performed by [45] in Figures 5 and 6, respectively. The sampling time in Figures 4 and 5 is 1 min. The plant characteristics are evaluated with a method similar to [45] in terms of the plant steady state error after a step input, the plant settling time to stabilize within a range δ=±2% of its steady state, and the plant rising time for its response to move from 10% to 90% of its final value.The performance indicators are presented in Table5.Table 5
Plant performance indicators.
PlantOpen loopClose loopSteady state error−4.740.04Maximum overshoot—16.9%Settling time21min2.8minRising time12.2min1.7minThe sublayer controller was tested with step inputs of the water mass flow rates for the open and close loop. PID tuning required to determineKd=0.06 to lower the settling time and decrease the overshoot then Kp=9.3 to lower the rise time and Ki=0.02 to eliminate the steady state error. 28°C outdoor air processed for fresh air intake crossed the primary heat exchanger (Figure 1), releasing its energy to chilled water to level-out the room air temperature at a reference temperature set at 24°C.Fresh air temperature control improved indoor air quality (IAQ) by removing moisture and the pollutants harmful to occupants. It could provide more comfort without stretching the energy demand as the fresh air is precooled at room temperature lowering therefore the compressor and supply fan speeds. PID implementation for fresh air control was in line with ASHRAE guidelines, as the settling time and maximum overshoot of the fresh air temperature (Figure5) were below the respective recommendation of 3 min and 30%, whilst the steady state error was near zero (Table 5). PID implementation on the close loop or controlled plant reduced the rising time to 1.7 min (Figure 5) versus 12.2 min (Figure 4) when the plant was uncontrolled.


### 5.2. Upper Layer MPC

The upper layer controller was adopted to regulate the compressor and supply fan speeds to provide satisfactory IAQ whilst allowing fresh air intake should the CO2 level rose above settings. The system was represented with 7 state variables, 3 inputs, and 3 outputs. State space formulation was adopted for prediction of the future response. In the absence of weight on the control action, the output might reach the set point very fast with no smooth transition. Adopting weighting factor led to gradual system response; therefore, smoother responses required a longer time for the control action to reach steady state where it decreased gradually as the energy used for set point tracking is spread over the future time.MPC testing was specific to the FCU’s dynamics. MPC’s performances were assessed in terms of set point tracking and disturbance rejection. The testing parameters [32] are listed in Table 6.Table 6
MPC parameters.
Compressor speed setting50%Supply fan speed setting50%Moisture content0.011kgkg−1 dry airRefrigerant flow rate3100m3s−1Outdoor air temperature28℃The MPC was tested on Simulink using the MPC toolbox. The mathematical model of the upper layer controller was implemented on Simulink, then linearized around a steady state point to obtain a Simulink control design framework. The linearized model was then used with a MPC toolbox for performance simulation to verify its acceptability. The inputs’ number was set at 3, namely, the compressor and supply fan speeds as well as the fresh air intake. The reference points were set at 23.5°C for temperature, 50% for relative humidity, and 780.1 PPM for CO2 level. The control and prediction horizons were set respectively at 3 and 24. The sampling time was set at 0.5 min with the simulation lasting 60 min.The cost function was formulated to track the output error and the inputs’ variation. A cost function optimizer with constraints was adopted to evaluate the inputs’ variation. The error tracking was defined within a finite prediction horizon by a difference bounded by the set point and predicted output. Input variation tracking was defined within a finite control horizon by a difference bounded by the present and past control actions. Scaling factors for both the error and input variation tracking were adopted to overcome scaling issue so that outputs’ prediction could be consistent scale wise. The scaling factors were set by nominal values determined with the modelling input and output.The cost function was also formulated over a finite future time and used to determine an optimal input vector which created instability outside the receding horizon framework. Therefore, only the first element of the input vector was used for output regulation for a given time setting. Once reaching the future time setting, the state variables were updated to compute the new input vector and only its first element was used for the newest regulation. This operation was repeated throughout the prediction horizon until the set point was reached.Figure6 describes the block diagram of the MPC loop.Figure 6
MPC block diagram [47].


#### 5.2.1. Set Point Tracking Assessment

Control actions adjust to changing conditions to track indoor settings. The sampling time in Figures7 and 8 is 0.5 min. In Figure 7, as set temperature changed, the compressor and supply fan speeds varied, whilst fresh air was admitted to maintain indoor settings. The compressor speed increased from 2000 rpm to 3500 rpm (Figure 7(a)) for about 5 min, then stabilized for another 5 min before dropping gradually to settle at 2250 rpm, whilst the temperature dropped from 24°C to 23.5°C (Figure 7(b)).Figure 7
Temperature set point tracking.
(a)(b)(c)(d)(e)(f)The supply fan speed increased from 4000 rpm to 6000 rpm (Figure7(c)) for about 5 min then it dropped gradually to 4200 rpm for 5 min, then, it slightly picked up to 5000 rpm for a brief time before dropping again to finally settle at 4100 rpm, whilst humidity did not change considerably (Figure 7(d)), as its variation was below 50.5% except for the time interval of 22–28 min when humidity picked up to 50.7% in response to the temperature setting 10 min earlier from 24°C to 23.5°C (Figure 7(b)).The fresh air intake did not significantly vary; however, it gradually increased from 0.2 vol/min to a pick of 0.3 vol/min before settling back to 0.2 vol/min (Figure7(e)), as the CO2 level remained unchanged (Figure 7(f)) since its variation was below 780.5 ppm except for the time interval of 10–15 min when the CO2 level was 780.6 ppm.Variation of set temperature from 24°C to 23.5°C (Figure7(b)) made the compressor and supply fan speeds (Figures 7(a) and 7(c)) increase simultaneously to track the set points. The fan speed dropped faster than the compressor speed to avoid excessive dehumidification due to continuous cooling, and this demonstrated that the coupling effect between temperature and humidity could be addressed with simultaneous compressor and supply fan speed adjustment.The CO2 level (Figure 7(f)) was controlled using the PID loop with fresh air intake (Figure 7(e)), carefully precooled at 24°C (Figure 5) and mixed with the room air upstream and the secondary heat exchanger (Figure 1) to prevent from imbalanced loads that might require compressor and supply fan speed increase.


#### 5.2.2. Disturbance Rejection Assessment

Temperature and humidity should be maintained within set ranges irrespective of sudden load changes; therefore, in Figures8(c) and 8(f), as sensible and latent loads rose, temperature and humidity increased subsequently, and the compressor and supply fan speeds varied to maintain indoor settings.Figure 8
System responses to load variation.
(a)(b)(c)(d)(e)(f)The compressor speed increased (Figure8(a)) for rapid load removal to avoid temperature offset (Figure 8(b)) above 24.5°C within the time interval of 22–26 min when the sensible load rose (Figure 8(c)). Simultaneously, the supply fan speed increased (Figure 8(d)) to avoid humidity offset (Figure 8(e)) above 50.5% within the time interval of 20–28 min with rising latent load (Figure 8(f)). The supply fan speed decreased faster (Figure 8(d)) than the compressor speed (Figure 8(a)) once the set target was reached for better moisture removal from the return air.Sensible and latent loads variation (Figures8(c) and 8(f)) impacted on temperature and humidity variation (Figures 7(b) and 7(e)) to a limit where the difference with the set point was respectively 0.5°C and 0.5% where the compressor and supply fan speeds increased simultaneously (Figures 7(a) and 7(d)) to withstand load variation and maintain the set points within range. Simultaneous variation of compressor and supply fan speed with varying load conditions to maintain the set points within range demonstrated the MPC ability to withstand disturbances.Conflicting speed control might be misleading without accounting for the coupling effect that often led to dire controller performance. The compressor speed kept rising to enhance cooling to maintain the temperature within set range (Figure8(a)) despite extreme dehumidification risk. However, rapid slowdown of the supply fan speed (Figure 8(d)) compared to the compressor speed (Figure 8(a)) maintained the humidity level within range without trading off the temperature requirement.


## 5.1. Sublayer PID

The sublayer controller was adopted for fresh air temperature control. The plant model was stable since the roots of its characteristic equation (12) were both negative with the values respectively equal to −0.035 and −0.003. The opened loop or uncontrolled plant’s transient response (Figure 4) had a small steady state error of −4.74 and a settling time of 21 min showing that adequate PID tuning could provide satisfactory performance. The closed loop’s transient response (Figure 5) to a step input was determined by MATLAB following the convolution theorem [43].Figure 4
Open loop’s response.Figure 5
Closed loop’s response.Table4 presents the PID gains determined with Ziegler-Nichols table [44, 45] using the parameters L, T and R [46].Table 4
Ziegler-Nichols parameters and gains.
ParametersL0.5minGainsKp9.3T22.8minKi0.02R0.004Kd0.06The transient responses of the opened and closed loops are represented and validated with the work performed by [45] in Figures 5 and 6, respectively. The sampling time in Figures 4 and 5 is 1 min. The plant characteristics are evaluated with a method similar to [45] in terms of the plant steady state error after a step input, the plant settling time to stabilize within a range δ=±2% of its steady state, and the plant rising time for its response to move from 10% to 90% of its final value.The performance indicators are presented in Table5.Table 5
Plant performance indicators.
PlantOpen loopClose loopSteady state error−4.740.04Maximum overshoot—16.9%Settling time21min2.8minRising time12.2min1.7minThe sublayer controller was tested with step inputs of the water mass flow rates for the open and close loop. PID tuning required to determineKd=0.06 to lower the settling time and decrease the overshoot then Kp=9.3 to lower the rise time and Ki=0.02 to eliminate the steady state error. 28°C outdoor air processed for fresh air intake crossed the primary heat exchanger (Figure 1), releasing its energy to chilled water to level-out the room air temperature at a reference temperature set at 24°C.Fresh air temperature control improved indoor air quality (IAQ) by removing moisture and the pollutants harmful to occupants. It could provide more comfort without stretching the energy demand as the fresh air is precooled at room temperature lowering therefore the compressor and supply fan speeds. PID implementation for fresh air control was in line with ASHRAE guidelines, as the settling time and maximum overshoot of the fresh air temperature (Figure5) were below the respective recommendation of 3 min and 30%, whilst the steady state error was near zero (Table 5). PID implementation on the close loop or controlled plant reduced the rising time to 1.7 min (Figure 5) versus 12.2 min (Figure 4) when the plant was uncontrolled.


## 5.2. Upper Layer MPC

The upper layer controller was adopted to regulate the compressor and supply fan speeds to provide satisfactory IAQ whilst allowing fresh air intake should the CO2 level rose above settings. The system was represented with 7 state variables, 3 inputs, and 3 outputs. State space formulation was adopted for prediction of the future response. In the absence of weight on the control action, the output might reach the set point very fast with no smooth transition. Adopting weighting factor led to gradual system response; therefore, smoother responses required a longer time for the control action to reach steady state where it decreased gradually as the energy used for set point tracking is spread over the future time.MPC testing was specific to the FCU’s dynamics. MPC’s performances were assessed in terms of set point tracking and disturbance rejection. The testing parameters [32] are listed in Table 6.Table 6
MPC parameters.
Compressor speed setting50%Supply fan speed setting50%Moisture content0.011kgkg−1 dry airRefrigerant flow rate3100m3s−1Outdoor air temperature28℃The MPC was tested on Simulink using the MPC toolbox. The mathematical model of the upper layer controller was implemented on Simulink, then linearized around a steady state point to obtain a Simulink control design framework. The linearized model was then used with a MPC toolbox for performance simulation to verify its acceptability. The inputs’ number was set at 3, namely, the compressor and supply fan speeds as well as the fresh air intake. The reference points were set at 23.5°C for temperature, 50% for relative humidity, and 780.1 PPM for CO2 level. The control and prediction horizons were set respectively at 3 and 24. The sampling time was set at 0.5 min with the simulation lasting 60 min.The cost function was formulated to track the output error and the inputs’ variation. A cost function optimizer with constraints was adopted to evaluate the inputs’ variation. The error tracking was defined within a finite prediction horizon by a difference bounded by the set point and predicted output. Input variation tracking was defined within a finite control horizon by a difference bounded by the present and past control actions. Scaling factors for both the error and input variation tracking were adopted to overcome scaling issue so that outputs’ prediction could be consistent scale wise. The scaling factors were set by nominal values determined with the modelling input and output.The cost function was also formulated over a finite future time and used to determine an optimal input vector which created instability outside the receding horizon framework. Therefore, only the first element of the input vector was used for output regulation for a given time setting. Once reaching the future time setting, the state variables were updated to compute the new input vector and only its first element was used for the newest regulation. This operation was repeated throughout the prediction horizon until the set point was reached.Figure6 describes the block diagram of the MPC loop.Figure 6
MPC block diagram [47].


### 5.2.1. Set Point Tracking Assessment

Control actions adjust to changing conditions to track indoor settings. The sampling time in Figures7 and 8 is 0.5 min. In Figure 7, as set temperature changed, the compressor and supply fan speeds varied, whilst fresh air was admitted to maintain indoor settings. The compressor speed increased from 2000 rpm to 3500 rpm (Figure 7(a)) for about 5 min, then stabilized for another 5 min before dropping gradually to settle at 2250 rpm, whilst the temperature dropped from 24°C to 23.5°C (Figure 7(b)).Figure 7
Temperature set point tracking.
(a)(b)(c)(d)(e)(f)The supply fan speed increased from 4000 rpm to 6000 rpm (Figure7(c)) for about 5 min then it dropped gradually to 4200 rpm for 5 min, then, it slightly picked up to 5000 rpm for a brief time before dropping again to finally settle at 4100 rpm, whilst humidity did not change considerably (Figure 7(d)), as its variation was below 50.5% except for the time interval of 22–28 min when humidity picked up to 50.7% in response to the temperature setting 10 min earlier from 24°C to 23.5°C (Figure 7(b)).The fresh air intake did not significantly vary; however, it gradually increased from 0.2 vol/min to a pick of 0.3 vol/min before settling back to 0.2 vol/min (Figure7(e)), as the CO2 level remained unchanged (Figure 7(f)) since its variation was below 780.5 ppm except for the time interval of 10–15 min when the CO2 level was 780.6 ppm.Variation of set temperature from 24°C to 23.5°C (Figure7(b)) made the compressor and supply fan speeds (Figures 7(a) and 7(c)) increase simultaneously to track the set points. The fan speed dropped faster than the compressor speed to avoid excessive dehumidification due to continuous cooling, and this demonstrated that the coupling effect between temperature and humidity could be addressed with simultaneous compressor and supply fan speed adjustment.The CO2 level (Figure 7(f)) was controlled using the PID loop with fresh air intake (Figure 7(e)), carefully precooled at 24°C (Figure 5) and mixed with the room air upstream and the secondary heat exchanger (Figure 1) to prevent from imbalanced loads that might require compressor and supply fan speed increase.


### 5.2.2. Disturbance Rejection Assessment

Temperature and humidity should be maintained within set ranges irrespective of sudden load changes; therefore, in Figures8(c) and 8(f), as sensible and latent loads rose, temperature and humidity increased subsequently, and the compressor and supply fan speeds varied to maintain indoor settings.Figure 8
System responses to load variation.
(a)(b)(c)(d)(e)(f)The compressor speed increased (Figure8(a)) for rapid load removal to avoid temperature offset (Figure 8(b)) above 24.5°C within the time interval of 22–26 min when the sensible load rose (Figure 8(c)). Simultaneously, the supply fan speed increased (Figure 8(d)) to avoid humidity offset (Figure 8(e)) above 50.5% within the time interval of 20–28 min with rising latent load (Figure 8(f)). The supply fan speed decreased faster (Figure 8(d)) than the compressor speed (Figure 8(a)) once the set target was reached for better moisture removal from the return air.Sensible and latent loads variation (Figures8(c) and 8(f)) impacted on temperature and humidity variation (Figures 7(b) and 7(e)) to a limit where the difference with the set point was respectively 0.5°C and 0.5% where the compressor and supply fan speeds increased simultaneously (Figures 7(a) and 7(d)) to withstand load variation and maintain the set points within range. Simultaneous variation of compressor and supply fan speed with varying load conditions to maintain the set points within range demonstrated the MPC ability to withstand disturbances.Conflicting speed control might be misleading without accounting for the coupling effect that often led to dire controller performance. The compressor speed kept rising to enhance cooling to maintain the temperature within set range (Figure8(a)) despite extreme dehumidification risk. However, rapid slowdown of the supply fan speed (Figure 8(d)) compared to the compressor speed (Figure 8(a)) maintained the humidity level within range without trading off the temperature requirement.


## 5.2.1. Set Point Tracking Assessment

Control actions adjust to changing conditions to track indoor settings. The sampling time in Figures7 and 8 is 0.5 min. In Figure 7, as set temperature changed, the compressor and supply fan speeds varied, whilst fresh air was admitted to maintain indoor settings. The compressor speed increased from 2000 rpm to 3500 rpm (Figure 7(a)) for about 5 min, then stabilized for another 5 min before dropping gradually to settle at 2250 rpm, whilst the temperature dropped from 24°C to 23.5°C (Figure 7(b)).Figure 7
Temperature set point tracking.
(a)(b)(c)(d)(e)(f)The supply fan speed increased from 4000 rpm to 6000 rpm (Figure7(c)) for about 5 min then it dropped gradually to 4200 rpm for 5 min, then, it slightly picked up to 5000 rpm for a brief time before dropping again to finally settle at 4100 rpm, whilst humidity did not change considerably (Figure 7(d)), as its variation was below 50.5% except for the time interval of 22–28 min when humidity picked up to 50.7% in response to the temperature setting 10 min earlier from 24°C to 23.5°C (Figure 7(b)).The fresh air intake did not significantly vary; however, it gradually increased from 0.2 vol/min to a pick of 0.3 vol/min before settling back to 0.2 vol/min (Figure7(e)), as the CO2 level remained unchanged (Figure 7(f)) since its variation was below 780.5 ppm except for the time interval of 10–15 min when the CO2 level was 780.6 ppm.Variation of set temperature from 24°C to 23.5°C (Figure7(b)) made the compressor and supply fan speeds (Figures 7(a) and 7(c)) increase simultaneously to track the set points. The fan speed dropped faster than the compressor speed to avoid excessive dehumidification due to continuous cooling, and this demonstrated that the coupling effect between temperature and humidity could be addressed with simultaneous compressor and supply fan speed adjustment.The CO2 level (Figure 7(f)) was controlled using the PID loop with fresh air intake (Figure 7(e)), carefully precooled at 24°C (Figure 5) and mixed with the room air upstream and the secondary heat exchanger (Figure 1) to prevent from imbalanced loads that might require compressor and supply fan speed increase.


## 5.2.2. Disturbance Rejection Assessment

Temperature and humidity should be maintained within set ranges irrespective of sudden load changes; therefore, in Figures8(c) and 8(f), as sensible and latent loads rose, temperature and humidity increased subsequently, and the compressor and supply fan speeds varied to maintain indoor settings.Figure 8
System responses to load variation.
(a)(b)(c)(d)(e)(f)The compressor speed increased (Figure8(a)) for rapid load removal to avoid temperature offset (Figure 8(b)) above 24.5°C within the time interval of 22–26 min when the sensible load rose (Figure 8(c)). Simultaneously, the supply fan speed increased (Figure 8(d)) to avoid humidity offset (Figure 8(e)) above 50.5% within the time interval of 20–28 min with rising latent load (Figure 8(f)). The supply fan speed decreased faster (Figure 8(d)) than the compressor speed (Figure 8(a)) once the set target was reached for better moisture removal from the return air.Sensible and latent loads variation (Figures8(c) and 8(f)) impacted on temperature and humidity variation (Figures 7(b) and 7(e)) to a limit where the difference with the set point was respectively 0.5°C and 0.5% where the compressor and supply fan speeds increased simultaneously (Figures 7(a) and 7(d)) to withstand load variation and maintain the set points within range. Simultaneous variation of compressor and supply fan speed with varying load conditions to maintain the set points within range demonstrated the MPC ability to withstand disturbances.Conflicting speed control might be misleading without accounting for the coupling effect that often led to dire controller performance. The compressor speed kept rising to enhance cooling to maintain the temperature within set range (Figure8(a)) despite extreme dehumidification risk. However, rapid slowdown of the supply fan speed (Figure 8(d)) compared to the compressor speed (Figure 8(a)) maintained the humidity level within range without trading off the temperature requirement.


## 6. Conclusion

Two controllers were implemented with a sublayer PID for outdoor air processing and an upper layer MPC for a simultaneous temperature, humidity, and CO2 level regulation. A cost function was established to determine an optimal control action for the MPC implementation using the receding horizon framework. The MPC performance was satisfactory with regards to set point tracking and disturbance rejection.Fresh air precooling enhanced the CO2 level control without imbalanced loads since the fresh air and room air temperatures were level-out, thus, requiring less cooling with the critical load being removed upstream the mixing zone. Temperature and humidity coupling effect was accounted by the MPC to enhance performances. Conflicting compressor and supply fan speeds were addressed as the compressor speed kept rising at times when the supply fan speed declined without trading-off the indoor condition settings. The MPC remained robust under load variation.This work demonstrated that the PID and the MPC could be combined to improve the IAQ with satisfactory control performance. The PID is more adequate to control a single parameter whose setting does not affect other parameters. The PID was implemented to regulate the outdoor air temperature for fresh air intake without imbalanced loads. The MPC is adequate for simultaneous control of multiple parameters whose settings might be correlated. The MPC was adopted for simultaneous indoor temperature and humidity control considering their coupling effect whilst adjusting the indoor CO2 level.The usefulness of this work is proven since implementing a PID loop for temperature control to prevent from imbalanced loads due to fresh air intake enables satisfactory set point tracking performance without necessarily increasing the compressor and supply fan speeds to overcome the imbalance. This reach of this work could be extended to evaluate the overall energy usage of a chiller-FCU in comparison to a similar system without a PID loop. Moreover, the sublayer controller performance using the PID loop at different operating points might be worth investigating especially for investigation of the disturbance rejection.



---

*Source: 8405361-2022-09-24.xml*