Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/331606897

Optimal Control for Magnetic Levitation System Using H-J-B Equation Based
LQR

Conference Paper · June 2018


DOI: 10.1109/EPETSG.2018.8658765

CITATIONS READS

6 4,334

3 authors:

Ritesh Raj Subrat Swain


Amrita Vishwa Vidyapeetham Birla Institute of Technology, Mesra
14 PUBLICATIONS 164 CITATIONS 32 PUBLICATIONS 360 CITATIONS

SEE PROFILE SEE PROFILE

Sudhansu Mishra
Birla Institute of Technology, Mesra
116 PUBLICATIONS 1,125 CITATIONS

SEE PROFILE

All content following this page was uploaded by Ritesh Raj on 11 March 2019.

The user has requested enhancement of the downloaded file.


Optimal Control for Magnetic Levitation System
using H-J-B equation based LQR
Ritesh Raj Mr. Subrat Kumar Swain Dr. Sudhansu Kumar Mishra
Department of E.E.E., Asst. Prof., Department of E.E.E., Asst. Prof., Department of E.E.E.,
Birla Institute of Technology, Mesra, Birla Institute of Technology, Mesra, Birla Institute of Technology, Mesra,
Ranchi, Jharkhand, India Ranchi, Jharkhand, India Ranchi, Jharkhand, India

Abstract— This paper deals with the designing of linear The Maglev system experimental set-up in this paper is
optimal controller for Magnetic Levitation system (Maglev) in based on electromagnetic force which is manufactured by
both simulation and real time. The Hamilton-Jacobi-Bellman Feedback Instruments Ltd [6].
(HJB) equation is employed to design the closed loop optimal
control of infinite-time as well as finite-time Linear Quadratic Several methods enumerating the process of designing
Regulator (LQR) system with quadratic performance measure different types of classical, optimal, linear, non-linear,
or index. The objective of the proposed controller is to stabilize digital, intelligent controllers for Maglev system has been
the Maglev system and to control the ball position for tracking explored in the literature. In [3], authors have designed and
the desired ball position. The two different cases of weights of also compared a linear and non-linear controller by using
the LQR controller are selected on the trial and error basis for feedback linearization method for Maglev system. The
studying and improving the time response performance of the classical PID controller by Ziegler–Nichols tuning method
system. The performance comparison between infinite-time and optimized tuning of PID controller based on LQR and
LQR and finite-time LQR is also investigated in both Grey Wolf Optimization method are described in [7], [8] for
simulation and real time. To validate the effectiveness of Maglev system in MATLAB simulink environment. The 2-
proposed controller, it is compared with the classical PID DOF PID, TID and I-TD controllers are also designed for
controller between their relative time response and Maglev system in simulink and real time in [9], [10]. The
performance indices of the system. In the future, a detailed fractional order PID controller for Maglev system is
study of robustness in the presence of model uncertainties or
presented in [11] with the real time implementation. In [12],
external disturbance will be incorporated as a scope of further
research.
digital controller for Maglev system is designed using Fuzzy
logic. The sliding mode controller technique has been
Keywords—Optimal Control; LQR; HJB equation; Magnetic presented in [4], [13], [14] using different algorithms. The
Levitation (Maglev); Finite-Time LQR; Infinite-Time LQR non linear optimal controller of infinite-time LQR using
HJB equation is designed for 3rd order Maglev system and
I. INTRODUCTION simulated in [15].
Magnetic Levitation (Maglev) is a technique used to An optimal controller is designed in this paper for
suspend an object without any support except magnetic linearised 2nd order Maglev system. Optimal controller of
fields. The effect of gravitational acceleration or any other continuous-time is proposed for both infinite-time and
acceleration can be counteract using Magnetic force. This finite-time. For obtaining the optimal closed loop control of
technology is receiving wide attention as it is a non contact Linear Quadratic Regulator (LQR) system, the Hamilton-
mechanical technology which results in zero friction losses Jacobi-Bellman (HJB) equation and optimality principle is
and higher energy efficiency. This causes low cost of used. Bellman's optimality principle states that any portion
maintenance. In future, this technology can be applied in of the optimal trajectory is optimal [16]. This derives the
non-contact structures, non-contact actuators, precision control policies which will simultaneously stabilize the open
engineering, transportation, satellite launching, magnetic loop operation, appropriately integrate the nonlinear
suspension [1], transit system [2], etc. There are several elements of the system and at the same time extremise the
engineering applications for this technology such as in selected performance criterion. Here, the performance index
molten metal levitation in induction furnaces, high-speed is quadratic and based on energy consumption. Hence, the
maglev trains, water transport, magnetically suspended wind control law gradually minimizes the energy. This proposed
tunnel, vibration isolation of sensitive machinery, magnetic controller also provides dynamic optimization to plant under
bearings and high-precision platforms, etc [3], [4]. For such dynamic condition.
a non-linear and unstable system, it is preferred to design a The organization of the paper is as given below. Section
proper controller for suspending a metal object in air space II deals with the Maglev system set-up with schematic
with the support of an electromagnetic force. diagram and mathematical modeling of the system. The
There are two particular ways for designing Maglev transfer function and state space equations of the linearised
system. One is based on electromagnetic attractive force and Maglev system is also provided in section II. Then the
another one is eddy current magnetic repulsive force [5]. problem formulation of optimal LQR controller using HJB

978-1-5386-4769-1/18/$31.00 ©2018 IEEE


equation for both infinite-time and finite-time is stated in B. System Modelling and State Space Equations
section III. In section IV, the experimental result of the The mechanical-electrical model of Maglev is shown in
controller with the system in simulink and real time are figure 3 [6], whose model equations are nonlinear.
shown. Section IV is also about the detailed performance
comparison of the proposed controller along with the Z-N
tuned PID controller. Finally, the conclusion part is
presented in section V and followed by the references.

II. THE MAGNETIC LEVITATION SYSTEM


A. System Description
The experimental set-up of Maglev system is
manufactured by Feedback Instruments Ltd [6]. This control
system set-up provides the platform to effectively designed
different controller and performs testing in real time using
Matlab and Simulink environment. The Maglev control
system set-up comprising of both mechanical and electrical
Fig. 3. Maglev phenomenological model
units is presented in figure 1.
The nonlinear model equation of the Maglev system [6]
relating the coil current i and the ball position x is following:

= − (1)

where g is the acceleration due to gravity, m is the mass of


ball and k is a constant whose value depends on the
parameters of coil. The Maglev is operational with an
internal control loop which provides the proportional current
to the control voltage. Hence, the relation between control
Fig. 1. Maglev control system set-up
voltage u that is produced for control purpose and the coil
current i [6] is given as:
The Mechanical unit of this system includes an
electromagnetic coil with heat sink, two infra-red sensors,
connection-interface panel and a suspended object that is a = (2)
steel ball. The coil is mounted on top of the mechanical unit
to generate electromagnetic force due to its current. This where k1 is control voltage to coil current gain.
force attracts the object and counteracts the effects of the This nonlinear model equation has to be linearised
gravitational acceleration which cause the object to be around the equilibrium point x0, i0 [9] for analysis and
balanced on the air. The ball position and coil current is controller design purposes. Hence, the linearised model
measured by two infra-red sensors. The electrical unit also transfer function of Maglev system [6], [9] is given below:
plays essential role in Maglev control. They allow the
transferring of measured signals to the computer via an ∆ .
input/output card. The Analogue Control Interface transfers . .= ( ) = = (3)

the control signals from the PC to Maglev and back. The
schematic diagram of Maglev plant is represented in figure where xv is the sensor output (in volts) and u is the control
2 [9]. voltage.
Maglev is a single input single output (SISO) plant in
which control voltage u is the control input signal and ball
position x is the plant output. The state space matrices in
controllable canonical form can be obtained from (3) and
are given by:

0 1
= (4)
2180 0
0
= (5)
Fig. 2. Schematic diagram of Maglev system −3518.85

= [1 0] (6)
= [0] (7) ∗( )=− ∗( ( ), ) (16)

Hence, the state space equations can be written using Using optimal control (16) in Hamiltonian function (15),
(4), (5), (6) and (7) as: optimized Hamiltonian (17) is obtained.

= ∗( ( ), ∗( ), ∗
(8) , )
1
= 2180 − 3518.85 (9) = ( ) ( ) – ∗ ∗
2
= (10) ∗
+ ( ) (17)
where x1 is the state of ball position x , x2 is the state of coil
current i, u is the control input signal and y is the output of The H-J-B equation [17] is represented as
the Maglev plant i.e. ball position x.
∗ ∗( ( ), ∗( ), ∗
+ , )= 0 (18)
III. OPTIMAL CONTROLLER DESIGN
The optimal control design derives a control law or with boundary condition:
signals which cause the dynamical system to achieve a
target or chase the trajectory and also extremize a ∗ ∗ ∗ ∗
( , )= (19)
performance index at the same time [17]. Considering the
Maglev plant dynamics in state variable form which is where F(tf) is expressed as:
described in (8), (9) and (10), the general form of
performance index [17] in terms of the terminal cost 1 0
function S(X(tf),tf), states X(t) and controls u(t) is = (20)
0 0
represented as:
Since, the performance index J (11) is a quadratic
= , + ( ( ), ( ), ) (11) function of the state, therefore the solution can be assumed
as:
where
∗( ( ), ) = ( ) ( ) ( ) (21)
, = (12)
where P(t) is a Riccati coefficient matrix to be determined
( ( ), ( ), ) = which satisfies P(t) = P(t)T > 0 for all values of t.
( ) ( ) + ( ) ( ) (13)
= = ( ) ( ) ( ) (22)
In (11), to and tf are initial and final points respectively.
F is a real, positive semi-definite, symmetric matrix in (12). = = ( ) ( ) (23)
In (13), Q and R are weighting matrices such that Q = QT ≥
0 and R = RT > 0. One of the algorithms for selecting
weights matrices for optimal LQR is presented in [18]. But Therefore, from (19), (20) and (21); the value of P(t)
in this paper, the selection of Q and R weights matrices is obtained at t = tf is
done on the trial and error basis.
1 0
( )= (24)
1 0 0 0
= (14)
0 0
Using assumed solution of performance index (21) with
Considering R = 1 and Q as (14), the first step for (22) and (23) in H-J-B equation (18), following equation is
optimization to form Hamiltonian function H [17] is given obtained which is the Matrix Differential Riccati Equation
as: (MDRE) [17].

( ( ), ( ), ∗
, ) = ( ( ), ( ), ) ( ) = −[ ( ) ] − [ ( )] − [ ]

+ ∗ ( ( ), ) ( )+ ( ) (15) +[ ( ) ( )] (25)

For optimization of H w.r.t. u(t), the necessary condition Then using (23) in (16), the optimal control input signal
is (∂H/∂u)=0 which leads to in terms of voltage is obtained as
∗( )= − ( ) ∗
( ) (26) Hence, the figure 5 clearly shows that the terminal cost
function with the terminating condition is achieved and the
The basic block diagram of closed loop optimal LQR figure 6 and 7 shows that the performance index in terms of
controller with Maglev system is shown in figure 4 in which states and controls is minimized respectively during the
K = {R-1 BT P(t)} and Nbar is the scale factor. Nbar is used to interval of interest. From figure 7, it can be inferred that the
decrease the steady-state error using knowledge of the plant output tracks the reference trajectory when the control input
model and full-state feedback system. The value obtained u*(t) approaches near to zero.
for Nbar is equal to -1.1764 by using Maglev plant dynamics
and considered weighting matrix (14) of the feedback
system.

Fig. 4. Basic block diagram of closed loop optimal LQR


controller with Maglev Plant

A. Finite-time LQR
The main purpose of finite-time optimal LQR is to hold
the states X(t) near to the zero value during the period of Fig. 6. Plot of Optimized state vector X*(t) (in Volts)
time of interest and at the final time tf. Here, the finite-time
interval is considered as [t0 , tf] = [0, 2].
The Riccati coefficient matrix P(t) solution is obtained
by solving the MDRE equation (25) backward in time with
the given final conditions (24) based on analytical solution
[17]. The solutions for the Riccati coefficients for the
considered finite-time interval are plotted in figure 5.

Fig. 7. Plot of optimal control u*(t) (in Volts)

B. Infinite-time LQR
When the final time tf is infinity, then there is no
practical significance of the terminal cost function (12) and
because of this, F(tf) becomes a zero matrix. In this case,
P(t) will be constant and therefore, (t) becomes equal to
Fig. 5. Plot of Riccati coefficients matrix P(t) zero. Now, the MDRE equation (25) becomes

Using the optimal control u*(t) (26), the optimal states [ ]+[ ]+[ ]−[ ]=0 (27)
x1 (t) and x2*(t) is obtained by solving the Maglev plant state
*

equations (8) and (9) forward in time for the given initial On solving equation (27), the value of time independent
conditions [-1.5, 0.762]T Volts [6], [9]. The figure 6 and 7 P matrix is obtained as (28), which is almost equal to the
represents the optimized state vector X*(t) and the optimal steady-state value of time dependent P(t) matrix solution
control u*(t) respectively in Volts. (fig. 5). Therefore,
0.0376 0.0005 tracking performance, the system performance indices like
= (28)
0.0005 0.0000 Integral Time Square Error (ITSE) and Integral Time
Absolute Error (ITAE) are calculated for the step response
Hence, the optimal control u*(t) for infinite-time (fig. 8) for all controllers and is tabulated in Table 2, in
LQR becomes which e(t) is the error expressed as the difference between
actual and desired ball position.
∗( )= − ∗
( ) (29)
TABLE 2. PERFORMANCE INDICES COMPARISION
IV. SIMULATION AND EXPERIMENTAL RESULT Performance Indices
The implementation of the proposed controller designed ITSE ITAE
in the above section with Maglev system is performed in Sl.
Type of Controller
both simulation and hardware model set-up. To validate the No.
∙ ( ) ∙ | ( )|
effectiveness of the proposed controller, the classical PID
controller tuned by Ziegler–Nichols (Z-N) method is also
implemented in both simulation and real time (with 1 0
parameter as kp=9.4085, ki=19.8483, kd=0.05730 [7]). = 0.000224 0.0005268
Infinite- 0 0
1 time
Figure 8 represents the step response comparison of LQR 100 0
Maglev plant with the different configuration controller. = 2.169e-05 5.56e-06
0 0
The experiment is performed with two different selection of
Q weight matrix. Q1 is the old weight matrix as expressed in 1 0
= 0.0005592 0.001128
(14) and Q100 is the new weight matrix obtained by Finite- 0 0
increasing the non-zero elements of (14) by 100 times. 2 time
LQR 100 0
= 1.62e-05 5.193e-05
0 0

3 Z-N Tuned PID 0.0003961 0.01451

As the equilibrium point for position x of the physical


system is at x0 = -1.5 Volts, the reference trajectory or
desired ball position tested for both simulations and real
time is considered to be a square wave signal having mean
value equals to 1.5 Volts. The simulation is run for 5 sec to
observe the clear difference between the tracking responses
of Maglev system with different controller configuration
and simulation result is represented in figure 9.

Fig. 8. Step Response Comparison (Simulation)

TABLE 1. TIME DOMAIN SPECIFICATION COMPARISION


Time Domain
Sl. Specification
Type of Controller Max. Settling
No.
Overshoot Time
(in %) (in sec)

1 0
= 0.368 0.0685
0 0
Infinite-time
1
LQR
100 0
= 3.520 0.0313
0 0

1 0
= 0.027 0.0881 Fig. 9. Simulation-time tracking response of Maglev system with
0 0
Finite-time different controllers (in Volts)
2
LQR
100 0
= 3.345 0.0298 From the above simulink response result, it is observed
0 0
that the performance of optimal LQR with both Q1 and Q100
3 Z-N Tuned PID 18.590 0.6580 weight matrix is better than Z-N tuned PID controller.
However, the performance of LQR system is very much
The time domain specification of Maglev system with improved with the new weight matrix Q100 as compared
the proposed HJB-LQR controller and Z-N tuned PID with the old weight matrix Q1. And the overall performance
controller is compared in Table 1. To observe the better of finite-time LQR optimal controller with the improved
weight matrix Q100 is slightly better than that of infinite- REFERENCES
time. But, large magnitude of weight matrices would require [1] Marjan Golob, Boris Tovornik, “Modelling and control of the
greater control force u(t) which generally corresponds to magnetic suspension system,” ISA Transaction 42, 89-100, 2003.
greater cost (more energy, larger actuator, etc). Therefore, [2] R. G. Rule and R. G. Gilliland, “Combined magnetic levitation and
the proposed finite and infinite-time LQR controller with Q1 propulsion: The mag-transit concept,” IEEE Transactions on
weight matrix having less magnitude is implemented with Vehicular Technology, vol. 29, no. 1, pp. 41-49, Feb 1980.
the hardware set-up of Maglev plant and run in real-time for [3] Walter Barie and John Chiasson, “Linear and nonlinear state space
50 sec with a square wave reference of mean value equals to controllers for magnetic levitation,” International Journal of Systems
Science, Vol. 27, pp. 1153-1163, 1996.
1.5 Volts. The real-time tracking response of Maglev system
[4] Chao-Lin Kuo, Tzuu-Hseng S.Li, Nai Ren Guo, “Design of a Novel
with different configuration controller is shown in figure 10, Fuzzy Sliding Mode Control for Magnetic Ball Levitation System,”
which clearly indicates the better performance of optimal International Journal of Intelligent and Robotic Systems, Vol. 42, pp.
LQR control for Maglev system. 295-316, 2005.
[5] T. H. Wong, “Design of a Magnetic Levitation Control System- An
Undergraduate Project,” IEEE Transactions on Education, vol. E-29,
no. 4, pp. 196-200, Nov. 1986.
[6] Magnetic Levitation: Control Experiments Feedback Instruments
Limited, UK, 2011.
[7] Shekhar Yadav, S. K. Verma, S. K. Nagar, “Optimized PID
Controller for Magnetic Levitation system,” IFAC-PapersOnLine, 49-
1, 778-782, 2016.
[8] Vinodh Kumar E, Jovitha Jerome, “LQR based optimal tuning of PID
controller for trajectory tracking of Magnetic Levitation system,”
Procedia Engineering 64, 254-264, 2013.
[9] Arun Ghosh et al., “Design and implementation of a 2-DOF PID
compensation for magnetic levitation systems,” ISA Transactions 53,
1216-1222, 2014.
[10] Debdoot Sain, Subrat Kumar Swain, Sudhansu Kumar Mishra, “TID
and I-TD Controller Design for Magnetic Levitation System Using
Genetic Algorithm,” Perspectives in Science (2016),
Fig. 10. Real-time tracking response of Maglev system with
http://dx.doi.org/10.1016/j.pisc.2016.04.078
different controllers (in Volts)
[11] Subrat Kumar Swain, Debdoot Sain, Sudhansu Kumar Mishra, “Real
time implementation of fractional order PID controllers for a
V. CONCLUSION Magnetic Levitation plant,” International Journal of Electronics and
Communication (AEU) 78 (2017) 141-156.
In this paper, the optimal LQR controller is designed
[12] Shekhar Yadav, J.P. Tiwari, S. K. Nagar, “Digital Control of
using H-J-B equation for both infinite-time and finite-time Magnetic Levitation System using Fuzzy Logic Controller,”
is proposed for Maglev system. The quadratic form of cost International Journal of Computer Applications (0975-8887), Vol.
function is based on energy consumption. The experiment is 41-No.21, 2012.
successfully carried out in both simulink and real time [13] F. J. Lin, L. T. Teng and P. H. Shieh, “Intelligent Sliding-Mode
hardware set-up. The time response performance of LQR Control Using RBFN for Magnetic Levitation System,” IEEE
Transactions on Industrial Electronics, vol. 54, no. 3, pp. 1752-1762,
controller can be improved according to the desired June 2007.
specifications by the proper selection of weights matrices on [14] D. Cho, Y. Kato and D. Spilman, “Sliding mode and classical
the basis of trial and error method. However, the weight controllers in magnetic levitation systems,” IEEE Control Systems,
matrices of higher magnitude would eventually requires vol. 13, no. 1, pp. 42-48, Feb. 1993.
greater control force u(t) resulting into greater cost (more [15] M. N. Monfared, M. H. Dolatabadi and A. Fakharian, “Nonlinear
optimal control of magnetic levitation system based on HJB equation
energy, larger actuator, etc.) One can also use an algebraic approximate solution,” 2014 22nd Iranian Conference on Electrical
approach for selecting the weighting matrices of LQR based Engineering (ICEE), Tehran, 2014, pp. 1360-1365.
on the desired time domain specification of the system as [16] Donald E. Kirk, “Optimal Control Theory An Introduction,” Dover
the trial and error method seems to be very time consuming. Publication, Inc, Dover edition, 2004.
[17] Desineni Subbaram Naidu, “Optimal Control Systems,” CRC Press
From the comparative study, it is observed that the time LLC, 2013.
response and the tracking performance of Maglev system [18] E. V. Kumar, J. Jerome and K. Srikanth, “Algebraic approach for
with the proposed controllers are found to be much better selecting the weighting matrices of linear quadratic regulator,” 2014
than Z-N tuned PID controller both in simulink and real International Conference on Green Computing Communication and
Electrical Engineering (ICGCCEE), Coimbatore, 2014, pp. 1-6.
time environment. The comparative result also shows that
the finite-time LQR optimal controller performance is
slightly better than that of infinite-time with the proper
selection of weights matrices. In the future, a detailed study
of robustness in presence of model uncertainties or external
disturbances will be incorporated as a scope of further
research.

View publication stats

You might also like