Upload
gaqf
View
4
Download
0
Tags:
Embed Size (px)
DESCRIPTION
articulo
Citation preview
1
Abstract: In this paper, four controllers are compared in order to levitate a steel sphere in
a SISO magnetic levitation plant. Comparisons between the controllers designed with
current estimator and current sensor are made experimentally. Simulations of the
controlled nonlinear dynamic system are shown in MATLAB and the current and position
behavior is addressed. The first two controllers are implemented and designed using a PD
controller. The other two controllers are designed in the state space using pole placement
and the linear quadratic regulator. All these controllers as well as the position sensor and
the coil inductance measurements were designed and implemented using the ds1104
board. All this work was done to validate the control methods studied in courses such as
classical and digital control usually offered in Electrical Engineering programs.
1 Introduction
The control study of a one dimensional system can lead to many fields of research such as:
control systems education [1]-[4], modern and classical control [4], nanopositioning [5], cellular
manipulation [6], design of electromagnetic actuators [7], control of maglev train systems [8],
Intelligent control [11]. This ample number of choices might show to undergraduate as well as
graduate students the importance of interdisciplinarity to develop or design a plant and its
possible controllers.
In paper [1], a PWM control is designed using an analog PD controller. In paper [4], a
quadratic optimal controller is designed. In this paper, the simulations are developed using the
nonlinear dynamic model for the plant proposed in [4] and [2] of the suspension system as
opposed to the mentioned papers [1 – 4] where the linear plant is used to develop the
simulations. Using the nonlinear plant model may give the students another interpretation of the
dynamic behavior of these control systems. For instance, the air damping coefficient is not
included in the models proposed in [1]–[4]. The first nonlinear dynamic model may also be
questioned from where is obtained by Taylor series the linear plant model and therefore the
controller design using linear methods.
Comparisons among the nonlinear electromagnetic dynamic systems are addressed to show
the effects of models on the simulation results and thus, on what may be expected
experimentally.
The PD control as well as the current control minor loop that is proposed in [1] is taken as a
main example of feedback compensation when noise may preclude the more common cascade
compensation. The minor loop is a nice example where the faster variable, in this case the coil
current, is needed to control the slower variable, the steel ball position.
In section 2 are reviewed the nonlinear and linear models used in papers [1] and [4]. In section
3, the simulation results in Matlab–Simulink are analyzed. In section 4, the experimental results
are compared to the simulated ones. In Section 5 are described the experimental system and
measurements. Conclusions are presented in section 6.
2 Linear and nonlinear electromagnetic system models
2.1 Exponential model
In paper [2], the electromagnet inductance is chosen to be governed exponentially according to
Juan E. Martínez is with the Department of Electronic Engineeringt, Universidad de Antioquia, Medellín, Antioquia, Colombia.
Julián A. Narvaéz was with the Department of Electronic Engineeringt, Universidad de Antioquia, Medellín, Antioquia, Colombia, and is now with Polco S.A. Medellín, Antioquia, Colombia.
Carol L. Bedoya is with the Department of Electronic Engineeringt, Universidad de Antioquia, Medellín, Antioquia, Colombia.
E-mail: [email protected]).
Simulations, Implementation, and Experimental Results of a PD and State Space Controllers
for a Magnetic Levitation System
Juan E. Martínez, Julián A. Narváez and Carol L. Bedoya
2
the distance between the steel sphere to be levitated and the electromagnet core (x variable) by a
length constant called “a”. In this model, L1 represents the inductance of the electromagnet
when the steel sphere is too far away from the electromagnet core, i.e., L1 = L(∞). When the
steel sphere is attached to the electromagnet core the inductance is increased by Lo Henries.
The following equation summarizes this approach:
( ) a
x
o eLLxL−
+= 1 (1)
For a system that is capable of storing energy as it is an electromagnet, the force that can be
applied to a magnetic material is a consequence of the changes in the system energy. Thus it is
calculated by the stored energy gradient:
( )x
Wxf
∂∂
= (2)
( ) ( )2
xi,Wwhere2ixL ⋅
= (3)
Therefore, the magnetic force is:
( ) a
x
o eia
Lxf
−⋅⋅
⋅−= 2
2 (4)
Based on this approach [2], the dynamic model for the proposed simulation is:
td
xdmgmei
a
L
td
xdm a
x
o β++⋅⋅⋅
−=−
2
2
2
2 (5)
where m is the sphere mass and β is the air damping coefficient.
2.2 Polynomial model
In papers [3] and [4], the electromagnet inductance with respect to the gap distance between its
core and the magnetic sphere, x, is:
( )x
xLLxL o
o+= 1 (6)
where xo is the operating levitation gap.
Substituting (6) into (3) and the result into (2) gives the magnetic force as:
( )2
2
⋅−=x
ixLxf oo (7)
Since the electromagnet inductance varies with x, the R-L circuit that defines the dynamics of
the coil current also depends on the distance x. The equation that governs the current dynamics
is:
( ) ( )td
idxLiRxv += (8)
where v is the applied voltage to the electromagnet, and R and L(x) are the resistance and
inductance of the electromagnet respectively.
Based on this approach [3], the dynamic model for our simulation is:
td
xdmgm
x
ixL
td
xdm oo β++
⋅−=2
2
2
2 (9)
However, in paper [4], the magnetic force is given as:
( )
2
12
+⋅−=
b
x
i
b
Lxf o (10)
where b has a similar meaning as the length constant “a” in the exponential approach.
3
2.3 Linear Simulink Models
The linearization of either of the two mentioned approaches is done using the Taylor series
expansion. The general expression for this case where two variables, namely, distance (x) and
current (i), describe the dynamics of the electromagnet system, is truncated taking just the linear
terms of this series:
( ) ( ) ii
fx
x
fdIfxif
oo xIxI
′∂∂+′
∂∂+=
,,
,, (11)
where x’ and i’ are the variations in gap distance and current respectively around the operating
levitation point, that is:
oxxx −=′ (12) , Iii −=′ (13)
Since the linearization is around the operating levitation point, the linear dynamics from
where the plant transfer function is obtained are:
ikxktd
xdm ′+′=
′212
2
(14)
where, for the exponential approach:
2
2
,
12 a
IeL
x
fk
a
x
o
xI
o
o
−
=∂∂= (15)
a
IeL
i
fk
a
x
o
xI
o
o
−
−=∂∂=
,
2 (16)
and for the Polynomial approach:
3
2
2
,
1
1
+
=∂∂=
b
xb
IL
x
fk
o
o
xI o
(17)
2
,
2
1
+
−=∂∂=
b
xb
IL
i
fk
o
o
xI o
(18)
Therefore, the linear transfer function representing the plant operating close to the operation
point from (14) and after taking Laplace transforms is:
( )( )
1
2
2
ksm
k
sI
sX
−= (19)
From (19), it is clear that the air damping coefficient is not considered in this linearized
model.
Since the dynamics of the system is represented by eqns. (8) and (14), the first differential
equations that govern the suspension system dynamics are:
im
kx
m
k 21 +′=ϑ& (20)
L
vi
L
R
td
id +−= (21)
where ϑ is velocity.
Eqns. (20) and (21) are used to define the state equation:
uBxAx +′=′& (22)
The output state equation for this SISO system is:
xC ′=y (23)
4
Therefore, the state and output system equations are defined by the following matrices:
[ ]00,10
0
,
00
0
010
21sGC
L
B
L
Rm
k
m
kA =
=
−
=
where sG is the position sensor gain and the state variables chosen are: position ( x′ ), velocity
( x′& ) and current (i).
The pole placement method to design the state controller was done using the Matlab
command place(A,B,P) where the argument A means the system matrix, B the input vector and
P the desired poles for the closed loop system. The linear quadratic regulator was designed by
the Matlab command lqr(A,B,Q,R,N) where Q, R and N are the weight matrices for the state
vector, input signal and final state respectively, which define the discrete performance index
[12] as :
( ) ( ) ( ) ( ) ( ) ( )∑1-
02
1
2
1N
k
kkkkNNJ=
++= uRuxQxxSxΤΤΤ
(24)
Since the lqr minimizes the performance index and this means more constrains, it may
produce more instability.
2.4 Nonlinear Simulink Models
To simulate the electromagnetic levitation system using the nonlinear dynamics of the steel
sphere position, it was decided to keep the coil inductance constant at a value close to one of the
operation points in order to simplify the simulation model, as shown in Fig. 3, for the R-L
circuit block.
Fig. 1 shows the nonlinear dynamics model of the levitation system using either the
polynomial or the exponential approach ([4] and [3]) where for the polynomial approach b =
0.018 m, Lo = 0.11 H, xo = 0.01 m, m = 0.13 kg, g = 9.5 m/s2 and beta is the damping air
coefficient.
3 Simulation and experimental results
The linear and nonlinear model proposed in [1] with the constants measured for the
Fig 1. Polynomial or Exponential Nonlinear plant dynamics
5
implemented suspension system was simulated in Simulink and the predicted results to a control
effort amplitude equal to one is shown in Fig. 2 (a) and (b) respectively, which can be compared
with the position measured with current estimation in Fig 2. (c) and with current sensor in Fig.
2. (d). The predicted change in position by the linear model of 1.5 cm is close to the one
predicted by the nonlinear model of 1 cm and the experimental ones which were approximately
1.25 cm (Figure 2. (c)) and 0.8 cm (Fig 2. (d))
Fig. 3 shows the Simulink model when the linear plant is replaced by the nonlinear dynamic
model that was linearized (Fig. 1). And the controller is the same PD control as the one used in
the simulation to obtain Fig. 2. (a) and (b)
When simulating the system with the nonlinear model is normal to notice that the control
efforts are greater than when simulating the linear plant since in the first case the model is taken
into account the effort to take the levitated object from the initial position condition to the
desired position and therefore the damping air coefficient is important in the model for the
closed loop system stability as oppose for the linear plant where it does not appear.
(a) (b)
(c) (d)
Fig. 2. (a) Output predicted by the linear model (exponential approach) for the PD controller (b) Position
output for the nonlinear exponential and polynomial plant for the PD controller (c) Measured position
output given by the PD controller with current estimation (d) Measured position output given by the PD
controller with current sensor.
Fig 3. PD controller and nonlinear plant.
6
Fig. 4 (a) and (b) show that the measured coil current for the closed loop system with PD
controller has the chattering behavior [] which in order to diminish its undesirable effects on the
system output the digital sliding mode control is one option [].
For the state space controllers, the Matlab - Simulink diagram used to simulate the controlled
suspension system using the pole placement and linear quadratic regulator methods for the
Regulator, with and without complete observer, is shown in Fig. 5. The control effort for both
controllers was equal to one. The results predicted for the position output and coil current by
these two controllers are shown in Fig. 6.
(a) (b)
Fig 4. (a) Measured coil current given by the PD controller with current estimation
by the coil current transfer function estimation. (b) Measured coil current given by
the PD controller with current sensor.
7
The simulations of the state feedback controller and regulator system with full –order state
observer using pole placement method to calculate the feedback gains are shown in fig. 6 (a)
and (b) and in Fig 6 (c) and (d) are the measured position and current coil variables. These
simulations show that the best predicted variable is the position with state observer where the
change of position is approximately 1.1 cm which is closed to the change in position shown in
Fig 6 (c) where these change is approximately 1.25 cm. The simulated currents do not show
good predictions must possible due to the chattering behavior already commented.
Fig 5. State feedback controller and regulator system with full-order state observer.
8
Since the lqr is a method of optimization to calculate the feedback and observer gains then it
is expected to have less range of change for the state variables as it shown in Fig 7 (a) and (b)
for the regulator with state observer. Fig 8. (a) and (b) show that these state feedback
controllers requires some method of filtering the noise to have a better performance as for
example the Kalman filter.
(a) (b)
(c) (d)
Fig 6. (a) Position output and (b) coil current predicted by Matlab – Simulink (c) Measured
position output and (d) measured coil current for the feedback controller and regulator
system with full-order state observer using pole placement method and the polynomial plant.
(b) (b)
Fig 7. (a) Position output and (b) current output predicted by Matlab –
Simulink for the state feedback controller and regulator system with full-order
state observer using the lqr method and the polynomial nonlinear plant)
9
5 Experimental system and measurements
5.1 Inductance
Inductance is defined as the relation between magnetic flux (Φ) through the coil and the current
(i) that circulates through the wires.
In an electromagnet, the magnetic flux tends to be confined to the core due to its high
magnetic permeability. It may be said that the magnetic flux is approximately uniform in the
core and the average value of magnetic flux density B coincides with the value that appears in
the middle line that passes through the centroid of the core.
As the cross section of the core of the coil is straight and the magnetic flux density is almost
perpendicular to this cross section, the inductance can be defined as:
i
SB
i
SB
i
SdB
iL AAs *)cos(**
≈≈•
==∫∫ θφ
rr
(25)
where L is the inductance, BA is the magnetic flux density in the middle line of the core, S is the
transversal area of the core of the coil (π*R2) and (i) is the current in amperes.
Fig. 17 shows the diagram of the assembly used to measure the inductance, which comprises
a current sensor and a field sensor whose outputs are carried to two ADC inputs of the ds1104
board to be processed by Simulink.
(a) (b)
Fig 8. (a) Measured position using the pole placement method and (b) Measured position using the lqr
method by the state feedback controller without full-order state observer.
Fig. 17. Assembly used to measure the inductance.
10
A field sensor (A1302), a current sensor (ACS712) and the ds1104 are used to measure the
inductance as shown in Fig. 18. Both sensors use the Hall effect to perform their functions. The
difference between them is that the current sensor uses an IC to transform the magnetic field
produced by the current that circulates through the sensor in a voltage proportional to this
current.
The field sensor delivers a voltage proportional to the magnetic flux density applied (for this
sensor, it is 1.3mV/G when the device is polarized with 5 V and the ambient temperature is
25˚C). In this device, when B=0, the output voltage is not zero; it is 50% of the supply voltage.
Similarly, the current sensor delivers a voltage proportional to the current applied (182mV/A),
and in the quiescent state (i=0), the output voltage is nominally one-half the supply voltage.
The voltage signals from the output of the field and current sensors are lead to two ADC
inputs of the ds1104 (Figs. 17 and 18). The signals are processed by Simulink since the DSP
works under Matlab platform (as is observed in Fig. 19) and the results obtained (inductance
as a function of the sphere position) are used to obtain each point of Fig. 20.
Fig. 19 shows the Matlab - Simulink schematic used in the DS1104 to calculate the
inductance of the coil where Gsensor_field and Gsensor _current are the gains of the field
sensor and the current sensor respectively (the gain of the field sensor is 1.3 mV/G; it is
multiplied by 1e-4 to convert to SI units).
The output voltage of the current and field sensors is attenuated by the ds1104 board by a
factor, therefore in the block diagram the ADC inputs are amplified by a gain of 10.
The output voltage in the quiescent state in both sensors shows 2.5 V. Hence, 2.5 V is
subtracted from each voltage signal in the block diagram so that the graphs available in the GUI
(Control Desk) can show zero values for magnetic flux density or current.
From (25), it can be seen that the current divides the other terms of the equation. Therefore, a
switch is used in Fig. 19 to prevent division by zero, which ensures that the final graph does not
have singularities.
In Fig. 20, the inductance variations can be seen when the steel sphere is moving along the
X- axis of the core coil. This graph has been obtained using the assembly indicated in Fig. 17
Fig. 18. Schematic of the circuit implemented to sense the inductance.
Fig. 19. schematic used to process the voltage signals coming from both sensors.
11
and the schematic of Fig. 19, and is used to measure the inductance at different points under the
core of the coil in discrete intervals of 2.5 mm.
When the distance between the steel sphere and the core is maximum, the inductance
calculated shows a value of 0.37 H. For the opposite case (when the distance between the sphere
and the core is minimum), the measured inductance is 1H or L1+L0=1H
5.2 Position
The position sensor is implemented using infrared diodes connected as an array in front of an
array of photodiodes. This sensor is a very important and critical factor in the control of the
plant. A good position sensor avoids problems and ensures that the sphere levitates.
Fig. 21 shows the position sensor. The elements used in this sensor are eight silicon
photodiodes (op906) and eight IR LEDs (QEC113). It is also possible to use a photo resistor
(Fig. 12) instead of photodiodes (Fig. 13) although the system oscillates a little more and the
operation range is reduced compared to the performance of photodiodes.
The position signal is taken from the photodiodes and leads to an ADC input of the DS1104.
5.3 Power Module
The PWM control signal is provided by the ds1104 through a digital output, which is carried to
a protection circuit made of optocouplers that inverts the control signal. Thus, in Fig. 23, the
master bit out block delivers zeros and the optocoupler takes the signal and inverts it, in order to
switch the MOSFET that controls the coil current. The MOSFET power circuit connects the coil
to a regulated DC source that operates at 25V D.C. The transistor reference is IRF840 N-
channel MOSFET that allows handling high currents and voltages.
To turn on and turn off (switching), the MOSFET transistor needs a driver; the one chosen was
the IR2110 that can manage high voltage and speed. It works like a buffer providing the
necessary voltage to turn on the MOSFET. Fig. 22 shows the schematic of the power module
connected to the coil.
Fig. 20. Inductance vs. Distance between the sphere and the core of thecoil.
12
5.4 Implemented Controllers
Fig. 23 shows the schematic of the PD controller used in the magnetic levitation system where
Vs is the bias voltage of the coil (25 V), Gs is the position sensor gain (86 V/m), Gsm is a gain
to adjust Gs, R is the coil resistance (3.4 Ω), L is the coil inductance (0.37 H), Kp is the
proportional constant of the controller (3.6), Td is the derivative constant of the controller
(0.056 s), and Gc is the current sensor gain (182 mV/A).
Fig 23. PD controller implemented in the DS1104
Fig. 21. Position Sensor
Fig.22 . Diagram of the protection system and power module.
13
In this model, the position is measured by a sensor, the current can be estimated by a RL
transfer function or measured by a current sensor, and the PWM signal is designed in Simulink
using a switch that works like a comparator between the control signal and the sawtooth signal.
In Fig. 23, it can be seen that the system is excited by a pulsed signal to test the controller and
verify that it works correctly. The response of a PD controller to this excitement is shown in
Figs. 10 and 11.
Figs. 24 and 25 show the Simulink schematics of the state space controllers implemented in
the DS1104 board. Fig. 24 shows the regulator system with full-order state observer and Fig. 25
shows the state feedback control system without observer. In this figure, a velocity estimator
was implemented since there is no sensor available for this state variable.
Here, A, B, C, Lob are coefficient constant matrices of dimensions (3x3), (3x1), (1x3), (3x1)
respectively.
In the controller of Fig. 25, the velocity is estimated differentiating the measured position
through a backwards differentiator:
( )( ) TZ
Z
ZX
ZV
⋅−= 1
(26)
where T is the sample time.
The other state variables (position and current) are measured by position and current sensors,
unlike Fig. 24, where current and position are determined by the observer.
Both controllers are excited by a pulsed signal, which is a demanding signal to test the system
stability.
The graphs of position and current obtained using the full-order state observer of Fig. 24 are
shown in Figs. 12 to 15.
Fig 24. Regulator system with full-order state observer
14
Similarly, the graphs of position and current obtained using the state space controller with the
velocity estimator of Fig. 25 are shown in Fig. 16.
5.5 Sample time
The sample time chosen was 0.02 s, which is enough for the bandwidth of the magnetic
suspension system that is about 5 Hz [1].
6 Conclusions
The experimental results for the linear quadratic regulator showed more noise sensibility than
the pole placement method as was expected based on the increase in the number of constrains.
The position control in the PD as well as in the state regulators was improved by changing the
sensor position from a photo- resistor to a matrix of infrared photodiodes (OP906) and LEDs
(OEC113). Photodiodes have a strong linearity and are not affected by the surrounding light
sources.
The current estimator using the R-L coil transfer function that was used for the minor current
loop in the PD controller showed good results even when using the photoresistor.
Simulations using the polynomial nonlinear model for the magnetic suspension system
predicted results closer to the experimental data than the exponential nonlinear model.
The ds1104 board used as a rapid prototyping tool was the key to verify the theory and the
controllers studied in the first courses of electrical engineering in the control system area.
Future work with this levitation plant and the ds1104 will seek to study and implement
optimization methods where noise is taken into account. These include the Kalman filter [10],
nonlinear control methods [9] and intelligent controllers [11].
7 Acknowledgments
The authors would like to acknowledge the financial support of the CODI (Committee for the
research development) from the University of Antioquia.
8 References
1 Hurley, W. G., Hynes, M., and Wolfle, W. H.: ‘PWM control of a magnetic suspension
System’, IEEE Trans. Educ., 2004, 47, (2), pp. 165 – 173
2 Hurley, W.G., and Wolfle, W.H.: ‘Electromagnetic design of a magnetic suspension
system’, IEEE Trans. Educ., 1997, 40, (2), pp. 124–130
Fig 25. State feedback control system controller with velocity estimator implemented in the ds1104
15
3 Wong T. H.: ‘Design of a magnetic levitation control system - An undergraduate project’,
IEEE Trans. Educ., 1986, E-29, (4), pp. 196-200
4 Oliveira, V. A., Costa, E. F., and Vargas, J. B.: ‘Digital implementation of a magnetic
suspension control system for laboratory experiments’, IEEE Trans. Educ, 1999, 42, (4), pp.
196-200
5 Kim, W. J., and Verma, S.: ‘Multiaxis Maglev positioner with nanometer resolution over
extended travel range’, Journal of Dynamic System, Measurement and control, 2007, 129,
pp. 777 – 785
6 Zhao, Y., and Zeng, H.: ‘Rotational maneuver of ferromagnetic nanowires for cell
manipulation’, IEEE Transactions on Nanobioscience., 2009, 8, (3), pp. 226 – 236
7 Shen, M., Yamahat, C., and Gijs, M.A.M.: ‘A high – performance compact electromagnetic
actuator for a PMMA ball – valve micropump’, J. of Micromechanics and
Microengineering., 2008, 18, pp. 1-9
8 Liu, H., Zhang, X., and Chang, W.: ‘PID control to Maglev train system’. IEEE
International Conference of Industrial and Information Systems, 2009, pp. 341 -343.
9 Baranowski, J., and Piatek, P.: ‘Nonlinear dynamical feedback for motion control of
magnetic levitation system’. IEEE 13th International Power Electronics and Motion Control
Conference, 2008, pp. 1446 – 1453.
10 Schuhmann, T., Hofmann, W., and Fleischer, E.: ‘Potential for reducing the power
requirements of magnetic suspension systems by implementing a linear quadratic Gaussian
controller’. European Conference on Power Electronics and Applications, 2007, pp. 1 -10.
11 Shiakolas, P.S., Van Schenk S.R., Piyabongkarn. D., and Frangeskou, I.: ‘Magnetic
levitation hardware-in-the-loop and MATLAB – based experiments for reinforcement of
neural network control concepts’, IEEE Trans. Educ., 2004, 47, (1), pp. 33 – 41.
12 Ogata, K.: ‘Discrete-Time Control System’ (Englewood Cliffs, NJ: Prentice-Hall, 2nd edn.
1995 Englewood Cliffs, NJ: Prentice-Hall)