final present 0502

35
Marwan K. Abbadi Advisor: Dr. Winfred Anakwa

Upload: guna8985

Post on 18-Nov-2014

142 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Final Present 0502

Marwan K. Abbadi

Advisor: Dr. Winfred Anakwa

Page 2: Final Present 0502

OutlineOutline

• Introduction– Problem definition– Objectives

• Functional Description• System Block Diagram• System Identification• Control Algorithm • Software Implementation• Hardware Interface• Results• Conclusions• Future work

Page 3: Final Present 0502

IntroductionIntroduction

• What are Magnetic levitation systems?What are Magnetic levitation systems?

Maglev. are devices that suspend ferromagnetic materials with the aid of electromagnetism. It has wide number of applications such as high-speed trains, aerospace shuttles, magnetic bearings and high-precision platforms.

Page 4: Final Present 0502

IntroductionIntroduction

• Problem definitionProblem definition

Maglev. systems based on electromagnetic attraction are characterized by non-linear and unstable open-loop dynamics which suggests the need of stabilizing controllers.

Page 5: Final Present 0502

Project ObjectivesProject Objectives

• Obtain a good model for the magnetic levitation system, maglev model 33-210 from Feedback Inc. Limited.

• Design and implement a microcontroller-based digital controller to stabilize a 21 gram steel ball at a desired vertical position. The overall system should track applied reference input signals.

Page 6: Final Present 0502

Functional DescriptionFunctional Description

• Inputs:– Set point (Constant 1.50 [V] ), corresponds to a distance of 22.5mm

between the ball and the electromagnet.– Reference signal (±0.4 Vpp)– Disturbances such as power supply fluctuation, coil temperature

variations and external forces applied to the ball.

• OutputActual ball position

Page 7: Final Present 0502

System Block DiagramSystem Block Diagram

In te l m icrcontro ller+

+

-

Set po int

R eferenceinput

E*(s)

D ig ita lC ontro ller

In terfaceC ircu itE (s)

Tszoh

InterfaceC ircu it

MagneticLevitation

SystemU (s)

Actual Ball position Y (s)

M aglev Front Panel

Page 8: Final Present 0502

System IdentificationSystem Identification

• Importance of modeling the system.

• There are two approaches to identify the plant:

a) Analytical model- Using differential equations.

b) Experimental model- Bode frequency response data fitting.

To obtain a good model for the system, both models were obtained for comparison.

Page 9: Final Present 0502

System IdentificationSystem Identification

• Analytical model

There are two sets of equations that describe magnetic levitation systems.

1) Electrical:

Coil ResistanceR

Coil inductance= L

+e-

Input Voltage

Current= i

Photo-detectorCells

Photo-emitterCells

δtδx

xi

xLδtδi

LiRe200

Wheree = Coil input voltage R= Coil resistancei = Coil current L= Coil inductancet = Time L0= Nominal point inductance

x0= Nominal point pos.

This is the general electrical circuit for magnetic levitation systems. However, this maglev. system is driven by an active circuit for the coil that adds further non-linearity since I is a non-linear function of e.

Page 10: Final Present 0502

System IdentificationSystem Identification

2) Mechanical equation Using Newton 2nd law of motion:

2

xi

CgmEFGFF

Gravitation forceGF = m*g

Electromagnetic force

EF= C (i/x)2

WhereF= Resultant forcem= Mass of the steel ball= 0.021 Kgg= gravitational acceleration = 9.82 m/s2

C= Magnetic plant constant

Page 11: Final Present 0502

System IdentificationSystem Identification

• The previous equation contained non-linear elements, so linearization is needed.

• Taylor series expansion is used to approximate the equations near the operating point of x0=22.5 mm from electromagnet.

• Operating region= 18 27 mm from electromagnet.

• Magnetic plant constant, C= 1.477x10-4 N.m2.A-2

Page 12: Final Present 0502

System IdentificationSystem Identification

• Coil inductance L was approximated as a constant = 296.74mH.

• Sensor gain Ks was determined to be 450.3 volts/meter.

Coil Inductance vs Ball Distance y = 0.001x2 - 0.0761x + 298.12

R2 = 0.9958

295.5

296

296.5

297

297.5

298

298.5

1 3 5 7 9

11

13

15

17

19

21

23

25

27

29

31

33

35

37

39

Ball distance from the coil (mm)

Co

il In

du

cta

nce (

mH

)

Series2

Poly. (Series2)

Page 13: Final Present 0502

System IdentificationSystem Identification

• Combining the previous equations:

)115.70)(114.29)(114.29(

0013.0)(

ssssGp analytical

Page 14: Final Present 0502

System IdentificationSystem Identification

• The analog controller of the manufacturer was connected to the plant to obtain frequency response data.

• The data was obtained at the nominal operating point x=x0=22.5 mm

• The reference input frequency was swept from 0 to 20 Hz.

Page 15: Final Present 0502

System IdentificationSystem Identification

• The experimental model of the plant is: )15.30)(15.30(

60.1)(exp_

sssGp

Page 16: Final Present 0502

System IdentificationSystem Identification

• The experimental model was used instead of the analytical model, since the analytical model did not account for the non-linearity of the active coil driver.

• The high-frequency pole at -70.15 rad/s was omitted in the practical model approximation.

Page 17: Final Present 0502

System IdentificationSystem Identification

• Frequency response data for controller from the manufacturer:

Page 18: Final Present 0502

System IdentificationSystem Identification

• Controller from manufacturer:

• Approximating to a first order:

• Pole at -2827 rad/s and zero at -47 rad/s

2_

)14000

)(1900

(

115)(

ss

s

sG manc

)1900

(

115)(_

s

s

sG manc

Page 19: Final Present 0502

System IdentificationSystem Identification

• SIMULINK vs. experimental system response to 0.6V step input

Page 20: Final Present 0502

System IdentificationSystem Identification• Bode diagram of Gc_man(s)*Gp_exp(s)

PM=30.5 degrees

Page 21: Final Present 0502

System IdentificationSystem Identification

• The analog controller from manufacturer was converted to discrete domain using bilinear (Tustin) transformation with Ts= 5 ms.

1

1

7521.01

7904.013.8)(

zz

zGc)1

900(

115)(_

s

s

sG manc

Page 22: Final Present 0502

Software ImplementationSoftware Implementation

• The digital controller was implemented using assembly language program on an Intel-80515 microcontroller.

• The software code:– Samples the error signal via the A/D.– Computes the control signal.– Sends the control signal to the plant via the

D/A.

Page 23: Final Present 0502

Software ImplementationSoftware Implementation

• The 8051 microcontroller does not handle floating point arithmetic.

• The controller transfer function was approximated for fixed point implementation.

• The approximated transfer function:

1

1

7521.01

7904.013.8)(

zz

zGc3.8*

1410

1

1411

1)(

1

1

_

z

zzG emacc

Gain implemented in

hardware7857.014

11Note: 7143.0

14

10

Page 24: Final Present 0502

Software ImplementationSoftware ImplementationIntializations

80515, Stack, Timer 0 interrrupt,

MAINTimer 0

- Sam ple A /D input C all C ontro ller P roduce via D /A

Update variablese(n), e(n-1), u(n-1)

Prepare E(n)- Set s ign b it if -ve- M ultip ly by coeffic ient

Prepare U(n-1)- Set s ign b it if -ve.- M ultip ly by coeffic ient

Prepare E(n-1)- Set s ign b it if -ve- M ultip ly by coeffic ient

M ultip lex operation 1

M ultip lex operation 2

Page 25: Final Present 0502

Hardware InterfaceHardware Interface

• Hardware interface circuitry is needed to level shift and scale the error to the range of the microcontroller A/D.

• Furthermore, the control signal generated via the D/A must be readjusted back to the full scale and multiplied by the controller gain.

Page 26: Final Present 0502

Hardware InterfaceHardware Interface

1Error signal E(t) = ±5V

2E1(t) = 0 ~ -5V

3E2(t) = 0 ~ +5V

Ready to be interfaced to the

EMAC

Error to A/D

Antialiasing filter

Antialiasing filter

EMACEMAC

Page 27: Final Present 0502

Hardware InterfaceHardware Interface

D/A to Maglev

1D/A signal 0 ~ 5V

2Shifted signal -2.5 ~ 2.5V

3Control signal

U

Controller gain

maglevmaglev

Page 28: Final Present 0502

ResultsResults

• The ball was stabilized at the equilibrium point however it was oscillating due to:

– Quantization errors of the 8-bit A/D and D/A.

– Truncation errors of coefficients stated in controller transfer function.

– Computational truncation errors.

Page 29: Final Present 0502

ResultsResults

Stabilization of steel ball at the nominal equilibrium point

Ball position

Control signal

Page 30: Final Present 0502

ResultsResults

Figure displaying the quantization effects

Page 31: Final Present 0502

ResultsResults

Page 32: Final Present 0502

ResultsResults

Tracking of sinusoidal reference input:

- The steel ball tracked reference sinusoidal and square waveform inputs.

Page 33: Final Present 0502

ConclusionsConclusions

• Mathematical modeling of an unstable system is a challenging control engineering problem. Some examples are inverted pendulums and aerospace vehicles.

• Implementation of controller algorithm on 8-bit microcontroller using fixed point arithmetic generates quantization and truncation errors.

• These errors, that depend on sampling period and controller gain, cause small oscillations in system response.

• The ball tracked reference input signals. Better tracking performance can be achieved using higher resolution A/D and D/A, longer word-length microcontroller and a higher order controller.

Page 34: Final Present 0502

Future work Future work

• A user-friendly interface can be developed using the keypad and LCD.

• Possible user inputs include sampling period, poles and zeroes locations, settling time etc.

• Once implemented, the system will serve as a

good apparatus for teaching undergraduate controls students the effect of varying different parameters on overall system response.

Page 35: Final Present 0502

ENDENDQuestions and answers

For more information: visit http://cegt201.bradley.edu/projects/proj2003/maglev/

Thank you