0% found this document useful (0 votes)
41 views6 pages

PXC 3871368

Uploaded by

bodlarakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views6 pages

PXC 3871368

Uploaded by

bodlarakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Journal of Computer Applications (0975 – 8887)

Volume 6– No.2, September 2010

Design of Controller using Simulated Annealing for a Real


Time Process
S.M GirirajKumar Bodla Rakesh N.Anantharaman
School of Electrical and Electronics School of Electrical and Electronics Department of Chemical Engineering
Engineering Engineering National Institute of Technology
SASTRA University SASTRA University Tiruchirapalli-620015, India
Tanjore-613402, India Tanjore-613402, India

ABSTRACT set of potential solutions, which is called population, and find the
The Proportional Integral Derivative Controllers have dominated optimal solution through cooperation and competition among the
the industries for nearly a century owing to their simplicity, potential solutions. These algorithms are highly relevant for
flexibility and efficiency. The demand for developing new industrial applications, because they are capable of handling
algorithms for designing these controllers to cope up with the problems with non-linear constraints, multiple objectives, and
complexities of the constantly evolving industries have turned the dynamic components – properties that frequently appear in real-
attention of the designers towards evolutionary algorithms like world problems [6].
Simulated Annealing(SA). This paper compares the tuning of the Simulated Annealing is a derivative-free stochastic search method
PID controllers using SA and traditional methods. The results for determining the optimum solution in an optimization problem.
obtained reflect that using SA tuned controllers improve the Ever since the method evolved, it has been used extensively to
performance of the process in terms of time domain and frequency solve large-scale problems of combinatorial optimization [5]. The
domain specifications. Further the disturbance rejection as well as SA evolves a single solution in the parameter space with certain
set-point tracking is being improved with a considerable guiding principles that imitate the random behavior of molecules
enhancement in stability of the process. during annealing process.[3] It is similar to the physical process
of heating up a solid until it melts, followed by cooling it down
Keywords slowly until it crystallizes into a perfect lattice. The objective
PID tuning, Modeling, Process Control, Evolutionary algorithm, function here corresponds to the energy of the states of a solid .An
SA attractive feature of SA is that it is easy to program and the
algorithm typically has few parameters that require tuning[2].
1. INTRODUCTION This has led to its vast application in industries and research in
Ever since they came to existence (in 1910), the PID controllers recent years [1].
have surpassed the rest and are applied in almost 90% of the
industries due to their simplicity, flexibility and efficiency [16]. The objective of this paper is to use the SA algorithm in order to
However, the constantly evolving industries have also increased obtain optimal PI controller settings for a spherical tank process.
in their complexity, which was not successfully accommodated by Every possible controller setting represent a particle in the search
the traditionally tuned controllers [14,13]. Since there are changes space which changes its parameters ,proportionality constant, Kp,
in the gain and phase margins, due to the increased complexity, it integral constant, Ki, in order to minimize the error function
calls for frequent tuning changes. This has forced the designers to (objective function in this case). The error function used here is
search for better tuning techniques. Integral of Absolute errors (IAE).

Intelligent techniques like neural networks attracted the designers In section 2, we have discussed in detail about the development of
[12,11] however real time implementation became rather tedious the mathematical model for the spherical tank process. The tuning
and often unyielding. The research and industrial community then results of conventional techniques are discussed in section 3.
changed their focus to optimization techniques [9]. Their Section 4 and 5 deal with the explanation of the SA algorithm and
simplicity and competitive efficiency made them a better choice its implementation. The comparative studies and results are given
compared to the intelligent techniques. Optimal control deals with in Section 6. The conclusions that was arrived, based on the
the problem of finding a control law for a given system such that a results is given in Section 7.
certain optimality criterion is achieved. A control problem 2. DEVELOPMENT OF MATHEMATICAL
includes a cost functional that is a function of state and control
variables. An optimal control is a set of differential equations MODEL FOR THE REAL TIME PROCESS
describing the paths of the control variables that minimize the cost The spherical tank system, which exhibits the property of non-
function [8,7]. linearity, is considered as the real time model. The process
dynamics are analyzed in a single segment, so as obtain effective
Evolutionary computation is a typical example of a family of model for the operating range with level variation from 0 – 48 cm.
meta-algorithms: it needs a model of the search space, a model of
solution quality, an algorithm for initialization, an algorithm to 2.1 Experimental Setup
evolve new attempts from old attempts and an algorithm for The experimental setup consists of a spherical tank, a water
termination, all of which are problem-dependent but conform to reservoir, pump, rotameter, a differential pressure transmitter, a
the general architecture of evaluating a succession of tentative current to pressure converter (I/P converter), a pneumatic control
solutions somehow related to previous attempts. Evolutionary valve, an interfacing ADAM’s module and a personal computer
algorithms are powerful optimization algorithms that work on a

20
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010

(PC). The differential pressure transmitter is been calibrated to 2.2 Step Testing Method
read the level of 0-43 cm in the conical tank in terms of 4-20 mA Step response based methods are most commonly used for system
and this current output from the DPT is passed through 100 ohms identification, especially in process industries. To get an effective
resistance and thus converted into 0.4 – 2 V. This voltage at the and accurate mathematical model, this method requires the
input of ADC of ADAM module is interfaced with computer conical tank level response, assumption of a suitable model and
through the RS-232 port of the PC. The output current signal of estimates of model parameters. The selection of the model could
the DAC is given to a current to pressure (I/P) converter which is be based on the shape of the open-loop step response. The open
connected to the pneumatic control valve. The inflow rate is thus loop step response is obtained by varying the manual mode output
adjusted by changing the stem position of the control valve from from the controller with the optimal value of flow through the
fully open to fully close. The control signal from the PC is control valve so that the response can be validated for the entire
transmitted to the I/P converter in the form of current signal (4- range.
20) mA, which converts it to corresponding 3-15 psi of
compressed air; further given as input to the pneumatic control A large number of graphical methods are available in literature
valve. The pneumatic control valve is actuated by this signal to and they have been used effectively in real time applications to
produces the required flow rate of water in the conical tank to obtain the model. In this project we are implementing the
maintain its level. SunderasanKumaraswamymethod[15] to validate the model from
The ADAM’s module has 8 analog input and 4 analog output the obtained response. As per the structure of the curves, we
channels with the voltage range of ±10 volt. The sampling rate of predict the model to be of the form similar to first order plus time
the module is 18 samples per sec and baud rate is 9600 bytes per delay (FOPTD), and hence the model is given by
sec with 16-bit resolution. The programs written in m-file of G(s) = Ke- ds
MATLAB software is then linked via ADAM’s module with the
sampling time of 60 milliseconds. The photograph of the s+1
experimental setup is given in the figure.1,and its technical details where K = process gain
is given in table.1.
first order time constant
d = delay time
From the response of the real time system we obtain the
mentioned constants and thereby we get the FOPTD models for
the real time spherical tank process as
G(s) = 6.86e-4.73s
219.76s+1
For the obtained FOPTD model the step change of similar
magnitude is given and simulated using MATLAB. The response
of the model was compared and it was found that the simulation
for the proposed model had a response that was close to the real
time response and is as shown in figure.2.
real time model
Fig.1. Photograph of Experimental Setup
60
Table.1. Technical details of the various transducers in the
50
experimental setup
40
PART NAME DETAILS
30

Spherical tank Stainless Steel, Diameter - 48 cm 20

10
Differential Capacitance type, Range 2.5 - 250mbar,
pressure Output4 - 20mA 0
transmitter 0 200 400 600 800 1000 1200
-10

Pump Centrifugal 0.5 HP


Fig .2. Comparison of real time and simulated responses for
Control valve Size ¼“ Pneumatic actuated, Type: Air to close, proposed model
Input 3 - 15 psi
2.3 CONVENTIONAL DESIGN
Rotameter Range 0 - 18 lpm
TECHNIQUES
Air regulator Size 1/4" BSP,Range 0 - 2.2 bar The basic PI controller parameters are given as, proportional gain,
I/P converter Input 4-20 mA, Output 0.2 - 1 bar Kp and integral gain Ki. Over the last fifty years, numerous
methods have been developed for setting the parameters of a PID
Pressure gauge Range 0 - 30 psi controller [10]. In this paper it is considered to proceed the tuning
with traditional tuning methodology, using Internal Model Control

21
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010

(IMC) tuning technique proposed by Skogestad [4] for PI tuning the Metropolis algorithm, there is some finite probability of
The IMC technique is one of the recent traditional tuning selecting the point x(t+1) even though it is a worse than the point x
(t)
techniques that yields better values among the techniques .The principle is represented in figure.3.The new stateK1is
available for conventional methods. For a FOPTD model of the accepted, but the new state K2is only accepted with a certain
mentioned form in equation (1) the IMC tuning values based on probability.
Skogestad proposal is given as
Kp= 1 ( c + d ) where c = d as per Skogestad,
K
and integral time constant Ti is given as ,Ti =
Applying the technique we get the IMC tuning parameters as Kp=
3.2904 ,Ki = 0.015 for the proposed model.

3. SA based controller
3.1 Simulated Annealing:
SA is a numerical optimization technique based on the principles
of thermodynamics. The Simulated Annealing method resembles
the cooling process of molten metals through annealing. At high
temperature, the atoms in the molten metal can move freely with
respect to each another. But, as the temperature is reduced, the
movement of the atoms gets reduced. The atoms start to get
ordered and finally form crystals having the minimum possible
energy. However, the formation of the crystal depends on the
cooling rate. If the temperature is reduced at a very fast rate, the
crystalline state may not be achieved at all; instead the system
Fig.3. Selection of new states in SA
may end up in a polycrystalline state, which may have a higher
energy state than the crystalline state. Therefore in order to
achieve the absolute minimum state, the temperature needs to be The probability of accepting a worse state is high at the beginning
reduced at a slow rate. The process of slow cooling is known as and decreases at the temperature decreases. For each temperature,
annealing in metallurgical parlance. SA simulates this process of the system must reach an equilibrium i.e., a number of new states
slow cooling of molten metal to achieve the minimum function must be tried before the temperature is reduced typically by 10 %.
value in a minimization problem. It can be shown that the algorithm will find, under certain
The cooling phenomenon is simulated by controlling a condition, the global minimum and not get stuck in local minima.
temperature-like parameter introduced with the concept of the Figure 4.iIllustrates the flowchart of SA algorithm.
Boltzmann probability distribution. According to the Boltzmann
probability distribution, a system in thermal equilibrium at a
temperature T has its energy distributed probabilistically
according to
P (E) = exp (- ∆E / kT),
where k is the Boltzmann constant. This expression suggests that
a system at a high temperature has almost uniform probability of
being at any energy state, but at a low temperature it has a small
probability of being at a high energy state. Therefore, by
controlling the temperature T and assuming that the search
process follows the Boltzmann probability distribution, the
convergence of an algorithm can be controlled using the
Metropolis algorithm.
At any instant the current point is x (t) and the function value at
that point is E (t) = f (x(t)). Using the Metropolis algorithm, the
probability of the next point being at x (t+1) depends on the
difference in the function values at these two points or on E =
E(t+1)–E(t) and is calculated using the Boltzmann probability
distribution:
P ( E (t+1) ) = min [1, exp ( - E/kT)].
If E 0, this probability is one and the point x (t+1) is always
accepted. In the function minimization context, this makes sense
because if the function value at x (t+1) is better than that at x(t), the
point x (t+1) must be accepted. When E > 0, which implies that
the function value at x(t+1) is worse than that at x(t). According to Fig. 4. Flowchart for SA algorithm

22
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010

4. IMPLEMENTATION OF SA 6
ALGORITHM 5
The optimal values of the conventional PI controller parameters

Distribution of Kp
Kp and Ki,is found using SA. All possible sets of controller 4
parameter values are particles whose values are adjusted so as to
3
minimize the objective function, which in this case is the error
criterion, which is discussed in detail.For the PI controller design, 2
it is ensured the controller settings estimated results in a stable
1
closed loop system.
0
4.1 Selection of SA parameters 0 20 40 60 80 100
To start up with SA, certain parameters need to be defined. It initial iteration
includes initial temperature (Ti), decrement temperature (Td),
population size, terminating temperature (Tt), multiplication factor Fig 5. Distribution of Kp in first iteration
etc. Selection of these parameters decides to a great extent the
ability of global minimization. The initial temperature and 0.06

decrement factor, through the multiplication factor decides the


number of iterations that affect the ability of escaping from local 0.045

Distribution of Ki
optimization and refining global optimization. In this work the
parameters are so selected to have 100 iterations. The population 0.03
size balances the requirement of global optimization and
computational time. The range of the tuning parameters is 0.015
considered in the range of 0-10.Initializing the values of the
parameters for this paper is as follows: 0
Population size – 100 0 20 40 60 80 100
initial iteration
Initial Temperature- 1500
Decrement Temperature- 10 Fig 6. Distribution of Ki in first iteration
For each iteration the best among the 100 particles considered as
Termination temperature- 0.001
potential solution are chosen. Therefore the best values for 100
Multiplication Factor – (Ti - Td)/ Ti = 0.995 iterations is sketched with respect to iterations for Kp and Ki, and
are as shown in figure 7 & 8.
4.2 Performance Index for the SA Algorithm
The objective function considered is based on the error criterion. 6

The performance of a controller is best evaluated in terms of error 5


criterion. A number of such criteria are available and in this paper,
4
controller’s performance is evaluated in terms of Integral of
Absolute Errors (IAE ) criterion, given by
Kp

0
The IAE weights the error with time and hence emphasizes the 0 20 40 60 80 100
error values over arrange of 0 to T, where T is the expected number of iterations
settling time
Fig.7. Best solutions of Kp for 100 iterations.
4.3 Termination Criteria
Termination of optimization algorithm can take place either when 0.06
the maximum number of iterations gets over or with the 0.05
attainment of satisfactory fitness value. Fitness value is nothing
but reciprocal of the magnitude of the objective function, since we 0.04

consider for a minimization of objective function. In this paper the 0.03


Ki

termination criteria is considered to be the attainment of


0.02
satisfactory fitness value which occurs with the maximum number
of iterations as 100.Application of the SA algorithm with IAE 0.01
error criterion for 100 iterations gives us the variation of the PI 0
parameters. For each iteration the best of the 100 solutions chosen 0 20 40 60 80 100
-0.01
is considered . The variation of the values for the first iteration for
number of iterations
Kp and Ki are given below for the model as shown in Figure 5 &
6. It is clearly seen that the values are distributed.
Fig.8. Best solutions of Ki for 100 iterations.

The PI controller were formed based upon the respective

23
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010

parameters for 100 iterations, and the gbest (global best) solution The real time results clearly infer that the SA tuned controller
was selected for the set of parameters, which had the minimum performs better than the IMC tuned controller for a set of 15
error. A sketch of the error based on IAE criterion for 100 cm.The time domain specifications for the real time responses is
iterations is as given in figure.9. given in table.6.

Table.2.Comparison of time domain specifications for the real


700
time response.
600
IMC controller SA controller
500
Rise time 200 149
400 (seconds)
IAE

300

200
Peak time 256 183
(seconds)
100

0 Overshoot 9.13 2.87


0 20 40 60 80 100 (%)
number of iterations
Settling time 289 208
(seconds)
Fig.9. IAE values for 100 iterations
It was seen that the error value tends to decrease for a larger
number of iterations. As such the algorithm was restricted to 100
5.2 Robustness Investigation:
The PI controllers tuned by the PSO based method should not be
iterations for beyond which there was only a negligible
compared only with their time domain responses but also with its
improvement. Based on SA algorithm for the application of the PI
performance index from the four major error criterion techniques
tuning we get the PI tuning parameters for model 1 as
of Integral Time of Absolute Error(ITAE) ,Integral of Absolute
Kp=4.416,Ki = 0.0158
Error(IAE) ,Integral Square of Error(ISE )and Mean Square Error
(MSE).Robustness of the controller is defined as its ability to
5. RESULTS AND COMPARISON tolerate a certain amount of change in the process parameters
The tuned values through the traditional as well as the proposed without causing the feedback system to go unstable. In order to
techniques are analysed for their responses to a unit step input, investigate the robustness of the proposed method in the face of
with the help of simulation and then the real time application for model uncertainities, the model parameters were altered. Here the
the spherical tank is presented. A tabulation of the time domain value of gain constant K, time constant, , and delay time d is
specifications comparison and the performance index comparison deviated by as much as ±20% of its nominal values. In the
for the obtained models with the designed controllers is presented. proposed models for the experimental setup the value of K is
Further robustness investigation is done by varying the model incremented by 20 %, the value of , is incremented by 20 % and
parameters by twenty percent. that of d is reduced by 20%.Thus the model with the proposed
5.1 Real time response of the experimental uncertainities is
setup for set point conditions G(s) = 8.228e-3.89s
The most important aspect of the paper is presented in this 263.71s+1
section.The real time response of the system were observed by
For the proposed model the comparison of performance index
giving a set point of 15 cm, and the corresponding variation of
were done and are listed as per the given table
level from a reference value of zero was recorded .The outflow
valve from the tank was kept partially open and the position was Table.3 Comparison of performance index for 20% changes in
retained for the various trials of controller settings. The response model parameters
of the spherical tank for set point of 15 cm with various controller IMC controller SA controller
settings are presented as shown in figure.10.
ITAE 562.69 261.11
IMC SA
IAE 97.36 70.81
16
ISE 73.41 60.15
12 MSE 0.1465 0.1201
level(cm)

4 6. CONCLUSION
The various results presented prove the betterness of the SA tuned
0 PI settings than the IMC tuned ones. The simulation responses for
0 50 100 150 200 250 300 the models validated reflect the effectiveness of the SA based
time(seconds) controller in terms of time domain specifications. The
performance index under the various error criterions for the
Fig.10.Real time response for a set point of 15 cm proposed controller is always less than the IMC tuned controller.

24
International Journal of Computer Applications (0975 – 8887)
Volume 6– No.2, September 2010

Above all the real time responses confirms the validity of the 7. S.Chen, R.H. Istepanian and J.Wu, “ Optimizing
proposed SA based tuning for the spherical tank. stability bounds of finite-precision PID controllers using
SA presents multiple advantages to a designer by operating with a adaptive simulated annealing”, Proceedings of the
reduced number of design methods to establish the type of the American control conference ,San Diego, California
controller, giving a possibility of configuring the dynamic ,June 1999.
behavior of the control system with ease, starting the design with 8. S. Chen and B.L.Luk, "Adaptive simulated annealing
a reduced amount of information about the controller (type and for optimization in signal processing applications",
allowable range of the parameters), but keeping sight of the Journal of Engineering and electronics, Vol. 79,pp. 117-
behavior of the control system. These features are illustrated in 128, 1999.
this paper by considering the problem of designing a control 9. Yan Tian, Li Erxue and Yang Shiyou, “Improved
system for a plant of first-order system with time delay and simulated annealing algorithm and its application in
deriving the possible results. The future scope of the work is fault-location of power transmission lines”, IEEE 1998.
aimed at providing an on-line self tuning PI controller with the 10. Luyben, W.L and M.L Luyben, “Essentials of process
proposed algorithm so as solve complex issues for real time control”, McGraw-Hill, New York (1997).
problems. 11. Simon Fabri and VisakanKadirkamanathan, “Dynamic
structure neural networks for stable adaptive control of
7. REFERENCES nonlinear systems”, IEEE transactions on neural
1. Hsien-Yu Tseng and Chang-Ching Lin, "A simulated networks, Vol 7, No. 5, September1996.
annealing approach for curve fitting in automated 12. Sanjay I. Mistry, Shao-liang Chang and Satish S. Nair,
manufacturing systems", Journal of Manufacturing “Indirect control of a class of nonlinear dynamic
technology management, Vol 18, No.2 pp. 202-216, systems”, IEEE transactions on neural networks Vol 7,
2007 No. 4, July 1996.
2. PierpaoloCaricato and Antonio Grieco, “Using 13. Mehrdad Salami and Greg Cain, “An adaptive PID
simulated annealing to design a material handling controller based on Genetic algorithm processor”,
system”, IEEE intelligent systems, 2005. Genetic algorithms in engineering systems:Innovations
3. Li-Sun Shu, Shinn-Ying Ho and Shinn-Jang Ho, “A and applications 12-14 September 1995, Conference
novel orthogonal simulated annealing algorithm for publication No. 414, IEE 1995.
optimization of electromagnetic problems.”, IEEE 14. Su Whan Sung, In-Beum Lee and Jitae Lee,“ Modified
transactions on Magnetics, Vol.40, No. 4, July 2004. Proportional-Integral Derivative (PID) Controller and
4. SigurdSkogestad, “Simple analytic rules for model a New Tuning Method for the PID Controller”,Ind.
reduction and PID controller tuning”, Journal of Process Eng.Chem. Res.,34, 4127-4132, 1995.
Control 13 (2003) 291–309,2003. 15. Sundaresan,K.R.,Krishnaswamy,R.R.,“Estimation of
5. L.R.Varela, R.A.Ribeiro and F.M.Pires, “Simulated time delay, time constant parameters in Time,
annealing and fuzzy optimization”, Proceedings of the Frequency and Laplace Domains”, Journal of Chemical
10th Mediterranean conference on control and Engineering.,56,257,1978.
automation- MED2002,Portugal, July 9-12, 2002. 16. J. G. Ziegler and N. B. Nichols, “Optimum settings for
6. JavedAlam Jan and BohumilSulc, “Evolutionary automatic controllers,” Trans. Amer. Soc. Mech. Eng.,
computing methods for optimizing virtual reality vol. 64, pp. 759–768, 1942
process models”, International Carpathian control
conference ICCC’2002, Malenovice Czech republic,
May 27-30, 2002.

25

You might also like