You are on page 1of 5

Canadian Journal on Electrical and Electronics Engineering Vol. 2, No.

11, November 2011

Optimization of PID Controller for liquid level tank system using Intelligent Techniques
Bijay Kumar, Rohtash Dhiman
Abstract- This paper presents a design of PID controller for liquid-level tank system. The liquid-level tank system has limitations and it is difficult to control optimally using only PID controller as the parameters of the system are changing constantly. We take the liquid level of three water tanks for object, and use MATLAB to design GA and PSO Control. Then we analyze the control effect and compare it with the effect of PID controller. As a result of comparing, it is found that PSO converges with less number of functional evaluations, consistent for simple systems and in general ITSE is preferable for quick settling time than GA.
Key Words PID controller, Parameter optimization, GA, PSO, liquid-level tank.

robustness, and without knowing anything about the underlying mathematics, GA and PSO are expected to overcome the weakness of traditional PID tuning techniques and to be more acceptable for industrial practice II. PID CONTROLLER PID stands for Proportional-Integral-Derivative. This is as type of feedback controller whose output, a control variable (CV), is generally based on the error (e) between some userdefined set-point (SP) and some measured process variable (PV). Each element of the PID controller refers to a particular action taken on the error.

I. INTRODUCTION Liquid level control system mainly control the manipulated parameter of liquid level, which in industry have a wide range of applications in various fields. In the industrial production process, there are many places need to control the liquid level, and make the liquid level maintain accurately for a given value. The traditional method is to use classical PID method. However, the practical application of the output is uncertain, in order to input well to follow the changes of output, then we need a continuously detect the number in time, to realize the liquid precise control. The implement a PID controller, three parameters (the proportional gain, Kp; the integral gain, Ki; the derivative gain, Kd) must be determined carefully. Many approaches have been developed to determine PID controller parameters for single input single output (SISO) systems. Among the well-known approaches is the Ziegler-Nichols (Z-N) method, the CohenCoon method, integral of squared time weighted error rule (ISE), integral of absolute error rule (IAE), internal-model control (IMC) based method, integral time squared error (ITSE), integral time absolute error (ITAE). Several new methods from an artificial intelligent approach, such as GA, PSO, ANN, BBO and fuzzy logic, the applications of GA and PSO have expanded into various fields. With the abilities for global optimization and good
1 Bijay Kumar is with Department of Electrical Engineering,Deenbandhu Chhotu Ram Univ. of Science & Technology,Murthal, Sonepat, India. (bijay1473@gmail.com) 2 Rohtash Dhiman is now with the Department of Electrical Engineering,Deenbandhu Chhotu Ram Univ. of Science &Technology,Murthal,Sonepat,India (rohtash.k@gmail.com)

Proportional: Error multiplied by a gain, Kp. This is an adjustable amplifier. In many systems Kp is responsible for process stability: too low and the PV can drift away; too high and the PV can oscillate. Integral: The integral error is multiplied by a gain Ki. In many systems Ki is responsible for driving error to zero, but set Ki too high is to invite oscillation or instability or integrator windup or actuator saturation. Derivative: The rate of change of error multiplied by a gain, Kd. In many systems Kd is responsible for system response: too high and the PV will oscillate; too low the PV will respond sluggishly. The designer should also note that derivative action amplifies any noise in the error signal. Tuning of a PID involves the adjustment of Kp, Ki and Kd to achieve some user-defined optimal character of a system response. Although much architecture exists for control systems, the PID controller is mature and well-understood by practitioners. For these reasons, it is often the first choice for new controller design. III. GENETIC ALGORITHM (GA)

A GA is an intelligent optimization technique that relies on the parallelism found in nature; in particular its searching procedures are based on the mechanics of natural selection and genetics. GAs were first conceived in the early 1970s by Holland. GAs are used regularly to solve difficult search, 531

Canadian Journal on Electrical and Electronics Engineering Vol. 2, No. 11, November 2011 optimization, and machine-learning problems that have previously resisted automated solutions [5]. They can be used to solve difficult problems quickly and reliably. These algorithms are easy to interface with existing simulations and models, and they are easy to hybridize. GAs include three major operators: selection, crossover, and mutation. Population-based optimization methods are addressed also. This paper is concerned primarily with the selection and mutation operators [5]. There are three main stages of a genetic algorithm; these are known as reproduction, crossover and mutation. This will be explained in details in the following section. A. Reproduction During the reproduction phase the fitness value of each chromosome is assessed. This value is used in the selection process to provide bias towards fitter individuals. Just like in natural evolution, a fit chromosome has a higher probability of being selected for reproduction. An example of a common selection technique is the .Roulette Wheel. Selection method, as shown in Figure 1. composed of entirely new offspring. The simplest crossover technique is the Single Point Crossover. More complex crossover techniques exist in the form of Multipoint and Uniform Crossover Algorithms. In Multipoint crossover, it is an extension of the single point crossover algorithm and operates on the principle that the parts of a chromosome that contribute most to its fitness might not be adjacent In uniform crossover, a random mask of ones and zeros of the same length. Uniform crossover is the most disruptive of the crossover algorithms and has the capability to completely dismantle a fit string, rendering it useless in the next generation. Because of this Uniform Crossover will not be used in this project and Multi-Point Crossover is the preferred choice. C. Mutation Mutation is a mechanism, which creates new individual by making changes in a single individual. Mutation is explorative, it creates random small deviations, thereby staying near (in the area of) the parent. Only mutation can introduce new information. The probability of mutation is normally low because a high mutation rate would destroy fit strings and degenerate the genetic algorithm into a random search. Mutation probability values of around 0.1% or 0.01% are common, these values represent the probability that a certain string will be selected for mutation i.e. for a probability of 0.1%; one string in one thousand will be selected for mutation. Once a string is selected for mutation, a randomly chosen element of the string is changed or mutated. E. Values of Genetic Parameters Population Size 50 Max. No of Functional evaluation 500 Crossover rate 0.7 Mutation rate 0.8 IV. PARTICLE SWARM OPTIMIZATION (PSO) PSO is a robust stochastic optimization technique based on the movement and cooperation of swarms. It applies the concept of social interaction to problem solving. It was first developed in 1995 by J.Kennedy and R. Eberhart. It uses a number of particles that constitute a swarm moving around in the search space looking for the best solution. Each particle is treated as a point in an N- dimensional space which adjusts its flying according to its own flying experience as well as the flying experience of other particles [4]. Each particle keeps track of its co-ordinates in the solution space which are associated with the best solution (fitness) that has achieved for by that particle. This value is called personal best, pbest. Another best value obtained so far by any particle in the neighborhood of that p[article. This value is called global best, gbest. The basic concept of PSO lies in accelerating each particle towards its pbest and the gbest locations, with a random weighted acceleration at each time step. Each particle 532

Fig.(1): depiction of roulette wheel selection All selection methods are based on the same principal that is giving fitter chromosomes a larger probability of selection [5]. Four common methods for selection are: 1. Roulette Wheel selection 2. Stochastic Universal sampling 3. Normalized geometric selection 4. Tournament selection B. Crossover Once the selection process is completed, the crossover algorithm is initiated. The crossover operations swaps certain parts of the two selected strings in a bid to capture the good parts of old chromosomes and create better new ones. Genetic operators manipulate the characters of a chromosome directly, using the assumption that certain individuals gene codes, on average, produce fitter individuals. The crossover probability indicates how often crossover is performed. A probability of 0% means that the offspring will be exact replicas of their parents and a probability of 100% means that each generation will be

Canadian Journal on Electrical and Electronics Engineering Vol. 2, No. 11, November 2011 tries to modify its position using the information such as the current positions, the current velocities, the distance between the current position and pbest, the distance between the current position and the gbest. The mathematical equations for the searching process are Vik+1=WVik+C1randi()(pbesti- sik) +C2rand2()(gbest-Sik) Xik+1= Xik + Vik+1 Where vki velocity of particle i at iteration k w weighting function C1 and C2 weighting factor rand uniformly distributed random number between 0 and 2. Ski current position of the particle i at iteration k. Pbesti pbest of particle i. gbest best value obtained by any particle so far. In the above procedure, the maximum velocity vmax determines the resolution of fitness regions are searched between the present position and target position. If vmax too high, particle might fly past good solution. If vmax is too small, the convergence could be slower. According to experience of PSO, vmax takes often 10% to 25% of the dynamic range of the velocity. A. Weighting Function The following weighting function is usually utilized in velocity update function [4]. pump so that a constant rate of liquid can be pumped to the tank. The height of the liquid inside the tank will then be measured and plotted. A simple model of the system can then be derived from this response curve. After obtaining a model of the system, a PID controller tuning by GA and PSO will be designed to control the level of the liquid inside the tank as shown in figure( 3) [6]. The plant shown in Fig. 2, consists of three water tanks. Each water tank is about 5 liter capacity and water level in each tank may be varied between 0-20 cm. All three tanks are cylindrical in shape. Top tank, middle tank and lower tank are placed vertically so that their crosssectional area remains same as the water level rises in these tanks. A small 12V DC pump is used to pump water from lower tank to the upper tank. At full speed pump produces flow rate of about 4 lit/min. A flow transducer is used to record the flow rate of the pump. Water level in each tank is measured using floats and servo potentiometers. To model this system we used the basic equation. Rate of flow in - Rate of flow out = Rate of accumulation. We get following three coupled differential equations for this system non-linear.

where wmax initial weight. wmin final weight. maxiter maximum iteration number. iter current iteration number. 2) PARAMETER OF PSO In this work, following parameters are chosen. No of particles = 50. c1 and c2 =2 Wmax =0.9 & Wmin =0.4 Vmax =25% of range of parameter Max. No of functional evaluation=500 V. DESCRIPTION OF THE PLANT Liquid level control systems are commonly used in many process control applications to control, for example, the level of liquid in a tank. Liquid enters the tank using a pump, and after some processing within the tank the liquid leaves from the bottom of the tank. The requirement in this system is to control the rate of liquid delivered by the pump so that the level of liquid within the tank is at the desired point. In this paper the system will be identified from a simple step response analysis. A constant voltage will be applied to the

Where H1, H2 H3 are the levels in Tank 1, Tank 2 and Tank 3, respectively. C1,C2, C3 are discharge coefficients. A1, A3 are cross-sectional areas of Tank l & 3 and

TANK-1

TANK-2

TANK-3

Figure. 2. Sketch of Three Liquid Tank System

533

Canadian Journal on Electrical and Electronics Engineering Vol. 2, No. 11, November 2011 The transfer function of this liquid-level system was obtained from the most popular of the empirical tuning methods, known as the PCR method, developed by Ziegler and Nichol. Ziegler and Nichol observed that the response of most processing units to an input change had a sigmoid shape, which can be adequately approximated by the response of a third-order system with dead time.
Three tank water level system-with PID 1.6 1.4 1.2 T a n kw a te rH e ig h t (m ) 1 0.8 0.6 0.4 0.2 0 -0.2 0 100 200 300 Time(sec) 400 PID PI P GA PSO

500

VI. SIMULATION TEST RESULTS In this method, the GA and PSO is used to search for the optimal PID parameters that will minimize the ITSE value when the process is in steady state. Therefore, the parameter tuning problem of a PID controller using GA and PSO can be considered by selecting the three parameters Kp, ki and kd such that the response of the plant will be as desired as shown in Figure 4. The details of the GA and PSO used in this paper are given in the following. The encoding used real numbers to form chromosomes. The population size used here is six tribes. The tribe is composed of three PID parameters, which used to describe the liquid-level control system. Because we do not know what PID value is the best value for the system, we gave the system many tribes, composed of random PID values around the values obtained from the Ziegler and Nichol method in the beginning. The fitness function is calculated from the ITSE, which will minimize the ITSE value when the process is in steady state as shown Table(1) Fitness function = ITSE

Fig . 4. Comparision between simulation results of P, PI, PID, GA and PSO. TABLE 1 PID VALUES OF ZN, GA, PSO.

P I D

P 0.742 0 0

PI 0.02351 0.00035 0

PID 0.031347 39.65750 9.914375

GA 0.0397 0.0003 0.5000

PSO 0.742 0.0004 1.1600

TABLE 2 PERFORMANCE INDICES OF P, PI, PID, GA AND PSO. Peak Over Shoot Rise Time Delay Time Settlin g Time ITSE

P 0.1534 25.9493 37.0660 500.000 7455.48

PI 0.4752 21.2750 39.4977

PID 0.4858 15.9394 30.1540

GA 0.1084

PSO 0.0814

20.8137 19.4375 27.0672 22.5821 167.449 148.6604 259.72 189.53

500.0000 194.200 6 1878.84 618.78

FITNESS GA/PSO PID SENSOR


Fig . 3. Block diagram of Intelligent PID controller

input

output PLANT

VII. SUMMARY AND CONCLUSIONS This paper proposed an intelligent PID controller with different subsections of different parameters, by using the particle swarm optimization and Genetic Algorithm to optimize the parameters of the PID controller. The results show that the intelligent PID can be easily applied to the third-order systems with time delay, and PSO performance is also better than the GA and Ziegler and Nichol. ITSE value of PSO is also less than the GA and ZN. In addition, the proposed method would be applied in much industrial process with better performance. ACKNOWLEDGMENT The authors would like to thank God, and friends who gave us help related to this work. REFERENCES
[1] Akihiro Oi, Chikashi Nakazawa, Tetsuro Matsui, Hiroe Fujiwara , Kouji
Matsumoto, Hideyuki Nishida , Jun Ando , Masato Kawaura: Development

The proposed GA and PSO system has been simulated using MATLAB program.

534

Canadian Journal on Electrical and Electronics Engineering Vol. 2, No. 11, November 2011
of PSO-based PID Tuning Method. International Conference on Control, Automation and Systems 2008 Oct. 14-17, 2008 in COEX, Seoul, Korea. [2] R. Senthil and J. Prakash: Design of fuzzy observer for a three tank system. IEEE Indicon 2005 Conference, Chennai, India, 11-13 Dec. 2005. [3] Guoming Huang, Dezhao Wu, Wailing Yang, Yuncan Xue: Self-tuning of PID Parameters Based on the Modified Particle Swarm Optimization. Proceedings of the 8th World Congress on Intelligent Control and Automation July 6-9 2010, Jinan, China. [4] T. K. Teng, J. S. Shieh and C. S. Chen: Genetic algorithms applied in online autotuning PID parameters of a liquid-level control system. Transactions of the Institute of Measurement and Control 2003; 25:433. [5] Aytekin Bagis: Determination of the PID Controller Parameters by Modified Genetic Algorithm for Improved Performance. Journal Of Information SCIENCE AND ENGINEERING 23, 1469-1480 (2007) [6] Chengwei Li And Jiandong Lian: The Application of Immune Genetic Algorithm in PID Parameter Optimization for Level Control System.

535

You might also like