PID Controller Design using Genetic Algorithm

0 downloads 0 Views 497KB Size Report
M. Mjahed. PID Controller Design using Genetic Algorithm Technique. ICICR 2013. 1 u Non linear. Plant. PID ... simple structural construction the basic building blocks available in many ... of the PID controller based system can be obtained as: Figure 1. .... J. J. D'Azzo and C. H. Houpis, Linear control system analysis and ...
M. Mjahed

PID Controller Design using Genetic Algorithm Technique

ICICR 2013

PID Controller Design using Genetic Algorithm Technique Mostafa MJAHED Ecole Royale de l'Air, Mathematics and Systems Department, 40000 Marrakech, Morocco [email protected]

I. INTRODUCTION The family of PID controllers represent, due to their simple structural construction the basic building blocks available in many process control systems. There are several classical methods for tuning a controller [1], [2], [3]. These methods have, however, some disadvantages: i) they are difficult to apply when the process is too complex to obtain precise dynamics of a plant; ii) they do not perform well for multiple specification design problems, such as the case required the optimization of both reference response and disturbance response at the same time; iii) in most cases, the achievement of good quality performances leads to contradictory solutions. In practice the theoretical tuning methods are frequently substitute for empirical methods such: trial and error, continuous cycling method (Ziegler Nichols method), process reaction curve methods (Ziegler-Nichols and Cohen-Coon methods), and ITAE criteria. Despite their wide spread use and considerable history, the PID controller tuning is still an active area of research. Recently, neural networks and Fuzzy logic have been proposed as designing method for controllers [4,5]. In this paper, the optimization of the PID controller gains has been carried out using Genetic Algorithms (GA) in contrast to the Reference model method. The paper is organized as follows: Section II outlines the flight model. The presentation of a fault tolerant system is given in section III. The design of the different components based on neural networks and genetic algorithm techniques is displayed in section IV. The effectiveness of the proposed approach is displayed by simulation results in the case of a longitudinal control (section 5). II. PID CONTROLLER PID controllers are playing an imperative role in the industrial control applications. Because of their simplicity and wide acceptability, they are still the best solutions for the industrial control processes [6-7]. Modern industrial controls are often required to regulate the closed-loop response of a system and PID controllers account for the 90% of the total controllers used in the industrial automation.

A PID controller is a simple three-term controller. The letters P, I & D stands for Proportional, Integral, and Derivative respectively. The simple block level representation of the PID controller based system can be obtained as: Yc



PID

u

Non linear Plant

Figure 1. PID Controller scheme bloc The general equation for a PID controller for the above figure can be given as [6-7] t

u (t )  k p .(t )  k i  ().d  k d 0

d(t ) dt

1

Where Kp, Ki and Kd are the controller gains, u(t) is output signal, (t) is the tracking error and is the difference between the desired output Yc and actual output Y. The equations governing the motion of the considered plant are a very complicated set of non-linear coupled differential equations. Given the complexity of the considered system, we adopted an identification model derived from the dependence of its inputs and outputs shown in Figure 2. The least square method is used to model this system. The result is thus used to calculate the PID parameters by using the reference model method.

III. DESIGNING OF THE PID CONTROLLERS Reference Model Method is one of the most widely used method for the tuning of the PID controller gains is to use the closed loop response inferred by the desired specifications. This approach is very useful but it do not perform well for multiple specification design problems, such as the case required the optimization of both reference response and disturbance response at the same time. The achievement of good quality performances leads to contradictory solutions. The complete simulation of the controlled system is shown in Figure 3.

1

M. Mjahed

PID Controller Design using Genetic Algorithm Technique

ICICR 2013

IV. GENETIC ALGORITHMS input

t(sec) output

t(sec) Figure 2. Example of inputs and corresponding outputs for the considered system.

Genetic algorithms (GAs) [8, 9] are stochastic global search and optimization methods that mimic the metaphor of natural biological evolution and which are developed based on the Darwinian theory of "survival of fittest". GA have found numerous applications in a number of problem domains where a randomized local search of the parameter space is applicable. Some examples of such applications are various pattern detection and recognition problems [10], training the weights of neural networks and signal enhancement [11]. Simple GA has three basic operators: selection, crossover and mutation. A GA starts iteration with an initial population. Each member in this population is evaluated and assigned a fitness value. In the selection procedure, some selection criterion is applied to select a certain number of strings, namely parents, from this population according to their fitness values. Strings with higher fitness values have more opportunities to be selected for reproduction in next step. Next, in crossover procedure, selected strings from old population are randomly paired to mate. For binary coding, a cross-site is determined according to some law, and the paired strings exchange all characters following the cross-site. Crossover usually results in two new strings, namely, two children that are expected to combine the best characters of their parents. Mutation simply changes one bit 0 to 1 and vice versa, at a position determined by some rules. Mutation is simple but still important in evolution because it further increases the diversity of the population members and enables the optimization to get out of local optima. After mutation, a new generation is created, and thus becomes the parents for next generation. This process is iterated until convergence is achieved or a near optimal. GAs operate on a population (a number of potential solutions). The population at time t is represented by the timedependent variable P(t), with the initial population of random estimates being P(0). The basic algorithm structure is shown on Figure 4. begin t=0 initialize P(t) evaluate P(t) (fitness) while not finished do begin t=t+1 select P(t) from P(t-1) alter (cross and mutation) P(t) evaluate P(t) (fitness) end end

Figure 3. Step response of the controlled system (case of the reference model based PID)

Figure 4. A simple Genetic Algorithm

2

M. Mjahed

PID Controller Design using Genetic Algorithm Technique

ICICR 2013

MATLAB GA Toolbox [12], adopted in this work, essentially supports one data type, a rectangular matrix of real or complex numeric elements. Because the GA is a stochastic search method, it is difficult to formally specify convergence criteria. A common practice is to terminate the GA after a prespecified number of generations and then test the quality of the best members of the population against the problem definition. If no acceptable solutions are found, the GA may be restarted or a fresh search initiated.

V. PID CONTROLLERS BASED ON GENETIC ALGORITHMS It is well known that GAs are a useful computational paradigm for a variety of optimization and search problems. The gain parameters can be optimally tuned with respect to the objective function or fitness. Genetic Algorithm based optimization has the advantage in ease of implementation for both linear and non-linear systems. For our application, as fitness function we used the objective function fi . fi = t i 

2

The design parameters to be optimized are the real components of P(t). P(t) = (K K K ) = (Pij(t)); (i = 1,… , P

I

P

K and K as depicted in Figure 5. D

K

P

K

I

Figure 6. Step response of the controlled system (genetic algorithm based PID)

Table 1. Summary of results Parameters

Overshoot

Settling

Rise Time

(%)

Time (sec)

(sec)

Reference Model

21.2

145.2

46.4

Genetic Algorithm

6.5

8.5

3.1

D

Nind; j = 1, … , Npar), (Nind being the population size and Npar=3 is the number of parameters to be optimized). An individual i in GA is a row-vector and each element of the vector encodes one of the variables of that individual: K , I

t(sec)

K

D

Figure 5. Encoding scheme for an individual i

Initialized from the given parameter ranges by genetic algorithm, these components are then evolved generation by generation and new solutions (gains) are obtained. After a number of generations (Ngen), the GA is terminated. The best solution corresponds to the minimal fitness fi. By using the GA procedure of Figure 4, with a population size of 10 solutions and 1000 generations, the optimization search required 90 s CPU time. The optimal gains based on the minimization of objective function fi, allows reaching the validation results illustrated in Figure 6. A summary of results is given in Table 1

VI. CONCLUSION In this paper, a non linear control system has been designed and implemented in MATLAB along with the optimization using the Genetic Algorithms. The computation of the gain parameters are done both by the Reference model rules and the Genetic Algorithms. It is clearly shown in figures that the Genetic Algorithms solutions present lesser oscillatory response in contrast to Reference model design in both the step response and the controller output. The use of Genetic Algorithms for optimizing the PID controller parameters offers advantages of decreased overshoot percentage, rise and settling times. When compared to the conventional tuning parameters, the Genetic Algorithms has proved better in achieving the steadystate response and performance indices. The design of the control systems by using GAs is a method that can help the designer in many respects: i) operating with a reduced number of design methods to establish the type of the controller; ii) possibility of easily configuring the dynamic behavior of the control system; iii) starting the design with a reduced amount of information about the controller (type and allowable range of the parameters), but keeping sight of the behavior of the control system.

3

M. Mjahed

PID Controller Design using Genetic Algorithm Technique

ICICR 2013

REFERENCES [1] [2] [3] [4]

[5]

J. J. D'Azzo and C. H. Houpis, Linear control system analysis and design, 3rd ed, McGraw-Hill, 1988. Levine, W.S. (editor): Control Systems Fundamentals, CRC Press, 2000. Åström, K. J., Wittemark, B.: Computer-Controlled Systems, Prentice Hall, 1993. J. A. Freeman, M. Skapura, Neural networks, Addison -Wesley, 1991 A. Shimura, K.Yoshida, Non-linear neuro control for active steering, The Japan Society of Mechanical and Engineers, Vol. 67, No.654(2001), pp. 407-413. Hansruedi Bühler, Réglage par logique floue, Presses polytechniques et universitaires romandes, 1994 R Sutton, P.J. Craven, A Fuzzy Autopilot Design Approach that utilizes Non-Linear Consequent Terms, Journal Of Marine Science And Technology, Vol. 9, No. 2, pp. 65-74 (2001) Driankov, D. et al, An introduction to fuzzy control, second edn, Springer-Verlag, Berlin (1996).

[6] [7] [8]

[9]

[10] [11]

[12]

M. Mjahed, Commande des systèmes, Lectures Notes ERA, Marrakech, 2002. D’Souza, Design of control systems, Prentice - Hall, 1998. D.E. Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learning, Addison Wesley, Reading, MA, 1989. Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs, Springer Verlag, New York, 1994. S.H. Pal, P.P. Wang (ed.), Genetic Algorithms for Pattern Recognition, CRC Press, 1996. A.J.F. van Rooij et al, Neural Network Training Using Genetic Algorithms, Machine Perception & Artificial Intelligence, vol. 26, 1996. A.J. Chipperfield et al, A Genetic Algorithm Toolbox for MATLAB, in Proc. Intern. Conference on Systems Engineering, Coventry, UK, 6-8 September, 1994.

4