feedback linearization and notch filter for a magnetic levitation system (maglev)

7
1 Feedback Linearization and Notch Filter for a Magnetic Levitation System Giorgio Fontana, Luca Maggiori, Ivan Maj Master’s Degree in Mechanical Engineering - Politecnico di Milano February 21, 2013 Abstract—In this paper, a feedback linearization control for a 1dof magnetic levitation system is presented. Starting from the nonlinear model of the uncontrolled system, a linearizing coordinate transformation is firstly introduced, and a simple Pole Placement control logic is applied. The model is then val- idated with experimental results. Finally, a method for taking into account the levitated ball’s lateral lability is introduced, by means of Notch Filters. Experimental performances are then compared with the unfiltered controlled system. Index Terms—feedback linearization, magnetic levitation, modelisation, band-stop filter. I. I NTRODUCTION Magnetic levitation (maglev) has been successfully im- plemented in many industrial applications, nowadays. It is used, for example, in magnetic bearings, maglev trains, and for product display purposes. The maglev system used in the laboratory is a 1dof Quanser set. An electromagnet is used in order to create a variable magnetic field capable of attracting and levitating a ferromagnetic ball in the air. With the geometric config- uration shown in Figure 1 only the vertical displacement inside the gap is controllable. The physical control variable is represented by the current circulating in the coil, generated by the actual input to the system: the voltage V c ; the ball position is measured through a photosensor included inside the basement. In the first sections, the (highly) non linear model of the uncontrolled system is firstly derived. Then the feedback linearization technique is applied, in order to transform and linearize the system [2], [3], [5]. While the classic control form of linearization would require to take into consideration only an assigned fixed position and the synthesized linear control logic would be effective only for small displacements around that position, the feedback linearization makes it possible to treat the model as an actual linear system. Thus any linear control technique can be applied and, if correctly designed, the controlled system will have effective performances on the whole range of possible ball positions. Figure 1: MagLev system and its schematic. In the final sections, a method for reducing the effect of lateral vibrations of the levitated ball is introduced. The lateral displacement, even if minimal, affects the light which excites the photosensors, so that a false measure of an apparent ball vertical movement is given to the feedback loop, thus inducing an unnecessary control action on the ball. This phenomenon could make the system unstable and the ball position control ineffective. II. NONLINEAR MODEL OF THE SYSTEM As a first step, the electric circuit is taken into account (Figure 1). The equation is easily derived as: V c (t)= I c (t)R s + I c (t)R c + dI c (t) dt L c (1) which shows that the electric part of the system related to the input V c is linear. By indicating with R tot = R c + R s the equation can be rewritten in the state-space form: dI c dt = - R tot L c I c + V c L c (2)

Upload: giorgio-fontana

Post on 07-Apr-2016

232 views

Category:

Documents


2 download

DESCRIPTION

Authors: Giorgio Fontana, Luca Maggiori, Ivan Maj. Mechatronic Systems, Prof. Francesco Braghin, Politecnico di Milano, A.A. 2012/2013

TRANSCRIPT

1

Feedback Linearization and Notch Filter for aMagnetic Levitation System

Giorgio Fontana, Luca Maggiori, Ivan MajMaster’s Degree in Mechanical Engineering - Politecnico di Milano

February 21, 2013

Abstract—In this paper, a feedback linearization control fora 1dof magnetic levitation system is presented. Starting fromthe nonlinear model of the uncontrolled system, a linearizingcoordinate transformation is firstly introduced, and a simplePole Placement control logic is applied. The model is then val-idated with experimental results. Finally, a method for takinginto account the levitated ball’s lateral lability is introduced, bymeans of Notch Filters. Experimental performances are thencompared with the unfiltered controlled system.

Index Terms—feedback linearization, magnetic levitation,modelisation, band-stop filter.

I. INTRODUCTION

Magnetic levitation (maglev) has been successfully im-plemented in many industrial applications, nowadays. It isused, for example, in magnetic bearings, maglev trains, andfor product display purposes.

The maglev system used in the laboratory is a 1dofQuanser set. An electromagnet is used in order to createa variable magnetic field capable of attracting and levitatinga ferromagnetic ball in the air. With the geometric config-uration shown in Figure 1 only the vertical displacementinside the gap is controllable. The physical control variableis represented by the current circulating in the coil, generatedby the actual input to the system: the voltage Vc; the ballposition is measured through a photosensor included insidethe basement.

In the first sections, the (highly) non linear model of theuncontrolled system is firstly derived. Then the feedbacklinearization technique is applied, in order to transform andlinearize the system [2], [3], [5]. While the classic controlform of linearization would require to take into considerationonly an assigned fixed position and the synthesized linearcontrol logic would be effective only for small displacementsaround that position, the feedback linearization makes itpossible to treat the model as an actual linear system.Thus any linear control technique can be applied and, ifcorrectly designed, the controlled system will have effectiveperformances on the whole range of possible ball positions.

Figure 1: MagLev system and its schematic.

In the final sections, a method for reducing the effectof lateral vibrations of the levitated ball is introduced. Thelateral displacement, even if minimal, affects the light whichexcites the photosensors, so that a false measure of anapparent ball vertical movement is given to the feedbackloop, thus inducing an unnecessary control action on theball. This phenomenon could make the system unstable andthe ball position control ineffective.

II. NONLINEAR MODEL OF THE SYSTEM

As a first step, the electric circuit is taken into account(Figure 1). The equation is easily derived as:

Vc(t) = Ic(t)Rs + Ic(t)Rc +dIc(t)

dtLc (1)

which shows that the electric part of the system related tothe input Vc is linear. By indicating with Rtot = Rc + Rs

the equation can be rewritten in the state-space form:

dIcdt

= −Rtot

LcIc +

VcLc

(2)

2

Now the attracting force generated by the electromagnetover the vertical axis must be expressed. The magnetic fieldand the forces around the electromagnet are not easy to bederived; moreover the phenomenon is highly nonlinear. Theresulting expression for the attracting magnetic force can beexpressed in the form:

Fc =1

2Km

Ic(t)2

xb(t)2 (3)

where Km is the electromagnetic constant of the system.it can be seen that nonlinearity is present for both the coilcurrent and the ball position.

In order to complete the physical modeling of the maglevsystem the equation of motion of the levitated ball must bederived. By considering the forces acting on the ball on thevertical axes in a dynamic condition:

Fc =1

2Km

Ic(t)2

xb(t)2 Fg =Mbg Fi =Mbxb (4)

the simple equation of motion is

Fi + Fc = Fg (5)

which can be finally expressed as

xb = g − 1

2

KmIc2

Mbxb2(6)

It is now possible to define the state vector as

x =

x1x2x3

=

Icxbxb

(7)

and to express the state-space equation of the system:dIcdt = −Rtot

LcIc +

Vc

Lc

xb = xb

xb = g − 12KmIc

2

Mbxb2

=⇒ (8)

=⇒ x =

−Rtot

LcIc

xbg − 1

2KmIc

2

Mbxb2

+

1Lc

00

Vc (9)

Indicating

f(x) = (f1, f2, f3)T =

−Rtot

Lcx1

x3g − 1

2Km

Mb

x12

x22

(10)

g(x) =

1Lc

00

(11)

u = Vc (12)

and considering that the ball position is measured throughthe photo sensors:

y = h(x) = xb = x2 (13)

the state-space equation can finally be synthesized as{x = f(x) + g(x)u

y = h(x)(14)

III. FEEDBACK LINEARIZATION

The purpose of this technique is to derive an appropriatecoordinate tranformation for the system in the form (14), inorder to establish a linear relationship between the output (yand its derivatives) and a so-called “synthetic input” v. Thislinearized system will be in the form

z− = [A] z− + b−v (15)

where the state vector z = T (x) is defined by y and its (n-1)derivatives:

z =

z1z2z3

=

yyy

=⇒ z =

yy˙y

=

z2z3v

(16)

The matrix [A] and the vector b are then defined as

[A] =

0 1 00 0 10 0 0

b =

001

(17)

and the linearization is formally obtained. Now the trans-formation operator T(x) between vector x and z must beintroduced. In particular, the (n-1) derivatives of y must becalculated, as a function of x.

y = h(x) = x2 =[0 1 0

]x (18)

y =∂h

∂x

˙x =

∂h

∂xf(x) +

∂h

∂xg(x)u = Lfh(x) + Lgh(x)u

having defined with

3

Lfh(x) =∂h

∂xf(x) =

∑i

∂h

∂xifi(x) (19)

Lgh(x) =∂h

∂xg(x) =

∑i

∂h

∂xigi(x) (20)

the Lie Derivatives. It can be observed that Lgh(x) = 0 andequally Lg(Lfh(x)) = 0, so the derivatives of y become

y = Lfh(x)

y = L2fh(x)

˙y = v = L3fh(x) + Lg(L

2fh(x))u

(21)

The physical control action u is only present in the thirdderivative of y, since (as it will be shown) Lg(L

2fh(x)) 6= 0:

the nonlinear system has a relative degree r = 3 (being r thefirst degree of derivation of y which is function of u).

This expression also highlights the (linear) relation be-tween the synthetic input v and the physical input u = Vc:

v = L3fh(x) + Lg(L

2fh(x))u = b(x) + a(x)u (22)

This makes it possible to design the control logic in termsof v, and consequently calculate the corresponding value ofu = Vc as

u = Tuv =v − b(x)a(x)

(23)

Only the formulation of the nonzero Lie derivatives is nowmissing. With simple steps it can be obtained:

Lfh(x) = x3

L2fh(x) = L2

fh(x3) = g − 12Km

Mb

x21

x22

L3fh(x) = b(x) = KmRtot

MbLc

(x1

x2

)2+ Km

Mb

(x21

x32

)x3

Lg(L2fh(x)) = a(x) = − Km

MbLc

(x1

x22

) (24)

The operative results are finally summarized:

T (x) =

x2x3

g − 12Km

Mb

x21

x22

Tuv =v − b(x)a(x)

(25)

A. Control Logic design: Pole Placement

As the transformed system is now in linear form, anylinear control logic can be implemented. First of all, it canbe easily observed that the system is controllable. Definingas Q the controllability matrix, it is

Q =[b Ab A2b

]=

0 0 10 1 01 0 0

⇒ det(Q) = −1 6= 0

(26)As for the control logic, a simple Pole Placement is applied.The control action v is defined as

v = [G] (zrif − z) (27)

where G = [ g1 g2 g3 ] is the gain vector. The gainvalues are obtained by imposing the controlled system statematrix’s eigenvalues. After a few tests, a suitable set of thedesired poles has been chosen:

P = [ ρ1 ρ2 ρ3 ] = [ −100 −101 −102 ] (28)

The control gains are then easily calculated with the useof Matlab function place(A,b,P):

G = 106[ 1.0302 0.0306 0.0003 ] (29)

and the system control is finally completely synthesized.In order to summarize the conceptual passages of the

control logic design, a block diagram is presented (Figure2), together with Simulink blocks from T and Tuv transfor-mations (Figure 3).

Figure 2: Block Diagram - Feedback Linearization.

IV. EXPERIMENTAL RESULTS

Many tests have been run, in order to validate the per-formances of the controlled Magnetic Levitation system.From the reported results, it can be noticed that a significantdifference with the reference position is present in the veryfirst seconds of the test, when the ball is lifted from thestand. This is only due to nonlinearities and calibration issues

4

(a) T(x). (b) Tuv.

Figure 3: Simulink Blocks.

of the photosensor: its signal is proportional to the ballposition when it’s far from the stand, but not when it’s fewmillimeters above it.

Figure 4a shows that the controlled ball reaches thereference position, and the vibration control is very good. InFigure 4b a square wave trajectory is imposed. Performacesare good, but not excellent, due to the fast variation ofposition which makes it difficult to stop the ball at the desiredlevel.

Figure 5 shows performances in case of a frequencychange in a sine wave reference trajectory. The amplitudeis kept constant (2mm) and frequency is suddenly changedfrom 0.4Hz to 1.6Hz. The system maintains very goodperformances, in particular it can be noticed that even at1.4Hz there’s no amplitude reduction in the ball movement,and no phase lag.

The last results are relative to sine wave tests at highfrequency. Figure 6a shows that even at 5 Hz the controlledsystem can follow the reference trajectory, but performancesare starting to decrease: amplitude control is more difficult(the ball overrides the peak positions) and phase lag (delay)can be noticed.

At frequency f=10Hz the controlled system becomes un-stable. More tests have confirmed that good performancescan be generallly achieved on a 0-8 Hz range.

V. NOTCH FILTER CONTROL UPGRADE

The considered MagLev system is affected by a problemconcerning the ball actual motion degrees of freedom. Thesystem is designed to levitate (and to control) the steelball along the vertical axis only, but no motion restrictionsare performed along any horizontal direction, thus the ballpresents a mechanical lability. Moreover the magnetic field ishighly nonlinear and changes rapidly even at small distancesfrom the electromagnet’s vertical axis. The result of all this isthat the ball will always be characterized by an uncontrolled

horizontal motion, which in some cases can make the controltest impossible, as the ball actually falls to the system’sbasement.

However the common case is that of a small lateralvibration of the ball during the first seconds when it islifted from the stand and levitated to the desired positionxb0. The vibration is generated because the ball is not liftedfrom the stand in a perfect vertical direction. Fortunately,the axisymmetric magnetic field acts as an elastic stabilizingspring on the ball, in any horizontal direction. Its intensity isnot strong, but since the initial ball’s vibration is generallysmall, it is sufficient to push back the ball towards thedesired controlled vertical axis. The major problem is thatthe electromagnetic nature of the forces makes the lateraldisplacement of the ball undamped, with the result that theinitial horizontal vibration of the ball persists during thecontrol test, even after reaching the final position xb0.

This phenomenon would be of small importance for thecontrol system’s perfomance if the ball’s vertical positionwere measured independently from the horizontal one. Inthis case, however, the photosensor is sensible to lightvariation and the variation of tension Vb is directly convertedin a vertical position estimate. Thus even if the ball isactually still on the vertical axis, its lateral vibration inducesa variation in photosensor tension Vb, and consequently afake activation or variation of the intensity of the controlaction. This causes a vertical ball vibration, synced with thehorizontal one, that can worsen the control system’s globalperfomance.

Figure 7: Lateral Vibration of the ball.

5

0 10 20 30 40 50 600

5

10

15

t [s]

[mm

]

Constant Position reference

xb rif

xb

(a) Constant Position.

5 10 15 20 25

4

4.5

5

5.5

6

6.5

7

t [s]

[mm

]

Square Wave − 2mm − 0.25Hz

xb rif

xb

(b) Square Wave.

Figure 4: Tests with reference trajectory.

20 25 30 35 40 45 50

5

5.5

6

6.5

7

t [s]

[mm

]

Sine Wave − 2mm − 0.4Hz <−−> 1.6Hz

xb rif

xb

(a) Ball Position.

20 25 30 35 40 45 50

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

t [s]

[A]

Sine Wave − 2mm − 0.4Hz <−−> 1.6Hz

Ic rif

Ic

(b) Coil Current.

Figure 5: Frequency change during a sine wave test.

A fast analysis has revealed that the lateral vibrationsare in the form of harmonic displacement, centered on thecontrol axis. The frequency is always in a range of 2-5 Hz,depending of the imposed lifting speed.

The goal of this control upgrade is to design a band-stopfilter (in particular a Notch Filter) tuned at the horizontalvibration’s frequency, in order to filter it from the feedbackloop [4], [1]. A more correct option is to design an adactiveNotch Filter, able to detect the frequency and change itscoefficients during real-time tests. Both the two cases will

pe presented.The chosen filter is a second-order Notch Filter with peak

attenuation of 10 dB. Its position inside the control logic (atcoil current output) has been chosen in order to minimizethe effects of stablity reduction.

A. Case 1 - Static Frequency syncing

In this case a reference trajectory is chosen, then afirst series of tests without the Notch Filter are conducted,

6

35 35.5 36 36.5 37 37.5

4.5

5

5.5

6

6.5

7

t [s]

[mm

]

Sine Wave − 2mm − 5Hz

xb rif

xb

(a) 5 Hz.

10 12 14 16 18 20

4.5

5

5.5

6

6.5

7

7.5

8

8.5

9

t [s]

[mm

]

Sine Wave − 2mm − 10Hz

xb rif

xb

(b) 10 Hz.

Figure 6: High Frequency tests.

in order to determine the mean frequency of the lateralvibration for the chosen trajectory.

In the reported example (Feedback Linearization controlwith exponential lifting trajectory) a vibration frequency ofabout 3 Hz has been estimated. After setting accordinglythe filter coefficients, a new test is performed (Figure 9).The Notch Filter is activated at time t=4s, and deactivatedat time t=20s.

It can be seen that the initial vibration is correctly filtered,and the ball and current estimated values are close to therespective references. With the filter deactivation the effectof lateral vibration is back again, and thus converted tounnecessary control informations inside the feedback loop.

It must be noted that during the whole duration of thereported test the ball horizontal vibration was always present(as the lateral direction motion is not controllable), but withthe activated filter it was not considered in the feedbackcontrol action: the operative result is that the vertical motionis not affected by the lateral one. With Notch Filter theball keeps moving horizontally but stops moving vertically,letting the control logic be as effective as it was designed.

B. Case 2 - Adaptive Notch Filter

In this second case a way to estimate the vibrationfrequency and to adapt filter’s coefficients in real time ispresented. Due to limitations of the available hardware ithas not been possible to correctly test this configuration onthe MagLev system, but a numeric simulation is proposed.

Figure 8: Reference Trajectoy.

The basic idea is to create a memory buffer of the lastposition measures (for instance the last second’s data), andto obtain an estimate of vibration frequency by means ofautocorrelation. Thus a time-stepped update of the frequencyvalue is possible (for instance: every second).

A numerical test has been realized (Figure 10); the sim-ulated unwanted vibration is a 3 Hz sine wave, and theadaptive filter is activated at instant t=4s. It can be observedthat a good filtering effect over the ball position is obtained,while the frequency value is updated at every second andcorrectly close to 3Hz (Figure 10a).

VI. CONCLUSION

In this paper, a feedback linearization model for a mag-netic levitation system was proposed, with experimental

7

Figure 9: Notch Filter effect.

(a) Frequency estimation. (b) Numerical result.

Figure 10: Adaptive Notch Filter: numerical test.

validation. A method for taking into account the ball’shorizontal lability by means of Notch Filters was thenintroduced. Experimental tests show that it is possible toreduce the effects of uncontrolled lateral vibrations over thefeedback control action, thus optimizing the control logicperformances over the ball vertical motion.

REFERENCES

[1] R.R. Pereira C.H. da Silva L.E. Borges da Silva G. Lambert-Torres.Harmonic detection with lms adaptive notch filter and transient detec-tion. IEEE, 2011.

[2] Ahmed El Hajjaji and M Ouladsine. Modeling and nonlinear controlof magnetic levitation systems. IEEE Transactions on IndustrialElectronics, 48(1), 2001.

[3] J. K. Hedrick and A. Girard. Control of Nonlinear Dynamic Systems:Theory and Applications. 2005.

[4] Shuli Jiao and Mahmood H. Nagrial. Modeling and simulation of areal time adaptive notch filter for sinusoidal frequency tracking. IEEE,1998.

[5] john A. Henley. Design and implementation of a feedback linearizingcontroller and kalman filter for a magnetic levitation system. Master’sthesis, The University of Texas at Arlington, May 2007.