0% found this document useful (0 votes)
386 views5 pages

DSP Control of Stepper Motor

Zaki

Uploaded by

AhmedHyderMohd
Copyright
© Attribution Non-Commercial (BY-NC)
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)
386 views5 pages

DSP Control of Stepper Motor

Zaki

Uploaded by

AhmedHyderMohd
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 5

Volume 51, Number 2, 2010 109

DSP-Based Real-Time Control of a Two


Phase Hybrid Stepping Motor
Mohamed S. ZAKY, Ehab M. ISMAEIL and Mahmoud M. KHATER
Abstract - The control of step motors has attracted much attention over the past few years, due to developments in control theory
and low-cost digital hardware. Among various types of stepping motors, hybrid stepping motor is the most commonly used since it
has the advantages of higher efficiency and torque capability. Stepping motors are widely used in precise motion control systems
which require a high dynamic performance. However, an open loop speed control is insufficient, so closed loop control is
essentially required. This paper presents a mathematical model by which the dynamic behavior of a hybrid stepping motor can be
successfully predicted under different operating conditions. Hysteresis current control is used to produce the power converter gate
drive pulses which enforce the phase currents follow their reference. The experimental results using DSP-DS1102 control board for
hybrid stepping motor under different operating conditions have been presented. The criteria of high performance such as fast
dynamic response, overshoot and undershoot of the proposed drive system are examined.
Keywords - Dynamic Analysis, DSP-Based Control, Hybrid Stepping Motor

1. INTRODUCTION


Hybrid stepper motor (HSM) is an
electromechanical actuator which is widely used as a
positioning device. It is a doubly salient machine which
incorporates a permanent magnet in the rotor [4]. Its
stator poles are provided with windings which are
energized sequentially via a power electronic converter
to produce the stepping motion. Compared with
variable reluctance type, HSM has a small step length
(typically 1.8 degrees) and possesses a higher
torque/volume ratio. Because of its high precision in
positioning, stepping motor is widely used in office and
factory automation applications such as robotic
systems, printers and consumer electronics [l].
The control of step motors has attracted much
attention over the past few years, due to the
developments in control theory and the availability of
low-cost digital hardware. Hybrid stepping motor is
generally operated in open loop due to its special
structure. The motor develops its torque through mutual
interaction between the electromagnetic excitation from
the stator poles and the permanent magnet flux crossing
the rotor teeth. Once a particular combination of phase
currents is established and maintained in the stator, the
rotor teeth will be attracted into an alignment with the
stator poles in a particular position.
Stepping motors are mainly used for simple point-
to-point positioning tasks in which they were open-loop
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 or speed was
used.


Manuscript received April 16, 2010.
The digital closed-loop principle was introduced
to stepping motors in the 1970s in order to increase
positioning accuracy and reduce their sensitivity to load
disturbances [1], [2].
The closed-loop 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 shaft
encoder. Nowadays, due to advances made in both
power electronics and data processing, stepping motors
are more often closed-loop 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 closed-loop algorithms such as proportional
integralderivative (PID) control is inadequate because
these algorithms are often sensitive to mechanical
configuration changes. This problem can be solved by
applying advanced closed-loop control techniques such
as self-tuning regulation (STR) where the controller is
enforced to adapt itself to the motor operating
conditions. Applied to the stepping motor, STR gives
better performance than PID regulation because this
technique is adaptive to system variations [3].
Nevertheless, this kind of control strategy is difficult to
be implemented due to the large amount of floating-
point computation, which means an increase in the
sampling period.
In the open loop control the HSM often use about
50% of its nominal torque since a large torque reserve
is required to overcome any load variation. In this
classical control scheme there is no feedback of load
position to the controller, however the motor must
respond to each excitation change. This introduces
large overshoot, resonance and torque ripple problems
which degrade the operating performances. Besides, if
2010 Mediamira Science Publisher. All rights reserved.
ACTA ELECTROTEHNICA 110
fast excitation changes are applied, the stepper motor
can lose steps and therefore it fails to move the rotor to
the new demanded position. This would result a
permanent error between the actual load position and
the required position and consequently lose its stability
and synchronization. For these limitations a closed loop
controller is utmost importance for high performance
applications [5].
The main contribution of this paper is to develop a
closed loop control of hybrid stepping motor using DSP
to realize a high dynamic system performance. The
dynamic model of a two-phase hybrid stepping motor
drive is presented. The development of a hysteresis
current controller for a hybrid stepping motor is
introduced. An experimental investigation study is
conducted to evaluate the proposed drive system with
closed loop control. The proposed hybrid stepping
motor drive system is implemented in the laboratory
using DSP-DS1102 control board. A high dynamic
performance of the proposed drive system is assessed
and tested during different operating conditions.

2. DYNAMIC MODELING OF HYBRID
STEPPING MOTOR
The mathematical model of a stepper motor
consists of electrical and mechanical parts. The
electrical part is represented by the equivalent circuit,
Fig. 1, which depends on the motor type.
The present analysis assumes that the magnetic
circuit is linear (no saturation) and the mutual
inductance between phases is negligible. The
mechanical part is represented by a state-space model
based on inertia moment and viscous friction
coefficient.
In this model, R
a
and L
a
represent respectively the
resistance and inductance of A-phase winding. Due to
the large value of the air gap introduced by the
magnets, the winding inductance of the permanent-
magnet or hybrid stepping motor can be considered to
be independent of the rotor position. The voltage source
e
a
() represents the motor back EMF (electromotive
force) which is a sinusoidal function of the rotor
position:

( )
a
d d d
e
dt d dt

= =
(1)
( ) sin( )
a r m
e N N
r
= (2)
Where N
r
is the number of rotor teeth and
m
is
the motor maximum magnetic flux.
Note that at the reference position 0 = , the north
pole on the rotor is fully aligned with A-axis pole so
that the A-phase back EMF is then zero.
For phase B, the back EMF becomes
(3) ( ) sin( / 2)
b r m r
e N N =
The voltage equations of a two-phase hybrid
stepper motors, can be obtained as,

sin( )
a
a s a s r m r
di
V r i l N N
dt
= +
(4)

sin( / 2)
b
b s b s r m r
di
V r i l N N
dt
= +
(5)
From the Eqns (2-3)

sin( )
a s r m
a r
a
s s s
di r N V
i N
dt l l l

= + +
(6)

sin( / 2)
b s r m
b r
b
s s s
di r N V
i N
dt l l l

= + +
(7)
The electromagnetic torque produced by a two-
phase hybrid stepper motor is equal to the sum of the
torque resulting from the interaction of the phase
currents and magnetic fluxes created by the magnets
and the detent torque, which results from the saliency
of the rotor:
The torque produced by a current in winding A
is given by
a
i
sin( )
a r m a r
N i N = (7)

e
a
()
R
a
L
a
V
a

i
a

Similarly, the torque developed by current is
given by.
b
i
(8) sin( / 2)
b r m a r
N i N =
The detent torque
sin(2 )
d dm r
T N = (9)
The total torque equal
Fig. 1. Equivalent circuit of hybrid stepping motor.

s i n ( )
s i n ( / 2 ) s i n ( 2 )
e r m a r r m a
r d m
T N i N N i
N T

r
N
=

(10)
The mechanical equation

2
e m L
2
d
T B T J
dt

=
(11)
That is, the following differential equations for the
rotor angular velocity and displacement result

e m L
d 1
(T B T )
dt J

=
(12)

d
dt

=
(13)

3. HYSTERESIS CURRENT CONTROL
The current control, which consists of two
hysteresis controllers, is built with Simulink blocks.
The motor currents are provided by measurement and
compared to the reference currents. The current error is
passed through hysteresis controller represented by

Volume 51, Number 2, 2010 111
relay block with band H to produce the inverter gate
pulses as shown in Fig. 2.
Square-wave current references are generated
using the current amplitude and the step frequency
parameters.
The gate pulses are produced based on the
following concepts taking phase a as an example,
In the positive half cycle,
If then Na = 0;
*
a a
i i H > +
If then Na = 1;
*
a a
i i H <
In the negative half cycle,
If then Na = 1;
*
a a
i i H > +
If then Na = 0;
*
a a
i i H <

4. SYSTEM IMPLEMENTATION
The proposed current control algorithms have
been realized and tested for feasibility in a motor drive
containing a hybrid stepping motor with a power
supply, inverter and gate circuit, and current controller.
The motor phases are fed by H-bridge MOSFET
PWM converters connected to a 28 V DC voltage
source. The motor phase currents are independently
controlled by two hysteresis-based controllers which
generate the MOSFET drive signals by comparing the
measured currents with their references. The output
switching commands of the DSP control board are
obtained via its digital ports and interfaced with the
converter through opto-isolated gate drive circuits.


+
-
Pulses
a
i
a
i



+
- b
i
b
i


Fig. 2. Hysteresis current controllers for producing gate pulses.
The Matlab/Simulink models can be implemented
and tested in real time. The Real-Time Interface (RTI)
contains a library of Blocks which connects the
Simulink models to the real system. The Real-Time
workshop (RTW) converts the model to C code. The C
code is then automatically compiled to the assembly
language of the target processors and downloaded to
the controller board. Finally, ControlDesk, and
Experimentation tools, are used to control, tune and
monitor the running process. In real time it is available
to capture the signals of the model and change
parameters of the controller.

5. EXPERIMENTAL RESULTS
The experimental system of Fig. 3 is built in the
laboratory to test the performance of the hybrid
stepping motor drive system under different operation
The basic configuration of the experimental
system is shown in Fig. 3. It consists of a hybrid
stepping motor interfaced with a digital control board
DS1102 based on a Texas Instruments TMS320C31
Digital Signal Processor for real-time control. Rating
and parameters of the hybrid stepping motor are given
in the appendix. Stator currents are measured and
filtered using analogue circuitry. Hall-effect sensors are
used for this purpose. The measured current signals are
acquired by the A/D input ports of the DSP control
board. This board is hosted by a personal computer on
which mathematical algorithms are programmed and
downloaded to the board for real-time control.
Fig. 3. Block diagram of the experimental system using DSP
control board.
Vdc
2-Phase
Bridege
Inverter
HS
Motor
b
a
ia ib
Drive
Control
Step
DIR
iaref ibref
DSP-DS1102 Control Board
Hysteresis
Current
Controller
A/D
Current
Sensor
Digital I/O Ports
Computer
ISA
Bus
T1 T
2
T3 T4
S1
S4
S3
S
2

D/A
Oscillo
scope

Time [sec]
S
p
e
e
d
s

[
r
p
m
]
Reference
Measured
(a) reference and actual speeds

Time [sec]
R
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]


(b) Rotor position signal
Time [sec]
A
b
s
o
l
u
t
e

r
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]
(c) Absolute rotor position
Fig. 4. Experimental results at step change of speed reference at
314 rpm.

ACTA ELECTROTEHNICA 112
conditions. This includes step change of reference
speed at different reference values 314, 125, and 65
rpm, respectively. Figs. 4 to 6 show the reference and
actual speeds, rotor position signal and absolute rotor
position under step speed change. It is obvious that the
actual speed and consequently the rotor position
reaches the steady state value smoothly without
overshoot or undershoot. Moreover, the drive system
has a fast dynamic response and takes a minimum rise
time to reach the steady state value. However, the
actual speed contains ripples which increase at low
speeds.
Experimental results are presented also during
speed reversal, Fig.7. It is clear that the actual speed
follows the reference speed smoothly. Moreover,
experimental results are presented with repetitive
operation to test the precise operation of the drive
system and fast dynamic response, Fig.8. It is observed
that the drive system preserves its stability and
synchronization with fast start and stop operations. This
proves the supremacy of the proposed closed loop
control of hybrid stepping motor drive system.




6. CONCLUSION
This paper has presented a mathematical model
with which the dynamic behavior of a hybrid stepping
motor could be successfully predicted. This model has
been used to illustrate the dynamic operation as well as
steady state operation of hybrid stepping motor with
hysteresis current control. The experimental results
using DSP-DS1102 control board for a hybrid stepping
motor under different operating conditions has been
presented. Experimental results have been presented
during step change of speed reference, speed reversal
and repetitive operation. It has been obvious that the
actual speed and consequently the rotor position
reaches the steady state value smoothly without
overshoot or undershoot. Moreover, the drive system is
fast dynamic response and takes a minimum rise time to
reach the steady state value. In addition, it has been
observed that the drive system can not lose its stability
or synchronization with speed reversal and fast start
and stop operations. This proves the supremacy of the
proposed closed loop control of hybrid stepping motor
drive system. With the high performance DSP and
advanced control techniques, attempts are done to
overcome speed ripples.


Time [sec]
S
p
e
e
d
s

[
r
p
m
]
Reference
Measured
(a) reference and actual speeds

Time [sec]
R
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]

(b) Rotor position signal

Time [sec]
A
b
s
o
l
u
t
e

r
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]
(c) Absolute rotor position
Fig. 5. Experimental results at step change of speed reference at
125 rpm.

Time [sec]
S
p
e
e
d
s

[
r
p
m
]

Reference
Measured
(a) Reference and actual speeds

Time [sec]
R
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]

(b) Rotor position signal

Time [sec]
A
b
s
o
l
u
t
e

r
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]
(c) Absolute rotor position
Fig. 6. Experimental results at step change of speed reference at
65 rpm.

Volume 51, Number 2, 2010

113

Reference
Measured
Time [sec]
S
p
e
e
d
s

[
r
p
m
]

Time [sec]
S
p
e
e
d
s

[
r
p
m
]
Reference Measured








(a) Reference and actual speeds
Time [sec]
(a) Reference and actual speeds


R
o
t
o
r

p
o
s
i
t
i
o
n


Time [sec]
R
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]

(b) Rotor position signal


[
d
e
g
.
]

(b) Rotor position signal








Time [sec]
p
o
s
i
t
i
o
n

[
d
e
g
.
]
(c) Absolute rotor position
Fig. 7. Experimental results during speed reversal.
A
b

s
o
l
u
t
e

r
o
t
o
r

Time [sec]
A
b
s
o
l
u
t
e

r
o
t
o
r

p
o
s
i
t
i
o
n

[
d
e
g
.
]
(c) Absolute rotor position
Fig. 8. Experimental results during repetitive operation.






5. T. Kenjo, A. Sugawara, "Stepping Motors and Their
Microprocessor Controls", 2
nd
Edition, Oxford University Press,
Oxford, 2003.
APPENDIX
6. P. Acarnley, "Stepping motors-A guide to theory and Practice,"
4
th
Edition, the Institution of Electrical Engineering, London,
2002.
Table I. Hybrid Stepping Motor Parameters.
Number of Phases 2 Detent torque 0.002 N.m
Winding inductance 0.0014 H The total inertia 1.2e
-7

Winding resistance 0.7 The total friction 0.0001
The step angle 1.8 Initial Speed(rad/sec)
0
Maximum flux
linkage
0.005 Initial Position (degree)
0
7. T. Kenjo and Takshi, "Speed Ripple Characteristic of Hybrid
Stepping Motor Driven in the Mini Step Mode," International
conference on stepping motor system.
8. C. Rusu, I. Birou and E. Szoke, "Model Based Design Controller
for the Stepper Motor," IEEE International Conference on
Automation, Quality and Testing, Robotics (AQTR), vol. 2, pp.
175179, May 22-25, 2008.
9. M. Bodson, J.N. Chiasson, R.T. Novotnak, and R.B. Rekowski,
"High Performance NonLinear feedback control of permanent-
magnet stepper motor", IEEE Transactions on Control Systems
Technology, vol. 1, Issue 1, pp. 514, March 1993.
REFERENCES
1. T.R. Fredriksen, "Application of the Closed-Loop Stepping
Motor," IEEE Trans. on Automatic Control, vol. AC-13, pp.
464474, Oct. 1968.

Mohamed S. ZAKY
2. B.C. Kuo, "Closed-Loop and Speed Control of Step Motors," The
3
rd
Annual Symposium Incremental Motion Control Systems and
Devices, Urbana-Champaign, IL, May 68, 1974.
Ehab M. ISMAEIL
Mahmoud M. KHATER
3. F. Betin, M. Deloizy, and C. Goeldel, "Closed Loop Control Of
Stepping Motor Drive: Comparison Between PID Control, Self
Tuning Regulation and Fuzzy Logic Control," European Power
Electronics Journal, vol. 8, no. 12, pp. 3339, June 1999.
Electrical Engineering Department
Faculty of Engineering
Shebin El-Kom (32511)
Minoufiya University, Egypt.
4. Du Xu, Yongping Jiang, "A Method and Implementation of Fully
Digitized Continuous Microstep for Step Motor", IEEE
IEMDC97, pp. TC2/9.1- TC2/9.3, May 18-21, 1997.

You might also like