You are on page 1of 4

2013 Sixth International Symposium on Computational Intelligence and Design

PID tuning based on improved quantum genetic


algorithm
Jian zhang, Li Liu, Huanzhou Li, Zhangguo Tang
School of Physics and Electronics Engineering, Sichuan Normal University, Chengdu, China
Email: dctscu07@163.com

Abstract-Parameters tuning is the key of the design of PID control effect. Such as genetic algorithm, particle swarm
controller, for the PID parameters tuning, a PID parameters optimization, ant colony optimization algorithm, etc.
tuning method based on improved quantum genetic algorithm Quantum genetic algorithm (QGA) is a probability based
is proposed in this study. This study proposes an improved optimization algorithm which combines the concept of
genetic algorithm (IQGA) which introduces a dynamic quantum computing and traditional genetic algorithm, and it
adjustment strategy of population and search intervals to has small population size, fast convergence speed and strong
improve the convergence speed, search ability and stability of global search capabilities[9,10]. In this paper, an improved
quantum genetic algorithm-based PID parameters tuning quantum genetic algorithm is used to PID parameters tuning,
method. Experimental results show that the proposed
and can be obtained more satisfactory results in a short time.
algorithm can obtain a good performance in PID parameters
tuning problem. II. RATIONALE OF PID CONTROL

Keywords- quantum genetic algorithm; PID parameters; PID control system mainly composed of PID controller
tuning and controlled object, and a typical PID control system can
described as Figure 1.
I. INTRODUCTION
PID control is the strategy which is widely used in
industrial process control in recent years [1-4]. The basic idea
is to construct a PID controller which made up of the
proportional, integral and derivative of the system deviation y (t )
r (t ) e(t ) u (t )
linearly to control the controlled object. PID controller
considers both the transient and steady-state performance,
and easy to implement for its simple structure and high
reliability. PID controller has robust performance and its
control quality is not sensitive to the changes of the
controlled objects, so it is able to meet general industrial
process requirements[5]. Since the invention of the PID Figure 1. PID control system
controller (largely due to Elmer's invention of ship autopilot)
PID controller is a linear controller, and the relationship
in 1910 and the Ziegler-Nichols PID parameter tuning
method (Z-N method) in 1942[6], the applications of PID of the control error (deviation) signal e(t ) , input signal
controller have been developed and popularized extremely[7]. r (t ) and the output signal y (t ) can be described as below:
The performance of the system control is depends on the (1)
parameters of the PID controller, so the PID parameter e(t ) = r (t ) − y (t )
tuning has become a core issue of PID control. The deviation signal which sent into PID controller is
PID parameters tuning includes engineering tuning performed proportional, integral and differential operation
method and theoretical calculations tuning method. respectively, and then performed a linear weighted operation,
Engineering tuning method tunes the parameters according finally, to control the controlled object. Common PID
to engineering experience directly, and it often requires a lot control system is mainly divided into continuous PID control
of experience, and different objective functions corresponds system and discrete PID control system. The continuous PID
to different experiences; theoretical calculations tuning controller can be descried as:
method obtains the PID parameters based on the 1 t d e(t )
mathematical model of the system. It needs a lot of u (t ) = K p [e(t ) + ³ e(τ ) d τ +Td ] (2)
Ti 0 dt
calculation. PID parameter tuning is a complex and tedious
process, and the research on PID parameter tuning method where u (t ) is the output of the PID controller, and K p , Ti
has been an important issue in control field[8]. In order to and Td is proportional coefficient, integral time constant
improve the efficiency of the PID controller parameter and derivative time constant, respectively.
tuning, many intelligent optimization algorithms have been Control equation can also be written as the form of the
applied to PID parameter tuning, and have achieved good transfer function:

978-0-7695-5079-4/13 $26.00 © 2013 IEEE 44


DOI 10.1109/ISCID.2013.125
U ( s) 1 B. Improved Quantum Genetic Algorithm (IQGA)
Gc ( s ) = = K p [1 + Td s ] (3)
E (s) Ti s Inspired by the phenomenon from the natural world, this
or study divides the search space into several sub-intervals, and
then evenly allocates initial population to each sub-interval.
U (s) 1
Gc ( s ) = = Kp + Ki + Kd s (4) In successive search process, the algorithm constantly
E (s) s adjusts the range and the population size of each sub-interval
where, integral coefficient K i = K p Ti ˈ derivative in term of its fitness until the optimal solution is found.
Firstly, the whole search space is divided into n
coefficient K d = K pTd DŽPID closed loop control system can
sub-intervals. Supposing there are m variables in each
be described as: sub-interval. And for PID parameter turning, real coding is
R( s ) E (s) U (s) Y ( s) adopted to avoid the frequent conversion of encoding and
Gc ( s ) G (s)
decoding in binary coding and improve computational
accuracy. So, double chains real coding is adopted in this
study. And then the search sub-intervals and the population
Figure 2. PID closed loop control system sizes of every sub-interval are adjusted dynamically. The
details can be seen in[11].
To discredit formula (5) and the expression can described as The evolution of the population adopts quantum rotation
below: gate:
k
e(k ) − e(k − 1) § cos(+θ i ) − sin(+θ i ) ·
u (k ) = K p e(k ) + K i ¦ e(k )T + K d (5) U (+θi ) = ¨ ¸ (7)
j =0 T © sin(+θ i ) cos(+θ i ) ¹
where T is the sampling period and k is the sample −
t

+θ i = θ ⋅ e tmax (8)
number.
A system’s performance is affected by the parameters of where θ ∈ [0.001π , 0.05π ] is a fixed angle, tmax is the
K p , K i and K d of the PID controller. PID parameter maximum iterative number. From equation (8), it is easy to
tuning problem is to determine the best combination of these get the rotation angle of the quantum rotation gate decreases
three parameters to obtain the optimal performance of the gradually with the increase of the iterative number. And the
control system. System performance includes regulating mutation operation is completed by Hadamard gate. It is also
time, error of steady state and overshoot, etc. a kind of rotation, and the rotation angle is π 4 . So the
III. IMPROVED QUANTUM GENETIC ALGORITHM mutation operation increases the diversity of the population.

A. Quantum Genetic Algorithm IV. PID PARAMETERS TUNING BASED ON IQGA


QGA is a probabilistic optimization algorithm which is A. Selection of the objective function
to borrow fully the concept and theory of Quantum
It is a parameter optimization problem based on a given
computing (such as qubits and quantum superposition state)
objective function that using quantum genetic algorithm to
on top of the genetic algorithm. The smallest information
tune PID controller parameters. The dynamic performance
unit in QGA is a qubit. The state of a qubit can be either 0 or
(response speed, overshoot, adjust time) will be improved by
1, which can be represented as: ψ = α 0 + β 1 . where searching a set of optimal PID control parameters.
α , β are two complex numbers representing the probability There are many forms of objective function of the
control system, in order to obtain a satisfactory dynamics
amplitudes of the corresponding state: α + β = 1 . α ,
2 2 2
performance and prevent too big control power, chooses the
β represent the probability of the qubit in the state of 0
2
following formula as the optimal parameter indicator [5]:

and 1 respectively. QGA uses a pair of complex numbers to J = ³ ª¬ w1 e(t ) + w2 u 2 (t ) º¼ d t + w3tu (9)
0
define a qubit. This representation has the advantage that it
is able to represent any superposition of states The where, tu is the rise time and w1 , w2 , w3 is the weights,
traditional genetic algorithm uses mating, mutation, etc. respectively.
operations to maintain the diversity of the population. QGA To avoid overshoot, the penalty function is introduced in
applies quantum rotation gate to maintain the diversity of the above formula and shown as below:

population, quantum rotation gate, which is a unitary
operation, only to change the phase of the qubit, does not J = ³ ª¬ w1 e(t ) + w2 u 2 (t ) + w4 e(t ) º¼ d t + w3tu if e(t ) < 0 (10)
0
change the length of the qubit.
where, w4  w1 .
§ α i' · § cos(+θ i ) − sin(+θ i ) · § α i ·
¨ '¸=¨ ¸¨ ¸ (6)
© βi ¹ © sin(+θi ) cos(+θ i ) ¹ © β i ¹ B. Selection of the parameters of the algorithm
where +θi is the rotation angle of each qubit. Two controlled objects are selected to verify the
performance of the algorithm:

45
400 the convergence speed and search accuracy can be
(1) G1 ( s ) = ( K P ∈ [0,5], K i , K d ∈ [0,1]) improved.
s + 50s
2

1.6
(2) G2 ( s ) = 2 ( K P ∈ [0, 20], K i , K d ∈ [0,1])
37.6

s + 2.584s + 1.6 37.4 GA


QGA
The performance of the proposed algorithm is evaluated 37.2
IQGA
by comparing its results with the traditional GA[5] and
QGA[12]. Formula (6) and (7) are selected as the object 37

function of the algorithm. Where, w1 = 0.999 , w2 = 0.001 , 36.8

w3 = 2.0 , w4 = 100 , and the sampling time is set as 0.001s. 36.6

Every algorithm chooses the same parameter values. The 36.4

number of the sub-intervals of the parameters K p , K i 36.2


0 10 20 30 40 50 60 70 80 90 100
and K d are set as n = 3 , the population size of every (a) G1 ( s )
sub-interval is set as p0 = 5 . The population size of every 101.79

sub-interval is constrained by pt ≤ 2 p0 during the evolution


101.78
process, and the maximum generation is max_ gen = 100 .
GA
Every experiment runs 100 times. 101.77 QGA
IQGA
C. Experimental results 101.76
The optimization results of the three algorithms are
shown in Table 1 and Figure 3. Table 1 shows the average 101.75
values, the optimal values, the worst values and variance of
every algorithm. As can be seen from Table 1, the proposed 101.74
10 20 30 40 50 60 70 80 90 100
algorithm has the best search ability and stability. Figure 3 (b) G2 ( s )
shows the convergence results of 100 experiments of the
three methods. It can be seen that the fluctuation of the curve Figure 3. Comparasion of the optimization results of GA, QGA and
IQGA
of IQGA is the most stable, and most of the curve is under
the other two curves. This indicates that IQGA has the best 38.5
search ability and stability. GA
38 QGA
TABLE I. COMPARASION OF THE OPTIMIZATION RESULTS OF IQGA
GA, QGA AND IQGA(100 TIMES EXPERIMENTS) 37.5
Method
System Items 37
GA QGA IQGA
Ave 36.5578 36.3143 36.2778 36.5
Min 36.2932 36.2644 36.2594
G1 ( s )
Max 37.3038 36.5083 36.2784 36
10 20 30 40 50
Var 5.02 e-2 2.22 e-3 5.50 e-6 (a) G1 ( s )
Ave 101.7813 101.7543 101.7525 101.81
Min 101.7509 101.7499 101.7503 GA
G2 ( s ) 101.8
QGA
Max 101.7885 101.7614 101.7526 IQGA
101.79
Var 7.10 e-5 6.26 e-6 7.89 e-8
101.78

Chooses the best one result of 100 times experiments of 101.77

every method, and shows the first 50 generations 101.76


convergence results in Figure 4. It can be seen that the value 101.75
of the objective function of IQGA is far less than that of
QGA and GA at the beginning of the evolution. It is due to 101.74
5 10 15 20 25 30 35 40 45 50
that the well-distributed initial population can effectively (b) G2 ( s )
avoid the too concentrated or too sparse population in some
sub-intervals. And the strategy can help finding the better Figure 4. Comparasion of the convergence speed of the GA, QGA and
IQGA
value quickly. And the strategy of adjusts the range and the
population size of each sub-interval dynamically, can guide
Table 2 shows the final results of the three methods, and
the population approach the high fitness area gradually, so
Figure 5 shows the corresponding step response curves of
the PID control system. r is the input unit step signal, y0

46
is the unit step response of the system, and y1 , y2 , y3 is the V. CONCLUSION
unit step response after PID parameters tuning, respectively. This study proposes a PID tuning method using an IQGA.
In Figure (a), the three curves are close to the step signal for To introduce a dynamic population adjustment strategy to
that the system G1 ( s ) has no steady state error. The speed of QGA can improve the search ability of the QGA greatly, and
response and adjustment time has been improved by means the experimental results indicate that the method of this
of PID parameters tuning. The curve of y0 in Figure (b) study has a good performance in PID parameters tuning, and
has a strong search ability, fast convergence speed and
shows that system G2 ( s ) has steady state error before stability.
adjustment, and the three curves of y1 , y2 , y3 show that the
steady state error has been eliminated after PID parameters REFERENCE
tuning. And y3 has the minimum overshoot and shortest [1] Ang, K.H., Chong, G.,Li, Y., PID control system analysis, design,
adjustment time. In summary, the IQGA-based PID and technology[J]. Control Systems Technology, IEEE Transactions
parameter tuning is effective, and this algorithm has a very on.2005, 13(4): 559-576.
good performance. [2] Cominos, P.,Munro, N., PID controllers: recent tuning methods and
design to specification[J]. IEE Proceedings-Control Theory and
TABLE II. RESULTS OF PID PARAMETERS TUNING
Applications.2002, 149(1): 46-53.
System Method Parameter [3] Astrom, K.J., Hagglund, T., The future of PID control[J]. Control
Kp Ki Kd Engineering Practice.2001, 9(11): 1163-1175.
[4] Bennett, S., Development of the PID controller[J]. Control Systems,
G1 ( s ) GA 4.9630 0.0354 0.1080
IEEE.1993, 13(6): 58-62.
QGA 4.9938 0.0287 0.0856 [5] Jinkun Liu, Advanced PID control and MATLAB Simulation [M],
IQGA 4.9626 0.0274 0.1504 Beijing, Publishing house of electronics industry, 2003.
G2 ( s ) GA 1.2371 0.0026 0.1440 [6] Ziegler, J.,Nichols, N., Optimum settings for automatic
QGA 1.1758 0.0021 7.74 e-4 controllers[J]. trans. ASME.1942, 64(11).
[7] Ang, K.H., Chong, G.,Li, Y., PID control system analysis, design,
IQGA 1.2140 0.0013 0.0588
and technology[J]. IEEE Transactions on Control Systems
1.4 Technology.2005, 13(4): 559-576.
y1 y2
[8] Astrom, K.J., PID controllers: theory, design and tuning[J].
1.2 y3
Instrument Society of America.1995.
1 [9] Malossini, A., Blanzieri, E.,Calarco, T., Quantum genetic
r
0.8 optimization[J]. Evolutionary Computation, IEEE Transactions on.2008,
y0 12(2): 231-241.
0.6
[10] Li Shiyong, L.P., Quantum Computation and Quantum Optimization
0.4 Algorithms[M].Harbin Institute of Technology Press:2009.
0.2 [11] Jian Zhang, Chang Liu, Kun He, Jiliu Zhou, An Improved Quantum
Genetic Algorithm for Function Optimization[J]. Journal of Information &
0
0 0.2 0.4 0.6 0.8 1 Computational Science.2010, 7(14 ): 3243–3250.
(a) G1 ( s ) [12] Shiyong Li, Panchi Li, Quantum Genetic Algorithm based on Real
Encoding and Gradient Information of Object Function[J], Journal of
1.5 Harbin Institute of Technology, 2006, 38(008): 1216-1218.

y2
y1
y3
1
r

y0
0.5

0
0 5 10 15 20

(b) G2 ( s )
Figure 5. Unit step response of PID control system

47

You might also like