Magnetic Levitation System

Similar documents
ME 5281 Fall Homework 8 Due: Wed. Nov. 4th; start of class.

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Magnetic Levitation System

Microelectronic Circuits - Fifth Edition Sedra/Smith Copyright 2004 by Oxford University Press, Inc.

EE 482 : CONTROL SYSTEMS Lab Manual

ANNA UNIVERSITY :: CHENNAI MODEL QUESTION PAPER(V-SEMESTER) B.E. ELECTRONICS AND COMMUNICATION ENGINEERING EC334 - CONTROL SYSTEMS

Homework Assignment 06

CDS 101/110: Lecture 8.2 PID Control

California University of Pennsylvania Department of Applied Engineering & Technology Electrical Engineering Technology

Dr Ian R. Manchester

BSNL TTA Question Paper Control Systems Specialization 2007

Downloaded From All JNTU World

Frequency Response Analysis and Design Tutorial

Chapter 10 Feedback ECE 3120 Microelectronics II Dr. Suketu Naik

OPERATIONAL AMPLIFIER PREPARED BY, PROF. CHIRAG H. RAVAL ASSISTANT PROFESSOR NIRMA UNIVRSITY

Microelectronic Circuits II. Ch 9 : Feedback

Course Outline. Time vs. Freq. Domain Analysis. Frequency Response. Amme 3500 : System Dynamics & Control. Design via Frequency Response

FlexLab and LevLab: A Portable Lab for Dynamics and Control Teaching

Homework Assignment 10

JUNE 2014 Solved Question Paper

Addendum Handout for the ECE3510 Project. The magnetic levitation system that is provided for this lab is a non-linear system.

CDS 101/110a: Lecture 8-1 Frequency Domain Design

Electronics and Instrumentation Name ENGR-4220 Fall 1999 Section Modeling the Cantilever Beam Supplemental Info for Project 1.

Operational Amplifier BME 360 Lecture Notes Ying Sun

Thursday, 1/23/19 Automatic Gain Control As previously shown, 1 0 is a nonlinear system that produces a limit cycle with a distorted sinusoid for

Homework Assignment 03

Positive Feedback and Oscillators

A Model Based Digital PI Current Loop Control Design for AMB Actuator Coils Lei Zhu 1, a and Larry Hawkins 2, b

Friday, 1/27/17 Constraints on A(jω)

Downloaded From JNTU World. B.Tech II Year II Semester (R09) Supplementary Examinations December/January 2014/2015 GENERATION OF ELECTRIC POWER

Operational Amplifier (Op-Amp)

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

Motomatic via Bode by Frank Owen, PhD, PE Mechanical Engineering Department California Polytechnic State University San Luis Obispo

Lab 10. Magnetic-Levitation Controller

Homework Assignment 07

Penn State Erie, The Behrend College School of Engineering

GATE: Electronics MCQs (Practice Test 1 of 13)

Dimensions in inches (mm) .021 (0.527).035 (0.889) .016 (.406).020 (.508 ) .280 (7.112).330 (8.382) Figure 1. Typical application circuit.

Analog Electronics. Lecture Pearson Education. Upper Saddle River, NJ, All rights reserved.

Operational amplifiers

ECE 203 LAB 2 CONTROL FUNDAMENTALS AND MAGNETIC LEVITATION

Brushed DC Motor PWM Speed Control with the NI myrio, Optical Encoder, and H-Bridge

9 Feedback and Control

ECE317 Homework 7. where

Dimensions in inches (mm) .268 (6.81).255 (6.48) .390 (9.91).379 (9.63) .045 (1.14).030 (.76) 4 Typ. Figure 1. Typical application circuit.

ME 375 System Modeling and Analysis

Index. Small-Signal Models, 14 saturation current, 3, 5 Transistor Cutoff Frequency, 18 transconductance, 16, 22 transit time, 10

Signal Conditioning Systems

Another Compensator Design Example

Testing Power Sources for Stability

Chapter 13 Oscillators and Data Converters

MAGNETIC LEVITATION SUSPENSION CONTROL SYSTEM FOR REACTION WHEEL

OPERATIONAL AMPLIFIERS and FEEDBACK

CDS 110 L10.2: Motion Control Systems. Motion Control Systems

14.2 Photodiodes 411

THE SINUSOIDAL WAVEFORM

Karadeniz Technical University Department of Electrical and Electronics Engineering Trabzon, Turkey

SECTION 6: ROOT LOCUS DESIGN

CHAPTER 9 FEEDBACK. NTUEE Electronics L.H. Lu 9-1

PURPOSE: NOTE: Be sure to record ALL results in your laboratory notebook.

Lecture 7:Examples using compensators

Section 4: Operational Amplifiers

(i) Determine the admittance parameters of the network of Fig 1 (f) and draw its - equivalent circuit.

Physics 303 Fall Module 4: The Operational Amplifier

DESIGN OF MAGNETIC LEVITATION DEMONSTRATION APPARTUS

Physics Jonathan Dowling. Lecture 35: MON 16 NOV Electrical Oscillations, LC Circuits, Alternating Current II

Lecture 2 Analog circuits. IR detection

ECE 203 LAB 6: INVERTED PENDULUM

Active Vibration Isolation of an Unbalanced Machine Tool Spindle

ELC224 Final Review (12/10/2009) Name:

DC SERVO MOTOR CONTROL SYSTEM

Automatic Control Systems 2017 Spring Semester

OBSOLETE. Low Cost Quad Voltage Controlled Amplifier SSM2164 REV. 0

CDS 101/110: Lecture 9.1 Frequency DomainLoop Shaping

Infrared Communications Lab

Homework Assignment 13

Optimizing Performance Using Slotless Motors. Mark Holcomb, Celera Motion

ENGR4300 Fall 2005 Test 4A. Name solutions. Section. Question 1 (25 points) Question 2 (25 points) Question 3 (25 points) Question 4 (25 points)

Class #9: Experiment Diodes Part II: LEDs

Lecture 8 ECEN 4517/5517

Testing and Stabilizing Feedback Loops in Today s Power Supplies

Position Control of DC Motor by Compensating Strategies

Using Magnetic Sensors for Absolute Position Detection and Feedback. Kevin Claycomb University of Evansville

DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY CAMBRIDGE, MASSACHUSETTS 02139

Electrical Engineering. Control Systems. Comprehensive Theory with Solved Examples and Practice Questions. Publications

Single Supply, Rail to Rail Low Power FET-Input Op Amp AD820

Operational Amplifiers

INTEGRATED CIRCUITS. AN1221 Switched-mode drives for DC motors. Author: Lester J. Hadley, Jr.

Chapter 9: Operational Amplifiers

(b) 25% (b) increases

Teaching Mechanical Students to Build and Analyze Motor Controllers

AE103 ELECTRONIC DEVICES & CIRCUITS DEC 2014

and using the step routine on the closed loop system shows the step response to be less than the maximum allowed 20%.

DC motor control using arduino

55:041 Electronic Circuits

USER MANUAL FOR THE LM2901 QUAD VOLTAGE COMPARATOR FUNCTIONAL MODULE

BUCK Converter Control Cookbook

Magnetic Suspension System Control Using Position and Current Feedback. Senior Project Proposal. Team: Gary Boline and Andrew Michalets

EE233 Autumn 2016 Electrical Engineering University of Washington. EE233 HW7 Solution. Nov. 16 th. Due Date: Nov. 23 rd

Lecture 8: More on Operational Amplifiers (Op Amps)

Transcription:

Magnetic Levitation System Electromagnet Infrared LED Phototransistor Levitated Ball Magnetic Levitation System K. Craig 1

Magnetic Levitation System Electromagnet Emitter Infrared LED i Detector Phototransistor V sensor 2.5 V At Equilibrium gap Levitated Ball m = 0.008 kg r = 0.0062 m Equilibrium Conditions gap 0 = 0.0053 m i 0 = 0.31 A Magnetic Levitation System K. Craig 2

Emitter Circuit Power MOSFET with Diode To Electromagnet Buffer Op-Amp Power Supply Capacitors to Ground Buffer Op-Amp Analog Sensor Detector PWM Gnd Circuit Magnetic Levitation System K. Craig 3

Microcontroller Board Gnd PWM Analog Sensor Magnetic Levitation System K. Craig 4

Electromagnet Actuator Current flowing through the coil windings of the electromagnet generates a magnetic field. The ferromagnetic core of the electromagnet provides a low-reluctance path in the which the magnetic field is concentrated. The magnetic field induces an attractive force on the ferromagnetic ball. Electromagnetic Force Proportional to the square of the current and inversely proportional to the square of the gap distance Magnetic Levitation System K. Craig 5

The electromagnet uses a ¼ - inch steel bolt as the core with approximately 3000 turns of 26-gauge magnet wire wound around it. The electromagnet at room temperature has a resistance R = 34 Ω and an inductance L = 154 mh. Magnetic Levitation System K. Craig 6

Ball-Position Sensor The sensor consists of an infrared diode (emitter) and a phototransistor (detector) which are placed facing each other across the gap where the ball is levitated. Infrared light is emitted from the diode and sensed at the base of the phototransistor which then allows a proportional amount of current to flow from the transistor collector to the transistor emitter. When the path between the emitter and detector is completely blocked, no current flows. When no object is placed between the emitter and detector, a maximum amount of current flows. The current flowing through the transistor is converted to a voltage potential across a resistor. Magnetic Levitation System K. Craig 7

The voltage across the resistor, V sensor, is sent through a unity-gain, follower op-amp to buffer the signal and avoid any circuit loading effects. V sensor is proportional to the vertical position of the ball with respect to its operating point; this is compared to the voltage corresponding to the desired ball position. The emitter potentiometer allows for changes in the current flowing through the infrared LED which affects the light intensity, beam width, and sensor gain. The transistor potentiometer adjusts the phototransistor current-to-voltage conversion sensitivity and allows adjustment of the sensor s voltage range; a 0-5 volt range is required as an analog input to the microcontroller. Magnetic Levitation System K. Craig 8

Emitter Current = 10 ma Detector Voltage = 0-5 V Ball-Position Sensor LED Blocked: e sensor = 0 V LED Unblocked: e sensor = 5 V Equilibrium Position: e sensor 2.5 V K sensor 1.6 V/mm Range ± 1mm Magnetic Levitation System K. Craig 9

Magnetic Levitation System Block Diagram Feedback Control System to Levitate Steel Ball about an Equilibrium Position Corresponding to Equilibrium Gap gap 0 and Equilibrium Current i 0 From Equilibrium: As i, gap, & V sensor As i, gap, & V sensor Magnetic Levitation System K. Craig 10

Magnetic Levitation System Derivation m Neglect m m field Magnetic Levitation System K. Craig 11 f gap,i i C gap 2 2 2 Ni m m m core gap object return path m N N L i Define: core object return path 2 2 2 gap N N 0 gap Lm 0A x gap m gap 0Agap xgap 0 gap Ni constant x A N gap A W 1 2 1 Lxi 2 2 A A N 2 x 0 gap gap i 2 0 gap 2 2 1 2 dl(x) 1 2 2 1 i fe i 0AgapN i K1 2 dx 2 0Agap x gap K2 x gap

Equation of Motion: 2 i mx mg C x 2 At Static Equilibrium: mg i C x 2 2 Magnetic Levitation System Control System Design Measure the gap from the electromagnet with x positive Linearization: C C C x C i x x x x 2 2 2 i i 2i 2i ˆ ˆ 2 2 3 2 mxˆ mg C C x C i x x x i 2 2i 2 ˆ 2i ˆ 2 3 2 mxˆ C x C i x x 2 i 2 ˆ 2 i ˆ 3 2 Magnetic Levitation System K. Craig 12

Use of Experimental Testing in Multivariable Linearization f f (i, y) m f f f f i, y y y i i m 0 0 0 0 y i i,y i,y 0 0 0 0 Magnetic Levitation System K. Craig 13

SI Units m 0.008 g 9.81 mg x 0.0053 i 0.31 2 2 i 2 i mxˆ C ˆ 3 xˆ C i 2 x x xˆ 3695xˆ 63i ˆ i C x 2 2 xˆ 63 i ˆ 2 s 3695 C 2.29E 5 Magnetic Levitation System K. Craig 14

Electromagnet Model L = 154 mh R = 34 Ω e in KVL KCL L i L i R dil ein L eout 0 dt i i i i 0 L R out R d e dt R I out = 0 R e out out ein L eout 0 Basic Component Equations (Constitutive Equations) L deout eout ein R dt L De e e R L D 1 e out e in R out out in L ein eout L dt Magnetic Levitation System K. Craig 15 e out eout 1 i R e in L R L R D 1 in D 1 e 1 R di i R

Magnetic Levitation System Control Design Design a Feedback Controller to Stabilize the Magnetic Levitation Plant with Adequate Stability Margins voltage 0.029 63 2 0.0045s 1 s 3695 position Note: Controller gain will need to be negative Magnetic Levitation System K. Craig 16

Phase (deg) Imag Axis Magnitude (db) Uncompensated Electromagnet + Ball System 600 Root Locus Editor for Open Loop 1 (OL1) -60 Open-Loop Bode Editor for Open Loop 1 (OL1) -80 400-100 -120 200-140 -160 0-180 -200-180 G.M.: 66.1 db Freq: 0 rad/s Unstable loop -200-225 -400-600 -800-600 -400-200 0 200 400 Real Axis Note: Negative Controller Gain Is Required 10 1 10 2 10 3 10 4 Magnetic Levitation System K. Craig 17-270 P.M.: Inf Freq: NaN Frequency (rad/s) xˆ 0.029 63 2 êin 0.0045s 1 s 3695

Sample Control Design z = -50 p = -800 K = 52664 s 50 G c(s) 52664 s 800 Magnetic Levitation System K. Craig 18

Nyquist Stability Criterion Key Fact: The Bode magnitude response corresponding to neutral stability passes through 1 (0 db) at the same frequency at which the phase passes through180. The Nyquist Stability Criterion uses the open-loop transfer function, i.e., (B/E)(s), to determine the number, not the numerical values, of the unstable roots of the closed-loop system characteristic equation. If some components are modeled experimentally using frequency response measurements, these measurements can be used directly in the Nyquist criterion. The Nyquist Stability Criterion handles dead times without approximation. In addition to answering the question of absolute stability, Nyquist also gives useful results on relative stability, i.e., gain margin and phase margin. The Nyquist Stability Criterion handles stability analysis of complex systems with one or more resonances, with multiple magnitudecurve crossings of 1.0, and with multiple phase-curve crossings of 180. Magnetic Levitation System K. Craig 19

Procedure for Plotting the Nyquist Plot 1. Make a polar plot of (B/E)(i) for - <. The magnitude will be small at high frequencies for any physical system. The Nyquist plot will always be symmetrical with respect to the real axis. 2. If (B/E)(i) has no terms (i) k, i.e., integrators, as multiplying factors in its denominator, the plot of (B/E)(i) for - < < results in a closed curve. If (B/E)(i) has (i) k as a multiplying factor in its denominator, the plots for + and - will go off the paper as 0 and we will not get a single closed curve. The rule for closing such plots says to connect the "tail" of the curve at 0 - to the tail at 0 + by drawing k clockwise semicircles of "infinite" radius. Application of this rule will always result in a single closed curve so that one can start at the = - point and trace completely around the curve toward = 0 - and = 0 + and finally to = +, which will always be the same point (the origin) at which we started with = -. Magnetic Levitation System K. Craig 20

3. We must next find the number N p of poles of B/E(s) that are in the right half of the complex plane. This will almost always be zero since these poles are the roots of the characteristic equation of the open-loop system and openloop systems are rarely unstable. 4. We now return to our plot (B/E)(i), which has already been reflected and closed in earlier steps. Draw a vector whose tail is bound to the -1 point and whose head lies at the origin, where = -. Now let the head of this vector trace completely around the closed curve in the direction from = - to 0- to 0+ to +, returning to the starting point. Keep careful track of the total number of net rotations of this test vector about the -1 point, calling this N p-z and making it positive for counter-clockwise rotations and negative for clockwise rotations. 5. In this final step we subtract N p-z from N p. This number will always be zero or a positive integer and will be equal to the number of unstable roots for the closed-loop. Magnetic Levitation System K. Craig 21

A system must have adequate stability margins. Both a good gain margin and a good phase margin are needed. Useful lower bounds: GM > 2.5, PM > 30 Vector Margin is the distance to the -1 point from the closest approach of the Nyquist plot. This is a single-margin parameter and it removes all ambiguities in assessing stability that come from using GM and PM in combination. Magnetic Levitation System K. Craig 22

ω = ± N p =1 N p-z = 1 N p N p-z = 0 Magnetic Levitation System K. Craig 23

ω = 0 rad/s GM = -4.23 db = 0.615 ω = 356 rad/s GM = 15.9 db = 6.237 ω = 86 rad/s PM = 32.5 Magnetic Levitation System K. Craig 24

closed-loop Bode plot Magnetic Levitation System K. Craig 25

z = -50 p = -800 K = 3.2792E5 Magnetic Levitation System K. Craig 26

Neutral Stability Magnetic Levitation System K. Craig 27

z = -50 p = -800 K = 1.0443E6 Magnetic Levitation System K. Craig 28

ω = ± N p =1 N p-z = -1 N p N p-z = 2 Magnetic Levitation System K. Craig 29

z = -50 p = -800 K = 32323 Magnetic Levitation System K. Craig 30

Neutral Stability Magnetic Levitation System K. Craig 31

z = -50 p = -800 K = 20095 Magnetic Levitation System K. Craig 32

ω = ± N p =1 N p-z = 0 N p N p-z = 1 Magnetic Levitation System K. Craig 33

Phase (deg) Imag Axis Magnitude (db) Uncompensated Electromagnet + Ball System 600 Root Locus Editor for Open Loop 1 (OL1) -60 Open-Loop Bode Editor for Open Loop 1 (OL1) -80 400-100 -120 200-140 -160 0-180 -200-180 G.M.: 66.1 db Freq: 0 rad/s Unstable loop -200-225 -400-600 -800-600 -400-200 0 200 400 Real Axis Note: Negative Controller Gain Is Required 10 1 10 2 10 3 10 4 Magnetic Levitation System K. Craig 34-270 P.M.: Inf Freq: NaN Frequency (rad/s) xˆ 0.029 63 2 êin 0.0045s 1 s 3695

Phase (deg) Imag Axis Magnitude (db) s 30 N G c(s) 132020 KP KDs s 800 s N K P = 4951 K D = 159 N = 800 500 Root Locus Editor for Open Loop 1 (OL1) 20 0 Open-Loop Bode Editor for Open Loop 1 (OL1) 400-20 300-40 -60 Control Design PD 200 100 0-100 -200-80 -100-120 -140-135 -180 G.M.: -7.78 db Freq: 0 rad/s Stable loop -300-400 -500-300 -250-200 -150-100 -50 0 50 100 Real Axis -225-270 P.M.: 25.3 deg Freq: 201 rad/s 10 0 10 1 10 2 10 3 10 4 10 5 Frequency (rad/s) Closed-Loop Poles: -888, -20.4, -56.9 ± 222i Magnetic Levitation System K. Craig 35

s 38.28s 370.42 K N I G c(s) 113200 KP KDs s s 896 s s N 2 K P = 4784 K I = 46798 K D = 121 N = 896 Root Locus Editor for Open Loop 1 (OL1) 50 Open-Loop Bode Editor for Open Loop 1 (OL1) 200 Control Design PID Imag Axis 150 100 50 0-50 Magnitude (db) 0-50 -100-150 -135 G.M.: -6.55 db Freq: 21.7 rad/s Stable loop P.M.: 30.1 deg Freq: 163 rad/s -100-150 Phase (deg) -180-225 -200-270 -250-200 -150-100 -50 0 50 10 0 10 1 10 2 10 3 10 4 10 5 Real Axis Frequency (rad/s) Closed-Loop Poles: -959, -67 ± 185i, -12.8 ± 17.2i Magnetic Levitation System K. Craig 36

Linear System M_hat Perturbation Control Effort i_hat Perturbation Current Step -113200 Controller Gain s 2+38.28s+370.42 s 2+896s Control Saturation -10.57 to 4.43 volts 0.029 0.0045s+1 LR Circuit -63 s 2+-3695 Magnet + Ball x_hat Perturbation Position Comparison: Linear Plant vs. Nonlinear Plant Step -113200 Controller Gain e0 V Bias s 2+38.28s+370.42 s 2+896s Control Saturation 0 to 15 volts M Control Effort Nonlinear System C = 2.29E-5 m = 0.008 g = 9.81 R = 34.1 L = 154.2E-3 x0 = 0.0053 i0 = 0.31 e0 = 10.57 i R/L Gain1 1/s Integrator2 1/R Gain2 u 2 Math Function Current Product g Constant C/m Gain 1/s Integrator 1 u Math Function1 1/s Integrator1 u 2 Math Function2 x Ball Position Magnetic Levitation System K. Craig 37

Position x (m) 7.2 x 10-3 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command 7 6.8 6.6 Nonlinear Pant Linear Plant 6.4 6.2 6 PD Control 5.8 5.6 5.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 38

Current i (A) 0.5 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command 0.45 0.4 0.35 0.3 Nonlinear Plant Linear Plant 0.25 0.2 PD Control 0.15 0.1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 39

Control Effort M (volts) 15 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command 10 Nonlinear Plant Linear Plant 5 PD Control 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 40

Position x (m) 7.2 x 10-3 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command Nonlinear Plant 7 Linear Plant 6.8 6.6 6.4 6.2 6 5.8 PID Control 5.6 5.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 41

Current i (A) 0.5 0.45 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command Nonlinear Plant Linear Plant 0.4 0.35 0.3 0.25 PID Control 0.2 0.15 0.1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 42

Control Effort M (volts) 15 Nonlinear & Linear Plant Response Comparison: 1 mm Step Command Nonlinear Plant Linear Plant 10 PID Control 5 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 43

Complete System: Electromagnet + Ball + PWM Voltage Control Step 1 mm step command e0 V Bias Identical Controller - PID Format -1-113200 Controller Gain Controller Gain2 PID(s) PID Controller s 2 +38.3s+370.4 s 2 +896s Controller 1/3 Reference Signal 4000Hz Saturation 0 to 15 volts > Relational Operator 1 M Control Effort Convert Boolean into Double 5 Set amplitude to 5V C = 2.29E-5 m = 0.008 g = 9.81 R = 34.1 L = 154.2E-3 x0 = 0.0053 i0 = 0.31 e0 = 10.57 Supply Voltage Switch ON 15 0 Supply Voltage Switch Off >= PWM Switch Transistor MOSFET R/L Gain1 1/s Integrator2 1/R Gain2 Saturation 0 to 1 amp u 2 Math Function i Current Product g Constant C/m Gain 1/s Integrator 1 u Math Function1 1/s Integrator1 u 2 Math Function2 x Ball Position Magnetic Levitation System K. Craig 44

Position x (m) 7.2 x 10-3 Nonlinear Plant & PWM Voltage Control: 1 mm Step Command 7 6.8 6.6 6.4 6.2 6 PD Control 5.8 5.6 5.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 45

Current i (A) 0.5 Nonlinear Plant & PWM Voltage Control: 1 mm Step Command 0.45 0.4 0.35 0.3 0.25 PD Control 0.2 0.15 0.1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 46

Control Effort M (volts) 15 Nonlinear Plant & PWM Voltage Control: 1 mm Step Command 10 5 PD Control 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 47

Position x (m) 7.2 x 10-3 7 Nonlinear Plant & PWM Voltage Control 1 mm Step Command 6.8 6.6 6.4 6.2 6 5.8 PID Control 5.6 5.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 48

Current i (A) 0.5 Nonlinear Plant & PWM Voltage Control 1 mm Step Command 0.45 0.4 0.35 0.3 0.25 PID Control 0.2 0.15 0.1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 49

Control Effort M (volts) 15 Nonlinear Plant & PWM Voltage Control 1 mm Step Command 10 5 PID Control 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 time (sec) Magnetic Levitation System K. Craig 50

Emitter Circuit Power MOSFET with Diode To Electromagnet Buffer Op-Amp Power Supply Capacitors to Ground Buffer Op-Amp Analog Sensor Detector PWM Gnd Circuit Magnetic Levitation System K. Craig 51

Microcontroller Board Gnd PWM Analog Sensor Magnetic Levitation System K. Craig 52

Arduino Microcontroller Implementation With Simulink Autocode Generator 2.5 Commanded Position Volts 5.98 Constant 1/1600 Gain 0.0053 m gap -1 Controller Gain2 PID(s) PID Controller 10.57 Bias Voltage Saturation 0 to 15 volts 1/3 255/5 8-Bit D/A Arduino Discrete PiD Control Magnetic Levitation System PWM Ts = sample period = 0.001 Pin 10 Digital Output Pin 0 Analog Input 5/1023 10-Bit A/D 1/1600 Gain1 Operating point is 0.0053 m gap and corresponds to sensor reading of 2.5 V Sensor gain is 1.6V/mm around operating point + or - 1 mm volts = 1600*m - 5.98 m = (volts + 5.98)/1600 Magnetic Levitation System K. Craig 53

Closed-Loop System Block Diagram LM 258 Low-Power Dual Op-Amp Unity-Gain Buffer Op-Amp e in = e out and in phase Magnetic Levitation System K. Craig 54

Power MOSFET TO-220 N-Channel, 60 V, 0.07 Ω, 16 A Magnetic Levitation System K. Craig 55

Alternative: Analog Power Stage Voltage-to-Current Converter e in R 2 R 1 +V + - -V OPA544 High-Voltage, High Current Op Amp e out Assume Ideal Op-Amp Behavior e R S R M Magnetic Levitation System K. Craig 56 L M Electromagnet R 2 1 im ein R1 R 2 RS e R 1 = 49KΩ, R 2 = 1KΩ, R S = 0.1Ω

e in e in R 1 +V R 2 e 1 R 2 R R 1 2 + - Σ e 1 + - R S A s1 -V L M e out R M Electromagnet Saturation Non-Ideal Op-Amp Behavior A eo e e s1 Magnetic Levitation System K. Craig 57 e e L s R i e out 1 M M R i 1 S 1 eout e1 LMs R M R S e L s R R M M S out 1 RS e out e 1 RS L s R R M M S 1 R S e e i