## 3 Traditional Controllers: PID and MPC Closed-Loop Control Strategies
### PID MIMO Centrifugal Chiller Closed Loop System Control in Extended State Space Representation  
The PID closed-loop control strategy for the MIMO CCS extended model with 39 internal states is depicted in Figure 12a-c. The PID transfer function in the s-complex domain is given by Equation (11). Both controllers' parameter datasets for evaporator temperature (indexed by \(T\)) and condenser liquid refrigerant level (indexed by \(L\)) were set to the following values:  
\[k_{PT}=0.1,\;k_{IT}=0.0001,\;k_{DT}=0.1,\;N_{T}=100,\;k_{PL}=0.1,\;k_{IL}=0.0001, \;k_{DL}=0.1,\;N_{L}=100,\]  
The temperature setpoint within the evaporator was Tchw-sp = 6.67 [degC], and the level of liquid refrigerant inside the condenser was \(L\) = 45 (%), with a much longer simulation time of Tf = 13,600 s (3 h 30 min). Therefore, alternative simplified ARMAX, ANFIS and neural network models of the MIMO Centrifugal Chillaer capable of capturing its entire dynamic evolution and suitable for control purposes were investigated in this research. Figure 12a shows the Simulink diagram of the PID closed-loop control strategy, and Figure 12b presents two subsystem components of the Simulink diagram (model + visualization block). The code lines of the Simulink MATLAB function from the visualization block are given in Figure 12c. The Simulink simulation results are discussed in Section 5, and a rigorous performance analysis is conducted in Section 6. Digital PID Control of MIMO Centrifugal Chiller Closed-Loop System in Extended State-Space Representation (39 States)  
A large number of simulations performed on a MATLAB Simulink R2024a platform showed a slow response of about 3 h and 30 min to reach a steady state and achieve accurate tracking performance for control of the evaporator subsystem temperature and the levels of liquid refrigerant in the condenser subsystem. The development of a fast-tuning digital PID controller, similar to an interesting approach proposed previously [15], provided a substantial improvement. Furthermore, an alternative to the extended MIMO centrifugal chiller model, a simplified Adaptive Neural Fuzzy Inference System (ANFIS) is under investigation for integration with the digital PID in the same closed-loop control strategy whose Simulink block diagram is shown in Figure 5. The MATLAB Simulink simulations are presented and discussed in Section 5 and a rigorous performance analysis is carried out in Section 6, revealing a fast response (settling time) and high tracking accuracy. Furthermore, the model's performance was compared with an advanced deep learning neural network (RL DLNN) in which the reward function was generated based on the step response block specifications of digital PID control of the MIMO CCS ANFIS model developed in the next section. In the Simulink diagram shown in Figure 5 the digital PID controller appears on the left side, implemented based on Equation (8). The simplest way to implement a digital PID is to discretize Equation (8) and then to transform it into a difference equation of the form suggested in [22]. Specifically, this is a recursive method that calculates the PID controller output at \(t=kT_{s},\;k\in\mathbb{Z},T_{s}\)--sampling time, based on the previous value of the controller output and its growth [22], as follows:  
\[u_{PID}(kT_{s})=u_{PID}[(k-1)T_{s}]+\Delta u_{PID}(kT_{s}) \tag{13}\]  
For simplicity, assuming \(T_{s}=1[s]\), Equation (13) becomes:  
\[u_{PID}(k)=u_{PID}(k-1)+k_{P}(e(k)-e(k-1))+k_{I}e(k)+k_{D}(e(k)-2e(k-1)+e(k-2)) \tag{14}\]  
or, compact:  
\[u_{PID}(k)=u_{PID}(k-1)+(k_{P}+k_{I}+k_{D})e(k)-(k_{P}+2k_{D})e(k-1)+k_{D}e(k-2) \tag{15}\]  
\[u_{PID}(k)=u_{PID}(k-1)+ae(k)+be(k-1)+ce(k-2) \tag{16}\]  
with the coefficients \(a,b\) and \(c\) given by:  
\[a=k_{P}+k_{I}+k_{D},\;b=-k_{P}-2k_{D},\;c=k_{D} \tag{17}\]  
Figure 5: Digital PID ANFIS discrete-time control temperature inside evaporator and liquid refrigerant level within condenser—overall Simulink diagram.