Pid BG
Pid BG
OPTIMIZATION ALGORITHM
Mohammed Alhanjouri¹, Ramzi Al ghamri²
ABSTRACT:
Recently, many algorithms used to make tuning for PID controller parameters for
different applications. PID Controller gives us control of both transient and steady state
response, and decreases the characteristics elements such as overshoot, steady state
error, settling time, and rising time, and makes the system stable and robust. But the
problem is how to choose the PID parameters to achieve a desired response. In this
work we will present the Bacteria Foraging Optimization Algorithm (BFOA) as a novel
algorithm using the social foraging behaviour for Escherichia coli bacteria to make
tuning for PID parameters for an experimental plant system. Comparing with Practical
Swarm Optimization (PSO), this proposed algorithm was more efficient in improving
the step response characteristic for this system.
I. INTRODUCTION
PID Controller is widely used in industrial systems due to its simplest and yet most
efficient solution for many real words control problems. PID Controller gives us control
of both transient and steady state response, and decreases the characteristics elements
such as overshoot, steady state error, settling time, and rising time, and makes the
system stable and robust. But the problem is how to choose the PID parameters to
achieve a desired response.
To solve this problem, several strategies have been proposed by researchers over the
past decades. The PI and I control parameters are tuned based on Hybrid Particle Swarm
Optimization (HPSO) algorithm method [1]. PSO based multi stage fuzzy controller is
proposed for solution of LFC problem in power system in [2]. Designing of PID
controller for LFC in interconnected power system using PSO has been discussed in [3].
Hybrid Nero Fuzzy (HNF) approach is employed in [4] for an Automatic Generation
Control (AGC) of interconnected power system with and without generation rate
constraint (GRC). Application of real coded GA for optimizing the gains of a PI
controller for two area thermal reheat power system has been discussed in [5]. Fuzzy
Logic Controller is designed for automatic LFC of two area interconnected power
system in [6].
Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century
1
BFOA more efficient over other algorithms, and more suitable as optimization tool for
control systems.
In this work we will propose a new optimization algorithm known as BFOA for optimal
designing of PID controllers for an experimental plant system. The effectiveness of the
proposed algorithm in designing PID controllers is supported by the observed
simulation results, which show the ability of the proposed BFOA in damping
oscillations, and in reducing settling time and overshooting.
II. PID CONTROLLER
PID Control (proportional-integral-derivative) is the widest type of automatic control
and is a generic control loop feedback mechanism widely used in industrial control
systems. Even though it has a relatively simple algorithm/structure as shown in Figure
1, there are many small variations in how it is applied in industry. A PID controller will
correct the error between the output and the desired input or set point by calculating and
give an output of correction that will adjust the process accordingly. A PID controller
has the general form:
(1)
Where is proportional gain, is the integral gain, and is the derivative gain. A
PID controller form in S domain is:
(2)
The PID controller calculation (algorithm) involves three separate parameters; the
Proportional, the Integral and Derivative values. The Proportional value determines the
reaction to the current error, the Integral determines the reaction based on the sum of
recent errors and the Derivative determines the reaction to the rate at which the error has
been changing.
Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century
2
those with poor search ability. Application of group foraging strategy of a swarm of
E.coli bacteria in multi-optimal function optimization is the notion of the new
algorithm. So by understanding and modeling of foraging behavior in any of the
evolutionary species, leads to its application in any nonlinear system optimization
algorithm. The foraging strategy of Escherichia coli bacteria present in human can be
described by four processes, namely chemotaxis, swarming, reproduction, and
elimination dispersal [7-8].
A. Chemotaxis
The movement of E.coli bacteria during its search for food can be defined in two ways:
swimming and tumbling. It can swim for a period of time in the same direction or it
may tumble (moving in random directions), and alternate between these two modes of
operation for the entire lifetime. Figure 2 show the swim and tumble of bacteria
B. Swarming
The swarming means that the bacteria congregate into groups and move as a concentric
patterns with high bacterial density. When the bacterium till a richest food location in
the search period should try to attack other bacteria so that together they converge at the
desired location.
C. Reproduction
After several stages of chemotactic, we reach to a reproduction stage. In this stage the
best set of bacteria divided into two groups, the least healthy bacteria eventually die
while each of the healthier bacteria asexually split into two bacteria, which are then
placed in the same location. This keeps the population of bacteria constant in the
evolution process.
Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century
3
D. Elimination and Dispersal
During the evolution process, sudden events may be occur such as rising of temperature
in the local environment, may be kill a group of bacteria and/or disperse them to a new
environment. Elimination and dispersal are parts of the population level and its occur by
a probability ratio. In our applications this phenomenon helps us in reducing the
behaviour of stagnation often seen in such parallel search algorithms.To simulate this
phenomenon in BFOA some bacteria are liquidated at random with a very small
probability while the new replacements are randomly initialized over the search space.
a) Parameters
[Step 1] Initialize parameters , S, , , , , , C(i)(i=1,2…S), .
: Dimension of the search space,
: Total number of bacteria in the population,
: The number of chemotactic steps,
: The swimming length.
: The number of reproduction steps,
: The number of elimination-dispersal events,
: Elimination-dispersal probability,
C(i): The size of the step taken in the random direction specified by the tumble.
b) Algorithm
[Step 2] Elimination-dispersal loop:
[Step 3] Reproduction loop:
[Step 4] Chemotaxis loop:
[a] For i =1,2…S take a chemotactic step for bacterium i as follows.
[b] Compute fitness function, (i, j, k, l).
Let, (i, j, k, l) = (i, j, k, l) + ( (j, k, l), P (j, k, l))
(i.e. add on the cell-to cell attractant–repellant profile to simulate the swarming
behavior).
[c] Let = to save this value since we may find a better cost via a
run.
[d] Tumble: generate a random vector with each element ,
, random number on [-1, 1].
[e] Move: Let
(3)
This results in a step of size in the direction of the tumble for bacterium i.
[f] Compute and let
(i, j+ 1, k, l) = (i, j, k, l) + ( ( j+ 1, k, l), ( j+ 1, k, l)).
[g] Swim
i) Let m=0 (counter for swim length).
ii) While (if have not climbed down too long).
• Let m=m+1.
Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century
4
• If (i, j +1, k, l) (if doing better), let = (i, j +1, k, l) and let
And use this (j+1, j, k) to compute the new (i, j +1, k, l) as we did in [f]
• Else, let m = . This is the end of the while statement.
[h] Go to next bacterium (i+1) if i S (i.e., go to [b] to process the next
bacterium).
[Step 5] If j , go to step 4. In this case continue chemotaxis since the life of the
bacteria is not over.
[Step 6] Reproduction:
[a] For the given k and l, and for each i = 1,2,..., S , let
(5)
be the health of the bacterium i (a measure of how many nutrients it got over its
lifetime and how successful it was at avoiding noxious substances). Sort
bacteria and chemotactic
Parameters in order of ascending cost health (higher cost means lower
health).
[b] The bacteria with the highest health values die and the remaining
bacteria with the best values split (this process is performed by the copies that
are made are placed at the same location as their parent).
[Step 7] If k < , go to step 3. In this case, we have not reached the number of
specified reproduction steps, so we start the next generation of the chemotactic
loop.
[Step 8] Elimination-dispersal: For i = 1, 2..., S with probability , eliminate and
disperse each bacterium (this keeps the number of bacteria in the population
constant). To do this, if a bacterium is eliminated, simply disperse another one to
a random location on the optimization domain. If l < , then go to step 2;
otherwise end.
IV. PLANT APPLICATION AND OPTIMAL RESULTS
In this section we will apply BFOA on PID tuning parameter for a plant and actuator
system which has a transfer function as follows:
(6)
And its block diagram as shown in Figure3, to ensure the effectiveness of the proposed
BFOA on the transient response of the system, which has the step response before
applying PID controller as shown in Figure 4.
Copyright © 2012 IUG. The 4th International Engineering Conference –Towards engineering of 21st century