# Tuning and Retuning of PID Controller for Unstable Systems Using Evolutionary Algorithm

Authors: V. Rajinikanth; K. Latha
Journal: ISRN Chemical Engineering
 (2012)

---

## Abstract

Proportional + integral + derivative (PID) controllers are widely used in industrial applications to provide optimal and robust performance for stable, unstable, and nonlinear processes. In this paper, particle swarm optimization (PSO) algorithm is proposed to tune and retune the PID controller parameter for a class of time-delayed unstable systems. The proposal is to search the optimal controller parameters likeKp,Ki, and Kd by minimising the cost function. The integral of squared error (ISE) criterion is considered as the cost function, which guides the PSO algorithm to get the optimised controller parameters. The procedure for PID parameter tuning and retuning is presented in detail. A comparative study is done with the conventional PID tuning methods proposed in the literature. The simulation results show that the PSO-based PID controller tuning approach provides  improved  performance  for  the  setpoint  tracking,  load  disturbance  rejection,  error minimization, and measurement noise attenuation for a class of unstable systems.


---

## Body

## 1. Introduction

Poportional  integral  derivative (PID) controllers are widely used in industrial applications to provide optimal and robust performance for stable, unstable, and nonlinear processes. It can be easily implementable in analog or digital form. Further, it supports tuning and online retuning based on the performance requirement of the process to be controlled.Open-loop unstable systems are mostly observed in chemical process industries and for economical and/or safety reasons, the chemical process loops to be operated in unstable steady state [1]. For unstable systems, there exist a minimum and maximum values of controller gain, and the average of this limiting value is considered to design the controller to stabilize the system. The increase in time delay in the process narrows down the limiting value and it restricts the performance of the closed-loop system under control. In addition, these systems show unusual overshoot or inverse response due to the presence of negative or positive zeros [2]. The literature gives details about various theoretical studies on fine tuning of PID controllers for open-loop unstable system [3–8]. Most of the controller tuning approaches proposed for unstable system may require an approximate first or second order transfer function model with delay. Further, for real time application, the model may not be readily available in practice or may be changing due to uncertainty [9]. The model-based controller tuning requires complex computations to identify the controller parameters. To overcome this, it is necessary to use soft computing based model independent controller autotuning methods.Optimization is a powerful tool for finding the controller parameters. Soft computing-based PID controller parameter optimization is widely addressed by the researchers. Wang et al. have proposed a PSO-based autotuning of PID controller on a stable system [10]. Jain and Nigam have attempted a PD-PI controller tuning for a stable second order system [11]. Kim et al. have discussed the PID controller tuning for a stable system using biologically inspired algorithms [12, 13]. Ali and Majhi have proposed PID controller tuning for a class of time-delayed stable systems using bacterial foraging optimization (BFO) algorithm [14]. Korani et al. presented a comparative analysis on PSO, BFO, and hybrid algorithm-based PID controller for a stable system [15]. Rajinikanth and Latha have discussed the heuristic algorithm-based PID controller tuning for unstable system with time delay [16–18].In this work, the PID controller parameter tuning is proposed for unstable system using particle swarm optimization (PSO) algorithm introduced by Kennedy and Eberhart [19]. PSO is a biologically inspired algorithm, and it is successfully used for engineering applications due to its high computational efficiency, easy implementation and stable convergence. Another advantage of PSO technique is that it does not need detailed mathematical description of the process and along with the controller tuning, it also supports the retuning of controller parameters, if necessary. In this work, to evaluate the performance of the proposed method, a simulation study is carried out using a class of unstable system models.This paper is organized as follows: principle of PSO algorithm is discussed in Section2, the basics of PID controller and implementation of PSO to optimize PID parameter is presented in Section 3. In Section 4, simulated results obtained for a class of unstable systems are shown. At the end, conclusion of the present research work is given in Section 5.


## 2. Particle Swarm Optimization

Particle swarm optimization (PSO) algorithm is a population-based evolutionary computation technique developed by the inspiration of the social behavior in bird flocking or fish schooling. It attempts to mimic the natural process of group communication of individual knowledge, to achieve some optimum property. In this method, a population of swarm is initialized with random positionsSi and velocities  Vi. At the beginning, each particle of the population is scattered randomly throughout the entire search space and with the guidance of the performance criterion, the flying particles dynamically adjust their velocities according to their own flying experience and their companions flying experience. Each particle remembers its best position obtained so far, which is denoted as pbest (Pit). It also receives the globally best position achieved by any particle in the population, which is denoted as gbest (Git) [20–25].The updated velocity of each particle can be calculated using the present velocity and the distances frompbest and gbest. The updated velocity and the position are given in (1) and (2), respectively. Equation (3) shows the inertia weight(1)Vit+1=Wt⋅Vit+C1⋅R1⋅(Pit-Sit)+C2⋅R2⋅(Git-Sit),(2)Sit+1=Sit+Vit+1,(3)Wt=(Wmax⁡-Iter)×[(Wmax⁡-Wmin⁡)Itermax⁡],
where C1 and C2 are positive constants. C1 is the cognitive learning rate and C2 is the global learning rate. R1 and R2 are random numbers in the range 0−1. The parameter “W” is inertia weight that increases the overall performance of PSO-based search. The larger value of W(Wmax) can favor the global wide-range search, and the lower value of W(Wmin) implies a higher ability for local nearby search.


### 2.1. Steps in PSO-Based PID Controller Optimization

Step 1.
% Assign values for the PSO parameters %
Initialize: swarm (N) and step size; learning rate (C1,C2) dimension for search space (D); inertia weight (W);
% Initialize random values and current fitness %
R1= rand (D,N); R2= rand (D,N); current fitness = 0 * ones (N,1).Step 2.
% Initialize Swarm Velocity and Position %
Current position = 10 * (rand (D,N)−0.2),
current velocity = 0.5 * rand (D,N).Step 3.
Evaluate the objective function of every particle and record each particle’sPit andGit. Evaluate the desired optimization fitness function in D-dimension variables.Step 4.
Compare the fitness of particle with itsPit and replace the local best value as given below.
fori=1:N
If current fitness (i) < local best fitness (i);
Then local best fitness = current fitness;
local best position = current position (i);
end
% Same operation to be performed forGit%.Step 5.
Change the current velocity and position of the particle group according to (1) and (2).Step 6.
Steps 2–5 are repeated until the predefined value of the function or the number of iterations has been reached. Record the optimizedKp, Ki, and Kd values.Step 7.
Perform closed-loop test with the optimised values of controller parameters and calculate the time domain specification for the system.
If the values are within the allowable limit, consider the currentKp, Ki, and Kd values.
Otherwise perform the retuning operation forKi, by replacing the optimised numerical values for Kp and Kd.


## 2.1. Steps in PSO-Based PID Controller Optimization

Step 1.
% Assign values for the PSO parameters %
Initialize: swarm (N) and step size; learning rate (C1,C2) dimension for search space (D); inertia weight (W);
% Initialize random values and current fitness %
R1= rand (D,N); R2= rand (D,N); current fitness = 0 * ones (N,1).Step 2.
% Initialize Swarm Velocity and Position %
Current position = 10 * (rand (D,N)−0.2),
current velocity = 0.5 * rand (D,N).Step 3.
Evaluate the objective function of every particle and record each particle’sPit andGit. Evaluate the desired optimization fitness function in D-dimension variables.Step 4.
Compare the fitness of particle with itsPit and replace the local best value as given below.
fori=1:N
If current fitness (i) < local best fitness (i);
Then local best fitness = current fitness;
local best position = current position (i);
end
% Same operation to be performed forGit%.Step 5.
Change the current velocity and position of the particle group according to (1) and (2).Step 6.
Steps 2–5 are repeated until the predefined value of the function or the number of iterations has been reached. Record the optimizedKp, Ki, and Kd values.Step 7.
Perform closed-loop test with the optimised values of controller parameters and calculate the time domain specification for the system.
If the values are within the allowable limit, consider the currentKp, Ki, and Kd values.
Otherwise perform the retuning operation forKi, by replacing the optimised numerical values for Kp and Kd.


## 3. PID Controller Tuning and Retuning

Industrial PID controllers are usually available as a packaged form, and to perform well with the industrial process problems, the PID controller requires optimal tuning. Figure1 shows the diagram of a simple closed-loop control system. In this structure, the controller (Gc(s)) has to provide closed-loop stability, smooth reference tracking, shape of the dynamic and the static qualities of the disturbance response, reduction of the effect of supply disturbance and attenuation of the measurement noise effect [26]. In this study reference tracking, load disturbance rejection, and measurement noise attenuation are considered.Figure 1
Block diagram of a closed-loop control system.Closed-loop response of the system with setpointR(s), load disturbance D(s), and noise N(s) can be expressed as (4) and(5)(4)Y(s)=[Gp(s)GC(s)1+Gp(s)GC(s)]R(s)+[11+Gp(s)GC(s)]D(s)-[Gp(s)GC(s)1+Gp(s)GC(s)]N(s),(5)Y(s)=[T(s)*[R(s)–N(s)]+(S(s)*D(s)],
where the complementary sensitivity function and sensitivity function of the above loop are represented in (6) and (7), respectively
(6)T(s)=Y(s)R(s)=[Gp(s)GC(s)1+Gp(s)GC(s)],(7)S(s)=[11+Gp(s)GC(s)].The final steady state response of the system for the setpoint tracking and the load disturbance rejection is given in (8) and (9), respectively,(8)yR(∞)=lim⁡t→∞sYR(s)=lim⁡t→∞sx[Gp(s)GC(s)1+Gp(s)GC(s)](As)=A,(9)yD(∞)=lim⁡t→∞sx[11+Gp(s)GC(s)](Ls)=0,
where A is amplitude of the reference signal and L is disturbance amplitude.To achieve a satisfactoryyR(∞) and  yD(∞), it is necessary to have an optimally tuned PID parameters. From the literature it is observed that to get a guaranteed robust performance, the integral controller gain “Ki” should have an optimised value.In this study, a noninteracting form of PID (GPID) controller structure is considered. For real control applications, the feedback signal is the sum of the measured output and measurement noise component. A low pass filter is used with the derivative term to reduce the effect of measurement noise.The PID structures are defined as the following:(10)GPID(s)=Kpe(t)+Ki∫0Te(t)dt+Kdde(t)dt,(11)GPID(s)=Kp[1+1Tis+TdsTdsN+1],
where Kp/Ti=Ki, Kp*Td=Kd, and N=filter constant(12)Ym(s)=Y(s)=PV(forN(s)=0),(13)Ym(s)=Y(s)±N(s)=PV(forN(s)≠0).
Figure 2 shows the block diagram of PID parameter optimization using PSO algorithm. Minimizing the cost function generates the controller parameters. The error criterion is considered as the cost function, and the values of Kp, Ki, and Kdare continuously adjusted, until the error of the closed-loop system is minimum. Equations (14)–(16) show the normally considered error criterion in control system to evaluate the performance of controller.(14)IAE=∫0T|e(t)|dt=∫0T|r(t)-y(t)|dt,(15)ISE=∫0Te(t)2dt=∫0T[r(t)-y(t)]2dt,(16)ITAE=∫0Tt|e(t)|dt=∫0Tt|r(t)-y(t)|dt,
where e(t)= error,r(t)=reference input, and y(t)= measured variable.Figure 2
Block diagram for PID parameters tuning and retuning using PSO.In this work, ISE (15) is considered as the cost function. For unstable systems, the ISE value may be large due to excessive overshoot in the process output, which may lead to slow convergence. Employing an approximate actuator model between the controller and the process will enhance this state. After getting the optimised controller parameters, the time domain parameters like rise time, overshoot and settling time in the response are then analysed. If the values are within the specified or acceptable limit, then the current controller parameter is considered for the system. Otherwise a retuning operation is carried out for the integral term (Ki) by replacing the optimised numerical values for kp and  kd,   to enhance the present performance of the PID controller.


## 4. Results and Discussions

To study the closed-loop performance of the unstable process with PSO-tuned PID controller, practical examples from literature are considered.


### 4.1. Process 1

The first order plus delayed time (FOPDT) unstable process with the following transfer function model is considered:(17)Gp(s)=4e-2s4s-1.
Many studies have proposed different PID settings for the above model and the values are clearly presented in the literature [1, 3].In this study, the optimization algorithm is initiated with the following values. Dimension of search space is three (i.e.,kp, ki, and kd); number of swarm and bird step is considered as ten; the cognitive (C1) and global (C2) search parameter are assigned the value of 2, the minimum (Wmin) and maximum (Wmax) inertia weight are set to be 0.2 and 1.2 respectively. The search space for kp, ki, and kd is defined as 30% of the three dimensional space with the positive and negative values. The maximum iteration for generation is set to 400.PSO-based PID tuning is proposed with the method as in Figure2. The final convergence of the Kp,Ki, and Kd is shown in Figure 3. The ISE-based controller parameter search value has converged at the 136th iteration, and the final PID parameters are tabulated in Table 1.Table 1
Classical and optimally tuned PID parameters for Process 1.
MethodKpKiKdHC0.5650.0460250.34352SC0.5480.0492940.56115Visioli0.6240.0540210.72446PSO PID0.53380.03070.4931PIDr10.53380.02110.4931PIDr20.53380.03790.4931Figure 3
Convergence ofKp, Ki, and Kd  with PSO tuned PID.Figure4 shows the value of the cost function (ISE) with respect to the iteration. When the iteration increases, the values of controller parameters will be optimized, which may help to reduce the ISE value of the process output. When the controller parameter reaches the final value, the reduced cost function for setpoint tracking has a value of 11.25 (Table 2).Table 2
Performance comparison for Process 1.
MethodOver ShootSettling Time, sISESIAESISELIAELHC1.780334.9513.4711.7013.9313.83SC1.323341.5510.1111.8710.4214.02Visioli1.303162.858.32410.978.62113.03PSO PID1.263241.8311.2513.7611.6216.30PIDr11.181559.8012.3417.4512.7720.73PIDr21.322936.2611.0412.6111.3914.91Figure 4
Decrease in cost function with optimized controller parameter.The process is then controlled with the optimized values of controller parameters, and the performance of the controller is tested in terms of the overshoot, settling time and the error criterion. From Table2, it is observed that the overshoot and the settling time for the present controller parameter are high. A retuning operation is then carried out by taking the overshoot and/or the settling time of the closed-loop process as the reference. During the retuning operation, the proportional and derivative controllers are replaced by its numerical values. In the retuning operation, the number of parameter to be optimized is one (i.e., the dimension of the search  space is one).  Initially the retuning is performed by taking the overshoot into account. The optimized PID gives an overshoot of 1.2632. During the retuning, the integral controller gain (Ki) is adjusted until the considered performance criterion is minimized. Figure 5 shows the retuned value of the Ki, and the final value is presented in Table 1. The retuned PID parameter is then considered as PIDr1. A retuning operation is also performed by considering the settling time. The retuned controller parameter is presented as PIDr2. From Table 2, it is observed that the PSO-based PID tuning and retuning method give a reduced overshoot and settling time compared to the conventional tuning methods available in literature. From Figure 6, it is observed that the retuning operation can improve the closed-loop performance of the process.Figure 5
Retuned value of integral controller gain.Figure 6
Servo response for Process 1 with PSO-tuned PID.Figure7 shows the servo response of the previous work reported in literature [3]. Figure 8 shows the servo and regulatory operation for Process 1. For reference tracking, a unity step signal is applied as the setpoint. For regulatory operation, a load disturbance of 0.2 (20% of setpoint) is introduced at 100 sec. Figure 8 shows that the proposed method provides a smooth setpoint tracking and load disturbance rejection.Figure 7
Reference tracking for Process 1 with  conventional PID parameters.Figure 8
Servo and regulatory response for Process 1.The robustness of the PSO-based PID controller is then tested with the measurement noise introduced in the feedback path. A band-limited white noise with a noise power of 0.001 is introduced along with the feedback signal and from the result it is observed that the proposed controller can perform well even in the noisy environment. Figure9 shows the servo response of the PSO-tuned PID controller with and without the measurement noise.Figure 9
Reference tracking performance with measurement noise.


### 4.2. Process 2

Isothermal continuous stirred tank reactor (CSTR) considered by Liou and Chien [27] has the transfer function model;
(18)dcdt=QV(Cf-Cr)-[K1Cr(K2Cr+1)2].The values of the operating conditions are given by flow rate(Q)=0.03333 lit/sec, volume (V)=1 lit, K1=10 lit/s, and K2=10 lit/mol, concentration, (Cf)=3.288 mol/lit. Measurement delay is 20 sec. Linearization of the model equation around this operating condition Cr=1.3065 mol/lit, gives the following unstable transfer function model:(19)G(s)=ΔC(s)ΔCf(s)=3.3226exp-20s(99.69s-1)For the above transfer function model, PSO-based PID tuning is proposed with the method as in Figure2. The controller parameters are converged at the 97th iteration, and controller values are Kp=1.4715, Ki=0.0228, and Kd=6.3923 (with N=10). The overshoot of the present controller setting is large, and a retuning operation is performed for the integral controller gain with minimising of the overshoot. The search value is converged at the 49th iteration, and the retuned value of the Ki  is 0.0147. Figure 10 shows that the retuned PID (PIDr1) provides improved performance.Figure 10
Servo response for Process 2 with PID and PIDr1.The regulatory response value is recorded with a disturbance value of 0.2 (20% of setpoint) introduced at 500 s. From the performance measure values in Table3, it is observed that the retuned PID (PIDr1) structure provides reduced ISE and IAE than PSO tuned PID.Table 3
Cost function for Process 2.
MethodOver ShootSettling Time, sISESIAESISELIAELPSO PID1.201360.777.6499.8980.72119.7PIDr10.985239.659.4578.7761.7994.36The robustness of the PID controller is then tested with a band-limited white noise with a noise power of 0.001and is introduced along with the feedback signal. From Figure11, it is observed that the proposed controller provides a smooth setpoint tracking in the noisy environment.Figure 11
Servo response with measurement noise.


### 4.3. Process 3

The bioreactor plays a major role in most of the biotechnological and chemical industry. It can be defined as a reactor tank to execute a number of biological reactions to create a large amount of intermediate and final products. In recent years, biosynthesis process is widely utilised to convert the living cells (biomass) into marketable chemical, pharmaceutical, food, and beverage products. In biosynthesis, the biomass consumes nutrients from the substrate (feed) to cultivate and produce more cells and important products. During this operation the bioreactor is kept under a controlled environment with constant pH, temperature, agitation rate, and dissolved oxygen tension to attain better growth of microbes.In this work, a small scale bioreactor widely analysed by the researchers [28–30] is chosen for the study. Figure 12 shows the schematic diagram of the reactor. The dynamic behaviour of the reactor is complex, and a number of vital manufacturing processes belong to this group.(20)ThebasicreactioninsidethebioreactorisA→kPSubstrate+Cell→kMoreCells+Products,Figure 12
Schematic diagram of a bioreactor.where “A” is the reactant, “k” is reaction rate constant, and “P” is the product.The stoichiometry for biomass activity is very complex since it varies with environmental conditions microorganism and nutrient in the system. Due to these reasons, unstructured models are mainly considered for analysis purpose. The following mathematical equations can describe a variety of industrial bioreactors. Equations (21) and (22) describe the balancing conditions and (23) depict the Monod model for the specific growth rate(21)Cellbalance:dX1dt=(μ-Dr)X1,(22)substratebalance:dX2dt=Dr(X2f-X2)-μX1Y,(23)growthrate:μ=μmax⁡X2km+X2+k1X22,
where X1 is biomass (cell) concentration, X2 is substrate concentration, Dr is the dilution rate, and  X2f   is substrate feed concentration.The steady state solutions and the mathematical model of the system are depicted in Tables4 and 5, respectively. The reactor model has two stable states and an unstable steady state [30]. The transfer function models shown in Table 5 along with a delay time of “1” are utilized in the proposed study.Table 4
Steady state solutions of the bioreactor.
Biomass concentration (X1); g/litSubstrate concentration (X2); g/litSystem conditionEquilibriumInitial arbitrary value for modellingX1X204.0StableTrivial010.99511.5122UnstableNontrivial0.12511.53020.1746StableNontrivial11Table 5
Mathematical model of the bioreactor.
Operating regionState-space modelTransfer function modelGrowth phaseA=[0-0.068-0.75-0.1302]; B=[-0.99512.4878]; C=[10]; D = [0]ΔX(s)ΔD(s)=-0.9951s-0.2987s2+0.1302s-0.0509Stationary phaseA=[00.9056-0.75-2.564]; B=[-1.53013.8255]; C=[10]; D = [0]ΔX(s)ΔD(s)=-1.53s-0.4588s2+2.564s+0.6792The unstable bioreactor model is a benchmark problem in the unstable system study.For substrate inhibition model, the following parameters are considered (Table6):Table 6
PID parameters considered for Process 3.
MethodKpTiTdLinearised (VC)−0.95135.53630.5235Vivek and Chidambaram (VC1)−0.95245.62280.5304Majhi and Atherton−1.18554.72550.4377PSO PID−0.87225.40730.3645μmax=0.53 hr−1, km=0.12 g/lit, k1=0.4545 lit/g, Y=0.4. The steady state dilution rate is Ds=0.3 h−1 (the residence time is 3.33 h) and the feed substrate concentration is X2fs=4.0 g/lit. The nonlinear process has the three steady state operating points for a dilution rate of 0.3 h−1. For the unstable operating region (equilibrium 2, nontrivial) biomass concentration X1s=0.995103 and substrate concentration X2s=1.512243 are considered. The dilution rate is taken as the manipulated variable to control the cell mass concentration at the unstable steady state.For the unstable operating point, the local linearized model for the unstable bioreactor is(24)Gp(s)=-0.9951s-0.2985s2+0.1302s-0.0509(25)=-5.86445.89s-1,
where (24) represents a second order model and (25) shows a reduced first order model. The delay time for the model ((24) and (25)) is considered as “1”.In this work, the PSO-based PID tuning is attempted for second order model (24), and the optimization search is converging at the 74th iteration. The optimised PID controller parameters are Kp=-0.8722, Ki=-0.1613, and Kd=-0.3179.The closed-loop response of the unstable bioreactor system is tested with the first order model (25), and its performance is compared with the classical PID parameters presented in Table 4 [28].Figure13 shows that the response of PSO PID has a lesser overshoot than the MA method, and the settling time is smaller than the VC and VC1 method.Figure 13
Servo response with classical and PSO-tuned PID.The actual bioreactor model constructed using the nonlinear equation ((21)–(23)) is then tested with the PID controller value obtained by the optimization algorithms. The objective is to maintain the concentration of biomass (X1s) based on the setpoint, by adjusting the substrate concentration (X2s). Figures 14 and 15 show the variation of biomass and substrate concentration for the servo and regulatory response. In this figure a setpoint of 0.995103 is considered and a load disturbance of 0.199 (20% of setpoint) is applied at 60 min.Figure 14
Servo response of the unstable bioreactor model.Figure 15
Regulatory response of the bioreactor model.From the result, it is observed that the PSO algorithm based PID controller provides a nonoscillatory response with minimized overshoot and settling for both the setpoint tracking and disturbance rejection applications.The robustness of the proposed control scheme is then tested by introducing a measurement noise (noise power of 0.001; sampling time of 0.1 sec). The nonlinear model is considered for the simulation study.Figure16 shows the variations of biomass concentration and Figure 17 depicts the variation of substrate concentration and dilution rate in the presence and the absence of measurement noise. The reference tracking response of the bioreactor with a PSO-based PID shows that the proposed scheme works well in the noisy environment.Figure 16
Variation of Biomass concentration with respect to noise.Figure 17
Variation of substrate concentration and dilution rate with respect to noise.


## 4.1. Process 1

The first order plus delayed time (FOPDT) unstable process with the following transfer function model is considered:(17)Gp(s)=4e-2s4s-1.
Many studies have proposed different PID settings for the above model and the values are clearly presented in the literature [1, 3].In this study, the optimization algorithm is initiated with the following values. Dimension of search space is three (i.e.,kp, ki, and kd); number of swarm and bird step is considered as ten; the cognitive (C1) and global (C2) search parameter are assigned the value of 2, the minimum (Wmin) and maximum (Wmax) inertia weight are set to be 0.2 and 1.2 respectively. The search space for kp, ki, and kd is defined as 30% of the three dimensional space with the positive and negative values. The maximum iteration for generation is set to 400.PSO-based PID tuning is proposed with the method as in Figure2. The final convergence of the Kp,Ki, and Kd is shown in Figure 3. The ISE-based controller parameter search value has converged at the 136th iteration, and the final PID parameters are tabulated in Table 1.Table 1
Classical and optimally tuned PID parameters for Process 1.
MethodKpKiKdHC0.5650.0460250.34352SC0.5480.0492940.56115Visioli0.6240.0540210.72446PSO PID0.53380.03070.4931PIDr10.53380.02110.4931PIDr20.53380.03790.4931Figure 3
Convergence ofKp, Ki, and Kd  with PSO tuned PID.Figure4 shows the value of the cost function (ISE) with respect to the iteration. When the iteration increases, the values of controller parameters will be optimized, which may help to reduce the ISE value of the process output. When the controller parameter reaches the final value, the reduced cost function for setpoint tracking has a value of 11.25 (Table 2).Table 2
Performance comparison for Process 1.
MethodOver ShootSettling Time, sISESIAESISELIAELHC1.780334.9513.4711.7013.9313.83SC1.323341.5510.1111.8710.4214.02Visioli1.303162.858.32410.978.62113.03PSO PID1.263241.8311.2513.7611.6216.30PIDr11.181559.8012.3417.4512.7720.73PIDr21.322936.2611.0412.6111.3914.91Figure 4
Decrease in cost function with optimized controller parameter.The process is then controlled with the optimized values of controller parameters, and the performance of the controller is tested in terms of the overshoot, settling time and the error criterion. From Table2, it is observed that the overshoot and the settling time for the present controller parameter are high. A retuning operation is then carried out by taking the overshoot and/or the settling time of the closed-loop process as the reference. During the retuning operation, the proportional and derivative controllers are replaced by its numerical values. In the retuning operation, the number of parameter to be optimized is one (i.e., the dimension of the search  space is one).  Initially the retuning is performed by taking the overshoot into account. The optimized PID gives an overshoot of 1.2632. During the retuning, the integral controller gain (Ki) is adjusted until the considered performance criterion is minimized. Figure 5 shows the retuned value of the Ki, and the final value is presented in Table 1. The retuned PID parameter is then considered as PIDr1. A retuning operation is also performed by considering the settling time. The retuned controller parameter is presented as PIDr2. From Table 2, it is observed that the PSO-based PID tuning and retuning method give a reduced overshoot and settling time compared to the conventional tuning methods available in literature. From Figure 6, it is observed that the retuning operation can improve the closed-loop performance of the process.Figure 5
Retuned value of integral controller gain.Figure 6
Servo response for Process 1 with PSO-tuned PID.Figure7 shows the servo response of the previous work reported in literature [3]. Figure 8 shows the servo and regulatory operation for Process 1. For reference tracking, a unity step signal is applied as the setpoint. For regulatory operation, a load disturbance of 0.2 (20% of setpoint) is introduced at 100 sec. Figure 8 shows that the proposed method provides a smooth setpoint tracking and load disturbance rejection.Figure 7
Reference tracking for Process 1 with  conventional PID parameters.Figure 8
Servo and regulatory response for Process 1.The robustness of the PSO-based PID controller is then tested with the measurement noise introduced in the feedback path. A band-limited white noise with a noise power of 0.001 is introduced along with the feedback signal and from the result it is observed that the proposed controller can perform well even in the noisy environment. Figure9 shows the servo response of the PSO-tuned PID controller with and without the measurement noise.Figure 9
Reference tracking performance with measurement noise.


## 4.2. Process 2

Isothermal continuous stirred tank reactor (CSTR) considered by Liou and Chien [27] has the transfer function model;
(18)dcdt=QV(Cf-Cr)-[K1Cr(K2Cr+1)2].The values of the operating conditions are given by flow rate(Q)=0.03333 lit/sec, volume (V)=1 lit, K1=10 lit/s, and K2=10 lit/mol, concentration, (Cf)=3.288 mol/lit. Measurement delay is 20 sec. Linearization of the model equation around this operating condition Cr=1.3065 mol/lit, gives the following unstable transfer function model:(19)G(s)=ΔC(s)ΔCf(s)=3.3226exp-20s(99.69s-1)For the above transfer function model, PSO-based PID tuning is proposed with the method as in Figure2. The controller parameters are converged at the 97th iteration, and controller values are Kp=1.4715, Ki=0.0228, and Kd=6.3923 (with N=10). The overshoot of the present controller setting is large, and a retuning operation is performed for the integral controller gain with minimising of the overshoot. The search value is converged at the 49th iteration, and the retuned value of the Ki  is 0.0147. Figure 10 shows that the retuned PID (PIDr1) provides improved performance.Figure 10
Servo response for Process 2 with PID and PIDr1.The regulatory response value is recorded with a disturbance value of 0.2 (20% of setpoint) introduced at 500 s. From the performance measure values in Table3, it is observed that the retuned PID (PIDr1) structure provides reduced ISE and IAE than PSO tuned PID.Table 3
Cost function for Process 2.
MethodOver ShootSettling Time, sISESIAESISELIAELPSO PID1.201360.777.6499.8980.72119.7PIDr10.985239.659.4578.7761.7994.36The robustness of the PID controller is then tested with a band-limited white noise with a noise power of 0.001and is introduced along with the feedback signal. From Figure11, it is observed that the proposed controller provides a smooth setpoint tracking in the noisy environment.Figure 11
Servo response with measurement noise.


## 4.3. Process 3

The bioreactor plays a major role in most of the biotechnological and chemical industry. It can be defined as a reactor tank to execute a number of biological reactions to create a large amount of intermediate and final products. In recent years, biosynthesis process is widely utilised to convert the living cells (biomass) into marketable chemical, pharmaceutical, food, and beverage products. In biosynthesis, the biomass consumes nutrients from the substrate (feed) to cultivate and produce more cells and important products. During this operation the bioreactor is kept under a controlled environment with constant pH, temperature, agitation rate, and dissolved oxygen tension to attain better growth of microbes.In this work, a small scale bioreactor widely analysed by the researchers [28–30] is chosen for the study. Figure 12 shows the schematic diagram of the reactor. The dynamic behaviour of the reactor is complex, and a number of vital manufacturing processes belong to this group.(20)ThebasicreactioninsidethebioreactorisA→kPSubstrate+Cell→kMoreCells+Products,Figure 12
Schematic diagram of a bioreactor.where “A” is the reactant, “k” is reaction rate constant, and “P” is the product.The stoichiometry for biomass activity is very complex since it varies with environmental conditions microorganism and nutrient in the system. Due to these reasons, unstructured models are mainly considered for analysis purpose. The following mathematical equations can describe a variety of industrial bioreactors. Equations (21) and (22) describe the balancing conditions and (23) depict the Monod model for the specific growth rate(21)Cellbalance:dX1dt=(μ-Dr)X1,(22)substratebalance:dX2dt=Dr(X2f-X2)-μX1Y,(23)growthrate:μ=μmax⁡X2km+X2+k1X22,
where X1 is biomass (cell) concentration, X2 is substrate concentration, Dr is the dilution rate, and  X2f   is substrate feed concentration.The steady state solutions and the mathematical model of the system are depicted in Tables4 and 5, respectively. The reactor model has two stable states and an unstable steady state [30]. The transfer function models shown in Table 5 along with a delay time of “1” are utilized in the proposed study.Table 4
Steady state solutions of the bioreactor.
Biomass concentration (X1); g/litSubstrate concentration (X2); g/litSystem conditionEquilibriumInitial arbitrary value for modellingX1X204.0StableTrivial010.99511.5122UnstableNontrivial0.12511.53020.1746StableNontrivial11Table 5
Mathematical model of the bioreactor.
Operating regionState-space modelTransfer function modelGrowth phaseA=[0-0.068-0.75-0.1302]; B=[-0.99512.4878]; C=[10]; D = [0]ΔX(s)ΔD(s)=-0.9951s-0.2987s2+0.1302s-0.0509Stationary phaseA=[00.9056-0.75-2.564]; B=[-1.53013.8255]; C=[10]; D = [0]ΔX(s)ΔD(s)=-1.53s-0.4588s2+2.564s+0.6792The unstable bioreactor model is a benchmark problem in the unstable system study.For substrate inhibition model, the following parameters are considered (Table6):Table 6
PID parameters considered for Process 3.
MethodKpTiTdLinearised (VC)−0.95135.53630.5235Vivek and Chidambaram (VC1)−0.95245.62280.5304Majhi and Atherton−1.18554.72550.4377PSO PID−0.87225.40730.3645μmax=0.53 hr−1, km=0.12 g/lit, k1=0.4545 lit/g, Y=0.4. The steady state dilution rate is Ds=0.3 h−1 (the residence time is 3.33 h) and the feed substrate concentration is X2fs=4.0 g/lit. The nonlinear process has the three steady state operating points for a dilution rate of 0.3 h−1. For the unstable operating region (equilibrium 2, nontrivial) biomass concentration X1s=0.995103 and substrate concentration X2s=1.512243 are considered. The dilution rate is taken as the manipulated variable to control the cell mass concentration at the unstable steady state.For the unstable operating point, the local linearized model for the unstable bioreactor is(24)Gp(s)=-0.9951s-0.2985s2+0.1302s-0.0509(25)=-5.86445.89s-1,
where (24) represents a second order model and (25) shows a reduced first order model. The delay time for the model ((24) and (25)) is considered as “1”.In this work, the PSO-based PID tuning is attempted for second order model (24), and the optimization search is converging at the 74th iteration. The optimised PID controller parameters are Kp=-0.8722, Ki=-0.1613, and Kd=-0.3179.The closed-loop response of the unstable bioreactor system is tested with the first order model (25), and its performance is compared with the classical PID parameters presented in Table 4 [28].Figure13 shows that the response of PSO PID has a lesser overshoot than the MA method, and the settling time is smaller than the VC and VC1 method.Figure 13
Servo response with classical and PSO-tuned PID.The actual bioreactor model constructed using the nonlinear equation ((21)–(23)) is then tested with the PID controller value obtained by the optimization algorithms. The objective is to maintain the concentration of biomass (X1s) based on the setpoint, by adjusting the substrate concentration (X2s). Figures 14 and 15 show the variation of biomass and substrate concentration for the servo and regulatory response. In this figure a setpoint of 0.995103 is considered and a load disturbance of 0.199 (20% of setpoint) is applied at 60 min.Figure 14
Servo response of the unstable bioreactor model.Figure 15
Regulatory response of the bioreactor model.From the result, it is observed that the PSO algorithm based PID controller provides a nonoscillatory response with minimized overshoot and settling for both the setpoint tracking and disturbance rejection applications.The robustness of the proposed control scheme is then tested by introducing a measurement noise (noise power of 0.001; sampling time of 0.1 sec). The nonlinear model is considered for the simulation study.Figure16 shows the variations of biomass concentration and Figure 17 depicts the variation of substrate concentration and dilution rate in the presence and the absence of measurement noise. The reference tracking response of the bioreactor with a PSO-based PID shows that the proposed scheme works well in the noisy environment.Figure 16
Variation of Biomass concentration with respect to noise.Figure 17
Variation of substrate concentration and dilution rate with respect to noise.


## 5. Conclusion

Most of the industrial process loops use conventional or modified structure PID controllers. Tuning the controller parameter for time-delayed unstable system is a challenging work if the system model is other than a first order plus dead time. In this work, design of optimization-based model independent controller tuning for unstable process models has been attempted. In this work, a PSO-based PID controller tuning and retuning is presented in detail for a class of unstable systems. The design of controller is formulated as an optimization problem using ISE as the performance index. This is a model free, online tuning method which can identify the optimal controller parameters effectively. PSO can be practically used as an alternative to obtain the controller parameters with an algorithm-based PID controller. The result obtained from the computer simulation shows that the proposed method improves the performance of the process in terms of time domain specification, setpoint tracking, disturbance rejection, error minimization, and measurement noise attenuation.



---

*Source: 693545-2012-05-10.xml*