Optimum - PID - Controller Pso
Optimum - PID - Controller Pso
Optimum - PID - Controller Pso
Abstract: In this paper, an artificial intelligence method, optimal gains of the PID such as by Cohen and Coon in
Particle Swarm Optimization (PSO) algorithm is presented for 1953, Åström and Hägglund in 1984 or by Zhuang and
determining the optimal proportional-integral-derivative (PID) Atherton in 1993 [1].
controller parameters of a typical servo motion system. This To obtain the optimal parameter tuning, it is highly
paper demonstrates in detail on how to employ the PSO method desirable to increase the capabilities of PID controllers by
to search efficiently the optimal PID controller parameters of a
typical servo motion system. In order to assist estimating the
adding new features. Most in common, artificial
performance of the proposed PSO-PID controller, a new time- intelligence (AI) techniques have been employed to
domain performance criterion function has been used. The improve the controller performances for a wide range of
proposed approach yields better solution in term of rise time, plants while retaining the basic characteristics. AI
settling time, maximum overshoot and steady state error techniques such as artificial neural network, fuzzy system
condition of the system. Compared to conventional Ziegler – and neural-fuzzy logic have been widely applied in order
Nichols method, the proposed method was indeed more efficient to get proper tuning of PID controller parameters [6-10].
and robust in improving the step response of a typical servo Recently, a new evolutionary technique, Particle
motion system. Swarm Optimization (PSO) was first introduced in 1995
by Kennedy and Eberhart for unconstrained continuous
optimization problems [11-12]. Its development was
INTRODUCTION based on observations of the social behavior of animals
such as bird flocking, fish schooling and swarm theory.
Even in a decade where advanced control algorithms The PSO is initialized with a population of random
mostly based on some kind of optimization procedure solutions. The PSO has some attractive characteristics
have achieved a high degree of maturity, Proportional where it has memory and therefore, knowledge of good
Integral Derivative (PID) controllers are still widely used solutions is retained by all particles. There exist
in industrial applications even though many new control constructive cooperation between particles where
techniques have been proposed [1-2]. The reason is that it particles in the swarm share information between them.
has a simple structure which is easy to be understood by The theoretical framework of PSO is very simple and
the engineers, and under practical conditions, it has been PSO is easy to be coded and implemented using computer
performing more reliably compared to more advanced and [11]. In fact, the PSO technique can generate a high
complex controllers [3-4]. The main propose of designing quality solution within shorter calculation time and stable
a PID controller is to determine the three gains and they convergence characteristics than other stochastic methods
are proportional gain (kp), integral gain (ki) and derivative [13]. Thus, this technique has gained much attention and
gain (kd) of the controller [2]. However, the three wide applications in various fields recently [14-20].
adjustable PID controller parameters should be tuned The rest of the paper is organized as follows. In topic
appropriately [1]. follows, a brief discussion about PID controller, basic PID
Over the years, several heuristic methods have been servo motion system and performance estimation of PID
developed for the tuning of PID controllers. The first controller are presented. Next, the PSO method and its
method used the classical tuning rules proposed by implementation into the PSO-PID controller are viewed in
Ziegler and Nichols [5]. Generally, it is always hard to detail. Further, the simulation results are presented in
determine optimal or almost optimal PID parameters with table form and discussed. Finally, the discussion of the
the Ziegler-Nichols method in many industrial plants [5]. results followed by conclusion of the research is provided.
Other than original works done by Ziegler and Nichols, a
great number of methods have been proposed to obtain
2
PID CONTROLLER [5, 21] therefore the following approximation as shown in (5) has
been made.
The PID controller is used to improve the dynamic
response as well as to reduce or eliminate the steady-state G (s )≈ 1 (5)
error. The derivative controller adds a finite zero to the
open-loop plant transfer function and improves the The servomotor is modeled as a lump inertia, J, a
transient response. The integral controller adds a pole at viscous damping term, b, and a torque constant, Kτ. The
the origin, thus increasing system type by one and lump inertia term is comprised of both the servomotor and
reducing the steady state-error due to a step function to load inertia. It is also assumed that the load is rigidly
zero. coupled such that the torsional rigidity moves the natural
The continuous form of a PID controller, with input mechanical resonance point well out beyond the servo
e(⋅) and output u pid (⋅) , is generally given as : controller’s bandwidth. This assumption allows us to
model the total system inertia as the sum of the motor and
⎡ 1 d ⎤ load inertia for the frequencies that will be control.
u pid (t ) = k p ⎢ e (t ) + ∫ e (τ ) d τ e (t )⎥
t
Ti t
+ Td
dt
(1) The actual motor position, θ(s) is usually measured
⎣ ⎦
either by an encoder or resolver coupled directly to the
where kp is the proportional gain, Ti is integral time motor shaft. Again, the underlying assumption is that the
constant and Td is the derivative time constant. We can feedback device is rigidly mounted such that its
also rewrite as mechanical resonant frequencies can be safely ignored.
d External shaft torque disturbances, Td are added to the
u pid (t ) = k p e (t ) + k i ∫ e (τ ) dτ e (t )
t
0
+ kd
dt
(2) torque generated by the motor’s current to give the torque
available to accelerate the total inertia, J.
where ki = kp / Ti is the integral gain and kd = kpTd is the Around the servo drive and motor block is the servo
derivative gain. controller that closes the position loop. A basic servo
In simple form, the PID controller transfer function is controller generally contains both a trajectory generator
ki
and PID controller. The trajectory generator typically
C (s ) = k p + + k d s (3) provides only position set-point commands labeled in Fig.
s
1 as θ*(s). The PID controller operates on the position
error and outputs a torque command that is sometimes
scaled by an estimate of the motor’s torque constant, K̂ t .
BASIC PID SERVO MOTION SYSTEM [22] If the motor’s torque constant is not known, the PID gains
are simply re-scaled accordingly. Due to the exact value
The basic components of a typical servo motion of the motor’s torque constant is generally not known, the
system are depicted in Fig. 1. According to this figure, symbol “^” is used to indicate it is an estimated value in
the servo drive closed a current loop and is modeled controller. In general, equation (6) holds with sufficient
simply as a linear transfer function G(s). In their most accuracy so that the output of the servo controller (usually
basic form, servo drives receive a voltage command that +/- 10 Volts) will command the correct amount of current
represents a desired motor current. Motor shaft torque, T for a desired torque.
is related to motor current, I by the torque constant, Kτ as
show in (4). Kˆ t ≈ K t (6)
T ≈ Kτ I (4) There are three gains to adjust in the PID kp, ki and kd.
These gains all act on the position error defined as (7).
The output of the PID controller is a torque signal.
The PID controller using the PSO algorithm was v (jt, +g1) = w • v (jt, )g
developed to improve the step transient response of (
+ c 1 * rand ( ) * pbest j,g − k (j t, g) )
typical servo motion system. It was also called the PSO- (13)
PID controller. The PSO algorithm was mainly utilized to + c2 * rand ( ) * (gbest g −k (t )
j,g )
determine three optimal controller parameters kp, ki, and j = 1 , 2 K n, g = 1, 2K 3
kd, such that the controlled system could obtain a good
step response output.
( t +1 )
If v j , g > V g , then v (jt,+g1) = Vgmax
max
In this paper, to apply the PSO method for searching Step 6:
the controller parameter, we use the “individual” to
replace the “particle” and the “population” to define the If v (jt, +g1) < V gmax, then v (jt,+g1) = Vgmax
“group”. The three controller parameters kp, ki, and kd,
composed an individual K by K ≡ [kp, ki, kd]; hence there Step 7: Modify the member position of each
are three members in an individual. These members are individual K according to (14)
assigned as real values. If there are n individuals in a
population, then the dimension of a population is n x 3. A k (j t, g+1) = k (j t, g) + v (jt, +g1) (14)
set of good control parameters kp, ki, and kd, can achieve a
good step response and result in minimization of such that k gmin ≤ k (j t, g+1 ) ≤ k gmax
performance criteria in the time domain including the min
where k g and k g
max
settling time (ts) , rise time (tr), maximum overshoot (Mp) represent the lower and upper
and steady state error (Ess). In the same time, we defined bounds, respectively, of member g of the individual K.
the evaluation value, f as in (12) which is reciprocal of the For example, when g is 1, the lower and upper bounds of
min max
performance criterion W(K) as in (8). the kp controller parameter are k g and k g respectively.
1
f = (12) Step 8: If the number of iterations reaches the maximum
W (K )
then, go to Step 9. Otherwise, go to Step 2.
It employs the smaller W(K) the value of individual K, the
higher its evaluation function. Step 9: The individual that generates the latest gbest is an
In order to limit the evaluation value of each optimal controller parameter.
individual of the population within a reasonable range, the
Routh-Hurwitz criterion must be utilized to test the
closed-loop system stability before evaluating the SIMULATION EXAMPLES RESULTS
evaluation value of an individual. The feasible individual
and small value of W(K) if the individual satisfied the The simulation of the Typical Servo Motion System
Routh-Hurwitz criterion stability test applied to the without PID controller, PSO-PID controller and Ziegler
characteristic equation of the system. and Nichols-PID Controller were implemented by
The searching procedures of the proposed PSO-PID MATLAB Version 7.2 and executed on the Pentium 4
controller were shown as follows [5, 24, 25]: 2.66GHz personal computer with 1GB RAM.
Step 1: Specify the lower and upper bounds of the three Typical Servo Motion System without PID Controller
controller parameters and initialize randomly the
individuals of the population including searching The block diagram of the Typical Servo Motion System
points, velocities, pbests and gbest. without PID is shown in Fig. 2 below. Result of this step
response of the Typical Servo Motion System without
Step 2: For each initial individual K of the population, PID controller has shown in following Fig. 3. To simulate
employ the Routh-Hurwitz criterion to test the this case, we found that performance criteria of the system
closed-loop system stability and calculate the in the time domain as the TABLE II below.
values of the four performance criteria in the
time domain, namely Mp, Ess, tr and ts.
TABLE II
PERFORMANCE CRITERIA OF TYPICAL SERVO
MOTION SYSTEM WITHOUT PID CONTROLLER
Typical Servo Motion System with Ziegler and Nichols- Fig. 7: Determining fo and Ko of Ziegler and Nichols
PID Controller method