A Self-Tuning of a Wavelet PID Controller - Semantic Scholar

Report 4 Downloads 213 Views
A Self-Tuning of a Wavelet PID Controller J. A. Cruz-Tolentino1, L. E. Ramos-Velasco2 and M. A. Espejel-Rivera3 1,2 Centro de Investigación en Tecnologías en Información y Sistemas, División del ICBI, Universidad Autónoma del Estado de Hidalgo, Carr. Pachuca-Tulancingo Km. 4.5, Pachuca, Hidalgo, México. [email protected], [email protected] 3 Instituto Tecnológico de Pachuca, Autopista México-Pachuca Km. 87.5, Pachuca, Hidalgo, México. [email protected] of a self-tuning wavelet controller and tune algorithm are presented too. The simulation results are showed in Section 4. Finally, the conclusions about of self-tuning wavelet control are presented in Section 5.

Abstract In this paper a self-tuning wavelet PID controller using wavelet networks is presented. The wavelet-based multiresolution PID controller was purpose by [8], the ability of this controller is to provide good rejection to disturbances and smooth control signal. One of its disadvantages is that the tuning gains are in trial or error mode. A wavelet network to identify the system and to tune the gains of the wavelet PID controller is proposed. To validate the proposed control system numerical simulation is performed for a motion control system.

2. Wavelets, multiresolution decomposition and wavelet neuronal network A wavelet is defined like a wave of very short duration. The wavelet function ψ (t ) is called mother wavelet because different wavelets are generated from it, by its dilation o contraction and translation, these are called daughter wavelet ψ a ,b (τ ) and its mathematic

Key Words: Control, multiresolution analysis, neural networks, PID, wavelet.

representation is ψ a ,b (τ ) =

1. Introduction

(1)

where a is dilation variable and b is translation variable. There are differences mother wavelets like: Haar, Mexican hat, Morlet, Meyer, Daubechies, RASP1 and others more [1]. In this paper the Morlet mother wavelet is used to generate the daughter wavelets used in the wavelet network as activation function. The mathematic representation of the Morlet wavelet and its partial derivate with respect to b are

The wavelet-based multiresolution controller was purposed by [8], it has ability to provide a smooth control signal even in the presence of noise. This controller use the multiresolution decomposition to decompose the error signal and to get the components of the error signal, these components are summing and scaling to generate the control signal to compensate the uncertain in the plant. In the absence of tuning method, a wavelet network is proposed as an alternative to tune the gains of controller [9, 14]. Firstly, this network is used to identify the unknown plant and lately an algorithm is used to update the gains of wavelet controller. Particularly in [14] an application in numerical simulation for a second order linear system is presented, while in the present paper a wavelet PID and wavenet PID are proposed making a comparison between them.

ψ (t ) = e ∂ψ a ,b (τ ) ∂b



t2 2

cos(5t ),

2 1 = [ω0 sin(ω0τ )e−0.5τ + τψ (τ )]. a

(2) (3)

Multiresolution representation is very effective for analyzing the information contained in the signal [5], the basic idea of a multiresolution decomposition consists of a sequence of successive approximation spaces V j , these spaces are close subspaces than satisfy [5, 11]

This paper is organized as follows: a general overview of the wavelets, multiresolution decomposition and wavelet network is given in Section 2. Section 3 presents the control strategy used, explains the use of wavelet network in the identification of nonlinear systems, design

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

1 t −b  t −b ψ ,  a > 0; a, b ∈ ;τ = a a  a 

V j ⊂ V j −1

∪V

=

j

∀ j ∈, L (),

(5)

{0} ,

(6)

j∈

∩V

j

=

(4)

2

j∈

73

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.

h

j



φ j ,k [n] = 2 2 φ (2− j n − k ) ∀j , k ∈  .

c 2,k

c 1, k

where V j represent the space of all function spanned by

2

h

2

V j −1 = V j ⊕ W j ,

(8)

V j ⊥ W j = 0 ∀j ∈  ,

(9)

c'3,k

c3, k 2

h

2

g

2

h

2

h

2

h

2

g

2

h

2

g

d'2,k

d 1, k

eH eM

1

eM

2

eL

Figure 1. Sub-band coding scheme for decomposition of the error signal whit N=3.

So, orthogonal basis of wavelet induce an orthogonal

If

2

in

N

(11)

is

sufficiently

large,

then

2

decomposition of f [ n ] ∈ L (  ) (the space of all square

f [ n] ∈ L (  ) can be approximated arbitrary closely in V N , for some integer N . Such that for any ε > 0

integrable functions on  ), through of the following equations:

f [n] − ∑ cN ,kφN ,k [n] < ε ,

N

(11)

(17)

k

m =1 k

cm,k = ∑ f [n]φm ,k [n],

h d''3,k

d 2,k

(10)

function is called wavelet function.

k

2

c''3,k 2

d'3,k

d 3,k

The equation (10) is an orthogonal basis generated from a function ψ [ n ] ∈ V0 by its dilation and translation, this

f [ n] = ∑ cN , kφN ,k [ n] + ∑ ∑ d m , kψ m ,k [ n],

g

d 1, k

where W j represent the space of all function spanned by

ψ j ,k [n] = 2 ψ (2 n − k ) ∀j , k ∈  .

g

2

d 2,k

e = c 0,k

add space W j , than satisfy

−j

g

2

d 3,k

function is called scaling function. If for each V j exist a

j 2

2

(7)

The equation (7) is an orthogonal basis generated from a function φ [ n ] ∈ V0 by its dilation and translation, this



c 3, k

h

then, it is obtained the approximation of the function f [n] as [12,13]

(12)

k

d m , k = ∑ f [ n]ψ m , k [ n],

f [ n]  ∑ cN , k φ N , k [ n],

(13)

where and,

N is φ [n]

i.e., some components of low-scale (high-frequency) than belong at wavelet space WN are despised and the

the level of decomposition of the function and

corresponding to

ψ [n]

are the conjugate functions

components of high-scale (low-scale) that belong at scaling space is preserved for approximate original function in scale N . This expression has similarity with a radial-basis function neural network as illustrated in Figure 2, where scaling functions ψ l (τ ) substitute

φ [ n] and ψ [ n] , respectively.

An efficient approach in computing the multiresolution composition is to use the sub-band coding scheme [11] which uses only the filters h[ k ] and g[ k ] , which are found in [1] and have the following relation h[ k ] = 2 ∑ φ[ n]φ [2n − k ], (14)

radial-basis functions in the hidden layer, wl are weights and

n

g[ k ] = 2 ∑ψ [ n]ψ [2n − k ], n

g[k ] = (−1)k h[−k + 1].

(15)

τ=

k − bl (k ) al (k )

∀ l , l = 1, 2,…, L − 1, L is the

number of neurons in the hidden layer of wavelet network.

(16)

In the Figure 1 is illustrated sub-band coding scheme used for decomposition of the error signal to a third level. This scheme is used for the wavelet control with a Dauechies filter of order two.

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

(18)

k

k

74

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.

ψ1(τ)

w1 ^

w2

ψ2(τ)

u[n]

alternative model of an unknown plant that can simplify the computation of control input is described by the equation y (k + 1) = Φ[Y(k ), U(k )] + Γ[Y(k ), U(k )]·u (k ), (24) Σ

where y ( k ) and u ( k ) denote the input and the output at

f[n]

the

wL

k ht instant of time, respectively. If the nonlinearity terms Φ (i) and Γ (i) are known

ψL(τ)

exactly, the required control u ( k ) for tracking a desired output yref ( k + 1) can be computed at every instant by

Figure 2. Structure of wavelet network of three layers.

u (k ) =

3. Control strategy The Figure 3 shows the scheme for control system SISO with a self-tuning wavelet PID control, proposed.

yref (k + 1) − Φ[ Y (k ), U ( k )]

Γ[Y ( k ), U (k )]

.

(25)

However, if Φ (i) and Γ (i) are unknown, then is used a wavelet network to approximate the system dynamics.

r(k) Sensor

P(k)

y ref (k)

+-

e(k)

Wavelet PID controller

u(k)

Em(k)

e n(k)

K(k) Self-tuning algorithm

Wavelet Network with IIR

^(k) Γ

3.2. Self-tuning wavelet PID controller

y(k)

Unknown Plant

The wavelet control takes the error signal e , and then decompose it employed the multiresolution decomposition. The resultant signals are summing and scaling to generate the control signal u ,

+ -

^ y(k)

u = K H eH + Km1 em1 + … + K M N −1 eM N −1 + K LeL ,

v(k)

k th instant

this equation in its matrix form is used for the of time u (k ) = K T (k )Em (k ).

Figure 3. Close loop block diagram of a SISO system with self-tuning wavelet PID controller.

(26)

(27) T

K (k ) =  K H ( k ) K M1 (k ) … Ki ( k ) … K M N −1 ( k ) K L ( k )  ,

3.1. Representation system

Em (k ) = eH (k ) eM1 (k ) … ei (k ) … eM N −1 (k ) eL (k )

This paper considers nonlinear systems SISO (single input – single output) which are described by discretetime state equations of the form [3, 4] x ( k + 1) = f [ x ( k ), u ( k ), k ], (19) y (k ) = g[ x(k ), k ], (20)

Wavelet PID

PC Decomposition

eH

x(k ) ∈  n y u ( k ) , y (k ) ∈  . Further, let the 1 unknown functions f , g ∈  . The only accessible data

e y ref

are the input and output, and if the linear systems around the equilibrium state is observable, an representation exists which has the form y (k + 1) = Ω[Y(k ), U(k )], (21) where Y(k ) = [ y(k ) y(k − 1) … y(k − n + 1)], (22) U(k ) = [u(k ) u(k −1) … u(k − n + 1) ], (23)

e M1

KH

P

KM

1

Σ

+e MN-1 eL

u

y Unknown Plant

KM

N-1

KL

Sensor

r

Figure 4. Close loop block diagram of a SISO system with wavelet PID controller.

i.e. a function Ω exists that maps y ( k ) , u ( k ) and theirs

There are different wavelets than can be used for the decomposition of the error signal, the wavelet selection affects the performance of the wavelet PID controller. In

past values. Here, we can use a wavelet network



Ω to approximate Ω over the domain interest. An

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

(29)

.

The Figure 4, shows the block diagram of a SISO system with wavelet PID controller.

where

n −1

(28)

T

75

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.

order to more details on the selection of wavelet see [7]. The wavelet PID controller in this paper employed the mother wavelet Daubechies of order two [1], based on the results of [8, 14] having been found very suitable for control.

ψ1(τ)

a)

w1 ^ y(k)

w2

ψ2(τ)

u(k)

Σ

z(k)

wL

All physical systems are subjected to some type of extraneous signals or noises during operation. In practice, disturbance and commands are often low-frequency signals, and noises are high-frequency signals. Then, use an wavelet PID controller that generates a signal of very smooth control and that reduces drastically the effects of the noise in the exit of the dynamic system, it is very suitable, especially because, the smooth signal of control produces a minimal effort, improving the life of the actuators (commonly motors of direct current) and better the whole behavior of the dynamic systems [2, 6].

IIR v(k)

ψL (τ)

b)

c c1 0

z(k)

cM-1 cM

^ y(k)

Σ

d1 dJ-1

Σ

v(k)

dJ

Figure 5. Structure of wavelet network with IIR : a) wavelet network architecture, b) IIR filter model.

One of its disadvantages of the wavelet PID controller (26) is that the tuning gains are in trial or error mode. In order to tune the gains of wavelet control K ( k ) , first, is employed an wavelet network with IIR filter (Infinity Impulse Response), like illustrate in Figure 5, to approximate the functions Φ ( i ) y Γ ( i ) [9, 14], and

To minimize E is possible to use the steepest gradientdescent method of minimization, which requires the ∂E , ∂E ∂E , ∂E , ∂E , gradients and

which are obtained by

parameters of wavelet network with IIR and the gains of wavelet controller, in accordance with the rule [9, 14] θ(k + 1) = θ(k ) + µθ ∆θ(k ), (44)







Γ [ Y( k ), U(k ) ] = CT ( k )Z( k ),

(31)

T

z (k ) = Ψ (k ) W(k ),

∆θ ( k ) = −

(32)

∂C( k )

∂D ( k )

∂E , ∂θ(k )

(45)

θ can be W, A, B, C, D, or K , and µθ ∈  is the fixed learning rate parameter for each

so that

where







(33)

y (k + 1) = Φ[ Y (k ), U ( k )] + Γ[ Y (k ), U ( k )]·u ( k ),

where T

W(k ) = [ w1 (k ) w2 (k ) … wl (k ) … wL−1 (k ) wL (k ) ] , T

A ( k ) = [ a1 ( k ) a2 ( k ) … al ( k ) … aL −1 ( k ) aL ( k )] , T

B(k ) = [b1 (k ) b2 (k ) … bl ( k ) … bL−1 (k ) bL (k ) ] , T

C(k ) = [ c0 ( k ) c1 (k ) … cm ( k ) … cM −1 ( k ) cM ( k ) ] , T

D( k ) = d1 (k ) d 2 (k ) … d j ( k ) … d J −1 ( k ) d J (k )  , T

Ψ ( k ) = [ψ 1 (τ ) ψ 2 (τ ) … ψ l (τ ) … ψ L −1 (τ ) ψ L (τ ) ] , T

Z( k ) = [ z ( k ) z ( k − 1) … z ( k − m) … z ( k − M + 1) z (k − M ) ] , Y(k ) =  y( k − 1)  ∧

∂B( k )

∂A ( k )

∂E for updating the incremental changes to each ∂K ( k )

(30)

Φ [ Y (k ), U( k )] = D ( k ) Y (k ) ⋅ v (k ), T

∂W(k )









y( k − 2) … y ( k − j ) … y (k − J + 1)

The self-tuning algorithm, is described by  ∂E ∂E = ∂K ( k )  ∂K H ( k )

∂E … ∂K m1 ( k )

∂E … ∂K i ( k )

∂E ∂K mN −1 ( k )

∂E  , ∂K L ( k ) 

∧ ∂E = − en ( k ) Γ [ Y ( k ), U ( k ) ] ⋅ ei ( k ). ∂K i ( k )

(38) (39) (40)

(46) (47)

4. Simulation results

T

y( k − J )  . 



parameters. (34) (35) (36) (37)

(41)

The algorithms are validated in linear control systems to control the position of a motor DC, the transfer function that describe the motor is [10]

The parameters of the wavelet network and the gains of wavelet PID control are minimized by a cost function E using adapted technique based on the least mean

G ( s) =

22 . s ( s + 4)

(48)



squares (LMS) algorithms. Given en (k ) = y (k ) − y (k )

The results are compared with a wavelet PID controller, which has follow gains showed in the Table 1, these were get in trial or error mode.

for an instant k , then the cost function is 1 E = ETn En , 2

(42)

En = [ en (1) en (2) … en (k ) … en (T −1) en (T )].

(43)

where

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

76

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.

Table 1. The gains of wavelet PID controller. 1

K m1

Km2

KL

0.15

2.5

2.5

0

The self-tuning wavelet PID controller has follow parameters, showed in the Table 2 and with initial values are showed in the Table 3.

0.6

0.4

0.2

Table 2. Parameters of WNN. Neurons Mother wavelet Feedfoward IIR coefficients, c Feedback IIR coefficients, d

Reference Wavelet PID controller Self-tuning wavelet PID controller

0.8 Amplitude (rad.)

KH

Wavelet PID

5 Morlet wavelet 2 2

0 0

0.5

1

1.5

2

2.5

3

3.5

4

Time (sec.)

Figure 6. System output signal with a self-tuning wavelet PID controller and system output signal with a wavelet PID controller.

The system is simulated with a self-tuning wavelet PID controller using a wavelet network without prior training, but it has a period of learning 0 ≤ t ≤ 120 seconds, for identifying to the system.

1.6 1.4 1.2

Wavelet PID controller Self-tuning wavelet PID controller

The Figure 6, shows how after a learning period the response of self-tuning wavelet PID control is acceptable. In case of nonlinear systems is possible that require have a wavelet network with prior training. The Figure 7, showed the signal control generated by wavelet PID and self-tuning wavelet PID controller.

Amplitude (volts)

1 0.8 0.6 0.4 0.2

Table 3. Initial values of the parameters of WNN and gains of self-tuning wavelet PID controller. W [ −0.5 −0.5 −0.5 −0.5 −0.5] µW 0.2

B C

D

K

[10 10 10 10 10] [0 30 60 90 120] [0.1 0.1] [0.1 0.1] [ 0.1 0.5 0.5 0.1]

0

0.5

1

1.5

2

2.5

3

Time (sec.)

Figure 7. Signal control of a self-tuning wavelet PID and of a wavelet PID controller.

µA

0.2

µB

0.2

µC

0.2

µD

0.2

-0.5

µK

0.5

-0.6

weights W

scalings A

-0.4

translations B

10.06

140

120

10.04

100

amplitude

The final values are showed in the Table 4, and the behaviors of the parameters along the simulation are illustrated in the Figures 8, 9 and 10.

10.02 amplitude

-0.7 -0.8 -0.9 -1

amplitude

A

0

10

80

60

9.98 40

-1.1

Table 4. Final values of the parameters of WNN and the gains of self-tuning wavelet PID controller. W

A

[ −0.426 [10.057

−0.47 −0.54 −0.56 −1.25]

-1.3 0

10.014 10.004 9.98 9.962]

C

[ 0.003 [0.775

D

[0.0973 0.0948]

K

[0.615

B

9.96

20

-1.2

100 200 time (sec.)

300

9.94 0

100 200 time (sec.)

300

0 0

100 200 time (sec.)

Figure 8. Behavior of the parameters of wavelet network.

30.019 60.065 90.15 120.018]

0.8] 0.45 0.448 0.2 ]

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

77

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.

300

Feedforward IIR c

Feedback IIR d

1

[2] B. Kuo. Sistemas de Control Digital. C.E.C.S.A., 1997.

0.104

0.102

[3] A. Levin and K. Narendra, “Control of Nonlinear Dynamical Systems Using Neural Networks: Controllability and Stabilization”. IEEE Transactions on Neural Networks, 1993, pp. 192-206.

0.1

amplitude

amplitude

0.5 0.098

0.096

[4] A. Levin and K. Narendra. “Control of Nonlinear Dynamical Systems Using Neural Networks - Part II: Observability, Identification, and Control”. IEEE Transactions on Neural Networks, 1996, pp. 30-42.

0 0.094

0.092

-0.5 0

50

100

150 time (sec.)

200

250

300

0.09 0

50

100

150 time (sec.)

200

250

300

[5] S. Mallat. “A Theory Multiresolution Signal Decomposition: The Wavelet Representation”. IEEE Transactions Pattern Analysis and Machine Intelligent, Jul. 1989, pp. 674-693.

Figure 9. Behavior of the parameters of IIR filter. 0.7

0.6

[6] K. Ogata. Ingeniería de Control Moderno. PretinceHall, 1998.

amplitude

0.5

0.4

[7] S. Parvez. Advance Control Techniques for Motion Control Problem. Ph. D. Dissertation, Cleveland State University, Cleveland, Ohio, USA, Dec. 2003.

KH KM

0.3

1

KM

2

0.2

[8] S. Parvez and Z. Gao. “A Wavelet-Based Multiresolution PID Controller”. IEEE Transaction on Industry Applications, Mar.-Abrl. 2005, pp. 537-543.

KL 0.1

0 0

50

100

150 time (sec.)

200

250

300

[9] M. Sedighizadeh and A. Rezazadeh. “Adaptive PID Control of Wind Energy Conversion Systems Using RASP1 Mother Wavelet Basis Function Network”. Proceeding of World Academy of Science, Engineering and Technology, Feb. 2008, pp. 269-273.

Figure 10. Behavior of the gains of self-tuning wavelet PID controller.

5. Conclusion

[10] J. Tang. “PID Controller Using The TMS320C31 DSK with on-line Parameter Adjustment for Real-Time DC Motor Speed and Position Control”. ISIE, Pusan, Korea, 2001, pp. 786-791.

In this paper, we presented a self-tuning wavelet PID controller using wavelet networks, this controllers was tested in motion control system. We can conclude based in the simulation results: a based-wavelet decomposition allows us be selective in the components of the error signal and with it be able to obtain a smooth signal and good rejection for external not wished signals like disturbances. The use of wavelet networks allow the tuning of the gains of a wavelet PID controller on line, without having to know the mathematical model of the dynamic linear system. Moreover, to employ the wavelets networks allows indentify the linear system faster and even without prior training. In addition, this controller can be employed in nonlinear systems where the mathematical model of the plant is unknown, in this case is possible that require have a wavelet network with prior training.

[11] M. Vetterli and J. Kovacevic. Wavelets and Subband Coding. Prentice-Hall PTR, 2007. [12] Q. Zhang and A. Benveniste. “Wavelet Networks”. IEEE Transactions on Neural Networks, Nov. 1992, pp. 889-898. [13] J. Zhang, G. Walter, Y. Miao and W. Lee. “Wavelet Neural Networks for Function Learning”. IEEE Transactions on Signal Processing, Jun. 1995, pp. 14851497. [14] J. Cruz, L. Ramos and M. Espejel. “PID Wavelet Auto-Sintonizado con una Red Neuronal Wavenet”. V Semana Nacional de Ingeniería Electrónica SENIE09”, Ocotlán, Jalisco, México, 7-9 Octubre. ISBN 978-607477-073-5, pp 23-31, 2009.

6. References [1] I. Daubechies. Ten Lectures on Wavelets. SIAM, 1992.

978-1-4244-5353-5/10/$26.00 ©2010 IEEE

78

Authorized licensed use limited to: Tec de Monterrey. Downloaded on June 15,2010 at 14:43:35 UTC from IEEE Xplore. Restrictions apply.