0% found this document useful (0 votes)
122 views10 pages

Adaptive PID Control of A Stepper Motor Driving A Exible Rotor

This document presents a study on using fuzzy logic gain scheduling to control a permanent magnet stepper motor driving a flexible rotor. The study derives a mathematical model of the stepper motor system and develops fuzzy systems to schedule the proportional and derivative gains of a PID controller. Simulation results show that the fuzzy gain scheduling PID controller is able to adapt controller gains based on load and speed response, achieving much better tracking performance than a conventional PID controller. The fuzzy self-tuning controller demonstrates fast response and little overshoot.

Uploaded by

Mohamed Nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views10 pages

Adaptive PID Control of A Stepper Motor Driving A Exible Rotor

This document presents a study on using fuzzy logic gain scheduling to control a permanent magnet stepper motor driving a flexible rotor. The study derives a mathematical model of the stepper motor system and develops fuzzy systems to schedule the proportional and derivative gains of a PID controller. Simulation results show that the fuzzy gain scheduling PID controller is able to adapt controller gains based on load and speed response, achieving much better tracking performance than a conventional PID controller. The fuzzy self-tuning controller demonstrates fast response and little overshoot.

Uploaded by

Mohamed Nabil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Alexandria Engineering Journal (2011) 50, 127–136

Alexandria University

Alexandria Engineering Journal


www.elsevier.com/locate/aej
www.sciencedirect.com

ORIGINAL ARTICLE

Adaptive PID control of a stepper motor driving


a flexible rotor
Nehal M. Elsodany *, Sohair F. Rezeka, Noman A. Maharem

Faculty of Engineering, Alexandria University, Egypt

Received 29 September 2009; accepted 22 August 2010


Available online 30 August 2011

KEYWORDS Abstract Stepping motors are widely used in robotics and in the numerical control of machine
Stepper motor; tools to perform high precision positioning operations. The classical closed-loop control of the
Fuzzy control; stepper motor can not respond properly to the system variations unless adaptive technique is used.
Gain scheduling; In this paper, the feasibility of fuzzy gain scheduling control for stepping motor driving flexible
Flexible rotor rotor has been investigated and illustrated by numerical simulation. The proposed control was
concerned with the permanent magnet step motor (PMSM) with mechanical variations such as
stiffness of rotor and load inertia. A mathematical model for the PMSM was derived and the
gains of a conventional PID control were presented. The data base required in learning process
of the fuzzy logic gain scheduling mechanism was obtained from the mathematical model. It
was found that the stable value for the integral gain is half the value of the proportional gain.
The fuzzy systems for scheduling the derivative gain and the proportional gain are presented.
The conducted simulation showed that the fuzzy system is able to adapt the controller gains to
track the desired load and speed response. Fuzzy PID performance is much better than the con-
ventional PID control scheme. Fuzzy self-tuning controller demonstrates a very fast response and
little overshoot.
ª 2011 Faculty of Engineering, Alexandria University. Production and hosting by Elsevier B.V.
All rights reserved.

* Corresponding author. 1. Introduction


E-mail addresses: [email protected] (N.M. Elsodany),
[email protected] (S.F. Rezeka). Mechatronics is defined as the interdisciplinary field of engi-
neering that deals with the design of products whose function
1110-0168 ª 2011 Faculty of Engineering, Alexandria University. relies on the integration of mechanical, electrical, and elec-
Production and hosting by Elsevier B.V. All rights reserved. tronic components [1,2]. Actuators (motors) are considered
as essential components of all Mechatronics systems. Stepper
Peer review under responsibility of Faculty of Engineering, Alexandria
motors are widely implemented in systems that demand high
University.
doi:10.1016/j.aej.2010.08.002
accuracy combined with quick response [3]. Stepping motors
were mainly used for simple point-to-point positioning tasks
in which they were open-loop controlled. In this way, they
Production and hosting by Elsevier were driven by a pulse train with a predetermined time interval
between successive pulses applied to the power driver, and no
128 N.M. Elsodany et al.

information on the motor shaft position or speed was used 2. System mathematical model
[4,5]. Unfortunately, the open-loop control scheme suffers
from low-performance capability and lack of adaptability to 2.1. Modeling of a permanent magnet stepper (PMS) motor
load variations and system variations. Indeed, without feed-
back, there is no way of knowing if the motor has missed a This section provides a brief derivation of a nonlinear model of
pulse or if the speed response is oscillatory. The closed-loop the 2-phase PM stepper motor. A number of references are
principle [6] was introduced in order to increase the accuracy available on the generation of stepper motor model [1,2].
positioning of the stepping motor while making it less sensitive The rotor shaft dynamics are given by:-
to load disturbances. The closed-loop control is characterized
dx
by starting the motor with one pulse, and subsequent drive Jm ¼ Tm  Fx  TL ð1Þ
pulses are generated as a function of the motor shaft position dt
and/or speed by the use of a feedback encoder. Nowadays, due Jm = Total inertia of the rotor, F = Viscous friction coeffi-
to advances made in both power electronics and data process- cient, TL = Load torque.The angular velocity is given:-
ing, stepping motors are more often closed-loop controlled, in The above Eq. (1) forms the basis for a general rotor
particular, for machine tools and robotic manipulators in dynamics model of a PM stepper motor. Hence for a 2 phase
which they have to perform high precision operations in spite PM motor with P rotor pole pairs and the two phases (uj) at 0
of the mechanical configuration changes. Also, the use of clas- and (p/2) the following state space equations can be derived.
sic closed-loop algorithms such as Proportional-integral-deriv- dh
ative (PID) control is weak unless the closed-loop control is ¼x
dt
forced to adapt to the motor operating conditions. Fuzzy Lo- dx Km F TL
gic [7–9] is a technology of great potential in the fields of arti- ¼ ðia sin Ph þ ib cos PhÞ  x 
dt Jm Jm Jm
ficial intelligence and Mechatronics. It mimics the human way
dia R Km ua
of thinking and decision-making. Fuzzy PID control can be ¼  ia þ x sin Ph þ ð2Þ
classified into two major categories according to their con- dt L L L
dib R Km ub
struction [10]. One category has no explicit proportional, inte- ¼  ib  x cos Ph 
gral, and derivative gains; instead the control signal is directly dt L L L
deduced from knowledge base and fuzzy inference. Most of the where, x is the angular velocity, dx
dt
is the load acceleration, didta is
dib
research on fuzzy logic control design belongs to this category the current through winding a, dt is the current through wind-
[11–14]. Another category is fuzzy-scheduling of conventional ing b.
PID gains. In recent years, fuzzy-scheduling control has been
widely applied to solve versatile control problems. Zhao and 2.2. Flexible shaft
Collins [15] designed fuzzy PI controller for weigh belt feeder
to maintain a constant feed rate. They used singleton TS fuzzy Considering the case when the load is connected to the motor
model based on the error and the change in error as inputs to through a long stiff shaft with stiffness k, then the motor iner-
tune the proportional and integral gains. Chang et al. [16] pro- tia will be Jm and the load inertia will be JL as shown in Fig. 3.
posed fuzzy scheduling control scheme, including the feedback In this case, the load and flexible shaft equation will be:-
states and the integral of tracking error for induction servo dhL
motor. Regional stability was discussed upon considering the ¼ xL ð3Þ
dt
saturation phenomena of the actuator. Hazzab et al. [17] pre-
sented control of an induction motor using fuzzy gain schedul- dxL 1
ing of PI controller based on tracking error and its first time ¼ ½ðkðhL  hm Þ  BðxL  xm ÞÞ
dt JL
derivative. Chang et al. [18] applied fuzzy-scheduling control
to a linear permanent magnet synchronous motor with pay A classical control technique for PMSM is based on park’s
load variations. They implemented the technique adopted in transformation [1]. That is, the transformation of the vector
[16]. Allaoua et al. [19] studied DC motor scheduling PID con- (u) and (i) expressed in the fixed stator frame (a, b) into vectors
trol with particle swarm optimization strategy and compared expressed in a frame (d, q) that rotates along the fictitious exci-
the results with those of fuzzy logic controller. Ghafari and tation vector such that:
Alasty [20–22] implemented gain scheduling PID fuzzy con-     
Xd cos Ph sin Ph Xa
troller for hybrid stepper motor. He did not consider rotor ¼
Xq  sin Ph cos Ph Xb
flexibility nor load variations (Fig. 1).
The aim of this paper is to investigate the feasibility of a The state Eq. (2) expressed in terms of currents and voltages in
fuzzy PID control for a stepping motor drive of flexible rotor rotating (d, q) coordinates become:
and to evaluate its sensitivity for mechanical configuration
changes. The simulation allows the generation of load torque
and inertia variations, which are the main disturbances, found
in the control machine tools and robotic manipulators. These
two mechanical variations are generated in order to test the Step Load
system response to external disturbances and the effectiveness motor JL
in the plant parameters. The scope of this work is limited to the k, B
study of the control of permanent magnet stepper motor Jm, Tm, θm θL
(PMSM).
Figure 1 Flexible rotor system.
Adaptive PID control of a stepper motor driving a flexible rotor 129

θr, ω r ud ω,
+ PID Stepper
Controller motor

uq

Figure 2 Block diagram of PID controller.

dhm Two control laws will be considered


¼ xm
dt
dxm Km F TL 1 1. Static PID control law.
¼ iq  xm   fkðhm  hL Þ þ Bðxm  xL Þg
dt Jm Jm Jm Jm 2. Intelligent control law which implements fuzzy logic con-
did R ud trol to adapt the static PID control law.
¼  id þ Pxm  iq þ
dt L L
diq R Km uq
¼  iq  Pxm  id  xm þ ð4Þ 3.1. Static proportional-integral-derivative (PID) control law
dt L L L

Fig. 2 shows the block diagram of closed-loop PID control. ud


3. Stepper motor control and uq denote the controller’s output signal, xr and hr are the
reference angular speed and angular displacement, respec-
The control objective is to find the suitable control variables tively. The control closed loop outputs are the actual angular
(ud, uq) so that the system tracks desired load angular position displacement and speed (h, x). The PID gains are: K1, K2,
and velocity with accepted errors while keeping the states and K3 are the proportional, integral and derivative control gains
control variables bounded too. respectively. The approach of Ref. [1] of selecting PID gains
There are many internal and external uncertainties that is adopted in order to compare results for the same motor
may affect the performance of the controlled system. These specifications. According to Ref. [1], the static PID control
uncertainties are the stiffness of the flexible shaft, the inertia output can be put in the form;
of the rotor. Z t
uq ¼ Km x  K4 ðiq  iqr Þ  K5 ½iq ðsÞ  iqr ðsÞ  ds
0
Z t
Response of motor position
ud ¼ PLx  iq  K4 ðid  idr Þ  K5 ½id ðsÞ  idr ðsÞ  ds
Motor position,rad

4
0
3
with ð5Þ
2 Reference signal
motor position idr ¼ 0
1  Z t 
0 Jm
iqr ¼ K1 ðh  hr Þ þ K2 ½hðsÞ  hr ðsÞds þ K3 ðx  xr Þ
-1 Km 0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
Time,s where iq, id are the actual current in rotating (d, q) and iqr, idr
Response of motor speed are the reference current in rotating (d, q).
600
Motor speed,rad/s

Reference signal
The controller gains are tuned for (Jm = 0.08 kg m2,
400
motor speed B = 3 Nms/rad, L = 3 Henry, R = 3 X, P = 6, Km = 2 Nm/
200 rad). The values of the gains in SI units are: K1 = 80,000,
0 K2 = 651K1, K3 = 500, K4 = L/T, K5 = R/T, and
T = 0.0005.
-200
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 T is the equivalent time constant of the current loops .With
Time,s the above choice of K4 and K5, the current loop transfer func-
tion is,
Figure 3 Response of PMSM with PID control subjected to step
input of motor position and motor speed.

Response of motor position Response of motor speed


20 100
Motor position,rad

Motor speed,rad/s

10 50 Reference signal
Reference signal
motor position motor speed
0 0

-10 -50
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
Time,s Time,s

Figure 4 Response of PMSM with PID control subjected to arbitrary reference input signal.
130 N.M. Elsodany et al.

x 10
6 Response of load speed
4 Response of load position 1
x 10
1.5 k=16.5
k=16.5 k=30
k=30 0.5 k=50
1 k=50 k=120
k=200

Load speed,rad/s
k=120
Load position,rad

0.5 k=200
0

0
-0.5
-0.5
-1
-1

-1.5 -1.5
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
Time,s Time,s

Figure 5 Position and speed response of PMSM with flexible shaft at different stiffness (k), and JL = 0.08 kg m2.

x 10
6 Response of load speed x 10
4 Response of load position
2 1.5
JL=0.05 JL=0.05
1.5 1 JL=0.08
JL=0.08 JL=0.1
1 JL=0.1 Load position,rad 0.5 JL=0.5
Load speed,rad/s

JL=0.5
0.5 0

0 -0.5

-0.5 -1

-1 -1.5

-1.5 -2

-2 -2.5
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
Time,s Time,s

Figure 6 Position and speed response of PMSM with flexible shaft at different load inertia (JL), k = 16.5 N m/rad.

iq ðsÞ id ðsÞ 1 obtained Ref. [1]. It is clear that the stepper motor recovered
¼ ¼
iqr ðsÞ idr ðsÞ 1 þ TS the targeted position with a small overshoot.
where the break frequency = 1/T = 2000 rad/s. The gain K1 is
chosen so that natural resonant frequency is 285 rad/s and the Response of load position
damping ratio is equal to 0.9. K3 is chosen so that 1/K3 = 4T. 7
The closed-loop system, based on the choice of poles, is stable K2=0.5*K1
upon using the above PID gains and system parameters. 6 K2=5*K1
K2=10*K1
5 K2=20*K1
3.1.1. Performance of PID control with rigid shaft
Load position,rad

The PID control is required to track two different referenced 4


signals: step input and any arbitrary reference signals. The
nominal value of the inertia is 0.01 kg m2 and the load torque 3
is 2 N m. The simulation is based on the rigid shaft Eqs. (2)
and (4). The system responses of the PID controller are ob- 2
tained and reported in Fig. 3 for step input signal. It can be no-
1
ticed from the figures, that at the beginning the response
exhibits an oscillation and the system reach to the desired po- 0
sition at 0.05 s. The PID control guarantees the desired refer-
ence position and speed in short time. -1
0 0.1 0.2 0.3 0.4 0.5
The second test for tracking is the typical position reference
Time,s
trajectory br (t) with trapezoidal speed reference xr (t). Fig. 4
shows the response of motor position error, motor position Figure 7 Effects of integral gain K2 on load position response,
and motor speed. The simulated results are the same as that k = 16.5 N m/rad, JL = 0.08 kg m2, K1 = 80,000 and K3 = 500.
Adaptive PID control of a stepper motor driving a flexible rotor 131

3.1.2. PID control for a stepper motor with flexible rotor Response of load speed
In this section the mechanical variations such as (load torque 300
and the stiffness of the system) are generated in order to test K3=400
the response of the PID control upon adding an external 200
K3=500
disturbance. K3=700
K3=1000

Load speed,rad/s
3.1.2.1. Classical PID control with fixed gains. The PID con- 100
trollers gains are held constant: K1 = 80,000,
K2 = 65*80,000, K3 = 500. The equations of the flexible shaft 0
Eq. (4) were added to the system model. A step input reference
signal is considered. The obtained results are presented in
-100
Figs. 5–8. In these figures, the effects of changing the shaft
stiffness from k = 16.5 to 200 N m/s and the inertia load from
JL = 0.05–0.5 kg m2 on the time response of load position, the -200
load speed are reported It can be shown that the performance
-300
0 0.1 0.2 0.3 0.4 0.5
Response of load speed Time,s
300
K2=0.5*K1 Figure 10 Effects of derivative gain K3 on load speed response,
K2=5*K1 k = 16.5 N m/rad, JL = 0.08 kg m2, K1 = 80,000 and K2 =
200 K2=10*K1
K2=20*K1 0.5K1.

100
Load speed,rad/s

0
Response of load potsition
4
-100

-200 3

K1=8000
Load position,rad

-300 2 K1=10000
0 0.1 0.2 0.3 0.4 0.5
K1=50000
Time,s
K1=80000
Figure 8 Effects of integral gain K2 on load speed response, 1
k = 16.5 N m/rad, JL = 0.08 kg m2, K1 = 80,000 and K3 = 500.

Response of load position -1


6 0 0.1 0.2 0.3 0.4 0.5
Time,s
K3=400
5 K3=500 Figure 11 Effects of proportional gain K1 on position response,
K3=700 k = 16.5 N m/rad, JL = 0.08 kg m2, K2 = 0.5K1 and K3 = 1000.
4 K3=1000
Load position,rad

3
of the fixed gain PID controller is not satisfactory and the sys-
tem is unstable To improve the system performance and to be
2
able to track the reference load position and speed, the PID
gains should be varied continuously.
1

3.1.2.2. Effects of PID gains on the response and uncertainties.


0
In this section the PID gains K1, K2 and K3 are changed to ob-
tain stable performance at different shaft stiffness and inertia
-1
0 0.1 0.2 0.3 0.4 0.5 load. Sample of these results reported in Figs. 7–12. It can
Time,s be noticed that the oscillations were damped and the system
become stable. As both the shaft stiffness and the inertia
Figure 9 Effects of derivative gain K3 on load position response, change, there will be another optimum set of PID constants
k = 16.5 N m/rad, JL = 0.08 kg m2, K1 = 80,000 and K2 = to track the desired load position and speed. The above proce-
0.5K1. dures were repeated for different values of k and JL to obtain
132 N.M. Elsodany et al.

the data base required in learning process of the Fuzzy logic 4. Optimum fuzzy gain scheduling mechanism
gain scheduling mechanism.
Numerical simulations were carried out upon varying the shaft
3.2. Fuzzy PID (FPID) stiffness (k) from 16.5 to 200 N m/rad and the load inertia (JL)
from 0.01 to 5.0 kg m2. This task has two-fold aim, the first is
The Fuzzy logic control is used to tune the parameters of the to determine the control parameters which are robust to these
PID controller on line. This is achieved by scheduling the gains varying operating conditions and the second is to identify the
of the PID control based on system performance indices as indices that will drive the gain scheduling mechanism. The
shown in Fig. 13. changes in the integral controller gain K2 may render unstable
response. Comparing Figs. 7 and 8 with Figs. 5 and 6, it can be
Response of load speed noticed that the closed loop is stable as the ratio of K2 to K1 is
200 decreased. It was found that maintaining the value of K2 to
K1=8000 0.5K1 realizes the most stable damped performance at all oper-
K1=10000 ating conditions. K2 is not fixed but it will be changed as K1
150 K1=50000 changes.
K1=80000
Load speed,rad/s

4.1. Fuzzy model for K


100

The fuzzy system has two antecedents (eh,max and ex,max) and
50 one consequent K3. The inference system is based on the
TSK model. The Gaussian membership function (MF) shown
in Fig. 14 produced better results than the triangular member-
0 ship function. The Guassian MFs have smooth transition
which is required with derivative gain.
The system has a single output, which is a crisp value that
-50
0 0.1 0.2 0.3 0.4 0.5
corresponds to the derivative gain K3. The output has three
Time,s values: mf1 = 500, mf2 = 900 and mf3 = 1000.
The inference rules are:
Figure 12 Effects of proportional gain K1 on speed response,
k = 16.5 N m/rad, JL = 0.08 kg m2, K2 = 0.5K1 and K3 = 1000. - If (input1) is low and (input 2) is high, then K3 is mf3.
- If (input1) is medium and (input 2) is medium, then K3 is
mf2.
Performance - If (input1) is high and (input 2) is low, then K3 is mf1.
indices
Gain
schedule
r, ωr
PID
ud Stepper
ω, 4.2. Fuzzy model for K1
Controlle motor
r
uq The indices are the instantaneous error in both load position
(eh) and load speed (ex). The fuzzy system has two antecedents
(eh and ex) and one consequent (K1). The inference system is
based on Mamdani model. It was found that both Guassian
Figure 13 Block diagram of fuzzy PID controller.
and triangular MFs have same results. This is because the

1
1

0.8 0.8 Low


Low medium
High
medium
0.6 High 0.6

0.4 0.4

0.2 0.2

0 0
0 100 200 300 400 500 0 1 2 3 4
max error of speed(input1) max error of position(input2)

Figure 14 Membership functions generated by Sugeno method.


Adaptive PID control of a stepper motor driving a flexible rotor 133

1
1 NL
NS NL
Z NS
PS 0.8
0.8 PL Z
PS
PL
0.6 0.6

0.4 0.4

0.2 0.2

0 0
-4 -3 -2 -1 0 1 2 3 4 -80 -60 -40 -20 0 20 40 60 80
instantaneous error of position instantaneous error of speed
(a) (b)
1
1
0.8 2
3

0.6

0.4

0.2

0
0 1 2 3 4 5 6 7 8 9
4
x 10
(c)
Figure 15 Membership functions generated for the fuzzy model of K1 a-input eh b-input ew c-output K1.

universe of discourse in this case is small for the two anteced- - If eh is PL and ex is Z then K1 is 2.
ents. The triangular membership functions are applied as - If eh is NL and ex is PS then K1 is 3.
shown in Fig. 15 since it is simpler in computation. - If eh is Z and ex is PL then K1 is 2.
The inference rules are: - If eh is PL and ex is PS then K1 is 1.

- If eh is NS and ex is PL then K1 is 2. Stability of fuzzy PID controlled system is discussed in


- If eh is NS and ex is NS then K1 is 1. Appendix B.
- If eh is PS and ex is NL then K1 is 2.

Response of load position


5 Response of load position
FUZZY PID 6
FUZZY PID
4
PID
5 PID
Reference signal
Reference signal
3 4
Load position,rad

Load position,rad

3
2

2
1
1

0
0

-1 -1
0 0.5 1 1.5 2 0 0.5 1 1.5 2
Time,s Time,s

Figure 16 Load position with PID and fuzzy PID Figure 17 Load position with PID and fuzzy PID
(JL = 0.08 kg m2, k = 16.5 N m/rad). (JL = 0.5 kg m2, k = 30.N m/rad.
134 N.M. Elsodany et al.

5. Results of the fuzzy PID Figs. 21 and 22. Therefore the power is saved upon using the
FPID control which is useful from industrial point of view.
The PID and FPID are required to track two reference signals:
step input signal as shown in Fig. 3 and an arbitrary trapezoi- 5.2. Results of arbitrary trapezoidal reference signal
dal reference signal as illustrated in Fig. 4. The PID gains are
held constants at K1 = 80,000, K2 = 0.5*80,000, and Figs. 23 and 24 illustrate the load position and load speed ob-
K3 = 500 for all simulations to guarantee stable response. tained with FPID and PID control. It can be seen that FPID
performance is much better than the conventional PID control
5.1. Results of step input signal scheme. Fuzzy self-tuning controller demonstrates a very quick
response and little overshoot, because the fuzzy self-tuning
Figs. 16–19 show that fuzzy gain scheduling of the PID con- control is based on the function relationship among the errors,
troller performs better than the conventional PID controller. parameters K1, K3, and operation experiences.
It is clear that the oscillations are damped upon using FPID
controller and the response is fast. FPID is robust to plant 6. Conclusion
parameter variations such as inertia change and stiffness. It
can be noticed that the output gain from fuzzy control is vary- The feasibility of fuzzy gain scheduling control for stepping
ing when changing the mechanical configuration as shown in motor driving flexible rotor has been investigated and
Fig. 20. The output control signals are stable, smoother faster
and less than that resulted from the PID control as depicted in
Output gain from FPID
Response of load speed 940
300
FUZZY PID 920
PID
k=30,JL=0.5
200 Reference signal Output gain K3
k=16.5,JL=0.08
900
Load speed,rad/s

100 880

860
0
840

-100
820
0 0.5 1 1.5 2 2.5 3
Time,s
-200
0 0.5 1 1.5 2 Figure 20 Output gain K3 variations with FPID control for
Time,s different stiffness and load inertia.

Figure 18 Load speed response with PID and fuzzy PID


(JL = 0.08 kg m2, k = 16.5 N m/rad).
Maximum uq
5000
Response of load speed FUZZY PID
150 PID
FUZZY PID
PID
100 Reference signal
voltageuq,v
Load speed,rad/s

50 0

-50

-5000
-100 0 0.5 1 1.5 2
0 0.5 1 1.5 2
Time,s Time,s

Figure 19 Load speed with PID and fuzzy PID (JL = 0.5 kg m2, Figure 21 Output control voltage uq from PID and FPID
k = 30.N m/rad). controller (JL = 0.08 kg m2, k = 16.5 N m/rad).
Adaptive PID control of a stepper motor driving a flexible rotor 135

Maximum uq illustrated by numerical simulation. The proposed control was


6000 concerned with the permanent magnet step motor (PMSM) with
FUZZY PID mechanical variations such as stiffness of rotor and load inertia.
PID A mathematical model for the PMSM was derived and the gains
4000
of a conventional PID control were presented. The data base re-
quired in learning process of the fuzzy logic gain scheduling
2000
mechanism was obtained from the mathematical model. Both
FPID and PID control are required to track step input reference
voltageuq,v

signal and arbitrary trapezoidal input signal. For rigid rotor and
0 specified load inertia the conventional PID control guarantees
the desired step reference position and speed in short time and
the performance is less satisfactory with trapezoidal reference
-2000 speed signal, but For flexible rotor and variable load inertia
the performance of constant gain PID is unstable. It was found
that the stable value for the integral gain is half the value of the
-4000
proportional gain. The fuzzy system for scheduling the deriva-
tive gain K3 has two antecedents which are the maximum errors
0 0.5 1 1.5 2
Time,s
in both load position and speed and one consequent K3.The
inference system is based on the TSK model. The Gaussian
Figure 22 Output control voltage uq from PID and FPID membership function produced the best results. The fuzzy sys-
controller at JL = 0.5 kg m2, k = 30 N m/rad. tem for scheduling the proportional gain K1 has two antecedents
which are the instantaneous errors in both load position and
speed and one consequent K1.The inference system is based on
the Mamdani model. The triangular membership function
Response of load speed
150 (MF) produced the best results. The conducted simulation
Reference signal showed that the fuzzy system is able to adapt the controller gains
FUZZY PID to track the desired load and speed responses. FPID perfor-
PID mance is much better than the conventional PID control
100
scheme. Fuzzy self-tuning controller demonstrates a very quick
Load speed ,rad/s

response and little overshoot, because the fuzzy self-tuning con-


trol is based on the function relationship among the errors,
50
parameters K1, K3, and operation experiences. The output con-
trol voltage and current produced by FPID are stable, smoother
and faster than that resulted from the PID control. The output
0 control signals from FPID are much less than these from the
PID. Therefore, the control power is saved upon using the FPID
control which is useful from industrial point of view. Although
-50 the FPID is trained based on step input response, it is able to
0 0.1 0.2 0.3 0.4 0.5 track an arbitrary trapezoidal reference signal.
Time,s

Figure 23 Reference load speed signal and controllers response


at JL = 0.08 kg m2, k = 16.5 N m/rad.
Appendix A
Response of load position
15 (See Tables A-1 and A-2).
Table A-1 Motor simulation specification.
Reference signal Motor parameters Symbol Value Units
10 FUZZY PID
PID Rotor inertia Jm 0.01 Kg m2
Load position,rad

Viscous friction B 0.05 N-m-s^2/rad


Self inductance of winding L 0.006 Henry
5 Resistance in phase winding R 3 Ohm
Number of pole pairs p 6
Motor torque constant Km 2 N m/A
Load torque TL 2 Nm
0

-5 Table A-2 Flexible rotor simulation specification.


0 0.1 0.2 0.3 0.4 0.5
Time,s Flexible rotor parameters Symbol Value Units
Load inertia JL From 0.08 to 5 Kg m2
Figure 24 Reference load position signal and controllers Stiffness k From 16.5 to 200 Nm
response at JL = 0.08 kg m2, k = 16.5 N m/rad.
136 N.M. Elsodany et al.

Appendix B [4] Ali Selk Ghafari, Mehdi Behzad, Investigation of the micro -step
control positioning system performance affected by random
PID stability: Since the gains of PID controller were chosen to input signals, Mechatronics 15 (2005).
satisfy certain pole placement, therefore the controlled system [5] M.P. Henry, Keynote paper, Control Engineering 3 (7) (1995).
[6] R. Marino, S. Peresada, P. Tomei, Nonlinear adaptive control
is stable unless the system parameters are changed.
of permanent magnet step motors, Automatica 31 (11) (1995).
Fuzzy PID stability: According to Eq. (5), the control volt- [7] Frank betin, Daniel Pinchon, Gerare Andro Capolino, Fuzzy
ages are determined based on determining the desired current logic applied to steed control of a stepping motor drive, I EEE
iqr and idr through the PID control. Considering the variation Transactions on Industrial Electronics 47(3) 9 (2000).
in the load and the rotor stiffness as disturbances, then Eq. (4) [8] Sergey Ddward Lyshevski, Motion control of electromechanical
can be rearranged in the form: servo devices with permanent-magnet stepper motor,
Mechatronics 7 (6) (1997).
K ¼ gðex ; eh Þ [9] Xuquan Li, Jiangping Chen, Zhijiu Chen, WeihuLiu, Wei Hu
Assuming the disturbances are bounded, then ee U where U is Xiaobing Liu, A new method for controlling refrigerant Flow in
a compact set and automobile air conditioning, Applied Thermal Engineering 24
Z (2004).
[10] J. Xu, C.C. Hang, C. Liu, Parellel structure and tuning of a
e¼V<1
d
U
fuzzy PID controller, Automatica 36 (5) (2000) 673–684.
[11] R.K. Mudi, N.K. Pal, A self-tuning fuzzy PI controller, Fuzzy
For any g € L2(U), there exists a continuous function g~ on U Sets Systems 115 (2) (2000).
such that [12] J. Carvajal, G. Chen, H. Ogmen, Fuzzu PID controller; design,
Z 12 performance evaluation, and stability analysis, Information
jg  g~j2 :d
e < e:=2 Sciences 123 (3) (2000).
U [13] Z. Ming-fa, C. Yan, Z. Zhi-yuan, D. Chun, D. Yu, Research of
complex fuzzy control on-off magnetism team motor speed-
By the Universal Approximation Theorem, there exists fuzzy adjusting, Power Electronics and Motion Control Conference,
approximation f eÞ such that IPEMC 2006. CES/IEEE 5th International, (2006).
  [14] Y. Tipsuwan, JiraSrisabye, and S. Kamonsantiroj, An
e
suph2U jfð
eÞ  g~ð
eÞj < 1 experimental study of network-based DC motor speed control
2V2 using SANFIS, IECON 2007, 33rd Annual Conference of the
Fuzzy system for Ki is developed based on numerical simula- IEEE, Industrial Electronics Society, pp 426–432 (2007).
tions considering wide range of disturbances such that, [15] Y. Zhao, E.G. Collins Jr., Fuzzy PI control design for an
Pm i Qn industrial weigh belt feeder, IEE Transactions on Fuzzy Systems
i¼1 y  ð i¼1 lFi ðei ÞÞ 11 (3) (2003) 311–319.
K ¼ fðeÞ ¼ P m Qn
i¼1 lFi ðei Þ
i¼1
[16] Y.-H. Chang, Y.-Y. Wang, M.-H. Hung, P.-C. Chen, Fuzzy-
scheduling integral control of induction servo motor with
So the fuzzy system is considered as an approximation for actuator saturation via LMI approach, International Journal
eÞ, therefore:
ggð of Computer Applications in Technology 27 (2/3) (2006) 107–
Z 12 Z 12 Z 118.
jfð eÞj2 d
eÞ  gð e 6 jfð eÞj2 d
eÞ  gð e þ jgð
eÞ [17] A. Hazzab, I. Bousserhane, M. Zerbo, P. Sicard, Real time
U U U implementation of fuzzy gain scheduling of PI controller for
induction motor machine control, Neural Processing Letters 24
eÞj2 d
 g~ð e
(3) (2006) 203–215.
Z 12 [18] Y.-H. Chang, Y.-Y. Wang, M.-H. Hung, P.-C. Chen, Fuzzy-
2 scheduling control of a linear permanent magnet synchronous
6 sup jfð
eÞ  g~ð
eÞj d
e þ e=2
U h2U
motor with payload variations, Procceedings IMechE, Journal
Systems and Control Engineering 222 (2008) 465–479.
e2 e [19] B. Allaoua, B. Gasbaoui, I. Mebarki, Setting up PID DC motor
6ð :VÞ þ 6 e speed control alteration parameters using particle swarm
4V 2
optimization strategy, Leonardo Electronic Journal of
Practices and Technology (14) (2009) 19–32.
References [20] A.S. Ghafari, A. Alasty, Design and real-time experimental
implementation of gain scheduling PID fuzzy controller for
[1] Petar Crnosija, Microcomputer implementation of optimal hybrid stepper motor in micro-step operation, Proceedings of
IEEE, ICM’04 (2004) 421–426.
algorithms for closed-loop control of hybrid stepper motor
[21] Thanassis Speliotisa, Dimitris Niarchosa, Patrick Meneroudb,
drives, I EEE Transactions on Industrial Electronics 47 (2000).
[2] Miodrag Bolic1, Vujo Drndarevic, Branko Samardzic, G. Magnacb, Franck Claeyssenb, John Pepinc, Claude
Distributed measurement and control system based on Fermond, M. Pannetierd, N. Biziered, Micro-motor with
screen-printed rotor Magnets, Journal of Magnetism and
microcontrollers with automatic program generation, Sensor
Magnetic Materials 2 (1997).
and Actuators 90 (2001).
[3] D.O. Carrica, S.A. Gonz_alez, M. Benedetti, A high speed [22] John R. Rogers, Kevin Craig, On-hardware optimization of
velocity control algorithm of multiple stepper motors, stepper motor system dynamics, Mechatronics 15 (2005).
Mechatronics (2004).

You might also like