## 6 Offline Optimization
### Offline Optimized PID Gain-Scheduled Controller  
In Step 2, based on the proportional gain function \(f(e)\) from Step 1, the initial scheduled derivative gain function \(D\) is selected as \(D(e)=11.13f(e)\) and optimized following the same process as Step 1 to obtain coefficients \(a\), \(b\), and \(c\), with the scheduled gain \(P\) from Step 1 and the integral gain \(I\) fixed. The optimization parameters are shown in Table 4.  
In Step 3, the initial scheduled integral gain \(I\) is in the form \(I(e)=57.098f(e)\), and is optimized in Step 3 using the gain-scheduled \(P\) and \(I\) from Steps 1 and 2, respectively. The optimization parameters are shown in Table 5. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & \multicolumn{5}{c}{**Gain-Scheduled PID Controller**} \\ \hline \(a\) & 1466 & \(b\) & 0.4937 & \(c\) & 916.17 \\ \(l\) & 57.098 & \(D\) & 11.13 & & \\ \hline \multicolumn{5}{c}{**PID Controller**} \\ \hline \(P\) & 2494.7 & \(l\) & 32.0724 & \(D\) & 9.7691 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Optimal controller parameters for Step 1. Figure 9: Pareto fronts of scheduled \(P\) and fixed \(P\) gain controllers. The solution of the optimal gain-scheduled PID controller is shown in Equation (11), with the associated evolution of Pareto front for each step shown in Figure 10. Note that part of the Pareto front in Step 1 is outside the plot. With the scheduled optimal derivative gain obtained in Step 2, both objective functions \(J_{1}\) (overshoot) and \(J_{2}\) (ISE) have been improved to from 0.0110 and 0.0473 to 0.0039 and 0.0470, representing an improvement of 64.5% and 0.6%, respectively. Finally, after Step 3, \(J_{1}\) and \(J_{2}\) are optimized to 0.0025 and 0.0470, a 35.9% and 0% improvement, respectively, over Step 2. To investigate the optimality, the scheduled function of the proportional gain \(P\) is re-optimized using the scheduled \(D\) and \(I\) gains from Steps 2 and 3, with the optimized result showing only a negligible improvement. Because the offline optimized (initial) gain-scheduled PID controller is intended to be further optimized online, the optimization results from Step 3 are sufficient. \[ \begin{cases}P(e)=\frac{1466}{abs(e)^{0.4937}}+916.17\\ I(e)=57.098(\frac{1.3763}{abs(e)^{0.717}}+0.098)\\ D(e)=11.13(\frac{0.066}{abs(e)^{1.00}}+0.785)\end{cases}  \tag{11}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Value** & **Parameter** & **Value** \\ \hline \(N_{p}\) & 100 & \(a_{range}\) & [0, 2] \\ \(b_{range}\) & [0, 3] & \(c_{range}\) & [0, 2] \\ \(P_{C}\) & 90\% & \(D_{C}\) & 10 \\ \(P_{M}\) & 30\% & \(D_{M}\) & 20 \\ \(Generation\) & 100 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Genetic Algorithm parameters used in Step 2. Figure 10: Pareto fronts of the gain-scheduled PID controller. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Value** & **Parameter** & **Value** \\ \hline \(N_{p}\) & 100 & \(a_{range}\) & [0, 2] \\ \(b_{range}\) & [0, 3] & \(c_{range}\) & [0, 2] \\ \(P_{C}\) & 90\% & \(D_{C}\) & 10 \\ \(P_{M}\) & 30\% & \(D_{M}\) & 20 \\ \(P_{M}\) & 30\% & \(D_{M}\) & 20 \\ \(Generation\) & 100 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Genetic Algorithm parameters used in Step 3. The step responses of the initial optimal controller are shown in Figure 11, with the associated performance improvements summarized in Table 6; the case numbers refer to these described in Section 3.2, while the notations G-S and F-G denote the gain-scheduled (G-S) and fixed-gain (F-G) PID controllers, respectively. Compared with the fixed-gain PID controller, the \(J_{1}\) (Overshoot) and \(J_{2}\) (ISE) are optimized to 0.0025 and 0.0470, which represents an improvement of 94.2% and 1.9%, respectively. In the detailed cases, regarding the steady-state error, both controllers handle it well in Cases 2, 3, and 4, with all of them being below 1%.