Sie sind auf Seite 1von 8

Application of Optimization Heuristics in Tuning Decentralized PID Controllers

Bruno Leandro Galv ao Costa, Jo ao Paulo Lima Silva de Almeida, Bruno Augusto Ang elico
UTFPR - Universidade Tecnol ogica Federal do Paran a. C ampus Corn elio Proc opio Av. Alberto Carazzai, 1640. Corn elio Proc opio - PR, Brasil. CEP 86300-000 brunolgcosta@gmail.com, joao.almeida@ifpr.edu.br, bangelico@utfpr.edu.br

Abstract This paper aims to make the tuning of PID Controllers in multivariable systems, using two optimization heuristics, namely: the GA (Genetic Algorithm) and the PSO (Particle Swarm Optimization). Two multivariable processes with two inputs and two outputs (TITO), in a decentralized control strategy, are analyzed. The rst process is the Quadruple-Tank and the second process is the Wood-Berry Distillation Column. The PID tuning is modeled as an optimization problem, which cost function seeks to improve the dynamic response of the system, while forcing decoupling of the loops. Results shown that both GA and PSO were able to nd good PID parameters in order to provide a reasonable dynamic behavior and a good loop decoupling.

In this paper, the GA and the PSO will be considered as search techniques for multi-loop PID tuning in two processes, in order to minimize a cost function which enhances the dynamic response of the system, and causes a good decoupling between control loops. II. H EURISTIC O PTIMIZATION Optimization, today, is a concept widely discussed in scientic research communities, because its application is given to obtain the best performances in several problems. Optimization aims to improve the performance of a system in a specic situation, modeled as a cost function with its constraints. Within this context the heuristics methods are inserted. They represent a good estimate for searching optimal solutions. The concept of heuristics is to seek for solutions using an intuitive analysis, ensuring a substantial reduction in the complexity of searching problems, without a deep knowledge (exact) [4]. There are several heuristics developed in the literature, but for this paper the focus will be given to GA and PSO. A. Genetic Algorithm (GA) The Genetic Algorithm is an optimization technique based on principles of genetics and natural selection [5]. The GA is based on the concept of evolution of individual structures, using selection and recombination operators to produce new samples in a search space. Thus the algorithm is developed according to the degree of tness of an individual facing a problem (environment) conceived, and so the individual who has a higher tness and adaptation to the environment is more likely to survive and produce ttest offspring [6]. There are two models of representation for the GA: binary and continuous. The continuous GA (explored in this work) works with a set of continuous variables, represented by oating points. An advantage of this model is the speed on evaluations of the cost function, once the variables need not be decoded and requires less storage [7]. The owchart with the main steps of the algorithm is described in Figure 1. The algorithm implemented in this work is based on [7]. First, a set of P chromosomes is generated randomly (within a rst predetermined interval - lower and upper bounds), each chromosome consists of a N -dimensional candidate solution vector Xi , such that i = 1, 2, . . . , N where N is the number of

Keywords Decentralized PID Controllers, GA, Multivariable Systems, PSO, TITO. I. I NTRODUCTION Nowadays, multivariable processes involving the control of many input and output variables are often found in industrial plants. Over the years, many studies have been developed in order to nd new control strategies for providing a good dynamic behavior to multivariable systems. Researchs showed that, in many industrial plants, a strategy widely used is a decentralized approach of the classical PID (Proportional-Integrative-Derivative) algorithm, known as multi-loop PID control [1]. In this technique, the entire system is decomposed into individual control loops, making the system easy to implement. However, the problem identied in this strategy is that this decomposition affects the dynamics of the multivariable process, since there is interaction between control loops [2]. Another problem encountered in practical situations is related to the tuning controllers employed in the system. Such a tuning is, in many cases, made by extensive trial and error methods, which are very time consuming [3]. Therefore, the main challenge consists in nding optimal parameters for the decentralized controllers, so that the interaction between loops is minimized and the desired response present a good dynamic behavior and no stationary error. One strategy that has been considered in the literature is the application of optimization heuristics to obtain the parameters for the controllers. This is due the ability of such methods in solving optimization problems (mostly nonlinear), with many constraints, resulting in optimized values [4].

Settings: cost function, algorithm parameters

mutation operation, which in this paper is a Gaussian mutation. The parameter P m represents the rate of change, resulting in Nm uniformly mutations, according to: Nm = [Pm .(P 1).N ]. (8)

Generating an initial population Cost for each chromosome

Selection of the best chromosomes Cross-over between chromosomes Mutation gens and updated costs
NO

If Xi is chosen, then, after the mutation, it is replaced by (9): Xi = Xi + N (0, m 2 ). (9) In equation (9), N (0, m 2 ) represents the Gaussian variable with mean zero and variance m 2 . After this, a calculation is made for restricting the updated values of the chromosomes, so they do not exceed a certain operation range x max and xmin , dened by the user. Thus, the chromosomes of the matrix are evaluated again in the tness function, and so the algorithm continues its execution until the total number of iterations (also dened by the user) is reached. B. Particle Swarm Optimization (PSO) The PSO algorithm was developed based on the social behavior of animals searching for resources. This technique relies on simple concepts, having direct relation to the existing methodologies of articial life (swarm in general) and evolutionary computation [8]. Instead of using genetic operators as in the GA, this algorithm evolves through cooperation and competition among its own elements, generating a timing behavior, which is a direct function of the efforts of each group member [9]. One of the fundamental hypothesis for the development of PSO was the attempt to simulate graphically the choreography of swarms seeking for food, based on experience gained by individuals in the group. This creates a decisive advantage in developing this model, which overcomes the disadvantages related to competition between the animals [8]. The algorithm is modeled with primitive mathematical operations, and this feature makes this model relatively inexpensive in terms of computational complexity. PSO is important in solving optimization problems due to its ability to handle difcult cost functions with multiple local minima and is designed to be robust and fast in nonlinear problems [9]. The owchart in Figure 2 shows the structure for implementing the PSO algorithm. The algorithm implementation [9] generates individuals at random and uniform distribution within a rst predened interval (as in GA). Each group member is named as a particle, as can be seen in (10), which is nothing more than a potential solution to solve the problem. Therefore, the i-th particle of a given group is represented as follows: Xi = [Xi,1 , Xi,2 , . . . , Xi,N ], i = 1, 2, . . . , P, (10)

Convergence analysis
YES

END

Fig. 1: Flowchart of Genetic Algorithm. variables of the problem. Then, each chromosome is evaluated in the cost function. Next, T best chromosomes are selected for pairing, generating the mating pool. The method for mating pairs within T chromosomes is the roulette wheel. Each of the T /2 couples generates two descendants, that have part of their genetic material, resulting in a total of T offspring. In the sequel, the P -T weaker chromosomes are replaced by descendants of the parents. A specic pair of chromosomes is given as: Xdad = [Xd1 , Xd2 , . . . , XdN ]; Xmom = [Xm1 , Xm2 , . . . , XmN ]. (1) (2)

The procedure for the crossover begins with the random selection of a crossover point (a random position), as shown in (3): j = u.N, (3) where u is a random variable uniformly distributed (u.d.) in the interval [0,1] and j is dened as j = 1, 2, . . . , T /2. Then, each two chromosomes (dad and mom) are combined to form new values that appear in the offspring. For a specic pair represented in (1) and (2), the following values are dened: XO1 = Xmom (j ) [Xmom (j ) Xdad (j )]; XO2 = Xdad (j ) + [Xmom (j ) Xdad (j )]. (4) (5)

The variable is a value u.d. in [0,1]. Thus, the offspring are generated according to [7]: Xof f s1 = [Xd1 , Xd2 , . . . , XO1 , XmN ]; Xof f s2 = [Xm1 , Xm2 , . . . , XO2 , XdN ]. (6) (7)

Some objective functions may have many local minima and, sometimes, the algorithm may end up converging to a local minimum. Because of this, is necessary to perform the

where N is the number of variables and P is the amount of individuals (population). These individuals, with their respective values, are tested in the objective function, and the so far best individual is chosen.

Settings: cost function, algorithm parameters Generating an initial population Obtaining initial cost Calculating the velocity Calculating the position Obtain new costs Comparing with the previous Positions and Updated costs
NO

If Vi (it + 1) Vmin , then Vi (it + 1) = Vmin .

(16)

As considered in GA, a restriction in the particles position is also imposed, xmax and xmin , in order to prevent the distant solution. III. M ULTIVARIABLE S YSTEMS AND D ECENTRALIZED C ONTROL An open loop multivariable system with n inputs and n outputs is usually represented by the following expression: y(s) = G(s)u(s), (17)

where G is an nx n process transfer function matrix, y is an n output vector and u is an n input vector. Considering a two input two output (TITO) system, expression (17) can be written as: y1 (s) y2 (s) = G11 (s) G21 (s) G12 (s) G22 (s) u1 (s) u2 (s) . (18)

Convergence analysis
YES

END

Fig. 2: Flowchart of PSO algorithm. Each of the generated element has a position and a speed. At any given iteration (it) they are described by equations (11) and (12): Xi (it) = [Xi,1 (it), Xi,2 (it), . . . , Xi,N (it)]; Vi (it) = [Vi,1 (it), Vi,2 (it), . . . , Vi,N (it)]. (11) (12)

Decentralized controllers (multi-loop controllers) have been extensively considered in industrial processes control, simplifying the system structure and improving the performance [2]. The strategy consists of a process composed of n independent outputs which are controlled by n individual controllers [10], as seen in Figure 3. However this approach is still undeveloped, because it may have stability problems. Moreover, the tuning of controllers is not a trivial task, because many interactions occur between control loops that affects the behavior of each individually [2].
r1 (t ) + y1(t)

As the algorithm evolves, the values presented by the particles of the equations (11) and (12) will be updated according to the equations (13) and (14): Vi (it + 1) = Vi (it) + 1 r1 (Xibest Xi (it)) best Xi (it)); (13) +2 r2 (Xg (14)

CONTROLLER 1

r2 (t ) +

y2 (t)
CONTROLLER 2
MULTIVARIABLE PROCESS

Xi (it + 1) = Xi (it) + Vi (it + 1),

where: best best Xi and Xg represent, respectively, the best position of an individual particle, and the best position of all the particles; 1 and 2 are the single acceleration coefcient and coefcient of overall acceleration, respectively; r1 and r2 are cognitive parameter (individual choice of each element) and social parameter (represent the thinking of the whole group), respectively, being both diagonal matrices u.d. in the interval [0,1]; is the inertia weight, which plays the role of controlling the operation of the cluster. Responsible for the search diversication and also for avoiding the algorithm get stuck to a local minimum. In order to prevent velocity extrapolation, the maximum speed Vmax and minimum speed V min are added to the model, such that: If Vi (it + 1) Vmax , then Vi (it + 1) = Vmax ; (15)

rn (t ) +

yn (t)
CONTROLLER n

Fig. 3: Multivariable Decentralized Control [3]. The control strategy for this approach is decomposed into two stages: rst the subsystem decoupling and then the subsystem control [11]. Figure 4 shows the structure of a multivariable TITO system considered in this work. In a TITO system, the decentralized control strategy can be represented as [2]: C(s) = C1 (s) 0 0 C2 (s) , (19)

where each one of the controllers follows the equation (20): Cj (s) = Kpj + Kij + Kdj s, s (20)

r1 (t ) +

PID 1

u1 (t )

G11 G21

+ +

y1(t)

The behavior of this system can be represented and studied considering two operating points [12], but only one of these points will be addressed in this work, which is represented by transfer matrix in equation (21). G(s) =
1.5 1+63s 2.5 (1+56s)(1+91s) 2.5 (1+39s)(1+63s) 1.6 1+91s

(21)

G12
r2 (t )
+ -

PID 2

u2 (t )

G22

+ +

y2 (t)

For this problem a PI controller is designed based on [10], so one j -th candidate vector for the problem is given as: Xj = [Kp1j , Ki1j , Kp2j , Ki2j ], (22)

Fig. 4: Decentralized control of a TITO system considered in this article [2], [3]. with j = 1, 2 and Kpj , Kij and Kdj being proportional, integrative and derivative gains, respectively. IV. C ONSIDERED P ROCESSES In this work, two cases are considered: the Quadruple-Tank [12] and Wood-Berry Distillation Column [13]. A. The Quadruple-Tank The Quadruple-Tank is a non-linear system which consists of four interconnecting tanks, as represented in Figure 5 [12].

where Kp1j and Ki1j are regarding C 1 (s), and Kp2j and Ki2j are regarding C 2 (s). B. The Wood-Berry Distillation Column The work presented by Wood and Berry is a validation of a control strategy for multivariable systems, to reduce the interaction between the control loops of the overhead and bottoms compositions of an pilot plant of the distillation column [13], shown in Figure 6. One alternative is to reduce this interaction made by means of compensating controllers. Thus, it is necessary to nd a matrix representation that could satisfactorily describe the process. Such a matrix is described by equation (23). The outputs of this process are the overhead and bottoms compositions, having as inputs the reux and steam ow rates.

Tank 3

Tank 4

A CR FR FRC

GAS CHROMATOGRAPH

COOLING WATER
COMPOSITION RECORDER FLOW RECORDER FLOW RECORDER CONTROLLER

PIC

LIQUID LEVEL LLIC INDICATOR CONTROLLER PIC TRC PRESSURE INDICATOR CONTROLLER TEMPERATURE RECORDER CONTROLLER

REFLUX

LLIC

CR

Tank 1 Pump 1 v1 y1

Tank 2 y2 Pump 2
FEED

TCR

TOP PRODUCT

v2
TRC FRC

FRC

FR DIGITAL COMPUTER

FRC STEAM

Fig. 5: The Quadruple-Tank [12]. The aim of this system is to control the uid level in the two lower tanks using two pumps. It is considered that the input variables are v1 and v2 represent, respectively, the voltage level on the pumps 1 and 2, while the output variables y 1 and y2 are the level values in the tank 1 and 2, respectively. The process inputs are dened by voltage levels applied to pumps and outputs signals representing the measure of the level sensors.
A LLIC

BOTTOM PRODUCT

FR

Fig. 6: The Wood-Berry Distillation Column [13]. G(s) =


12.8es 1+16.7s 6.6e7s 1+10.9s 18.9e3s 1+21s 19.4e3s 1+14.4s

. (23)

For this problem a PID controller is designed [3]. Then one j -th candidate vector for the PID controller applied to the problem is given as: Xj = [Kp1j , Ki1j , Kd1j , Kp2j , Ki2j , Kd2j ], (24)

VI. S IMULATIONS PARAMETERS AND R ESULTS The algorithms have been implemented with the aid of software MATLAB R without using any toolbox. The adopted parameters for the simulations can be viewed in Tables I and II. TABLE I Time parameters for the cost function
t1 (s) t2 (s) t3 (s) tmax (s) System (21) 300 500 400 2000 System (23) 20 40 30 100

where Kp1j , Ki1j and Kd1j are regarding C 1 (s), and Kp2j , Ki2j and Kd2j are regarding C 2 (s). V. O PTIMIZATION P ROBLEM The objective is to design n (n = 2) PI/PID based controllers, associated with the n loops, such that the i outputs of the processes may have desired dynamic responses in relation to its i inputs references. In addition, its desired that the j inputs do not contribute signicantly to the outputs i (j = i). The cost function to be optimized is based on the weighted integral of the system performance including the constraints on the controllers output u ij presented in [10], with slight modications being described by the equations (25) and (26). These equations relates the desired region of the dynamic response. Jij = J=
i=1 j =1 tmax 0 n n

TABLE II Response parameters for the cost function


Xss 1.0 X1 1.2 X2 1.05 X3 0.95 X4 0.8 X5 0.2 X6 0.05 X7 -0.05 X8 -0.2

max (fij (t) yi (t), 0)2 (up) +max (yi (t) fij (t), 0)2 wij
tmax 0 (low)

(low)

dt;

(25) The weighting factors of the objective function, for the two problems, were the following values: w 11 = 1.0, w12 = 0.25, w21 = 0.25, w22 = 1.0; w11 = w12 = w21 = w22 = 0.1 [10]. TABLE III Lower and upper bounds for the controller gains.
max min Kp 1.5 -1.5 Ki 0.15 -0.15 Kd 0 -0.2

|uij (t)|dt + wij Jij .


(up)

(26)

In these equations, f ij (t) and fij (t) are continuous functions dening the lower and upper boundaries of the shaded regions (shown in gure 7); w ij and wij are the weighting factors of objective function element for the i-th output under the j -th set-point, with w ij 0, wij 0 [10]. In order to evaluate the performance of the controllers, an unit step input signal is applied to the closed loop system. The desired response regions are shown in Figure 7. The main idea implemented by the cost function minimization, is to keep the response i to the input i inside region in Figure 7(a), and the response i to the input j , for i = j , inside the region in Figure 7(b).
yi (t )
c1 c2 css c3 c4

The lower and upper bounds initially set for the controller gains are shown in Table III. TABLE IV Simulation parameters for the GA
Parameters Total number of genes N Number of iterations Time interval (s) Time resolution P Pm m T xmax xmin System (21) 4 300 [0,2000] 0.1 20 0.8 0.15 P/2 5 -5 System (23) 6 300 [0,100] 0.1 20 0.8 0.25 P/2 5 -5

fij(up) (t)
yi (t )
c5

fij(low) (t)
t1 t2 tmax t

c6 c7 c8
0

fij(up) (t)
t3

fij(low) (t)

tmax

(a) Response region for the outputs i = j

(b) Response region for the outputs i = j

Fig. 7: Regions for the desired systems response y i,j , i = 1,2 and j = 1,2, (a) i = j and (b) i = j [10]. In these two gures, the parameters X 1 , X2 , . . . , X8 , Xss , t1 , t2 , t3 and tmax are constants specied by the users.

Tables IV and V present the GA and PSO parameters to the systems (21) and (23). For all the considered problems, the best result over 300 iterations/generations are considered as th PI/PID tuning parameters.

A. The Quadruple Tank The parameters of PI controllers obtained by each method, as well as initial and nal values of the cost function, can be seen in Table VI. The Figures 8 and 9 present the response signal obtained in accordance with the best controller gains found by GA to the system (21).
y(t)
1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0

1.2 1 0.8 0.6 0.4 0.2

y11 y21

y11 y21

0 0.2 0.4 0

y(t)

500

1000

1500

2000

Time (s)

Fig. 10: Unit step response, y 11 and y21 , for the system (21) using PSO for tuning the PI controller.
500 1000 1500 2000 2.5

Time (s)

Fig. 8: Unit step response, y 11 and y21 , for the system (21) using GA for tuning the PI controller.
y(t)

y12 y22

1.5

1.2

0.5

0.8

y12 y22

0.6

y(t)

0 0.4

500

1000

1500

2000

Time (s)

0.2

Fig. 11: Unit step response, y 12 and y22 , for the system (21) using PSO for tuning the PI controller.
500 1000 1500 2000

0.2 0

Time (s)

TABLE V Simulation parameters for the PSO


Parameters Total number of variables N Number of iterations Time interval (s) Time resolution P 1 2 Vmax Vmin xmax xmin System (21) 4 300 [0,2000] 0.1 20 0.75 0.55 0.65 0.8 -0.8 5 -5 System (23) 6 300 [0,100] 0.1 20 0.75 0.55 0.65 0.8 -0.8 5 -5

Fig. 9: Unit step response, y 12 and y22 , for the system (21) using GA for tuning the PI controller. The Figures 10 and 11 show the response signal obtained for the best controller gains found by PSO to the system (21). B. The Wood-Berry Distillation Column The parameters of PID controllers obtained by each method, as well as initial and nal values of the cost function, can be seen in Table VII.

TABLE VI Parameters for PI controllers.


Kp1 Ki1 Kp2 Ki2 J Initial Values 1.0 1.0 1.0 1.0 177087.1015 GA 1.038538 0.192073 -0.094342 -0.001184 730.725403 PSO -0.182045 -0.001532 2.734893 0.149574 589.484503

The Figures 14 and 15 show the response signal obtained for the best controller gains found by PSO to the system (23).

1.2

0.8

y11 y21

The Figures 12 and 13 indicate the response obtained in accordance with the best gains found by GA to the system (23).

0.6

y(t)
0.4 0.2 0 0.2 0

1.2

y11
0.8

y21

20

40

60

80

100

Time (s)

0.6

y(t)

0.4

Fig. 14: Unit step response, y 11 and y21 , for the system (23) using PSO for tuning the PID controller.

0.2

0 1.2 0.2 0 20 40 60 80 100

Time (s)

y12
0.8

y22

y(t)
0.4 0.2 0 0.2 0

Fig. 12: Unit step response, y 11 and y21 , for the system (23) using GA for tuning the PID controller.

0.6

1.2

y12
0.8

20

40

60

80

100

y22

Time (s)

0.6

y(t)

0.4

Fig. 15: Unit step response, y 12 and y22 , for the system (23) using PSO for tuning the PID controller.

0.2

VII. C ONCLUSIONS
20 40 60 80 100

0.2 0

Time (s)

Fig. 13: Unit step response, y 12 and y22 , for the system (23) using GA for tuning the PID controller.

The optimization heuristics presented in this work (GA and PSO) were able to nd proper PI/PID parameters so that the multivariable control systems achieved satisfactory performance in terms of dynamic response, stationary errors, and decoupling. It also can be concluded that the adopted cost function is suitable for measuring the performance of the considered systems.

TABLE VII Parameters of PID controllers.


Kp1 Ki1 Kd1 Kp2 Ki2 Kd2 J Initial Values 0.1 0.1 0.001 0.1 0.1 0.001 365689.1015 GA 0.384753 0.054480 0.000438 -0.074940 -0.013637 -0.185986 5.188941 PSO 0.371040 0.021396 -0.163217 -0.094906 -0.009450 -0.136004 4.885578

Considering the nal values of the objective functions, and taking into account the particular PSO and GA input parameters adopted, PSO provided the best cost minimization in all considered cases, resulting in dynamic responses and decoupling slightly better than GA. As suggestion for future works, a convergence and computational complexity analysis can be done in order to state which algorithm presents the best performance in terms of cost function minimization, convergence time and number of operations needed for achieving convergence. ACKNOWLEDGEMENT This work was supported by Fundac a o Arauc aria. R EFERENCES
[1] K. Astrom, K. Johansson, and Q.-G. Wang, Design of decoupled pi controllers for two-by-two systems, Control Theory and Applications, IEEE Proceedings -, vol. 149, no. 1, pp. 7481, jan. 2002. [2] M. A. Johnson and M. H. Moradi, PID Control: New identication and design methods. Springer, 2005. [3] M. C. S. Swiech, E. Oroski, and L. V. R. d. Arruda, Sintonia de controladores pid em colunas de destilac a o atrav es de algoritmos gen eticos, in 3o Congresso Brasileiro de P&D em Petr oleo e G as, Salvador, oct. 2005, pp. 16. [4] R. Valerdi, Heuristics for systems engineering cost estimation, Systems Journal, IEEE, vol. 5, no. 1, pp. 9198, mar. 2011. [5] J. H. Holland, Adaptation in Natural and Articial Systems. Ann Arbor: University of Michigan Press, 1975. [6] A. P. Grosko, J. R. Gorski, and J. d. S. Dias, Algoritmo gen etico: revis ao hist orica e exemplicac a o, in X Congresso Brasileiro de Inform atica em Sa ude, Florian opolis, oct. 2006, pp. 16. [7] R. L. Haupt and S. E. Haupt, Practical genetic algorithms, 2nd ed. A John Wiley & Sons, Inc., Publications, 2004. [8] J. Kennedy and R. Eberhart, Particle swarm optimization, in Proceedings of the Sixth International Symposium on Micro Machine and Human Science, vol. 4, nov/dec. 1995, pp. 19421948. [9] Y. Shi and R. Eberhart, A modied particle swarm optimizer, in Evolutionary Computation Proceedings, 1998. IEEE World Congress on Computational Intelligence., The 1998 IEEE International Conference on, may 1998, pp. 6973. [10] A. Mehrabian and C. Lucas, Automatic tuning of decentralized controllers by swarm intelligence, in Intelligent Systems, 2006 3rd International IEEE Conference on, sept. 2006, pp. 350353. [11] P. Prerez and A. Sala, Multivariable Control Systems: An Engineering Approach. Springer, 2004. [12] K. Johansson, The quadruple-tank process: a multivariable laboratory process with an adjustable zero, Control Systems Technology, IEEE Transactions on, vol. 8, no. 3, pp. 456 465, may 2000. [13] R. K. Wood and M. W. Berry, Terminal composition of a binary distillation column, Chemical Engineering Science, vol. 28, pp. 1707 1717, 1973.

Das könnte Ihnen auch gefallen