## 5 TCLab Results
### PID Controller Tuning  
This section presents both simulation and TCLab results regarding the PID controller gains optimized with the PSO algorithm as depicted in the previous sections. The results are compared with the Cohen-Coon (CC) settings [43], as previously introduced in [39; 40] and a more recent technique: AMIGO [5], which is well-known to achieve system robustness. For the sake of experiment replication, these two tuning rule methods for PID controllers are presented in Table 1.  
Based on the FOPTD PSO model, PID controllers can be designed using several tuning methods. In [40], results were presented using the Cohen-Coon (CC) settings as these perform well for the TCLab. The results obtained with the CC PID settings \(Kp=13.47\), \(Ti=45.99\) s, and \(Td=7.00\) s are presented in Figure 7. This figure presents the overlapped results between the simulated and TCLab responses. A step input is applied to the system reference input at \(t=0\) s to define the TCLab transistor 1 set-point  
Figure 5: TCLab system identification and controller tuning approach. temperature at 25 \({}^{\circ}\)C and another one at \(t\) = 100 s increasing the set-point to 60 \({}^{\circ}\)C. A load disturbance with a magnitude of \(-\)40% is applied to the controller output at \(t\) = 380 s. Both the FOPTD model and the CC PID gains are used in the next section for comparison purposes with the other methods. The PSO optimization simulations were carried out in MATLAB(r)/SIMULINK(r). The PSO settings were defined for all the subsequent PID controller tuning simulations as follows:  
* A swarm with size \(m\) = 30 particles. * Each simulation was run for 70 iterations. * The search intervals used for the controller gains \(K_{p}\), \(T_{i}\), and \(T_{d}\) are: [0.1 20], [10 s 150 s], and [1 s 12 s], respectively. The tuning gains obtained with classical tuning rules can be used (e.g., CC) to define the search interval. The interval used for the integral gain was widened to see if the PSO converged for slower TCLab control system responses. * The inertia weight for initial and final values were \(\omega_{\text{init}}\) = 0.7 and \(\omega_{\text{fin}}\) = 0.4. These values were deemed appropriate considering the number of iterations used, as it can be observed from Figure 8. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & \(Kp\) & \(T_{i}\) & \(Td\) \\ \hline Cohen-Coon & \(\frac{1}{K}\frac{T}{L}\left(\frac{4}{3}+\frac{L}{4T}\right)\) & \(L\frac{32+6}{13+8}\) & \(L\frac{4}{11+2\gamma}\) \\ AMIGO & \(\left(\frac{1}{K}\right)\left(0.2+0.45\frac{T}{L}\right)\) & \(\left(\frac{0.4L+0.8T}{L+0.17}\right)\) & \(\frac{0.51\gamma}{0.3L+T}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cohen-Coon [32] and AMIGO [5] proportional, integral, and derivative (PID) tuning rules. Figure 6: TCLab open-loop step response (**top plot**) and particle swarm optimization (PSO) model step response overlapped with the real TCLab data (**bottom plot**). Figure 7: Simulated and TCLab responses using Cohen-Coon settings. In this figure, four different inertia weight intervals [\(\omega_{\text{init}}\), \(\omega_{\text{fin}}\)] were considered: (a) [0.9, 0.2], (b) [0.9, 0.4], [0.7, 0.4], and [0.4, 0.4]. Note that the conditions used for conducting the PSO optimization PID tuning tests differ from the ones used to perform the FOPTD model identification, particularly in the swarm size and higher iteration number. The PSO convergence rate for the PID optimization was found to be slower than the FOPTD model identification case. The optimizations consider a step response applied at the reference input at \(t=0\) s assuming an ambient temperature of 18 \({}^{\circ}\)C and a set-point of 60 \({}^{\circ}\)C. The simulation time was 600 s, and a load disturbance with amplitude \(-40\%\) was applied at instant \(t=300\) s. The optimization test result considering just the minimization of IAE is presented in Figures 9-11.