European Journal of Scientific Research ISSN 1450216X Vol.39 No.1 (2010), pp.5063 © EuroJournals Publishing, Inc. 2010 http://www.eurojournals.com/ejsr.htm
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor
S.F.Rezeka Arab Academy for Science and Technology and Maritime Transport Alexandria, Egypt Email: srezeka@yahoo.com
N.M.Elsodany Faculty of Engineering, Alexandria University, Alexandria, Egypt
N.A.Maharem Faculty of Engineering, Alexandria University, Alexandria, Egypt
Abstract
Stepping motors are widely used in robotics and in the numerical control of machine tools to perform high precision positioning operations. The classical closedloop control of the stepper motor does not respond properly to the system variations unless adaptive technique is used. In this paper, the feasibility of fuzzy gain scheduling control for stepping motor driving flexible 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 both the derivative and the proportional gains 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 conventional PID control scheme. Fuzzy selftuning controller demonstrates a very fast response and little overshoot.
Keywords: Stepper motor, Fuzzy control, Gain scheduling, Flexible rotor
1. Introduction
Mechatronics is defined as the interdisciplinary field of engineering that deals with the design of products whose function relies on the integration of mechanical, electrical, and electronic components [1, 2]. Actuators (motors) are considered as essential components of all Mechatronics systems. Stepper motors are widely implemented in systems that demand high accuracy combined with quick response [3]. Stepping motors were mainly used for simple pointto point positioning tasks in which they were openloop controlled. In this way, they were driven by a pulse train with a predetermined time interval between successive pulses applied to the power driver, and no information on the motor shaft position
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor 51
or speed was used[4,5]. Unfortunately, the openloop control scheme suffers from lowperformance capability and lack of adaptability to load variations and system variations. Indeed, without feedback, there is no way of knowing if the motor has missed a pulse or if the speed response is oscillatory. The closedloop principle [6] was introduced in order to increase the accuracy positioning of the stepping motor while making it less sensitive to load disturbances. The closedloop control is characterized by starting the motor with one pulse, and subsequent drive pulses are generated as a function of the motor shaft position and/or speed by the use of a feedback encoder. Nowadays, due to advances made in both power electronics and data processing, stepping motors are more often closedloop controlled, in particular, for machine tools and robotic manipulators in which they have to perform high precision operations in spite of the mechanical configuration changes. Also, the use of classic closedloop algorithms such as proportional–integral– derivative (PID) control is weak unless the closedloop control is forced to adapt to the motor operating conditions. Fuzzy Logic is a technology of great potential in the fields of artificial intelligence and Mechatronics [7, 10]. It mimics the human way of thinking and decisionmaking. The aim of this paper is to investigate the feasibility of a fuzzy PID control for a stepping motor drive 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 system response to external disturbances and the effectiveness in the plant parameters. The scope of this work is limited to the study of the control of permanent magnet stepper motor (PMSM).
2. System Mathematical Model
2.1 Modeling of a Permanent Magnet Stepper (PMS) Motor
This section provides a brief derivation of a nonlinear model of a two phase PM stepper motor. A number of references are available on the generation of stepper motor model [1], and [2]. The rotor shaft dynamic is given by:
J
m
d ω
dt
Where
=
T
m
−
F
ω −
T
L
(1)
J _{m} = Total inertia of the rotor F = Viscous friction coefficient T _{L} = Load torque For a two phase PM motor with P rotor pole pairs and the two phases (φ _{j} ) at 0 and (π/2), the state space equations are:
d 
θ 

= ω 

dt d ω = 
K 
m 
( 
− i 
sin 
P θ+ 
i 
b 
cos 
P ) F θ _{−} ω− 
T L 

dt 
J 
m 
a 
J m 
J m 

di 
^{a} 
= − 
R 
i 
+ 
K 
m 
ω sin P θ + u 
a 

dt 
L 
a 
L 
L 

di 
^{b} = − 
R 
i 
− 
K 
m 
P 
θ − 
u 
b 

dt 
L 
b 
L 
ω cos 
L 
(2)
Where, ω is the angular velocity,
^{d}^{ω} is the load acceleration, ^{d}^{i}^{a} is the current rate through
dt
dt
winding a, and
^{d}^{i}^{b} is the current rate through winding b. dt
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
2.2. Flexible Shaft
Considering the case when the load is connected to the motor through a long stiff shaft with stiffness k, then the motor inertia will be J _{m} and the load inertia will be J _{L} as shown in figure (1).
52
In this case, the load and flexible shaft equations will be:
d θ
L
dt
d
ω
L
=
ω
1
L
=
dt
J
L
[(
−
k
(
θ θ
L
−
m
)
−
B
(
ω ω
L
−
m
))]
A classical control technique for PMSM is based on park's transformation [1]. That is, the transformation of the vector (u) and (i) expressed in the fixed stator frame (a, b) into vectors expressed in a frame (d, q) that rotates along the fictitious excitation vector such that:
⎡
⎢
⎣
X
d
X
q
⎤
⎥
⎦
=
⎡ cos
⎢
⎣
P
θ
P
θ
− sin
sin
cos
P
P
θ
θ
⎤
⎥
⎦
⎡ X ⎤
⎢
⎣
⎦
⎥
a
X
b
The state equations (2) expressed in terms of currents and voltages in rotating (d, q) coordinates become:
d θ
m 
= ω 

dt d ω m dt 
= 
K m J m 
m i q − 
F J m 
ω m 
− 
T J L m 
− J 
1 m {)( k θ θ m − L 
+ B 
( 

di 
^{d} 
= − 
R 
i 
+ 
P 
i + u 
d 

dt 
L 
d 
ω 
m q L 

di 
^{q} =− R 
i 
P i 
K m u q 

dt 
L 
q 
− ω m 
d − 
L ω + m 
L 
ω ω
m
−
L
)}
(3)
3. Stepper Motor Control
The control objective is to find the suitable control variables (u _{d} , u _{q} ) so that the system tracks desired load angular position and velocity with accepted errors while keeping the states and control variables bounded too. There are many internal and external uncertainties that may affect the performance of the controlled system. These uncertainties are the stiffness of the flexible shaft, the inertia of the rotor.
Two control laws will be considered
G. Static PID control law
H. Intelligent control law which implements fuzzy logic control to adapt the static PID control law
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor
53
3.1. Static ProportionalIntegralDerivative (PID) Control Law
Figure 2: Block Diagram of PID Controller
Figure (2) shows the block diagram of closedloop PID control. u _{d} and u _{q} denote the controller's output signal, ω _{r} and θ _{r} are the reference angular speed and angular displacement, respectively. The control closed loop outputs are the actual angular displacement and speed (θ, ω). The PID gains are:
K _{1} , K _{2} , K _{3} are the proportional, integral and derivative control gains respectively. According to Ref [1], the static PID control output can be put in the form;
u
u
d
q
=−
PL ω i
q
=
K ω
m
−
−
K
K
4
4
(i
(i
q
d
−
−
i
i
qr
dr
)
)
−
−
K
K
5
5
t
∫
0
t
∫
0
[i
d
(
τ
)
[i ()τ
q
−
−
i
i
dr
qr
(
τ ]d τ
)
.
()τ ]d _{τ}
.
(5)
With i _{d}_{r} =0
i =−
qr
J
m
K
m
{
K
1
(
θ−θ +
r
)
K
2
t
∫
0
[
θτ −θ τ τ+
r
d
()
(
)
]
K
3
(
ω−ω
r
)}
where: i , i _{d} are the actual current in rotating (d, q) and i
q
qr
, i _{d}_{r} are the reference current in rotating (d, q).
The controller gains are tuned for (J _{m} =0.08 kg.m ^{2} , B= 3 Nms/rad, L= 3 Henry, R= 3Ω, P=6, K _{m} =2 Nm/ rad). The values of the gains in SI units are: K _{1} = 80000, K _{2} = 651K _{1} , K _{3} = 500, K _{4} =L/T, K _{5} =R/T, and T = 0.0005. T is the equivalent time constant of the current loops .With the above choice of K _{4} and K _{5} , the current loop transfer function is,
i 
q () s 
= 
i 
d 
() s 
1 
i qr () s 
i dr 
(s) 
^{=} 1 + TS 
Where the break frequency = 1/T = 2000 rad/s. The gain K _{1} is chosen so that natural resonant frequency is 285 rad/s and the damping ratio is equal to 0.9. K _{3} is chosen so that 1/K _{3} =4T.
3.1.1. Performance of PID Control with Rigid Shaft The PID control is required to track two different referenced signals: step input and any arbitrary reference signals. The nominal value of the inertia is 0.01 kg m ^{2} and the load torque is 2 N.m. The simulation is based on the rigid shaft equations (2) and (3). The system responses of the PID controller are obtained and reported in figure (3) for step input signal. It can be noticed from the figures, that at the beginning the response exhibits an oscillation and the system reach to the desired position at 0.05 second. The PID control guarantees the desired reference position and speed in short
54
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
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
The second test for tracking is the typical position reference trajectory Ө _{r} (t) with trapezoidal speed reference ω _{r} (t). Figure (4) shows the response of motor position error, motor position and motor speed. The simulated results are the same as that obtained ref [1]. It is clear that the stepper motor recovered the targeted position with a small overshoot.
Figure 4: Response of PMSM with PID Control Subjected to Arbitrary Reference Input Signal.
Response of motor position
Response of motor speed
3.1.2. PID control for a Stepper motor with flexible rotor In this section the mechanical variations such as (load torque and the stiffness of the system) are generated in order to test the response of the PID control upon adding an external disturbance
3.1.2.1. Classical PID Control with Fixed Gains The PID controllers gains are held constant: K _{1} =80000, K _{2} =65*80000, K _{3} =500. The equations of the flexible shaft (eq.4) were added to the system model. A step input reference signal is considered. The obtained results are presented in figures (5) to (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 J _{L} =0.05 to 0.5 kg.m2 on the time response of load position, the load speed are reported It can be shown that the performance of the fixed gain PID
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor 55
controller is not satisfactory and the system is unstable To improve the system performance and to be able to track the reference load position and speed, the PID gains should be varied continuously.
Figure 5: Position and Speed response of PMSM with flexible shaft at different stiffness (k), and J _{L} =0.08 kg.m ^{2} .
Figure 6:
Position and Speed response of PMSM with flexible shaft at different load inertia (J _{L} ), k =16.5 N.m/rad.
tim e,s
time,s
3.1.2.2. Effects of PID Gains on the Response and Uncertainties In this section the PID gains K _{1} , K _{2} and K _{3} are changed to obtain stable performance at different shaft stiffness and inertia load. Sample of these results reported in figure (7) to figure (12.). It can be noticed that the oscillations were damped and the system become stable. As both the shaft stiffness and the load inertia change, there will be another optimum set of PID constants to track the desired load position and speed. The above procedures were repeated for different values of k and J _{L} to obtain the data base required in learning process of the Fuzzy Logic gain scheduling mechanism.
Figure 7:
Effects of integral gain K _{2} on load position response, k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{1} = 80000 and K _{3} = 500
Response of load position
time,s
56
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
Figure 8: 
Effects of integral gain K _{2} on load speed response, k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{1} = 80000 and K _{3} = 500 

Response of load speed 

300 

200 
K2=0.5*K1
K2=5*K1
K2=10*K1
K2=20*K1


Load speed,rad/s 
100 

0 

100 

200 

300 

0 
0.1 
0.2 
0.3 
0.4 
0.5 

time,s 

Figure 9: 
Effects of derivative gain K _{3} on load position response, k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{1} = 80000 and K _{2} = 0.5 K _{1} 
Response of load position
time,s
Figure 10: Effects of Derivative Gain K _{3} on Load Speed Response,k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{1} = 80000 and K _{2} = 0.5 K _{1}
Response of load speed
time,s
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor
57
Figure 11: Effects of proportional gain K _{1} on position response, k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{2} = 0.5 K _{1} and K _{3} = 1000
Response of load position
time,s
Figure 12: Effects of proportional gain K _{1} on speed response, k=16.5N.m/rad, J _{L} =0.08kg.m ^{2} , K _{2} = 0.5 K _{1} and K _{3} = 1000
Response of load speed
time,s
3.2. Fuzzy Pid (FPID)
_{T}_{h}_{e} Fuzzy Logic Control is used to tune the parameters of the PID controller on line. This is achieved by scheduling the gains of the PID control based on system performance indices as shown in figure
(13).
Figure 13: Block Diagram of Fuzzy PID Controller
58
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
4. Optimum Fuzzy Gain Scheduling Mechanism
Numerical simulations were carried out upon varying the shaft stiffness (k) from 16.5 N.m/rad to 200 N.m/rad and the load inertia (J _{L} ) from 0.01 kg.m ^{2} to 5.0 kg.m ^{2} . This task has twofold aim, the first is to determine the control parameters which are robust to these varying operating conditions and the second is to identify the indices that will drive the gain scheduling mechanism. The changes in the integral controller gain K _{2} may render unstable response. It was found that maintaining the value of K _{2} to 0.5 K _{1} realizes the stable performance at all operating
4.1. Fuzzy model for K _{3}
The fuzzy system has two antecedents (e _{θ}_{,}_{m}_{a}_{x} and e _{ω}_{,}_{m}_{a}_{x} ) and one consequent K _{3} . The inference system is based on the TSK model. The Gaussian membership function (MF) shown in figure(14)produced better results than the triangular membership functionThe system has a single output, which is a crisp value that corresponds to the derivative gain K _{3} . The output has three values: mf1= 500, mf2 = 900 and mf3 = 1000.
Figure 14: Input Membership functions
0.8
0.6
0.4
0.2
max error of speed(input1)
max error of position(input2)
4.2. Fuzzy Model for K _{1}
The indices are the instantaneous error in both load position (e _{θ} ) and load speed (e _{ω}_{)} . The fuzzy system has two antecedents (e _{θ} and e _{ω} ) and one consequent (K _{1} ). The inference system is based on Mamdani model. The membership functions are triangular functions as shown in figure (15).
Figure 15: Membership functions generated for the fuzzy model of K _{1} ainput e _{θ} binput e _{w} c output K _{1}
(c)
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor
59
5. Results of Fuzzy PID
The PID and FPID are required to track two reference signals: step input signal as shown in figure (3) and an arbitrary trapezoidal reference signal as illustrated in figure (4). The PID gains are held constants at K _{1} =80000, K _{2} =0.5*80000, and K _{3} =500 for all simulations to guarantee stable response.
5.1. Results of Step Input Signal
Figures (16) to (19) show that fuzzy gain scheduling of the PID controller performs better than the conventional PID controller. It is clear that the oscillations are damped upon using FPID controller and the response is fast. FPID is robust to plant parameter variations such as inertia change and stiffness. It can be noticed that the output gain from fuzzy control is varying when changing the mechanical configuration as shown in figure (20). The output control signals are stable, smoother faster and less than that resulted from the PID control as depicted in figures (21), (22). Therefore the power is saved upon using the FPID control which is useful from industrial point of
Figure 16: Load position with PID and FUZZY PID (J _{L} =0.08kg.m ^{2} , k =16.5N.m/rad)
Response of load position
time,s
Figure 17: Load position with PID and FUZZY PID (J _{L} =0.5kg.m ^{2} , k =30.N.m/rad
Response of load position
time,s
60
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
Figure 18: Load speed response with PID and FUZZY PID (J _{L} =0.08 kg.m ^{2} , k =16.5N.m/rad)
Response of load speed
time,s
Figure 19: Load speed with PID and FUZZY PID (J _{L} =0.5kg.m ^{2} , k =30.N.m/rad).
Response of load speed
time,s
Figure 20: Output gain K _{3} variations with FPID control for different stiffness and load inertia
Output gain from FPID
time,s
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor
61
Figure. 21: Output control voltage u _{q} from PID and FPID controller (J _{L} =0.08kg.m ^{2} , k=16.5N.m/rad)
Maximum uq
time,s
Figure 22: Output control voltage u _{q} from PID and FPID controller at J _{L} =0.5kg.m ^{2} , k=30N.m/rad
Maximum uq
time,s
5.2. Results of arbitrary trapezoidal reference signal
Figure (23) and figure (24) illustrate the load position and load speed obtained with FPID and PID control. It can be seen that FPID performance is much better than the conventional PID control scheme. Fuzzy selftuning controller demonstrates a very quick response and little overshoot, because the fuzzy selftuning control is based on the function relationship among the errors, parameters K _{1} , K _{3} , and operation
62
S.F.Rezeka, N.M.Elsodany and N.A.Maharem
Figure 23: Reference load speed signal and controllers response at J _{L} =0.08kg.m ^{2} , k=16.5N.m/rad
Response of load speed
time,s
Figure 24: Reference load position signal and controllers response at J _{L} =0.08kg.m ^{2} , k=16.5N.m/rad
Response of load position
time,s
6. Conclusions
The feasibility of fuzzy gain scheduling control for stepping motor driving flexible 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. Both FPID and PID control are required to track step input reference signal and arbitrary trapezoidal input signal. For rigid rotor and 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 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 proportional gain. The fuzzy system for scheduling the derivative gain K _{3} has two antecedents which are the maximum errors in both load position and speed and one consequent K _{3} .The inference system is based on the TSK model. The Gaussian membership function produced the best results. The fuzzy system for scheduling the proportional gain K _{1} has two antecedents which are the instantaneous errors in both load position and
Fuzzy Gain Scheduling Control of a Stepper Motor Driving a Flexible Rotor 63
speed and one consequent K _{1} .The inference system is based on the Mamdani model. The triangular membership function (MF) produced the best results. The conducted simulation showed that the fuzzy system is able to adapt the controller gains to track the desired load and speed responses. FPID performance is much better than the conventional PID control scheme. Fuzzy selftuning controller demonstrates a very quick response and little overshoot, because the fuzzy selftuning control is based on the function relationship among the errors, parameters K _{1} , K _{3} , and operation experiences. The output control voltage and current produced by FPID are stable, smoother and faster than that resulted from the PID control. The output 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 the FPID is trained based on step input response, it is able to track an arbitrary trapezoidal reference signal.
References
[1] 
Crnosija, P., "Microcomputer implementation of optimal algorithms for closedloop control of (2001). 
[2] 
hybrid stepper motor drives," IEEE Transactions on Industrial Electronics, Vol. 47, (2000). Bolic,M., V. Drndarevic and B. Samardzic," distributed measurement and control system based 
on microcontrollers with automatic program generation," Sensor and Actuators, Vol. 90, 

[3] 
Carrica, D.O., S.A. Gonz_alez and M. Benedetti," A high speed velocity control algorithm of 
[4] 
multiple stepper motors," Mechatronics (2004). Ghafari, A.S., and Mehdi Behzad, "Investigation of the micro step control positioning system 
[5] 
performance affected by random input signals," Mechatronics, Vol. 15, (2005). Henry, M.P., "Keynote paper," Control Eng Vol. 3, No. 7 (1995). 
[6] 
Marino, R., S.Peresada and P.Tomei," Nonlinear adaptive control of permanent magnet step 
[7] 
motors," Automatica Vol. 31, No.11, (1995). Betin, F., D. Pinchon and G.A. Capolino, "Fuzzy logic applied to steed control of a stepping 
[8] 
motor drive," IEEE Transactions on Industrial Electronics, Vol. 47, No 3, 9 (2000). Speliotisa, T., D. Niarchosa, P. Meneroudb, G. Magnacb, F. Claeyssenb, J. Pepinc, C. Fermond, 
[9] 
M. Pannetierd and N. Biziered, "Micromotor with screenprinted rotor Magnets," Journal of Magnetism and Magnetic Materials, Vol. 2, (1997). Lyshevski,S.D., "Motion control of electromechanical servo devices with permanentmagnet 
[10] 
stepper motor," Mechatronics, Vol. 7, No. 6, (1997). Li, X., J. Chen, Z. Chen, W. Liu and W. H. X. Liu," A new method for controlling refrigerant 
[11] 
Flow in automobile air conditioning," Applied Thermal Engineering ,Vol. 24,(2004). Rogers, J.R., and K. Craig,"Onhardware optimization of stepper motor system dynamics," Mechatronics, Vol. 15, (2005). 
Гораздо больше, чем просто документы.
Откройте для себя все, что может предложить Scribd, включая книги и аудиокниги от крупных издательств.
Отменить можно в любой момент.