## 2 PID Control Design: Problem Statement  
Consider a general block diagram representation of a closed-loop system in Figure 1, assuming the following representation where \(r\) is the reference input (set-point), \(y\) is the controlled output, \(e\) is the error signal, \(u\) is the control output, \(d_{1}\) is a load disturbance, \(d_{2}\) is an output disturbance, \(n\) is a noise signal, and \(G_{c}\) and \(G_{p}\) are the controller and process transfer functions. The ideal feedback control corresponds to obtaining the controlled output equal to the reference input independent of system disturbances. This ideal control is not possible in practice due to disturbances, measurement noise, actuator saturation, and a wide range of other physical limitations. With these limitations, the controlled output should attempt to follow the reference input (Set-Point Tracking, SPT), while rejecting the system disturbances (Disturbance Rejection, DR). In this work, it is assumed that a dynamic model of the system can be identified. In addition to the SPT and DR criteria, it is also important to consider the control effort in the controller design. A relevant research question is: How can a PID controller be designed to achieve the best possible set-point performance while minimizing the control effort? There are many time-domain criteria to evaluate a controller performance. These criteria frequently involve set-point step responses with the smallest possible values for first overshoot and rise time. An indirect approach to simultaneously minimize several step response indices is using error-based criteria. The most common are the following: Integral of Square Error (ISE), Integral of Absolute Error (IAE), Integral of Time Weighted Absolute Error (ITAE), and Integral Weighted Square Error (ITSE), represented respectively by the following expressions:  
\[ISE=\int_{0}^{t_{sim}}e^{2}(t)\ dt \tag{1}\]  
\[IAE=\int_{0}^{t_{sim}}\Bigl{|}e(t)\Bigr{|}dt \tag{2}\]  
\[ITAE=\int_{0}^{t_{sim}}t\Bigr{|}e(t)\Bigr{|}dt \tag{3}\]  
\[ITSE=\int_{0}^{t_{sim}}te^{2}(t)dt \tag{4}\]  
with \(t_{sim}\) representing the simulation time, which should be large enough so that the system-controlled output reaches the steady-state value. Depending on which of these criteria is adopted in the optimization cost function, different PID controller settings are obtained. Among these criteria the most widely used are the ISE, IAE, and ITAE. Time weighting the absolute error penalizes the error as time increases for ITAE, promoting the elimination of small steady-state errors. IAE independently gives the same relevance to errors over time. For this reason, IAE is adopted in this study. A common criterion to measure the control effort is:  
\[E_{u}=\int_{0}^{t_{sim}}\Bigl{|}u(t)\Bigr{|}dt \tag{5}\]  
Figure 1: General closed-loop control system block diagram. there is specific information regarding the problem. The specific information can be incorporated in the initialization procedure to improve the convergence rate to an optimal solution. Each PSO iteration, \(t\), updates every particle position to a new position. The update is from the sum of a velocity term according to (8) with the velocity evaluated using (9):  
\[x_{i}(t+1)=x_{i}(t)+v_{i}(t+1) \tag{9}\]  
\[v_{i}(t+1)=\omega\ v_{i}(t)+c_{1}\phi_{1}[b_{i}(t)-x_{i}(t)]+c_{2}\phi_{2}[g(t )-x_{i}(t)] \tag{10}\]  
where \(b_{i}\) represents the best position obtained by particle \(i\) until the current iteration, \(t;g\) represents the best position from the full swarm (global best) or a specific neighborhood (local best). In this study, information is shared among the entire swarm (fully-connected model). As it can be observed from (9), the new velocity value is evaluated by a sum of three parts. The first part (\(\omega\ v_{i}(t)\)) is the inertia and considers the previous velocity value with a factor, \(\omega\), called inertia weight. The second part (\(c_{1}\phi_{1}[b_{i}(t)-x_{i}(t)]\)) represents the particle cognitive knowledge update.