You are on page 1of 6

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882

Volume 3 Issue 1, April 2014

Fuzzy Controller design using LQR Fusion for Magnetic


Levitation System
Shailendra Chauhan1, Himanshu Kumar2, Varunendra Kumar Singh3, Ashis Kumar Behera4
1

Department of Electronics & Communication,IIT Roorkee


2
Instrument Design Development Center, IIT Delhi
3,4
Department of Electronics & Communication, IIT Roorkee

ABSTRACT
One of the principal components of soft computing is
fuzzy logic, and one of the more active areas of fuzzy logic
applications is control systems. The implementation of
fuzzy control is an imitation of the control laws that
humans use. Creating machines to emulate human
expertise in control gives us an opportunity to design
controllers for complex plants whose mathematical models
are not easy to specify. Fuzzy logic controllers serve the
same function as most conventional controllers, but they
manage complex control problems through heuristics and
mathematical models provided by fuzzy logic, rather than
via mathematical models provided by differential
equations [1].The application of fuzzy control to largescale complex systems is not, by no means, trouble-free.
For such systems the number of the fuzzy IF-THEN rules
as the number of sensory variables increases very quickly
to an unmanageable level. When we take into account
more input variables in control system, the number of rules
grows exponentially: if we have l possible values for each
of n variables, we must describe control corresponding to
all possible combinations of input values. Here the
method of sensory fusion is studied in an attempt to reduce
the size of the inference engine for large-scale systems.
This structure reduces the number of rules considerably.
But the adequate parameters should be estimated for the
implementation of this technique. Much reliance has to be
put on the experience of the operator with respect to the
find these parameters. [3] In this work we will find the
estimation of the parameters of the sensory fusion method
using LQR Mapping Based Information Fusion. It is an
appropriate technique to find the parameters in a large
search space. Also in the optimization problems it has
shown efficient and reliable results.
KeywordsFuzzy Controller, Fuzzification,
Magnetic levitation system,matlab

I.

of fuzzy logic applications is control systems. A system


may be called large-scale or complex, if its dimension
(order) is too high and its model (if available) is nonlinear,
interconnected with uncertain information flow such that
classical techniques of control theory cannot easily handle
the system [2]. As the complexity of a system increases, it
becomes more difficult and eventually impossible to make
a precise statement about its behavior. Fuzzy logic is used
in system control and analysis design, because it shortens
the time for engineering development and sometimes, in
the case of highly complex systems, is the only way to
solve the problem. Principle components of a fuzzy
controller are:
A process of coding numerical values to fuzzy linguistic
labels (Fuzzification), inference engine where the fuzzy
rules (expert operators experience) are implemented and
decoding of the output fuzzy decision variables
(Defuzzification). Fuzzy control can be implemented by
putting the above three stages on a chip, on a personal
computer or like. Basic structure of FLC is shown in
Fig.2.1

LQR,

INTRODUCTION

One of the principal components of soft


computing is fuzzy logic, and one of the more active areas
www.ijsret.org

Fig.1 Basic block diagram of FLC

128

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

II.

CONTROLLER THEORY

Linear FLC
In studying the dynamic properties of the fuzzy controller,
the model of the process is needed so that the impact of
the successive control actions may be monitored the
dynamic properties of the closed-loop structure have to be
derived intuitively and experimentally. There are two
main different aspects in the design of Fuzzy-like PD
controllers. The rst aspect includes the structure. Second
aspect is how to optimize the input/output scaling factors
of the Fuzzy-like PD controller. The control surface for a
simple proportional-derivative (PD) controller is a plane in
three dimensions as shown in Fig 2.2

Linear FLC and From Fig 2.5 there is nonlinear


relationship between the input and output of the controller.
Thus Fuzzy controller which has such relationship is called
nonlinear FLC. Nonlinearity handling capability is more
than comparison to the linear FLC.
Two fuzzy sets for the variable error E, change in error EC
in universe of discourse of (-1 3.5) and (-2 4) and for
control output U the universe of discourse (0 1). Defined
membership functions are taken as a triangular for E and
EC and linear for U.
Rules of fuzzy logic controller are taken as:
If E is N and EC is N then U is3.4E+4.1EC
If E is N and EC is P then U is 3.3E-.90EC
If E is P and EC is N then U is 0.3E+3.7EC
If E is P and EC is P then U is 0.5E-4.0EC
Where U is the output of the T-S FLC corresponding to the
above rules for input variables E and EC.

.
Fig.2 Control surface of linear FLC
With the proper choice of the PD gains, the linear PD
controller can easily be made to have the same shape as the
fuzzy controllers like convention controller .this type of
control surface is representing the controlsurface for linear
FLC controller, So nonlinearity handling capacity is not
good enough.
The linear relationship between input/output can be seen
through the Fig.2.3. It is a plot between the error and
control signal of Linear FLC. Linear FLC uses three
membership function Negative (N),Zero (Z),Positive (P)
and have two inputs error (E) and change in error
(EC).Therefore have 9 rules as shown in table().

E
EC
N
Z
P

TABLE 1Rules of Linear FLC


N
Z
NB
NS
Z

NS
Z
PS

Fig.3 Control surface of Non-linear FLC

P
Z
PS
PB

Non-Linear FLC
If the control surface of the FLC is rippled surface as
shown in Fig.2.4 this type of FLC is known as a Non-

Fig. 4 Nonlinear relationship between the input and out of


Non-linear FLC

www.ijsret.org

129

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

III.

SENSORY FUSION METHOD

For the Fuzzy system total number of rules can be given by


= [2]. As an example, inverted pendulum system has
four variables position, velocity, angular position and
angular velocity linguistic variables are NB, NS, Z, PS, PB;
The total number of fuzzy rules will be = 5 = 625
(where; n = 4 & l = 5).
This example shows that the application of fuzzy control to
any system of significant size would result in a
dimensionality explosion. Let another example in which
number of variables of system is 2, and linguistic variables
are just 3 in this case total number of fuzzy rules will be
= 3 = 9 (where; n = 4 & l=5).From these two examples
one can infer, if by any technique if number of variables are
reduced in mathematical operation and if one choose lesser
number of linguistic variables then there will be less
number of the fuzzy rules and this will be a good solution
of dimensionality explosion problem in Fuzzy controller.
The reduction of the dimension of the control problem
consists in decreasing the number of input variables of the
fuzzy controller. This reduction can be obtained by fusion
of the input variables. This method consists in combining
variables before providing them to input of the fuzzy
controller. These variables are often fused linearly. The
coefficients of fusion , ,
and
are positive. Let
there are four input variables , , , that are fused and
has been reduced into two variables ,
=
+
=
+
In Fig.4 fusion method has been used with four states of
inverted pendulum which are after fusion feed to the FLC.
Position (x) and angle (theta) are fused into error (E),
velocity (x dot) and angular velocity (theta dot) are fused
into change error (EC)

Fig. 4 Fusion method with four variables

The reduction of the number of rules is optimal if one can


fuse all the input variables in only one variable associated.
In this case, the number of rules is equal to the definite
number of linguistic labels for this variable. But it is
obvious that all these variables cannot be fused arbitrarily,
any combination of variables has to be reasoned and
explained. In practice only two variables are fused:
generally the error and the change of error. The fusion can
be done through the following rule
E= ae +be ; where and b are constants.
The expression of the fusion function ( ) can be given
as
0
0
( )=
(1)
0
0

Where = ( ) + ( ) + ( ) + ( )
The value of Fusion function after calculation is
( )=
0.38164 0.8776
0
0
0
0.2432

0
(2)
0.15875

IV. LQR MAPPING BASED INFORMATION FUSION

This method uses the characteristics of LQR which


belongs to modern control theory in fuzzy logic. Fuzzy
controller may also be designed for the even for the
complex system through the reduction of the variables.
Inverted pendulum system is a multi-sensor system; multisensor is the basis of information fusion, and multi-source
information is its object. The information fusion is that the
multiple sensor or multi-source information is treated
comprehensively, in order to obtain more accurate and
reliable conclusion [6]. The approximate linear state
equation near the natural upward equilibrium position of
the inverted pendulum system can be obtained after some
assumptions and approximations. It is well known that the
linear system has characteristics of direct integration, so
the inverted system state variables can be changed into
integrated error E and error change EC by constructing a
linear fusion [7] function. The mathematical analysis of
the system and its derivation of the relations between
system inputs and outputs provide the general model
which would be valid for a whole range of systems inputs
and states. On the other hand, there are usually a lot of
unknown constants and relations when performing the
mathematical analysis. Therefore, modelling by
mathematic analysis is suitable for simple controlled
systems with small number of parameters or for obtaining
basic information about the system. The basic functional
building block has been shown in Fig. 1.

www.ijsret.org

130

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

Fig. 5 Block diagram of closed loop system with fusion of


inputs

IV.

MAGNETIC LEVITATION SYSTEM

Magnetic levitation refers to suspending an object in air


without any physical support, just using magnetic force to
counter balance weight of the object and any other force
acting on the object. If magnetic attraction is used it is
called magnetic suspension and if magnetic repulsion is
used the phenomenon is called magnetic levitation. In the
past, magnetic levitation was attempted by using
permanent magnets. Earns haws theorem, however,
proves mathematically that it is impossible to attain a
stable equilibrium using only permanent magnets. Thus
different techniques are used to levitate an object specially
using electromagnet, and controlling the current flowing in
the electromagnet via a feedback loop to stabilize the
system.
Electromagnetic suspension works via the force of
attraction between an electromagnet and the object. If the
object gets too close to the electromagnet, the current in
the electromagnet must be reduced. If the object gets too
far, the current in the electromagnet must be increased to
pull back the object to the equilibrium point.
Electromagnetic levitation works via electromagnetic force
of repulsion and we use feedback in the system in order to
levitate the object.

Fig. 6 shows the schematic diagram of magnetic levitation


system. Assuming the ball is not disturbed by external
forces, the dynamic equation in vertical direction can be
described as,
m = mg F
(3)
In equation (3), F is force due to magnetic field,
F = k(ix) (4)
m = mg k(ix) (5)
Where Magnetic Field Constant k = -0.250AN2Kf
m =mass of ball,
g=acceleration due to gravity,
I = current through the coil,
N=no. of turns in the coil,
R=the resistance
A =cross sectional area of the coil, and
x=
position of the ball levitating in the air.
In equation 5 let us assume the state parameters x1 and x2
as,
x1 = x
x2 = x
Hence, the state equations will be
x2 = g

x1 = x2
(ix )

(6)
(7)

To linearize equation 7 we will use small signal


linearization around the operating point x = x0 and i = i0.
According to small signal linearization, if x = f(x, i) where
f shows a non-linear relationship, then
( , )

( , )

x =
at operating point x +
at operating
point i
Applying equation 7 we will get the following linear state
equations,
x1 = x2
(8)
x2 =

( )

x1

In equation 4 F is force due to magnetic field


F = k(ix)
hence
mx = mg k(ix) (10)

Fig. 6 Schematic diagram of magnetic levitation system

Where Magnetic Field Constant


k = -0.250AN2Kf
m= mass of ball,
g= acceleration due to gravity
i = the current through the coil,
N = no. of turns in the coil,

www.ijsret.org

(9)

131

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

R = the resistance
A = the cross sectional area of the coil, and
x = the position of the ball levitating in the air.
To linearize equation 10 we will use small signal
linearization around the operating point x = x0 and i = i0.
According to small signal linearization,If x = f(x, i) where
f shows a non-linear relationship, then
( , )

controller in real time as well.The linear controllers tend to


be very sensitive to parametric variations, uncertainties,
and disturbances, so nonlinear control scheme preferred to
get the improved performance even in presence of
nonlinearities, disturbances, and uncertainties.

( , )

=
at operating pt. x +
(11)
After applying the operating point condition in equation 11
we will get the following linear state equations
1 = 2 (12)
2 =

( )

(13)

Various values used for simulations have been shown in


the Table 2 given below. Here, it is noticeable that the
operating point (x0, i0) of the magnetic levitation system
indicates that it generates i0=0.61A of currents to levitate
the ball in the air at x0=20mm.

Fig.7 Response of MLS for Non-Linear FLC

TABLE 2. Parameters of Magnetic Levitation System

Fig.8 Response of MLS for Linear FLC

Using values of various parameters shown in Fig. 2.5 and


converting the state space equations (2.21) and (2.22) into
transfer function form, we will get the relationship
between position and current (in terms of voltages) as
shown below,
G(s) = 77.8421(( 0.0311s^2-30.52))

V.

The Fig 7 and Fig. 8show the Non linear and linear FLC
response for magnetic levitation system respectively. It
easily infer that Linear FLC is sluggish and have some
amount of steady state error while Nonlinear FLC is fast
and does not possess steady state error showing Non-linear
FLC is good over Linear FLC.

(14)

RESULTS AND CONCLUSION

Fuzzy Logic Controller has been designed using Sensory


Fusion Method and implemented controller on Magnetic
Levitation System. Sensory fusion is used to reduce the no.
of rules by fusing two inputs into one. The performance of
designed controllers is satisfactory on Magnetic levitation
system in real time as well.Results show the immunity of
the system to noise and robust performance of the

Fig.9 Response of MLS for Non- Linear and Linear FLC


when external noise is applied

www.ijsret.org

132

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 3 Issue 1, April 2014

Fig.10MLS in real time

Fig.11 Real time Simulation error of MLS


Fig. 9shows the response of designed linear and non-linear
fuzzy controllers applied on magnetic levitation system
when system is subjected to a random noise signal at input.
It is clear from the diagrams that non-linear fuzzy
controller works better then linear fuzzy controller as the
response of linear controller deteriorates with time. When
linear fuzzy controller is applied on the system in real
time, the performance of the overall system degrades
drastically where as non linear fuzzy controller shows
good response as shown in Fig. 10 and Fig. 11.

REFERENCES
[1]. Kevin M. Passino, Stephen Yurkovich. Fuzzy
control. Addison Wesley Longman, Inc.1998.
[2]. Q,Z., Xie , W. ,Zhou, Q. Qu, Z., Xie, W., Zhou, Q.:
Variable Composition Based Adaptive Fuzzy Control
of Double Inverted Pendulum. In: IEEE Conference on
Fuzzy System and Knowledge Discovery, vol. 2, pp.
768772 (2010) ariable Composition Based Adaptive

Fuzzy Control of Double Inverted Pendulum. In: IEEE


Conference on Fuzzy System and Knowledge
Discovery, vol. 2, pp. 768772 (2010).
[3]. Wang, L., Zheng, S., Wang, X., Fan, L.: Fuzzy
Control of Double Inverted Pendulum Based on
Information Fusion. In: IEEE International Conference
on Intelligent Control and Information, pp. 327331
(August 2010).
[4]. Y. Han and Y. Liu, Reduced Dimension Fuzzy
Controller Design Based on Fusion Function and
Application in Double Inverted Pendulum, IEEE
International Conference on Industrial Mechatronics
and Automation, 2010, pp. 337340
[5]. B. D.O.AndersonandJ.B.Moore. Optimal Control:
Linear Quadratic Methods.Prentice-Hall, Englewood
Cliffs, NJ, 1990.
[6].Yulia Nikolaevna Ladeneva Automatic estimation
of parameters to reduce rule base of fuzzy control
complex systems, a master thesis in august 2006,
Puebla, Mexico.
[7]. Dario Maravall, Changjiu Zhou. Hybrid Fuzzy
Control of the Inverted Pendulum via Vertical Forces,
International Journal of Intelligent systems,
2005.20:195-211.
[8]. S. Daley and K. F. Gill. Comparison of a fuzzy
logic controller with a P+D control law.Trans. ASME,
Journal of Dynamical System, Measurement, and
Control, 111:128137, June 1989.
[9]. C. C. Chung and J. Hauser, Nonlinear control of a
swinging pendulum, Automatica, vol. 31, no. 6, pp.
851862, Jun. 1995.
[10]. Googol Technology, GT-400-SV Magnetic
Levitation User's Manual,2007 & GT-GL Inverted
pendulum user's Manual 2002.
[11]. Dario Maravall, Changjiu Zhou. Hybrid Fuzzy
Control of the Inverted Pendulum via Vertical Forces,
International Journal of Intelligent systems,
2005.20:195-211.
[12]. T.Ross, Fuzzy Logic in Engineering
Applications. McGraw-Hill, New York, 1995.
[13]. Wang, L. X., A Course in Fuzzy Systems and
Control, Prentice Hall, PTR, Upper Saddle Rive, HJ,
1996

www.ijsret.org

133

You might also like