Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
47
CHAPTER 3
LQR BASED PID TUNING FOR TRAJECTORY
TRACKING OF MAGNETIC LEVITATION SYSTEM
3.1 INTRODUCTION
Magnetic levitation systems have received wide attention recently
because of their practical importance in many engineering systems such as
high-speed maglev passenger trains, frictionless bearings, levitation of wind
tunnel models, vibration isolation of sensitive machinery, levitation of molten
metal in induction furnaces, and levitation of metal slabs during
manufacturing (Almuthari & Zribi 2004). Magnetic levitation (maglev)
technology reduces the physical contact between moving and stationary parts
and in turn eliminates the friction problem. However, Maglev systems are
inherently nonlinear, unstable and are described by highly nonlinear
differential equations which present additional difficulties in controlling these
systems (Hajjaji & Ouladsine 2001). So the design of feedback controller for
regulating the position of the levitated object is always a challenging task. In
recent years, many methods have been reported in the literature for
controlling magnetic levitation systems. The feedback linearization technique
has been used to design control laws for magnetic levitation systems (Barie &
Chaisson 1996). The input-output, input-state, and exact linearization
techniques have been used to develop nonlinear controllers (Charara et al
1996). The current control scheme was employed for the control purpose
instead of the conventional voltage control by Oliveira et al (1999). Control
48
laws based on the gain scheduling approach (Kimand & Kim 1994), linear
controller design (Rifai & Youcef 1998), and neural network techniques
(Lairi & Bloch 1999) have also been used to control magnetic levitation
systems.
Classical optimal control theory has evolved over decades to
formulate the well known LQR, which minimizes the excursion in state
trajectories of a system while maintaining minimum controller effort. This
typical behavior of LQR has motivated control designers to use it for the
tuning of PID controllers (Das et al 2013). PID controllers are most common
in process industries due to its simplicity, ease of implementation and
design problem reduces to the ARE which is solved to calculate the state
feedback gains for a chosen set of weighting matrices. These weighting
matrices regulate the penalties on the deviation in the trajectories of the state
variables (x) and control signal (u). Indeed, with an arbitrary choice of
weighting matrices, the classical state-feedback optimal regulators seldom
show good set-point tracking performance due to the absence of integral term
unlike the PID controllers. Thus, combining the tuning philosophy of PID
controllers with the concept of LQR allows the designer to enjoy both optimal
set-point tracking and optimal cost of control within the same design
framework. The objective of this work is to present a PID controller tuning
approach via LQR based on dominant pole placement method. PID tuning
based on LQR method is tested on a benchmark magnetic levitation system
for trajectory tracking application, and the performance of the controller in
tracking the reference trajectory is assessed using various test signals.
3.2 MAGNETIC LEVITATION SYSTEM MODEL
Magnetic levitation systems are electromechanical devices which
suspend ferromagnetic materials using electromagnetism. The schematic
49
diagram of the magnetic levitation system is shown in Figure 3.1. A steel ball
in a magnetic levitation system is levitated in mid air by controlling the
current applied to the coils. The maglev system consists of an electromagnet,
a steel ball, a ball post, and a ball position sensor.
Figure 3.1 Magnetic levitation system diagram
Figure 3.2 Block diagram of closed loop magnetic levitation system
Figure 3.2 illustrates the overall block diagram of magnetic
levitation system. The entire system is encased in a rectangular enclosure
which contains three distinct sections. The upper section contains an
electromagnet, made of a solenoid coil with a steel core. The middle section
consists of a chamber where the ball suspension takes place. One of the
electro magnet poles faces the top of a black post upon which a one inch steel
50
ball rests. A photo sensitive sensor embedded in the post measures the ball
elevation from the post. The last section of maglev system houses the signal
conditioning circuitry needed for light intensity position sensor. The entire
system is decomposed into two subsystems, namely, mechanical subsystem
and electrical subsystem. The various parameters of magnetic levitation
system are given in Table 3.1. The coil current is adjusted to control the ball
position in the mechanical system, where as the coil voltage is varied to
control the coil current in an electrical system. Thus, the voltage applied to
the electromagnet indirectly controls the ball position. In the following
section, the nonlinear mathematical model of the maglev system is obtained
and linearized around the operating region in order to design a stabilizing
controller.
Table 3.1 Magnetic levitation system parameters
Symbol Description Value
Lc Coil inductance 412.5mH Rc Coil resistance Nc Number of turns in the coil wire 2450 lc Coil length 0.0825m rc Coil steel core radius 0.008m Rs Current sense resistance Km Electromagnet force constant 6.5308E-005 rb Steel ball radius 1.27E-002 m
Mb Steel ball mass 0.068kg Kb Ball position sensor sensitivity 2.83E-003 m/V g Gravitational constant 9.81 m/s2
51
3.3 MATHEMATICAL MODEL OF MAGLEV SYSTEM
Figure 3.3 Schematic of the maglev plant
the electrical circuit shown in Figure 3.3
( ) dV R R I L Ic cc c s dt (3.1)
The transfer function of the circuit can be obtained by applying
Laplace transform to Equation (3.1)
( )( ) 1( ) cI s Kc cG sc sV sc (3.2)
where
1Kc R Rc s and
Lcc R Rc s
52
3.3.1 Equation of Motion of a Ball
The force applied on the ball due to gravity can be expressed by
F M gg b (3.3)
Force generated by the electromagnet is given by
212 2
K Im cFc xb (3.4)
The total force experienced by the ball is the sum of Fg and Fc
212 2
K Im cF F M gc g bxb (3.5)
can be obtained as
2 212 22
d x K Ib m c gM xdt b b (3.6)
At equilibrium point, all the time derivative terms are set to zero.
21 02 2K Im c gM xb b (3.7)
From Equation (3.7), the coil current at equilibrium position, 0cI ,
can be expressed as a function of 0xb and Km .
53
2
0 0M gbI xc bKm (3.8)
The electromagnet force constant, Km , as a function of the nominal
pair 0 0( , )b cx I , can be obtained from Equation (3.7).
22 020
M gxb bKmIc (3.9)
The nominal coil current 0cI for the electromagnet ball pair can be
obtained at the static equilibrium point of the system. The static equilibrium at
a nominal operating point 0 0( , )b cx I is characterized by the ball being
suspended in air at a stationary point 0xb due to a constant attractive force
created by 0cI .
3.3.2 Linearization of EOM
In order to design a linear controller, the system must be linearized around equilibrium point where the suspension of ball takes place. The nonlinear system equations are linearized around the operating point using
0 0( , )b cx I to
Equation (3.6),
2 2 2 111 0 0 0 12 2 3 22
0 0 0
d x K I K I xm m b K I Ib c c m c cgM x M x M xdt b b bb b b (3.10)
Substituting Equation (3.9) into Equation (3.10)
22 21 1 1
2 0 0
d x gx gIb b cx Ib cdt (3.11)
54
Applying Laplace transform to Equation (3.11)
2( ) 2 2
Kb bG sb s b (3.12)
where
00
xbKb Ic and 2
0g
b xb
The open loop transfer function of a maglev system is a type zero,
second order system. The two open loop poles of the system are located at
s b . Location of pole on the right half of the s-plane proves that the open
loop system is unstable in nature. Thus, the feedback controller is necessary
for stabilizing the system. In this work, a PID controller combined with the
feed forward component is designed to not only levitate the ball but also to
make the ball follow the reference trajectory.
3.4 PID PLUS FEED FORWARD CONTROLLER DESIGN
The objective of the control strategy is to regulate and track the ball
position in mid-air. The control scheme should regulate the ball in such a way
that in response to a desired 1mm square wave position set point, the ball
position response should satisfy the following performance requirements.
1. Percentage overshoot 15%
2. Settling time 1s
The proposed control scheme, as shown in Figure 3.4, consists of a
PID controller with a feed forward component. The gain of the feed forward
controller is determined based on the equilibrium point at which the ball
55
suspends in mid air. Three separate gains are used in PID controller design,
which introduces two zeros and a pole at origin so that the entire system
becomes a Type 1 system, allowing for zero steady state error. The objective
of the feed forward control action is to compensate for the gravitational bias.
When the PID controller compensates for dynamic disturbances around the
linear operating point 00( , )cbx I , the feed forward control action eliminates the
changes in the force created due to gravitational bias.
Figure 3.4 PID plus Feed forward control loop for ball position control
The dynamics of the electromagnet is taken into account while
obtaining the following open loop transfer function ( )mG s , which relates the
output variable (ball position) and the input variable (coil current).
02
0
2( )( ) ( ) 2des
b cc
b
gIx sG sm I s gsx (3.13)
The current feed forward action is represented by
_ _I K xc ff ff b des (3.14)
56
and
1 _I I Ic c c ff (3.15)
At equilibrium point, 0x xb b and 0I Ic c . Thus, the feed forward
gain is given by
0
0
IcK ff xb (3.16)
The closed loop transfer function of the system is
2 (( ) )( )( )
( ) 2 2 223 2( )00 0 00
g K K s Kx s p iffbG sc x s gK gK gKg pbdes d iI s s sc I x I Ic c cb (3.17)
The normalized characteristic equation of electromechanical system is
2 2 223 2 00 0 00
gK gK gKg pd is s sI x I Ic c cb (3.18)
3.5 LQR BASED PID TUNING
Figure 3.5 LQR based PID tuning of second order magnetic levitation
system
57
LQR design technique is well known in modern optimal control theory and has been widely used in many applications (Lewis & Syrmos 1995). It has a very nice stability and robustness properties. If the process is of single-input and single-output, then system controlled by LQR has a minimum phase margin of 60o and an infinite gain margin, and this attractive property appeals to the practicing engineers. Thus, the LQR theory has received considerable attention since 1950s. Optimal control theory has been extended to PID tuning in the recent years. Saha et al (2012) have proposed a methodology for tuning PID controller via LQR for both over-damped and critically damped second order systems. They also suggested that one of the real poles can be cancelled out by placing one controller zero at the same position on the negative real axis in complex s-plane. So, the second order system which is to be controlled with a PID controller can be reduced to a first order system to be controlled by a PI controller. However, this approach is not valid for lightly damped processes because a single complex pole of the system cannot be removed with a single complex zero of controller, as they are in conjugate pairs. To address this issue, Das et al (2013) have given a formulation for tuning the PID controller gains via LQR approach with guaranteed pole placement. In this work, the idea has been extended to a magnetic levitation system which has two control schemes such as PID controller and feed forward controller. In this approach, the error, error rate and integral of error are chosen as state variables to obtain the optimal gains of the PID controller.
Let the state variables be
1( ) ( )x t e t dt 2 ( ) ( )x t e t 3( ) ( )dx t e tdt (3.19)
From Figure 3.5,
2 2( ) ( )( ) ( )2 ( )o o o
n n
Y s K E sU s U ss s (3.20)
58
In the state feedback regulator design, the external set point does not affect the controller design, so the reference input is zero (r(t)=0) in Figure 3.5. When there is no change in the set point, the relation y(t)=-e(t) is valid for standard regulator problem. Thus, Equation (3.20) becomes,
2 22 ( ) ( ) ( )o o on ns s E s KU s (3.21)
Applying inverse Laplace transform,
22 ( )o o on ne e e Ku (3.22)
Thus the state space representation of the above system is of the form
1 1
2 22
3 3
0 1 0 00 0 1 0
0 ( ) ( 2 )o o on n
x xx x ux x K
(3.23)
From Equation (3.23), the system matrices are
2
0 1 00 0 1
0 ( ) ( 2 )o o on n
A
00BK (3.24)
The following quadratic cost function which weighs both control input and state vector is minimized to obtain the optimal gains.
0
( ) ( ) ( ) ( )T TJ x t Qx t u t Ru t dt (3.25)
The minimization of above cost function gives the optimal control input as
1( ) ( ) ( )Tu t R B Px t Fx t (3.26)
59
where 1 TF R B P and P is the symmetric positive definite solution of the
following Continuous Algebraic Riccatti Equation (CARE).
1 0T TA P PA PBR B P Q (3.27)
The weighting matrix Q is a symmetric positive definite and the
weighting factor R is a positive constant. In general, the weighting matrix Q is
varied, keeping R fixed, to obtain optimal control signal from the linear
quadratic regulator. The corresponding state feedback gain matrix is
11 12 131 1 1
12 22 23 13 23 33
13 23 33
0 0Tpi d
P P PF R B P R K P P P R K P P P K K K
P P P (3.28)
The corresponding expression for the control signal is
1
2
3
( )( ) ( ) ( ) ( ) ( ) ( )
( )p pi id d
x tdu t Fx t K K K x t K e t dt K e t K e tdt
x t (3.29)
The third row of symmetric positive definite matrix P can be obtained in terms of PID controller gains as
13 1iK
PR K 23 1
pKP
R K 33 1dK
PR K (3.30)
The closed loop system matrix for the system given in Equation
(3.24) with state feedback gain matrix represented using Equation (3.28) is
1 2 2 1 2 1 213 23 33
0 1 00 0 1
( ) (( ) ) ( 2 )c
o o on n
A
R K P R K P R K P (3.31)
60
The corresponding characteristic polynomial for the closed loop system is
( ) 0cs sI A3 2 1 2 2 1 2 1 2
33 23 13(2 ) (( ) ) 0o o on ns s R K P s R K P R K P (3.32)
The characteristic polynomial of closed loop system in terms of the
desired damping ratio and natural frequency is given by,
3 2 2 2 2 3( (2 ) (( ) 2 ( ) ( ) ) ( ) ) 0c c c c c c cn n nns s m s m m (3.33)
On equating the coefficients of Equation (3.32) with Equation (3.33),
1 233
2 1 2 2 2 223
1 2 2 313
(2 ) (2 )
( ) ) ( ) 2 ( ) ( )
( ) ( )
o o c cn n
o c c cn n n
c cn
R K P m
R K P m
R K P m (3.34)
The elements of the third row of matrix P are determined by
knowing the open loop process characteristics ( , , )o on K and desired closed
loop dynamics ( , , )c cn K .
2 3
13 1 2
2 2 2 2
23 1 2
33 1 2
( ) ( )
( ) 2 ( ) ( ) ( )
(2 ) 2
c cn
c c c on n n
c c o on n
mP
R Km
PR K
mP
R K (3.35)
by solving the ARE given in Equation (3.27). With the known third row
elements of P matrix the other elements of P and Q matrices can be obtained
as follows.
61
2 1 211 13 13 23
1 212 13 13 23
1 2 222 23 23 33 33 13
( )
2
2 ( )
ono o
no o o
n n
P P R K P P
P P R K P P
P P R K P P P P (3.36)
1 2 21 13
1 2 2 22 23 12 23
1 2 23 33 23 33
2( ( ) )
2( 2 )
ono o
n
Q R K P
Q R K P P P
Q R K P P P (3.37)
3.5.1 Design Steps
Step 1: Specify both the open loop characteristics ( , , )o on K and the
desired closed loop system dynamics ( , , )c cn K .
Step 2: Choose the weighting factor R in LQR and determine the weighting
matrix Q using Equation (3.37).
Step 3: Obtain the transformation matrix P, solution of ARE, using
Equation (3.35) and Equation (3.36).
Step 4: Calculate the system matrices A and B as specified in
Equation (3.24)
Step 5: Determine the solution of state feedback control using Equation
(3.28) and obtain the PID controller gains.
3.6 SIMULATION RESULTS
Numerical simulations are carried out to evaluate the performance
of the proposed LQR based PID tuning for magnetic levitation system using
62
MATLAB. The simulink block diagram of the overall closed loop system is
shown in Figure 3.6. The open loop parameters of magnetic levitation system
are found to be K=7, 1.8on , and the desired parameters of the closed loop
system which satisfy the controller specification given in section 3.4 are
0.8c , 1.4cn , and m=9. Based on the closed loop requirements of the
system given in terms damping ratio and natural frequency, the gains of the
PID controller are determined using the LQR weighting matrices approach as
presented in the above section. The corresponding system matrices are found
to be
0 1 00 0 10 3.24 0
A
007
B
The resultant state feedback gain matrix obtained by solving the ARE is
65.8 28.14 5.03 pi dF K K K
At the beginning of the simulation, the magnetic ball started in a
certain arbitrary position and was controlled to track the desired trajectory.
Figure 3.7 shows the simulation result of a set point change of the position
from 6mm to 8mm, and it is observed that the ball position response has a
settling time of 0.8s and an overshoot of 7%, which suggest that the design
requirement of the system are met with the above controller gains.
63
Figure 3.6 Simulink block diagram of PID plus feed forward controller
Figure 3.7 Simulated ball position response
3.7 EXPERIMENTAL RESULTS
The experimental set up, as shown in Figure 3.8, consists of a
control algorithm is realized in the PC using the real time algorithm, QUARC,
which is similar to C like language. The sampling interval is chosen to be
0.002s, and in order to attenuate the high frequency noise current which
64
increaes the oscillation in steel ball beyond the 6mm range, a low pass filter
of cut off frequency 80Hz is added to the ball position sensor output.
Furthermore, by differentiating the ball position, the ball vertical velocity is
estimated.
Figure 3.8 Snap shot of magnetic levitation experimental set up
3.7.1 Trajectory Tracking
Three signals namely square, sine and saw-tooth signals with a
frequency of 1 Hz is chosen as reference signals to test the trajectory tracking
performance of the controller. Figure 3.9, 3.10, and 3.11 show the results for
trajectory following. Figure 3.12 shows the response of coil current, which
tracks the specified command to make the ball follow the reference trajectory.
Figure 3.13 depicts the coil input voltage V(t), and it can be observed that the
amount of voltage supplied to the coil is comparatively high at the beginning
because of the unstable nature of the system, and it is worth to note that the
coil voltage is restricted to 8V during the stabilization phase. Figure 3.14
shows the tracking error, which is the difference between actual trajectory and
reference trajectory. The performance indices namely IAE, ITAE, ISE and
ITSE are considered to evaluate the performance of the controller, and they
65
are given in Table 3.2. Reduced tracking error suggests that the position of the
magnetically levitated ball quite accurately tracks the desired trajectory.
Figure 3.9 Square wave trajectory
Figure 3.10 Sine wave trajectory
66
Figure 3.11 Saw tooth trajectory
Figure 3.12 Coil current response
67
Figure 3.13 Coil voltage response
Figure 3.14 Trajectory tracking error
68
Table 3.2 Performance indices of LQR based PID tuning method
IAE ITAE ISE ITSE
0.0041 0.1252 0.000017 0.000015
3.8 CONCLUSION
A combined design approach of PID tuning with LQR has been
applied for a trajectory tracking application of magnetic levitation system.
Conventional PID controller design has been formulated as a LQR problem
for the control of second order oscillatory system. For levitating the ball, the
conventional PID controller is combined with the feed forward controller in
order to nullify the effect of gravitational bias existing in the magnetic
levitation system. The non linear mathematical model of the plant from
fundamental physical laws has been obtained and the non linear equation has
been linearized around the equilibrium point using Taylor's series. Combining
the tuning philosophy of PID controllers with the concept of LQR theory, the
simple mathematical gain formulae has been formulated to obtain the
satisfactory response. The experimental results demonstrated the effectiveness
of the proposed approach not only in stabilizing the ball but also in tracking
the various reference trajectories given as an input.