PID Controller Design For A Magnetic Levitation System Using An Intelligent
PID Controller Design For A Magnetic Levitation System Using An Intelligent
1 ,2
Computer Engineering Department, 3 Electrical Engineering Department
1 ,2 ,3
Faculty of Engineering, Mustansiriyah University
Baghdad, Iraq.
Abstract – Magnetic Levitation System (MLS) parameters can be tuned using different controlling techniques. Magnetic levitation
systems are used to levitate objects by using attraction force or repulsive force between magnetic force and ferromagnetic material.
The levitation of an object is possible using a control system to help stabilize the magnetic force. This paper investigates a
controlling technique for a MLS. The numerical model of the system shows that it has high non-linearity and inherent instability.
Different Controlling Methods were applied. A Proportional-Integral-Derivative (PID) controller is tuned using Neural Network
(NN) and Genetic Algorithm (GA) due to their ability to control nonlinear plants. The results show better performance of the MLS
when NN and GA are used, compared to other classical methods.
Keywords - MLS model, PID controller, LQR controller, IMC controller, NN controller, GA controller, Matlab/Simulink.
d2x
m K i (i - x 0 ) K x (x - x 0 ) (8)
dt 2
The voltage equation of the electromagnetic coil is
given by:
U ( t ) R i ( t ) L(d i / d t ) (9)
Where (L) is the static inductance between the ball and
attractive field. In system demonstrating, the input is the
control current of the electromagnet, the effect of
inductance isn't considered here. Expect the power
enhancer yield current is entirely straight with input
voltage immediately. The system can be portrayed by
Figure1. MLS Configuration [3]. following condition, mg = - K(i 0 - x 0 ) 2 , subsequent to
taking Laplace change and putting limit condition ,the
system open mathematical model is:-
d2 x
m F(i, x) + mg (1)
dt 2 d2x 2Ki 0 2Ki 2
Where, (x) is the air hole between the ball and the m K i (i - i 0 ) K x (x - x 0 ) i 30 x (10)
dt 2 x0 x
magnet, (m) is the mass of steel ball, (i) is current in
electromagnet and force is generated and can be given 2ki 0 2ki 02
x (s)s 2 i(s) - x (s) (11)
using following equation, (g) is acceleration speed of mx 02 mx 30
gravity. When the control current goes over the winding, x (s ) -1
(12)
electromagnetic power is created and can be given using i(s) As 2 - B
the following condition:
Where A i 0 , B i 0 characterize the input
F(i,x)=K(i/x) 2 (2) 2g x 0
Where K is constant, depending on physical parameters. variable as the input voltage of the power amplifier Uin ,
F(i,x) is the attraction power, the current (i) and air hole output variable as the output voltage Uout, the System
control object model can be described as:-
(x) are nonlinearly related. For the controller
k
configuration, the system can be linearized using linear ( s )
Uout(s) ks x(s) ka
hypothesis, first at balance point (i0, x0). Now Taylor’s G(s) (13)
Uin(s) kai x(s) As2 - B
expansion of (2), ignore higher order terms, then
F(i,x) F(i0 , x0 ) Fi (i0 , x0 )(i- i0 ) Fx (i0 , x0 )(x- x0 ) (3) Then the system state variables are x 1 Uout ,
In which F(i0 , x 0 ) is the magnetic force equal to the x 2 Uout and the system state equations are as:-
ball gravity force, when the air gap is x 0 and the current 0 1 x 0
x 1 2g 1 2gK s U in (14)
is i0 . 0 x
2
x 2 x 0 i0Ka
F(i 0 , x 0 ) mg (4)
1
C3 (s) k p (1 d Df (s)) k p k i k d Df (s) (17)
i s
C4 (s) kp ( dDf (s)) kp kdDf (s) (18)
values, in equation (17), and for C 4 controller (FF) 2DOF PID structure. The response requires more
let 0.6 , Figure (4) shows the SIMULINK block- tuning, to reduce the settling time, but this may increase
the overshoot.
Diagram, and Figure (5) shows the transient response of
1 0
R 1; and Q
0 1
Using MATLAB LQR statement, the optimal K is
equal to: K= [1.4664 1.0006]. Figure (6) shows closed
loop response with (LQR Controller).
feedback structure .The input setup is appeared in Figure IV. THE INTELLIGENT ALGORITHMS FOR
(7). In the IMC plan, the controller, Gc(s), is construct ENHANCING THE RESPONSE OF THE SYSTEM
specifically with respect to the "great" some portion of the
system under control[24].The transfer function of NN and GA are used to optimise the attributes of the
controller Gc(s) is:- PID controller, to obtain the required response for the
(MLS).The two methods are explained in follows.
1
G o (s) G p (s) -1 (20) A. NN Algorithm
(s 1) n
The NN processes the information of the system with
many properties as biological NN [25]. The intelligent
controller can estimate the behaviour of the system to
produce the desired response .The most familiar network
used is feed forward NN [26].
The NN is divided into three main layers:
1- The input layer: It takes the data to be processed
through the network. The required output of the MLS at a
time is input to the NN controller during different time.
2- The hidden Layer: In this layer by the activation
functions processing the data that take from input layer.
3-The output layer: Each neuron at the hidden layer is
connected with weights to all neurons at the output layer.
Figure7. The IMC feedback configuration [24]. The tan sigmoid (tansig) activation function is considered
here for the MLS is. The structure of NN is shown in
Figure (9).
The IMC detailing for the most part results about just
a single tuning parameter, the closed loop time constant
( ) , the IMC filter factor. The filter order (n) is selected
large enough to achieve proper Gp(s). Choose n=2 and
=0.01. Figure (8) shows the closed-loop response for
(IMC), the response is satisfactory, but at one second the
response is out of control, due to unstable poles at high
frequency. ( ) can be adjusted to obtain the bandwidth
and the stability required for the closed loop system.
layer, k and q represent the number of input layer controller. In this structure, the same parameters of the
neurons. PID controller are used, which are obtained from using
The control action (U) represents the output of the 2DOF PID controller. Figure (12) shows the response of
NN, which applied to the plant (MLS). In this structure, the system using the proposed NN controller.
the input signals to the NN are Z1, Z2 and Z3 from the
PID controller. S1 and S2 are fed from the NN. The block
diagram of the PID-NN controller for the MLS is shown
in Figure (10). The NN is used to control the MLS
directly. The NN controller has two inputs, the first input
is the feedback from the NN and second input is the
output of the PID controller .The optimized control action
is applied to the plant to obtain the required response with
small values of overshoot and settling time.
Figure (11) shows the Simulink model of the PID -
NN controller for the MLS. This NN is self-learning, Figure 10. A block diagram of PID - NN controller for MLS.
there is no need to modify the activation function or
neural block, if the reference input is changed. The NN
controller receives data from the output of same block
with the output of the PID controller as inputs to
B. GA
GA follows the natural evolution for Drawin theory
"The survival of the fittest". In 1975 John Holland
proposed the GA for the first time In GA, the smallest
unit of data is the gene, the data which carried by a set of
genes is called individual, and population is a set of
individuals, synonyms are chromosome and individual
[27]. GA is used to choose the optimum parameters of the
PID controller to obtain the desired response of the
system. The process of optimisation is calculated by
maximisation of the fitness function (F) which is the
mean error between the current value of the system output
and the desired reference:
1 T
MSE
0 ∫
(e( t )) 2 dt (23)
A block diagram of PID-GA is shown in Figure (13), The optimisation is achieved in iterations form called
to apply GA, the chromosome elements (Kp, Kd, Ki) of generations, and creates a new set of chromosomes at
PID controller is set. each generation through crossover and mutation and the
best chromosomes are allowed to the next generation. In
this work GA parameters are chosen according to the trial
and error method as follows:
V. DISCUSSION
PID 1.3 0 0
LQR 5.3 0 0
IMC 0.1 Infinity(after1sec) infinity
PID - NN 0.378 0.108% 0
PID - GA 0.009 0 0
Kp = 155.7678, Kd = 28.9475, and Ki = 489.8021. [10] D. Hall and B. Samanta,” Nonlinear Control of a Magnetic
Levitation System Using Single Multiplicative Neuron
Models”, ASME International Mechanical Engineering Congress
When comparing the proposed method PID-GA, with and Exposition, San Diego, California, USA, November , 2013.
the same system equation. (16) in [1] and [19], using [11] J. Jesús ,et al. “Modeling and control with neural networks for a
intelligent controller (fuzzy logic controller), it is clear magnetic levitation system”, in Elsevier Neurocomputing,
vol.227, pp.113-121, 2017.
that the design specifications (Max. overshot, settling [12] Arun K. and Veena S. , “ANN approach for Magnetic Levitation
time, and rise time) are better. stabilization using gradient and Quasi Newton learning”, in IEEE
Students Conference on Engineering and Systems (SCES) ,
VI. CONCLUSIONS Allahabad, India ,2014.
[13] Z. Daghooghi ,et al.” A real-time control of maglev system using
neural networks and genetic algorithms”,in IEEE International
This paper presents a controlling method for the Conference on Industrial Technology (ICIT), Athens, Greece,
(MLS), where different approaches are proposed. The 2012.
proposed methods are PID, state-space approach, LQR [14] I. Ahmad, M. Shahzad and P. Palensky,” Optimal PID control of
Magnetic Levitation System using Genetic Algorithm”,in IEEE
and IMC, are measured, in every one of these techniques, Energy Conference (ENERGYCON), Cavtat, Croatia, 2014.
the transient plan details are not met, exceptionally in [15] D.Sain,S. Kumar and S. Kumar,” TID and I-TD controller design
settling time (response speed), as shown in Table (1). for magnetic levitation system using genetic algorithm”,in
The NN controller system for the MLS is proposed. Elsevier Perspectives in Science, Vol. 8, pp. 370-373, 2016.
[16] Googol Technology Ltd, GML series Magnetic Levitation System
The neural system structure is self-learning and User Manual and Experimental Book, 2007.
straightforward. The response of the MLS with the NN [17] Anupam Kumar, Vijay Kumar "Design and Implementation of
controller is better than the traditional PID, providing fast IT2FLC for Magnetic Levitation System”, Advances in Electrical
response, with small estimation of overshoot. There is no Engineering Systems (AEES) 116Vol. 1, No. 2, 2012.
[18] C.J. Munaro, M.R. Filho," Modeling and Observer-Based
need to compare the proposed methods with the IMC Nonlinear Control of a Magnetic Levitation System”, Proceedings
since the steady-state error and overshot are infinity after of the 2002 IEEE International Conference on Control
one second. The PID-GA method results are the best Applications,pp.162-167, September 2002.
among other methods. However, the PID-GA [19] Shailendra Chauhan1, HimanshuKumar,”Fuzzy Controller design
using LQR Fusion for Magnetic Levitation System,” IJSRET,
improvement is sensitive to the reference which used. Volume 3, Issue 1, April 2014.
PID-GA appears to offer the most encouraging result. [20] M. A. Johnson and M. H. Moradi, “PID Control,” Springer-
Verlag, London, 2005.
REFERENCES [21] Mituhiko Araki and Hidefumi Taguchi,” Two-Degree-of-Freedom
PID Controllers”, International Journal of Control, Automation,
and Systems Vol. 1, No. 4, December 2003
[1] Anupam Kumar, Vijay Kumar "Design and Implementation of [22] Alvaro Romero Acero1, Alejandro Marín Cano1 ,” Modeling and
IT2FLC for Magnetic Levitation System”, Advances in Electrical Simulation of LQR and LFSV Controllers in the Magnetic
Engineering Systems (AEES) 116Vol. 1, No. 2, 2012. Levitation System (MLS)”, 2014 III International Conference of
[2] Santanu Kumar Pradhan, Bidyadhar subudhi, " Nonlinear Control Engineering Mechatronics and Automation (CIIMA).
of a Magnetic Levitation System Using a New Input-Output [23] Engr. Sadaqat Ur Rehman1, Engr. Muhammad,” Linear Quadratic
Feedback Linearization ", IFAC-PapersOnLine 49-1 (2016) 332– Regulator controller for Magnetic Levitation System,” (IJCSSE),
336. Volume 4, Issue 1, January 2015.
[3] Anupam Kumar, Manoj Kumar Panda, and Vijay Kumar , "Design [24] Adrian-Vasile, Mircea Dulău,Stelian-Emilian Oltean,"IMC based
and Implementation of Interval Type-2 Single Input Fuzzy Logic PID Control of a Magnetic Levitation System", 9th International
Controller for Magnetic Levitation System",Proceedings of Conference Interdisciplinarity in Engineering, INTER-ENG 2015,
ICAdC, AISC 174, pp. 833–840., Springer India 2013. 8-9 October 2015, Tirgu-Mures, Romania ,ELSEVIER..
[4] R. Lakshman Kumar Reddy,” Different Controlling Methods And [25] P. Kumar and K.P.Singh,”Comparative Analysis of Air
PID Controller Design For Magnetic Levitation System”, Conditioning System Using PID and Neural Network Controller”,
IJAREEIE, Vol. 2, Issue 12, December 2013. in International Journal of Scientific and Research Publications,
[5] Kashif Ishaque,, Yasir Saleem, “Modeling and control of magnetic Vol. 3, Issue 8,2013.
levitation system via fuzzy logic controller”, IEEE,2011. [26] N. Safaa.” Improve the Performance of PID Controller by Two
[6] De-sheng, Liu Li,Wen-Sen,Chang,” Internal Model Control For Algorithms for Controlling the DC Servo Motor”, Baghdad
Magnetic Suspension System”, Proceedings of the Fourth Journal of Engineering, No. 1 ,Vol. 22, January ,2016.
International Conference on Machine Learning and Cybernetics, [27] G. Joshi,” Review of Genetic Algorithm: An Optimization
Guangzhou, 18-21 August 2005. Technique”, International Journal of Advanced Research in
[7] Shabeer Ali K P, Sanjay Sharma, Dr.Vijay Kumar, "Comparison Computer Science and Software Engineering”, Vol. 4, Issue 4,
Of Interval Type-2 Fuzzy Controller And Self Tuning Interval April ,2014.
Type-2 Fuzzy Controller For A Magnetic Levitation
System",IJERT, Vol. 2 Issue 6, June – 2013.
[8] S.Zhao and X.Gao “Neural network adaptive state feedback
control of a magnetic levitation system”,in IEEE Control and
Decision Conference (CCDC), Changsha, China,2014.
[9] M.Aliasghary,et al.” Magnetic Levitation Control Based-on
Neural Network and Feedback Error Learning Approach”,in
IEEE International Conference on Power and Energy (PEC ),
Johor Baharu, Malaysia ,December, 2008.