Sunteți pe pagina 1din 6

System Identification Using Particle Swarm Optimization Algorithm

Kaushik Das Sharma1, Amitava Chatterjee2, Anjan Rakshit2


1
Department of Electrical Engineering, Future Institute of Engineering and Management,
Kolkata – 700150, India.
2
Department of Electrical Engineering, Jadavpur University, Kolkata – 700032, India.

Abstract: System identification is the art and science of building mathematical models of
dynamic systems from observed input-output data. It can be seen as the interface
between the real world of applications and the mathematical world of control theory and
model abstractions. System identification is a very broad aspect with different techniques
that depend on the character of the models to be estimated: linear, nonlinear, hybrid,
nonparametric etc. At the same time, the system identification problem can be
characterized by the features like the model complexity, information contents in the data,
and effective validation. The identification process has many facets and there are many
approaches and methods. In this present work Particle Swarm Optimization (PSO)
method is utilized for determining the optimal parameters of a DC motor. As a stochastic
optimization technique, PSO has obtained much attention during the past decade. It is
gaining popularity, especially because of the speed of convergence and the fact that it is
easy to realize. The results obtained from the simulation study demonstrate the
usefulness of the proposed methodology.

Key Words: System Identification, Particle Swarm Optimization (PSO), DC motor.

1. Introduction

A system identification problem can be viewed as the construction of a mathematical


model for a dynamic system using the knowledge and observations of that system [1],
[2]. The two most important elements for system identification are: the selection of a
feasible model structure and the determination of model parameters with the minimum
error.
In this present work, model structure is selected as the state model of a DC motor [11]
and the parameters of this model are identified by using particle swarm optimization
(PSO) technique. The state model of DC motor is given as:
x&1 = x 2 

 BRa K b K T   Ra B  KK T 
x& 2 = − +  x1 −  +  x 2 + u (t ) (1)
 JLa JLa   La J  JLa 
y = x1 

where, [x1 x2 ] = [ω ω ] , the output y is the angular speed of the motor (in rad/s).
&
The unknown parameters are: armature resistance (Ra), armature inductance (La),
inertia constant (J), damping constant (B), and the constants of the DC motor and its
driver circuit (Kb, KT and K).
In the following, section 2 describes briefly the basic PSO algorithm and section 3 the
application of PSO to the determination of DC motor model parameters is explained.
Section 4 shows the simulation results and section 5 concludes the paper.
2. Particle Swarm Optimization Algorithm

Particle swarm optimization is a stochastic, population-based evolutionary algorithm for


problem solving. It is a kind of swarm intelligence that is based on socio-psychological
principles and provides insights into social behavior, as well as contributing to
engineering applications. The particle swarm optimization algorithm was first developed
in 1995 by James Kennedy and Russell C. Eberhart [3] [4]. In the PSO computational
algorithm, population dynamics simulates bio-inspired behavior i.e. a “bird flock’s”
behavior which involves sharing of information and allows particles to take profit from the
discoveries and previous experience of all other particles during the search of food.
Each particle in PSO has a randomized velocity vector ( v ) associated to it, which moves
through the search space. Each particle in PSO keeps track of its coordinates in the
solution space, which are associated with the best solution (fitness) it has achieved so
far. This value is called p (personal best position vector). Another best value that is
tracked by the global version of the particle swarm optimizer is the overall best value
(fitness). Its location, called g (global best position vector), is obtained among all the
particles in the population. The past best position of the particle itself and the best overall
position in the entire swarm are employed to obtain new position vector ( s ) for the
particle in quest to minimize (or maximize) the fitness [5].
At each time step t the velocity of the particle is updated and the particle is moved to a
new position. This new position is calculated as the sum of the previous position and the
new velocity:
s t +1 = s t + v t +1 (2)
The update of the velocity from the previous velocity to the new velocity is determined
as:
v t +1 = ω.v t + r1 .c1 ( p t − s t ) + r2 .c 2 ( g t − s t ) (3)
The PSO concept consists, in each time step, of changing the velocity of each particle
flying towards its personal best and global best location with an inertia weight ω , which
controls the magnitude of the old velocity in the calculation of new velocity. The velocity
is weighted by random terms, with separate random numbers (r1 and r2) being generated
for velocities towards personal best and global best locations respectively. c1 and c2 are
the social parameters used for the learning purpose in the optimization technique [9].

3. PSO Based System Identification Technique

In PSO based system identification, a particle’s position in solution space is a vector


containing all required information to obtain the model of the DC motor, e.g. i) armature
resistance (Ra), ii) armature inductance (La), iii) inertia constant (J), iv) damping constant
(B), v) motor constants (Kb and KT ) and vi) driver circuit constant (K). This particle vector
s is formed as [10], [11]:
s = [ Ra | La | J | B | Kb | K ] (4)
As we know that in SI unit Kb = KT, thus the particle vector s is formed only with Kb and
KT will be found subsequently.

PSO Based System Identification Algorithm:


The outline of the PSO (global version) based system identification algorithm employed
in this paper is given as follows –
i) Initialize the jth particle’s position and velocity randomly throughout the solution
space using the following formula:
j
s 0 = s min + r1 ( s max − s min ) (5)
j s min + r2 ( s max − s min )
v0 = (6)
∆t
where r1, r2 are the random numbers between 0 and 1, s min is the vector of lower
bounds and s max is the vector of upper bounds for the DC motor parameters and ∆t is
the time step.
ii) Calculate the fitness value of the optimization process with the candidate solution.
iii) Search the fitness value for each particle till now, in all iterations, to get its own best
fitness value (pBest) in history and get the corresponding position vector ( p ) i.e. the DC
motor parameters corresponding to that fitness value.
iv) Determine the particle in the design space with the best fitness value (gBest) till
now, among all the particles, and denote its position as g .
v) For each particle calculate the velocity according to the following formula [8]:
j j j
j j
c1 r1 ( p t − s t ) c 2 r2 ( g − s t )
v t +1 = ωt v + t + (7)
∆t ∆t
where ω t is the inertia weight of the particle at iteration t, as introduced by Shi and
Eberhart [6], [9], and is given by:
(itermax − t ) ∗ (ω start − ω end )
ωt = + ω end (8)
itermax
where itermax is the maximum number of iterations of PSO. Normally ω t is reduced
linearly from ω start to ω end throughout the PSO generation. A typical combination is
ω start = 0.9 and ω end = 0.4.
c1 and c2 in (7) are the ‘trust’ parameters and are usually set to 2. Update each particle’s
position vector according to the following equation
j j j
s t +1 = s t + v t +1 ∆t (9)
j j
where s t +1 represents the position of particle ‘j’ at (t+1)th iteration and v t +1 represents
the corresponding velocity vector. A unit time step (∆t) is taken throughout the present
work.
vi) The stopping criteria can be set in two ways, either by choosing the itermax or by
using a minimum error criteria i.e. continue the PSO adaptation until a maximum pre-
specified error is attained by the controller.
Each particle’s velocity, in each dimension, is clamped to a maximum velocity vmax as
j j
if v g > v max , then v g = v max
j j
if v g < −v max , then v g = −v max
where vmax is specified by the designer according to the nature of the system.

4. Simulation Results

To demonstrate the usefulness of the proposed PSO algorithm for system identification,
we have performed a real-life experiment on a real DC motor. Fig 1 shows the
experimental arrangement of data collection of the DC motor through a parallel port
interface in real time.

Fig 1: Experimental arrangement

The open loop test data of the input voltage and its corresponding speed of DC motor for
4 min. are measured at an interval of 6 seconds. The voltage that is to be applied to the
motor for the identification of its parameters is a triangular wave. The speed
measurement is carried out using shaft encoders having 10 holes in the wheel mounted
on the shaft. The plot of the open loop voltage and the speed are shown in Fig 2.

100 3000

2000
Speed (rpm)
Voltage (V)

50

1000

0 0
0 60 120 180 240 0 60 120 180 240
Time (sec) Time (sec)
(a) (b)
Fig 2: (a) Input voltage plot, (b) speed plot of the DC motor

The unknown parameters are identified utilizing PSO algorithm, where the PSO
algorithm determines the best vector comprising the unknown parameters for which
discrepancy between the model output and the actual experimental output data, for the
same input, is minimum, considering the entire set of input-output real-life data. The
results obtained, after 10 test cases, for the identified parameters of the DC motor is
tabulated in Table 1. Fig 3 shows the result obtained after 200 PSO generations in one
test case as a sample basis, where dashed line correspond the experimentally obtained
data and the solid line correspond the desired model output.
Table 1
No. of Test Ra La Kb J f K

1 0.0089 0.0100 0.0003 0.0059 0.0035 0.3457


2 0.0007 0.0095 0.0009 0.0014 0.0079 0.0286
3 0.0099 0.0100 0.0004 0.0063 0.0035 0.3384
4 0.0045 0.0098 0.0016 0.0052 0.0043 0.0542
5 0.0006 0.0074 0.0005 0.0008 0.0100 0.0502
6 0.0009 0.0097 0.0003 0.0041 0.0060 0.0785
7 0.0009 0.0100 0.0007 0.0083 0.0086 0.0443
8 0.0045 0.0100 0.0012 0.0097 0.0042 0.0666
9 0.0023 0.0100 0.0011 0.0086 0.0057 0.0517
10 0.0009 0.0100 0.0007 0.0066 0.0071 0.0390
Standard
0.0035 8.06x10-4 4.27x10-4 0.0029 0.0023 0.1232
Deviation
Average 0.0034 0.0096 7.7x10-4 0.0057 0.0061 0.1097

4000

3000
Speed (rpm)

2000

1000

0
0 60 120 180
Time (sec)
Fig 3: Comparison of test) data and model output

5. Conclusion

In this work, PSO algorithm was used for a typical system identification problem. It is
concluded that PSO is fast, flexible and very simple to implement. The results found
show that PSO is very efficient for this kind of problem. PSO can be applied to more
complex identification problems and its performance can be compared with the
performance of other algorithms such as genetic algorithm [12], ant colony optimization
[8] etc.

Acknowledgment

This work was supported by University Grants Commission, India under Major Research
Project Scheme (Grant No. 32-118/2006(SR)).
REFERENCES

1. K. Ogata, ”System dynamics”, Prentice Hall, New Jersey, 1992.


2. L. Ljung,, “System identification: Theory for the user”, Prentice hall, 1987.
3. R. C. Eberhart and J. Kennedy, “A new optimizer using particle swarm theory,”
Proc. 6th Int. Symp. Micromachine Human Sci., Nagoya, Japan, pp 39-43, 1995.
4. J. Kennedy and R. C. Eberhart, “Particle swarm optimization,” Proc. IEEE Int.
Conf. Neural Networks, vol. 4, pp. 1942-1948, 1995.
5. G. Venter and J. S. Sobieski, “Particle swarm optimization,” 43rd AIAA conf.,
colorado, 2002.
6. Y. Shi and R. C. Eberhart, “A modified particle swarm optimizer,” Proc. IEEE Int.
Conf. Evol. Comp., Alaska, May, 1998.
7. R. C. Eberhart and Y. Shi, “Comparing inertia weights and constriction factors in
particle swarm optimization,” Proc. 2000 Congr. Evol. Comp., pp. 84-89, 2000.
8. M. Dorigo V. Maniezzo, and A. Colorni, “Ant system: optimization by a colony of
cooperating agent,” IEEE Trans. Syst., Man, Cybern. B Cybern., vol. 26, no. 1, pp.
29-41, Feb. 1996.
9. Y. Shi and R. C. Eberhart, “Parameter selection in particle swarm optimization,”
Evol. Prog. VII: Proc. EP 98, Spriger-Verlag, New York, 1998.
10. K. Das Sharma, A. Chatterjee and F. Matsuno, “A Lyapunov theory and
stochastic optimization based stable adaptive fuzzy control methodology,” Proc.
SICE Annual Conference 2008, Japan, pp-1839-1844, August 20-22, 2008.
11. K. Das Sharma, A. Chatterjee and A. Rakshit, “A hybrid approach for design of
stable adaptive fuzzy controllers employing Lyapunov theory and particle swarm
optimization,” IEEE Trans. Fuzzy Syst., vol. 17, no. 2, pp. 329- 342, April, 2009.
12. D. Goldberg, “The design of innovation: Lessons from and for competent genetic
algorithms”, Kluwer Academic Publishers, 2002.

S-ar putea să vă placă și