5
Magnetic Levitation and Control Using Two Solenoids With Their Axes in a Vertical Plane Ajinkya Dahale B.Tech., Mechanical Engineering Indian Institute of Technology Gandhinagar Ahmedabad, India Abstract—Magnetic Levitation has found tremendous utility in fields like transport and tribology. It is also one of the classic experiments used in introductory courses in controls. This paper discusses a two-dimensional extension to this classic experiment. In this proposed setup, a diamagnetic object is to be levitated using the magnetic field strength of two solenoids with an iron core each located in two separate locations with their axes in the same vertical plane. The key feature of this new setup is the ability to levitate the object in any position within a portion of a plane as compared to a single line in the classical experiment. Using two currents in the coils as two inputs, the objective is to have a position and velocity control of the object. In order to do so, first, the analytical form of the magnetic field strength outside the two solenoids is determined. Then, the magnetic force acting on the sphere is evaluated. Using these expressions, equilibrium points are established based on the required position and the stability of these points is analysed. Further, a control system is implemented to achieve the aforestated objective. Keywordsmagnetic levitation, look-up table, nonlinear, multi- variable, control. I. I NTRODUCTION Magnetic Levitation has found tremendous utility in fields like transport and tribology. It is also one of the classic experiments used in introductory courses in controls. This paper discusses a two-dimensional extension to this classic experiment. ZeroN by Lee et al. [1] discusses one direction of this expansion. However, this paper discusses a design in which there are no moving parts in the system except the object to be levitated. In our version, a diamagnetic steel sphere is to be levitated against gravity using the magnetic field strength of two solenoids with an iron core. As in the classical experiment, an object is to be mag- netically levitated. However, here we propose a setup using the magnetic field strength of two solenoids with an iron core each located in two separate locations with their axes in the same vertical plane. The key feature of this proposed setup is the ability to levitate the object in any position within a portion of a plane as compared to along a single line in the classical experiment. This experiment can also be extended further to add more magnets, either to add a third dimension, or to expand the region in which control is possible. Even within a single dimension, this problem is challenging as it involves both mechanical and electromagnetic aspects. As a second dimension is introduced, not only is non-linearity added to the system, but also the equations cease to be analytically simplifiable. Also, this becomes a multi variable problem since more than one (electro)magnets are needed. In this paper, first a setup for the experiment is posed. Then, a mathematical model is created to simulate this setup. Lookup tables are used to handle the nonlinearities present. Once the mathematical model is ready, simulations are analysed for stability around certain points of interest. To do this, artificial equilibrium points are created by calculating the required currents to sustain the position. Then, the model is linearized for further actions. The unstable equilibrium is then stabilized using known control methods based on the linearized model. II. THE SETUP The proposed setup is illustrated in Fig. 1. There are two electromagnets M 1 and M 2 with their axes in the same vertical plane. The axes are perpendicular to each other and are located symmetrically along the vertical drawn from their point of intersection. This arrangement requires the least number of magnets for 2D levitation. III. METHODOLOGY FOR CREATING MODEL The following steps were performed to develop a mathe- matical model of the actual problem for simulation and further analysis. A. Variables Used The input, state, output and other variables used are shown in Table I. x y ρ 1 z 1 ρ 2 z 2 M 2 M 1 Fig. 1: Model environment showing magnet positions and coordinate systems

[IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

  • Upload
    ajinkya

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

Magnetic Levitation and Control Using TwoSolenoids With Their Axes in a Vertical Plane

Ajinkya DahaleB.Tech., Mechanical Engineering

Indian Institute of Technology GandhinagarAhmedabad, India

Abstract—Magnetic Levitation has found tremendous utilityin fields like transport and tribology. It is also one of the classicexperiments used in introductory courses in controls. This paperdiscusses a two-dimensional extension to this classic experiment.In this proposed setup, a diamagnetic object is to be levitatedusing the magnetic field strength of two solenoids with an ironcore each located in two separate locations with their axes inthe same vertical plane. The key feature of this new setup is theability to levitate the object in any position within a portion ofa plane as compared to a single line in the classical experiment.Using two currents in the coils as two inputs, the objective is tohave a position and velocity control of the object. In order to doso, first, the analytical form of the magnetic field strength outsidethe two solenoids is determined. Then, the magnetic force actingon the sphere is evaluated. Using these expressions, equilibriumpoints are established based on the required position and thestability of these points is analysed. Further, a control system isimplemented to achieve the aforestated objective.

Keywords—magnetic levitation, look-up table, nonlinear, multi-variable, control.

I. INTRODUCTION

Magnetic Levitation has found tremendous utility in fieldslike transport and tribology. It is also one of the classicexperiments used in introductory courses in controls. Thispaper discusses a two-dimensional extension to this classicexperiment. ZeroN by Lee et al. [1] discusses one directionof this expansion. However, this paper discusses a design inwhich there are no moving parts in the system except the objectto be levitated. In our version, a diamagnetic steel sphere is tobe levitated against gravity using the magnetic field strengthof two solenoids with an iron core.

As in the classical experiment, an object is to be mag-netically levitated. However, here we propose a setup usingthe magnetic field strength of two solenoids with an iron coreeach located in two separate locations with their axes in thesame vertical plane. The key feature of this proposed setupis the ability to levitate the object in any position within aportion of a plane as compared to along a single line in theclassical experiment. This experiment can also be extendedfurther to add more magnets, either to add a third dimension,or to expand the region in which control is possible.

Even within a single dimension, this problem is challengingas it involves both mechanical and electromagnetic aspects. Asa second dimension is introduced, not only is non-linearityadded to the system, but also the equations cease to beanalytically simplifiable. Also, this becomes a multi variableproblem since more than one (electro)magnets are needed.

In this paper, first a setup for the experiment is posed. Then,a mathematical model is created to simulate this setup. Lookuptables are used to handle the nonlinearities present. Once themathematical model is ready, simulations are analysed forstability around certain points of interest. To do this, artificialequilibrium points are created by calculating the requiredcurrents to sustain the position. Then, the model is linearizedfor further actions. The unstable equilibrium is then stabilizedusing known control methods based on the linearized model.

II. THE SETUP

The proposed setup is illustrated in Fig. 1. There are twoelectromagnets M1 and M2 with their axes in the same verticalplane. The axes are perpendicular to each other and are locatedsymmetrically along the vertical drawn from their point ofintersection. This arrangement requires the least number ofmagnets for 2D levitation.

III. METHODOLOGY FOR CREATING MODEL

The following steps were performed to develop a mathe-matical model of the actual problem for simulation and furtheranalysis.

A. Variables Used

The input, state, output and other variables used are shownin Table I.

x

y

ρ1

z1ρ2z2

M2

M1

Fig. 1: Model environment showing magnet positions andcoordinate systems

Administrator
new
Page 2: [IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

TABLE I: List of Variables

Variable DescriptionI1, I2 Currents in the respective solenoids

x, y Dimensions in Cartesian coordinate system along the horizontal andvertical axes

zi, ρi Dimensions in Cylindrical coordinate system along the axes of theelectromagnets

x(s) State vector used for control and other analysis

B Magnetic flux density

m Magnetic dipole moment in the object

mO Mass of the object. Note that the subscript “O” is used here for“Object” to differentiate mass from magnetic dipole moment.

g Acceleration due to gravity (= 9.8m/s2 = 980cm/s2)

µ0 Permeability of free space

L Length of each electromagnet

N Number of loops in each electromagnet

a Radius of each electromagnet

l The centers of magnets M1 and M2 are at (l, l) and (−l, l)respectively

B. Coordinate System

Three coordinate systems are used. In the primary xysystem, the origin is at the point of intersection of the axesof the two magnets. The y-axis is taken upwards along thevertical mentioned earlier, while the x-axis is taken alongthe horizontal pointing towards magnet M1. This system willbe used for all the modeling and control calculations. Forconvenience in calculation of B, we use two more cylindricalcoordinate systems ρ1z1 and ρ2z2, where z1 and z2 axescoincide with the axes of the respective magnets and pointtowards the origin from the centers of the respective magnets.

C. Assumptions for the Model

A simplified mathematical model was developed using thefollowing assumptions:

• The object is small, diamagnetic and not magnetized:The assumption on its size allows us to use theformula for force on a point dipole by an externalmagnetic field (viz. F = ∇(m ·B)). The diamagneticpart ensures that m ∝ B. Assuming that there isno magnetic field previously inside the object avoidshaving to take into consideration the orientation of theobject — as m is in the direction of B, there will beno torque on the object.

• The inputs to this model are the currents I1 andI2 in the solenoids. Normally, these are themselvescontrolled by the potential differences applied acrossthe loops, but here we choose to ignore it to focus onthe magneto-mechanical portion of the model ratherthan the electrical part.

• The iron core does not alter the shape of the magneticfield but merely amplifies it.

• The coils are wound around tightly close to eachother but isolated from each other. Thus a coiledsolenoid with a current of I flowing through the wireis assumed to be same as a finite continuous solenoidwith a current of NI flowing uniformly within itaround its curved surface.

With these simplifications, the state vector x(s) and theinput vector u can be chosen as follows1:

x(s) = [ (x− xreq) (y − yreq) (x− xreq) (y − yreq) ]T

(1)

u = [ (I1 − I1eq) (I2 − I2eq) ]T (2)

Here, the subscript “req” represents the value which wewant that that variable to have, while the subscript “eq”represents the value that the variable should have to maintainthe specified requirements. Thus, we would be specifying therequired position of the object as a function of time, and thencalculating the currents required to maintain the motion.

D. Equations for the Model

The following equations were used for calculation ofmagnetic flux density B by a single solenoid [2]. The valuesare components along cylindrical coordinate directions at apoint with cylindrical coordinates (ρ, φ, z).

Bρ =µ0NI

1

L

√a

ρ

[k2 − 2

kK(k2) +

2

kE(k2)

]ζ+ζ−

(3)

Bz =µ0NI

1

L

√1

[ζk

(K(k2) +

a+ ρ

a− ρΠ(h2, k2)

)]ζ+ζ−

(4)Where, ζ± = z ± L/2; h2 = 4aρ/(a+ ρ)2; k2 =4aρ/((a+ ρ)2 + ζ2); K, E and Π are the elliptic equationsof the first, second and third kind, respectively.

K(m) =

∫ π2

0

1√1−msin2θ

dθ (5)

E(m) =

∫ π2

0

√1−msin2θ dθ (6)

Π(n,m) =

∫ π2

0

1

(1− nsin2θ)√

1−msin2θdθ (7)

After the assumptions, the effective magnetic force on theobject can then be calculated as:

Fmag = ∇(m ·B)

= cd∇(‖B‖2) (8)

where cd is a diamagnetic constant such that m = cdB. Thetotal force on the object then is:

F = Fmag −mOgy. (9)

where y is the unit vector along y direction.

1This form of state and input vectors is chosen against the more intuitiveform x(s) = [x y x y ]T , u = [ I1 I2 ]

T as with this, an equilibrium isfound at x(s) = 0, u = 0, which can be handled with known state spacemethods without modification after linearization.

Administrator
CAREF2
Page 3: [IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

E. Calculations for Nonlinear Model

These equations contain elliptic integrals of the first, secondand third kind. Efficient algorithms are available for the firstand second kind and are already implemented in software likeMATLAB and Python (through the SciPy module). The ellipticintegrals of the third kind can be calculated using numericalmethods. However, calculating this data just-in-time wouldprove too slow to be able to control the levitation. These valuescan however be pre-calculated and stored in lookup tables.

These equations also involve space derivatives of B. Thesederivatives can either be calculated analytically through theformula for B, or numerically from values stored in the lookuptables. To use the first method, a suggested method would beto divide Fmag into components:

Fmag = f11I12 + f12I1I2 + f22I2

2 (10)

where each fij term is independent of current.

In this paper, however, the author chose to use the secondmethod. In this, only the values of Bx and By are stored. Thegradient at any point is then calculated using the values atthat point and other points in its vicinity, not unlike the colorgradients used in computational photography. This methodis preferred to the first, as it does not involve too complexcalculations. It also avoids having to store too many lookuptables (six in the case of analytical method as compared to justtwo for numerical). This difference in the number of requiredtables would become more prominent if the number of magnetswere increased, as the number of fij terms increases as O(n2).

F. Simulation of Model

The parameters chosen for simulation are given in Table II.Simulation was done using SIMULINK block diagrams. Datafor lookup tables were calculated using the SciPy and NumPymodules of Python. The values stored in the lookup tableswere Bx/I1cb and By/I1cb as produced by the first magnetalone, where

cb = µ0/2π. (11)

The space differentiation mentioned earlier was donethrough central divided difference method.

IV. ANALYSIS AND CONTROL

With the model ready at hand, the next step in magneticlevitation is to develop a control system for it. Here onestrategy towards this goal is discussed. For simplicity, a basiccase is discussed which can be extended to more complexsituations like general or time-varying required position.

The block diagram representing this is shown in Fig. 2. Weintend to get a gain κ to be added into the feedback loop suchthat u = −κx(s). Note that:

x(s) = f(x(s),u) =

x− xreqy − yreq

Fx/m− xreqFy/m− yreq

. (12)

TABLE II: Values of Parameters used for Simulation

Parameter Valuel 5cm

L 5cm

a 1cm

Maximum magnitude of x and y coordinatesfor which data were stored in lookup tables 10cm

cmag =√cdcb (see (8) and (11)) 0.2 SI units

κMagLevSystem

u x(s)

(a)

u x(s)x(s)f(x(s),u) ∫.

(b)

Fig. 2: Block diagram of system and feedback loop used forcontrol: (a) Feedback loop, and (b) “MagLev System” blockexpanded

A. Selection of Point of Interest

For a basic case, the required position of the object waschosen to be the origin as shown in Fig. 1. As a furthersimplification, it was assumed that the currents in both the coilsstay equal, theoretically confining the object to the y-axis. Bybalancing forces, the currents required for equilibrium can beobtained (in this particular case2 I1 = I2 ≈ 5.868A).

B. Stability of the Equilibrium

The equilibrium thus formed is found to be unstable (Fig.3a). With the aforementioned confines, the object falls to theground if it is a little below the origin. If it is slightly abovethe origin, it is found to oscillate around a point y ≈ 3.55cm.This second equilibrium point (at y ≈ 3.55cm), however, isalso unstable in the presence of perturbations in x.

2The case taken here is rather particular. As I1 = I2 (= I , say), (10) assuresthat Fmag ∝ I2. Thus Ieq can be calculated by first running the simulationwith I = 1 and then modifying I according to the obtained Fmag .

Administrator
CAREF2
Page 4: [IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

C. Linearization

Before taking any further steps, it is necessary to linearizethe system to get a state-space form (For an explanation ofthis form, see [3]).

x(s) = A(s)x(s) +B(s)u (13)

y(s) = C(s)x(s) +D(s)u (14)

MATLAB’s linmod function was used to linearize themodel around the point of interest. The following results wereobtained:

A(s) ≈

0 0 1 00 0 0 1

330 0 0 00 1255 0 0

; (15)

B(s) ≈

0 00 0

0.8349 −0.83491.6700 1.6700

. (16)

We assume3 y(s) = x(s); then C(s) is an identity matrixand D = 0.

D. Controllability and Observability

The output of this model is the position of the ball,differentiating which will also give the other two states. Thus,the system is fully observable. The linearization shows that thesystem is also controllable around our point of interest.

E. Stabilization

Using LQR (for details, see [3]–[5]), the point of interestwas stabilized. For this, the Q and R matrices were chosen tobe identity matrices of appropriate dimensions. The followinggain κLQR was obtained.

κLQR ≈[

395.3 751.4 21.77 21.22−395.3 751.4 −21.77 21.22

](17)

Simulation results after stabilization are shown in Fig. 3b.

F. Lyapunov Analysis

Lyapunov analysis (see [3], [5]) was performed over boththe unstable and the stabilized models to obtain the extentto which the controller stabilizes the system. The Lyapunovfunction V was chosen as:

V = x(s)T

1 0 0 00 6944 0 1000 0 1 00 100 0 8

x(s) (18)

For Lyapunov analysis, once we have a potential function,we have to find area where its time derivative V is negative.Now,

V =d V

dx(s)x(s) =

d V

dx(s)f(x(s),u) (19)

3This is a very ideal scenario. In a practical situation, however, observingposition would be easier than observing velocity. While theoretically thisshould not affect the observability of the system, it would depend on anumber of factors like quality of sensor and velocity of the object duringimplementation.

0 0.2 0.4 0.6 0.8 1−0.1

−0.05

0

0.05

0.1

t (s)

y (m

)

Open Loop Results

y(0) = 0.001y(0) = −0.001

(a)

0 0.2 0.4 0.6 0.8 1−1

−0.5

0

0.5

1x 10

−3

t (s)

y (m

)

Results after Stabilization

y(0) = 0.001y(0) = −0.001

(b)

Fig. 3: Simulation results after slight deviation in y for (a)Unstable and (b) Stabilized Systems

Thus, the exact value of f(x(s),u) is needed. This wasobtained using the relevant portion of the SIMULINK blockdiagram and running it for a single time-step.

Results of the analysis are shown in Fig. 4. These resultscan be checked against by manually setting the initial condi-tions and observing whether the controller is able to stabilizethe system from there.

V. CONCLUSION

A double-magnet system was modeled and controlled forlevitating a diamagnetic object in two dimensions. The objectwas to be levitated using the magnetic field strength of twosolenoids with an iron core each located in two separatelocations with their axes in the same vertical plane. The keyfeature of this setup was the ability to levitate the object inany position within a portion of a plane as compared to asingle line in the classical experiment. Currents in the coilswere used as inputs. Firstly, analytical form of the magneticfield strength outside the two solenoids was determined. Then,

Administrator
CAREF2
Page 5: [IEEE 2013 International Conference on Control, Automation, Robotics and Embedded Systems (CARE) - Jabalpur, India (2013.12.16-2013.12.18)] 2013 International Conference on Control,

dV/dt

y−Velocity, x(s)4

(m/s)

y−P

osit

ion,

x(s

)2

(m)

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

0.015

0.02

−300 −200 −100 0 100 200 300 400 500 600 700 800

(a)

dV/dt

y−Velocity, x(s)4

(m/s)

y−P

osit

ion,

x(s

)2

(m)

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

0.015

0.02

0 1000 2000 3000 4000 5000 6000 7000 8000 9000

(b)

Fig. 4: V for various initial conditions: (a) For the unstable system, and (b) System after stabilization. The system is stable in theclosed region around the point of interest within which its value is negative. Initial Values of x(s)1 and x(s)3 are zero throughout.

the magnetic force acting on the sphere was evaluated. Usingthese expressions, equilibrium points were established basedon the required position and the stability of this points wasanalysed. Further, an LQR control system was implementedto achieve levitation.

Use of actual values for electromagnets could have yieldeda physically implementable model. In that case, a magnetizedobject model might be needed, as the forces by a moderatesized electromagnet on a non-magnetized object prove to havetoo little magnitude to levitate it. This paper does not discusssuch implementations. However, the calculations can be donesimilarly, assuming the dipole moment of the object as fixedin magnitude rather than proportional to the Magnetic FluxDensity at its current position.

Another aspect that this paper does not discuss is the factorof general motion. We would want the ball to move in anydirection as we want rather than just stay fixed at the origin.To achieve this, we would need to be able to dynamicallychange the desired equilibrium as per the current value of xreqand yreq. That in turn would require dynamic calculation ofequilibrium current.

ACKNOWLEDGMENT

This paper was initiated in March 2013 with ShyamalKishore, a fellow student, as a course project for the courseof Advanced Multivariable Control instructed by Dr. AmeyKarnik. The author is grateful to these individuals for theirsupport during the semester. The author would also like tothank Prof. Harish P.M. for his support during the submission.

REFERENCES

[1] J. Lee, R. Post, and H. Ishii, “ZeroN: mid-air tangible interaction enabledby computer controlled magnetic levitation,” in Proc. 24th Annual Symp.User Interface Software and Technology. ACM, 2011, pp. 327–336.

[2] “the magnetic field of a finite length solenoid,” 2011, [accessed7-July-2013]. [Online]. Available: http://nukephysik101.wordpress.com/2011/07/17/the-magnetic-field-of-a-finite-length-solenoid/

[3] K. Ogata, Modern Control Engineering, ser. Instrumentation and controlsseries. Prentice Hall, 2010.

[4] Mathworks, “Linear-Quadratic Regulator (LQR) design - MATLAB lqr- MathWorks India,” 2013, [accessed 9-July-2013]. [Online]. Available:http://www.mathworks.in/help/control/ref/lqr.html

[5] Feedback Control Of Dynamic Systems, 5/E. Pearson Education, 2008.

Administrator
CAREF2