PID Controller Tuning Based On Metaheuristic Algorithms For Bioprocess Control
PID Controller Tuning Based On Metaheuristic Algorithms For Bioprocess Control
To cite this article: Olympia Roeva & Tsonyo Slavov (2012) PID Controller Tuning based on
Metaheuristic Algorithms for Bioprocess Control, Biotechnology & Biotechnological Equipment,
26:5, 3267-3277, DOI: 10.5504/BBEQ.2012.0065
BIOINFORMATICS
PID Controller Tuning based on Metaheuristic Algorithms
for Bioprocess Control
Olympia Roeva1, Tsonyo Slavov2
1
Bulgarian Academy of Sciences, Institute of Biophysics and Biomedical Engineering, Sofia, Bulgaria
2
Technical University of Sofia, Department of Systems and Control, Sofia, Bulgaria
Correspondence to: Olympia N. Roeva
E-mail: [email protected]
ABSTRACT
This paper presents an optimal tuning of a universal digital PID controller using metaheuristics as Genetic Algorithms (GA),
Simulated Annealing (SA) and Tabu Search (TS). The controllers were used to control the feed rate and to maintain the glucose
concentration at the desired set point for an E. coli MC4110 fed-batch cultivation process. The mathematical model of the
cultivation process was represented by the dynamic mass balance equations for biomass and substrate. In the control algorithm
the design measurement and process noise as well as the time delay of the glucose measurement system were taken into account.
To achieve good closed-loop system performance metaheuristics based controller tuning was done. By tuning the constants (Kp,
Ti, Td, b, c and N) in the PID controller algorithm, the controller can provide control action designed for the specific process
requirements. To evaluate the significance of the tuning procedure and controller performance different criteria were used.
Objective function values and CPU time were used as criteria to compare the performance of the three metaheuristic algorithms
– GA, SA and TS. A series of procedures for PID controller tuning were performed using competing techniques and criteria.
As a result the set of optimal PID controller settings was obtained. For a short time the controller set the control variable and
maintained it at the desired set point during the E. coli MC4110 fed-batch cultivation process. The simulation results indicate
that the proposed metaheuristic algorithms are effective and efficient, and demonstrate that the applied techniques exhibit a
significant performance improvement over classical optimization methods.
Biotechnol. & Biotechnol. Eq. 2012, 26(5), 3267-3277 The control strategy for substrate feed rate can be
Keywords: E. coli, genetic algorithm, simulated annealing, summarized in three groups: open (feedforward), closed-
loop (feedback) control and mixed (feedforward–feedback).
tabu search, PID controller, tuning, bioprocesses
A widely used controller in the feedback control of industrial
cultivation processes is the proportional-integral-derivative
Introduction (PID) controller (4, 5, 6, 9, 15, 39). The PID controller is
Fed-batch operation is often used in the industry because it often poorly tuned owing to highly changing dynamics of
allows to overcome catabolite repression or glucose effect, most bioprocesses caused by the nonlinear cell growth and
which usually occurs during production of fine chemicals the changes in the overall metabolism. Due to a change of the
such as pharmaceutical biochemicals (interleukins, insulin, system parameters, the conventional PID controllers result
interferons, enzymes and growth factors). Moreover, fed-batch in sub-optimal corrective actions and hence require retuning.
operation also gives the operator the freedom to manipulate In control design of continuous cultivation processes the
the process via the substrate feed rate. Since either nutrient controller tuning could be done with traditional methodology
overfeeding, or underfeeding, is detrimental to cell growth and (23). The models of these processes can be linearized in an
product formation, development of a suitable feeding strategy equilibrium point. Fed-batch cultivation processes, however,
control is critical in fed-batch cultivation. cannot be linearized around an equilibrium point of a system
– there is no equilibrium point. If a linear approximation is
There are commercially available controllers only for well-
found, the resulting model will be valid only for a small region
established measurement systems (such as temperature, pH and
around the linearization point. Therefore, it is necessary to use
dissolved oxygen); for substrate feed rate control there is a lack non-classical tuning methods to achieve the best overall PID
of control systems. The main reason for this are the difficulties control for the entire operating envelope of the given system.
in on-line measuring of the substrate concentration in a fast Optimization methods could be applied for the controller tuning,
and reliable way during the cultivation process. Moreover, in although the procedure is a big challenge for the conventional
principle, the substrate concentration measurement systems optimization methods. As an alternative, metaheuristics could
are characterized with significant time delay which sets the be applied for the quality controller tuning (12, 17, 18, 19, 22,
challenge to control the processes. 30).
S (t ) 1
m ( t ) = mmax ( t ) 1 + exp ( D / max (T ) )
kS + S ( t ) . (Eq. 10)
. (Eq. 6)
The function that the algorithm uses to update the
Genetic algorithm temperature is:
GAs are described in greater details by Chipperfield et al. (7).
In the GA applied here the individual fitness, F(xi), of each T = T0 0.95r , (Eq. 11)
individual is computed as the individual’s raw performance,
f(xi), relative to the whole population, i.e., where r is the annealing parameter:
Nind max ( s j )
T j
F ( xi ) = f ( xi ) / ∑ f ( xi ) ri = log 0
Ti si
i =1 , (Eq. 7) , (Eq. 12)
where f is the objective function, F is the resulting relative
where ri is the annealing parameter for component i, T0 is the
fitness, Nind is the population size and xi is the phenotypic value
initial temperature of component i, Ti is the current temperature
of individual i.
of the component i, si is the gradient of the objective in direction
To solve the considered optimization problem the population i times difference of bounds in direction i. In the considered
size was chosen to be 100 after several algorithm performance algorithm the number of points accepted before reannealing
pre-tests. In the same manner the number of generations was 100.
was set at 100. Here double point crossover with crossover
The algorithm stops when the average change in the
probability of 0.7 was assumed. Mutation is randomly applied
objective function is sufficiently small with respect to the
with low probability, typically in the range 0.001 and 0.01
predefined tolerance.
(used here). A generation gap of 0.97 was chosen and fitness-
based reinsertion was used. The SA algorithm can be described by the following
schema:
The following is a pseudocode of a GA: Find initial solution (by generating it randomly)
begin Set initial value for the control parameter T = T0
i = 0 (set generation number to zero) Set a value for r, the rate of cooling parameter
Initial population P(0) (initialize a usually random population j=0
of individuals) Generate (at random) a new solution S’
Evaluate P(0) (evaluate fitness of all initial individuals of Calculate the difference in cost:
population) D = cost(S’) – cost(S)
while (not done) do (test for termination criterion [time, fitness, Examine the new solution and decide:
etc.]) accept or reject
begin If accepted, it becomes the current solution; otherwise, keep the
i = i + 1 (increase the generation number)
Biotechnol. & Biotechnol. Eq. 26/2012/5 3269
old one; j = j+1 the accuracy of the decisions and the computing time could be
Reduce the temperature and generate a new solution optimized to a not inconsiderable degree. The parameters of the
Until some stopping criterion applies
regarded algorithms were tuned based on several pre-tests for the
Tabu search PID controller tuning problem considered here. Following the
TS has similar characteristics to SA, i.e. starting from one tuning procedures the main metaheuristic algorithm parameters
initial solution and generating a new solution to search through were set to the optimal settings, presented in the next four tables.
its neighborhood. A detailed description of TS algorithm is The GA operators and parameters are summarized in
given by Gendreau and Potvin (12). Table 1 and Table 2. These are the most appropriate GA
The following is a pseudocode of TS: parameters and operators for the problem considered here
Step 1. Initialization based on our earlier research (32, 33, 34, 35) too. The SA
Set k = 1 algorithm parameters are summarized in Table 3 and the TS
Generate initial solution S0
Set S1 = S0, then G(S1) = G(S0)
algorithm settings, in Table 4.
Step 2. Moving
Select Sc from neighborhood of Sk
Table 1
IF move from Sk to Sc is already in TL THEN Genetic algorithm operators
Sk+1 = Sk
GOTO Step 3 Operator Type
END IF
IF G(Sc) = G(S0) THEN Encoding Binary
S0 = Sc Crossover Double point
END IF Mutation Bit inversion
Delete the TL move in the bottom of TL
Add new Tabu Move in the top of TL Selection Roulette wheel selection
GOTO Step 3 Fitness function Linear ranking
Step 3. Next iteration
Set k = k + 1 Table 2
IF k = N THEN Genetic algorithm parameters
STOP
ELSE
GOTO Step 2 Parameter Value
END IF Generation gap 0.97
Computer specifications Crossover rate 0.70
The computer specifications to run all optimization procedures Mutation rate 0.05
were Intel® Core™2 Quad CPU Q8200 2.33 GHz, 4 GB Memory, Precision of binary representation 20
Windows XP operating system and Matlab 7.5 environment. Number of individuals 100
Number of generations 100
Results and Discussion Table 3
In order to prevent E. coli growth inhibition due to substrate Simulated annealing parameters
excess, the glucose concentration has to be controlled at low
levels. Two control systems are considered. In the first control Parameter Value
system (simpler case), measurement and process noise are taken Reannealing interval 100
into account. In the second control system (more complex case),
Initial temperature 100
a Smith Predictor (SP) structure is used. Moreover, to reduce
Maximum number
the influence of glucose measurement system time delay, a
of objective function 3000*number of variables
correction in measured glucose is proposed. To achieve good
evaluations allowed
closed-loop system performance GA, SA and TS based optimal
Termination tolerance on
controller tuning procedures are applied. Objective function 10-6
function value (TolFun)
values and CPU times were used as criteria to compare the
Step length equals uniformly
performance of the three metaheuristic algorithms. A series of
Annealing function random current temperature
tuning procedures for PID controllers tuning, using competing
direction
techniques and different criteria, are performed. As a result the
set of optimal PID controller’s settings are obtained. Acceptance function See Eq. 10
Number of iterations over
Metaheuristic algorithms settings which average change in fitness
500*number of variables
In order to increase the performance of the three competing function value at current point
algorithms (GA, SA and TS) it is necessary to provide is less than TolFun
adjustments of their parameters depending on the considered Function used to update
See Eq. 11
problem. With the appropriate choice of algorithm settings temperature schedule
Table 5
Controller parameters tuned with GA, SA and TS algorithms
GA SA TS
Parameter
Mean Best Worst Mean Best Worst Mean Best Worst
Kp 0.4002 0.4000 0.4000 0.4009 0.4000 0.4000 0.4925 0.5252 0.7904
Ti 0.9999 1.0000 1.0000 0.9346 0.9930 1.0000 0.7182 0.6281 0.9779
Td 0.0030 0.0030 0.0030 0.0030 0.0030 0.0030 0.0392 0.0239 0.0302
IISE 16.1945 16.1943 16.1943 16.1944 16.1943 16.1949 16.3431 16.1878 16.6157
CPU time, s 267.5859 200.2656 353.3438 192.5766 176.4219 309.6563 43.3625 39.2813 47.7031
Biotechnol. & Biotechnol. Eq. 26/2012/5 3271
where bi1 = K pT0 / Ti , bi2, ad = Td / (Td + NT0 ) , concentration) is displayed. It is seen that for a short time the
controllers set the control variable and kept it at the desired set
bd = K pTd N / (Td + NT0 ) , r(k) is a reference signal, y(k) is
point of 0.1 g·L-1 during the process.
output signal, u(k) is control signal, Kp is proportional gain, Ti
is integral time, Td is derivative time, Td/N is time constant of Control variable
first-order low-pass filter, T0 is sample time. 1
the execution time of the GA and SA are similar too. The best 25 Tabu Search
28.7
result from SA was achieved for 176.4219 s compared to GA, 20 28.6
Simulated Annealing,
Genetic Algorithm
200.2656 s. A larger difference was observed in the average
28.5
results: 192.5766 s for SA and 267.5859 s for GA. In contrast the 15 14.9 14.92 14.94 14.96
x& m ( t ) = f m ( x m , F )
11 11.2 11.4 11.6 11.8 12
0.4
Sm ( t ) = h m xm ( t )
0.2 mm ( t ) X m ( t )
SCORm ( t ) = S m ( t ) + Dt ,
YS / X
0 Sm ( t )
6 8 10 12 14 16 mm ( t ) = mmax
Cultivation time [h]
m
kS + Sm ( t )
(Eq. 18)
Fig. 4. Feed rate profiles during the process (Case 1).
t
Case 2: In this case the process model (Eq. 1–Eq. 5) is x m ( t ) = X m ( t ) S m ( t ) Vm ( t )
, (Eq. 19)
extended with equation for the correction of measured glucose
concentration: fm ( xm , F ) =
ì (t ) X (t ) F (t )
SCOR ( t ) = S ( t ) + Dt mm ( t ) X m ( t ) − X m (t )
YS / X V m ( )
t
. (Eq. 17)
1 F ( t )
= −
YS / X
mm ( t ) X m ( t ) +
Vm ( t )
( Sin − S m ( t ) )
η ξ
Freal
F (t )
r e e* u fbreal Cultivation S
PID
Controller process
u ff real
Extended
Kalman Filter , (Eq. 20)
Feed forward Ŝ
control
Sm
where Xm is the concentration of biomass, evaluated by the
SCORm
Nonlinear Xm em model, g·L-1; Sm is the delayed concentration of substrate
process model
mmax m
evaluated by the model, g·L-1; Vm is the bioreactor volume
Vm
evaluated by model, L; m max m is the model maximum growth
rate, h-1, SCORm is the nondelayed concentration of substrate
predicted by the model, g·L-1. Here m max m = 0.5 h-1.
Fig. 5. Structure of the control system. The feedback control algorithm (PID controller) is
described as follows:
Table 7
Controller parameters tuned with GA, SA and TS algorithms (Case 2)
GA SA TS
Parameter
Mean Best Worst Mean Best Worst Mean Best Worst
Kp 0.0190 0.0200 0.2937 0.3452 0.8592 6.58*10-5 0.4320 0.5073 0.0106
Ti 0.0294 0.0368 0.0259 4.5981 6.7438 6.58*10-5 1.0071 1.3819 0.3375
Td 0.0568 0.0558 0.0053 0.0235 0.0069 11.9000 0.0017 0.0009 0.1381
b 1.8696 0.7980 2.1480 2.1761 2.6000 1.7500 0.8381 0.6494 3.2767
c 0.9464 0.9998 0.3737 0.5428 0.3488 1.2000 1.4392 1.6851 0.6392
N 7.8241 9.9300 6.1798 21.9871 19.7200 28.2900 6.3419 7.5892 2.5618
IISE 16.6972 16.6800 16.7087 18.2213 16.8131 20.3914 17.3078 17.166 17.6968
CPU time, s 3173.4 2535.5 3985.2 1502.4 1783.6 1365.6 995.7 1008.5 987.2
Genetic algorithm
0.8
30
0.4
0.2
20
0 Simulated annealing
Genetic algorithm 10
-0.2
-0.4 0
6 8 10 12 14 16 6 8 10 12 14 16
A Cultivation time [h] Cultivation time [h]
Fig. 7. Biomass concentration during the process (Case 2).
0.14 0.7
0.13 0.6
Genetic algorithm Simulated annealing
Feed rate, [l/h]
0.12 0.5
Simulated annealing
0.11 0.4
0.3
0.1
Tabu search
0.2
0.09
Tabu search 0.1
0.08
Genetic algorithm
0
7.5 8 8.5 9 9.5 6 8 10 12 14 16
B Cultivation time [h] Cultivation time [h]
Fig. 8. Feed rate profiles during the process (Case 2).
0.35
Tabu search 1.2
Specific growth rate, [1/h]
0.3
1
Simulated annealing
0.25 Tabu search
Simulated annealing 0.8
0.2
0.6
0.15
0.1 0.4
0.05 0.2
Genetic algorithm Genetic algorithm
0 0
12 13 14 15 16 6 8 10 12 14 16
C Cultivation time [h] Cultivation time [h]
Fig. 6. Glucose concentration during the process (Case 2). (A) (B) (C) Fig. 9. Resulting specific growth rates during the process (Case 2).