ASC 42 - Trajectory Tracking Using Fuzzy-Lyapunov Approach

0 downloads 0 Views 254KB Size Report
description of the plant and then describe its extension to the fuzzy case. Consider the single-input, single output system. ( ). ( ). , , x F xu. y h x. = = q . (1) where ().
Trajectory Tracking Using Fuzzy-Lyapunov Approach: Application to a Servo Trainer Jose A. Ruz-Hernandez1, Jose L. Rullan-Lara1, Ramon Garcia-Hernandez1, Eduardo Reyes-Pacheco2, and Edgar Sanchez3 1

Universidad Autonoma del Carmen, Calle 56 # 4 por Avenida Concordia, CP 24180, Colonia Aviación, Cd. del Carmen, Campeche, Mexico {jruz,jrullan,rghernandez}@pampano.unacar.mx 2 Universidad Tecnologica de Campeche, San Antonio, Cardenas, Mexico, CP 24381 [email protected] 3 CINVESTAV, Unidad Guadalajara, Apartado Postal 31-430, Plaza La Luna, C.P. 45091, Guadalajara, Jalisco, MEXICO, on sabbatical leave at CUCEI, Universidad de Guadalajara [email protected]

Abstract. This paper presents a Fuzzy-Lyapunov approach to design trajectory tracking controllers. This methodology uses a Lyapunov function candidate to obtain the rules of the Mamdani-type fuzzy controllers which are implemented to track a desired trajectory. Two fuzzy controllers are implemented to control the position and velocity of a servo trainer and real time results are presented to evaluate the performance of designed controllers against the performance of classical controller.

1 Introduction The most difficult aspect in the design of fuzzy controllers is the construction of rule base. The process of extracting the knowledge of human operator, in the form of fuzzy control rules, is by no means trivial, nor is the process of deriving the rules based on heuristics and a good understanding of the plant and control theory [1], [2]. We present an application of fuzzy Lyapunov synthesis method to an educational servo trainer equipment [3]. We design two controllers, the first one is used to solve the trajectory tracking problem when a desired reference is used to determine the behavior of the angular position and the second one has the same goal when a desired reference is used to determine the behavior of the angular velocity. Real time results using the designed fuzzy controllers are illustrated and compared to the obtained results via conventional controllers, which have been suggested by the servotrainer designers [3]. Additionally to this section, the paper is organized as follows. In section 2 we present the theory related to fuzzy Lyapunov synthesis method as described in [1], [4], [5], [6], [7], [8], [9] and [10]. Section 3 describes the mathematical model of servo trainer, which is used as the plant to apply the designed controllers. In section 4 the design of both position and velocity fuzzy controller is presented. Real time results are presented in section 5. Finally, the conclusions are established in section 6. O. Castillo et al. (Eds.): Theor. Adv. and Appl. of Fuzzy Logic, ASC 42, pp. 710–718, 2007. springerlink.com © Springer-Verlag Berlin Heidelberg 2007

Trajectory Tracking Using Fuzzy-Lyapunov Approach

711

2 Fuzzy Lyapunov Synthesis Method In this section we describe the proposed fuzzy Lyapunov synthesis method to design controllers. We start with the conventional case when we have an exact mathematical description of the plant and then describe its extension to the fuzzy case. Consider the single-input, single output system

x = F ( x, u ) , y = h ( x ) . where F ( ⋅) = ( F1 ( ⋅) , F2 ( ⋅) ,… , Fn ( ⋅) )

T

u ∈ R and

with

(1)

Fi ( ⋅) ' s being continuous functions,

y ∈ R are the input and output of the system, respectively, and

x = ( x1 , x2 ,… , xn ) ∈ R n is the state vector of the system. The control objective is to T

design a feedback control u ( x ) so that 0 will be stable equilibrium point of (1).

One way of achieving this goal is to choose a Lyapunov function candidate V ( x )

and then determine the conditions on u necessary to make it Lyapunov function. The Lyapunov function candidate follows the next requirements 1. V ( 0 ) = 0

2. V ( x ) > 0, x ∈ N \ {0} n

∂V xi −e 3. If e and e have opposite signs we must have w = 0 These combinations can be used to generate a rules base for w as follows: IF IF IF IF

e e e e

is positive and e is positive THEN w is negative big is negative and e is negative THEN w is positive big is positive and e is negative THEN w is zero is negative and e is positive THEN w is zero

Triangular membership functions, center of gravity defuzzifier and the product inference engine are used to obtain the following w w = f1 ( e, e ) + f 2 ( e, e ) .

(5)

By means of the equations (2) y (3) we obtain the following control law u=

τ G1G2

( w + yθ ) +

1 x2 G1G2

(6) .

4.2 Velocity Mamdani-Type Controller

For this case, the objective is to design u ( x1, x2 ) such that the velocity behavior x2 of servo trainer follows a reference signal yω . As well done in the design of position controller the conditions of the signal reference yθ are held. The Lyapunov function candidate is still the same but the error signal is e = x2 − yω . Differentiating V yields V = ee + ee = ee + e ( x2 − yω ) and denoting

w = x2 − yω ,

(7)

714

J.A. Ruz-Hernandez et al.

and taking into account the same conditions as established in equation (4), we obtain V = ee + ew < 0 .

(8)

Finally, using equations (2) and (7) we obtain the following control law u=

τ



1



⎜ w + yω + x2 ⎟ dt τ ⎠ G1G2 ∫ ⎝

(9) .

5 Real-Time Results In this section we show real time results using both position and velocity controller and its performances are compared with respect to conventional controller’s performances which are taken from user manual of educational equipment [3]. All results are done considering that the servo trainer is operating only with a small load, which corresponds to a time constant equal to 1.5 seconds. Figure 1 shows the block diagraman of the application in real time. We used the Data Adquisition Target PCI6071 manufactured by National Instruments and the Xpc-Target Toolbox of Matlab1.

Fig. 1. Real time application using NI-DAQ PCI6071 and Xpctarget of Matlab 6.5

5.1 Application of the Position Controller

Figures 2–4 shows the real time results using the initial conditions (4π/9,0) and the signal reference yθ = 5sin(0.5t) where its amplitude corresponds to 80 degree of angular position. The initial conditions were adjustment manually by using an independent supply applied to the actuator of servotrainer until. The proportional controller has a velocity feedback loop; the value of proportional gain is 10 and the gain of velocity feedback loop is 0.01 which are proposed to implement a conventional controller as indicated in [2]. As illustrated in figure 2, after 5 seconds the angular position of both fuzzy and proportional controllers track the signal reference, however a lag phase with the proportional controller is holded. This lag phase is reflected in the error plot of figure 4 where the steady state error is different to zero when the conventional controller is used. The error signal converges to zero after 5 seconds when our fuzzy controller is 1

Matlab is a registered trademark of Mathworks Inc.

Trajectory Tracking Using Fuzzy-Lyapunov Approach

715

implemented. The control signal computed by the fuzzy controller presents some suddenly changes but is smaller than the control signal computed by proportional controller which is satured during two seconds at beginning. 150 referencia signal angular position with fuzzy controller angular position with proportional controller

position (degrees)

100

50

0

-50

-100 0

5

10

15

20 25 time (seconds)

30

35

Fig. 2. The position angle of servotrainer x1 with fuzzy controller (dashed line), with a conventional controller (dashed-dot line) and the reference signal yθ = 5sin(0.5t) (solid line) when initial condition (4π/9,0) is used

ufuzzy (volts)

10 5 0 -5 -10 0

5

10

15

20 25 time (seconds)

30

35

0

5

10

15

20 25 time (seconds)

30

35

up (volts)

10 5 0 -5 -10

Fig. 3. The control signal u for angular position tracking when initial condition (4π/9,0) is used. The first plot (above) corresponds to fuzzy control and the second plot (below) corresponds to conventional control.

716

J.A. Ruz-Hernandez et al. 100 fuzzy controller proportional controller

80 60

error (degrees)

40 20 0 -20 -40 -60 -80 -100

0

5

10

15

20 25 time (seconds)

30

35

Fig. 4. The error signal for angular position tracking when initial condition (4π/9,0) is used. The error signal for fuzzy controller is defined by e = x1 − yθ and the error signal for proportional controller is defined by e = yθ − x1 . 1500

referencia signal angular velocity with fuzzy controller angular velocity with proportional controller

velocity (rpm)

1000

500

0

-500

-1000 0

5

10

15

20 25 time (seconds)

30

35

Fig. 5. The angular velocity of servotrainer x2 with fuzzy controller (dashed line), with PI controller (dashed-dot line) and the reference signal yω = 5sin(0.5t) (solid line) when initial condition (0,0) is used

5.2 Application of the Velocity Controller

Figure 5 shows the simulation results when the initial conditions (0,0) and the reference signal yω = 5sin(0.5t) are used. The amplitude of this reference corresponds to 1000 revolutions per minute for angular velocity. In this case a proportional-integral

Trajectory Tracking Using Fuzzy-Lyapunov Approach

717

(PI) controller is used to compare the performance of fuzzy controller. The proportional gain is 0.9 and the integral gain is 2.4. After 6 seconds both controller converge to reference signal. However, when the PI controller is used a lag phase is holded. The control signals of both controllers are showed in figure 6. The PI control signal and the fuzzy control signal are bounded. However, PI controller has a steady state error different to zero against the performance of fuzzy controller which converge to zero after 2 seconds. 10

u with fuzzy controller u with proportional controller

8 6 4

u (volts)

2 0 -2 -4 -6 -8 -10 0

5

10

15

20 25 time (seconds)

30

35

Fig. 6. The control signal u for angular velocity tracking when initial condition (0,0) is used

fuzzy controller proportional controller

300

200

error (rpm)

100

0

-100

-200

-300

0

5

10

15

20 25 time (seconds)

30

35

Fig. 7. The error signal for angular velocity tracking when initial condition (0,0) is used. The error signal for fuzzy controller is defined by e = x2 − yω and the error signal for proportional

controller is defined by e = yω − x2 .

718

J.A. Ruz-Hernandez et al.

6 Conclusions In this paper, controllers using fuzzy Lyapunov synthesis approach are designed and implemented to solve the trajectory tracking problem when signal references are used to determine the behavior of the angular position and velocity of a servo trainer. Real time results illustrate that the performance of the fuzzy controller is better than the performance using conventional controller suggested by the servo trainer designers. Fuzzy Lyapunov approach is an efficient methodology to sistematically derive the rule bases of fuzzy controllers, which are stable and improve the behavior of classical proportional and proportional-integral controllers. We are encouraged to extend this methodology considering different loads and perturbations to achieve new results in short time. Acknowledgement. The authors thank support of UNACAR on project PR/61/2006.

References 1. Margaliot M., Langholz G.: Fuzzy Lyapunov-based approach to design of fuzzy controllers. Fuzzy Sets and Systems, Elsevier, No. 106, (1999) 49-59. 2. Margaliot M., Langholz G.: Design and Analysis of Fuzzy Schedulers using Fuzzy Lyapunov Synthesis. Third International Conference on Knowledge-Based Intelligent Inforation Engineering Systems, Adelaide, Australia (1999). 3. TecQuipment LTD: CE110 Servo Trainer, User’s Manual, England (1993). 4. Margaliot M., Langholz G.: Adaptive Fuzzy Controller Design via Fuzzy Lyapunov Synthesis. Proceedings of IEEE World Congres on Computational Intellegence, Vol. 1, (1998), 354-359. 5. Margaliot M., Langholz G.: New approaches to fuzzy modeling and control: design and analysis, World Scientific, Singapore (2000). 6. Zhou C.: Fuzzy-Arithmetic-Based Lyapunov Synthesis in the Design of Stable Fuzzy Controllers: A Computing-With-Words Approach. Intenational Journal of Applied Mathematics and Computational Scients, Vol. 12, No. 3 (2002), 411-421. 7. Margaliot M., Langholz G.: Fuzzy control of benchmark problem: a computing with words approach, IEEE Transaction on Fuzzy Systems, Volume 12, Issue 2, (2004) 230-235 8. Cazarez N. R., Castillo O, Aguilar L. and Cardenas S.: Lyapunov Stability on Type-2 Fuzzy Logic Control, Proceedings of International Seminar on Computational Intelligence, Mexico D. F (2005) 32-41. 9. Mannani A., Talebi H. A.,: A Fuzzy Lyapunov Síntesis-Based Controller for a Flexible Manipulator: Experimental Results. Proceedings of the IEEE Conference on Control Applications, Toronto, Canada, (2005), 606-611. 10. Castillo O., Cazarez N., Melin P.: Design of Stable Type-2 Fuzzy Logic Controller based on a Fuzzy Lyapunov Approach. IEEE International Conference on Fuzzy Systems (2006).