10/25/2021
Special Electric Machines
and Their Control
Modeling and simulation of Stepper
Motor in MATLAB/Simulink
Author: Igor Jovanovski 2020m
Mentor: Prof. D-r Goga Cvetkovski
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Abstract:
Development of digital electronics and
microprocessor systems have led to
development of electrical motors capable to
be digitally controlled. These motors are
widely known as stepper motors and the
enable transformation of pulsed electrical
excitation into mechanical energy.
MATLAB/Simulink is used as a simulation
tool for hybrid stepper motor enabling motor
transient characteristics of current, voltage,
torque and speed to be obtained. Different
operating motor regimes are simulated as
no-load and rated load operation. Adequate
conclusions regarding motor performance
characteristics are derived.
Keywords: hybrid stepper motor, Simulink, torque, current, degrees, load
1
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Contents
Introduction..............................................................................................................................................3
1. Hybrid stepper motor- Construction and principle of operation........................................4
2. Simulink Model of Hybrid Stepper Motor..................................................................................5
3. Simulation analysis........................................................................................................................7
3.1 Version 1...................................................................................................................................8
3.2 Version 2.................................................................................................................................12
3.3 Version 3......................................................................................................................................16
Conclusion.............................................................................................................................................20
References.............................................................................................................................................21
2
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Contents of figures
Figure 1: Construction of hybrid stepper motor
a) side view b) cross-section view
Figure 2: Block diagram of stepper motor
Figure 3: Simulink Hybrid Stepper Motor Model
Figure 4: Simulink model of control circuit
Figure 5: Control signals from Signal builder block
Figure 6: Phase Current Iph(A)
Figure 8: Rotor Speed w(rad/s)
Figure 10: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 11: Electromagnetic torque Te (Nm) for Tload=0,15Nm
Figure 12: Electromagnetic torque Te (Nm) for Tload=0,
Figure 13: Electromagnetic torque Te (Nm) for Tload=0,25Nm
Figure 14: Electromagnetic torque Te (Nm) for Tload=0,3Nm
Figure 15: Control signals from Signal builder block
Figure 16: Phase Current Iph(A)
Figure 17: Electromagnetic torque Te(N*m))
Figure 18: Rotor Speed w(rad/s)
Figure 19: Rotor Position Theta(degrees)
Figure 20: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 21: Electromagnetic torque Te (Nm) for Tload=0,15Nm
Figure 22: Electromagnetic torque Te (Nm) for Tload=0,2Nm
Figure 23: Electromagnetic torque Te (Nm) for Tload=0,25Nm
Figure 24: Electromagnetic torque Te (Nm) for Tload=0,3Nm
Figure 25: Control signals from Signal builder block
Figure 26: Phase Current Iph(A)
Figure 28: Rotor Speed w(rad/s)
Figure 30: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 31: Electromagnetic torque Te (Nm) for Tload=0,15Nm
Figure 32: Electromagnetic torque Te (Nm) for Tload=0,2Nm
Figure 33: Electromagnetic torque Te (Nm) for Tload=0,25Nm
Figure 34: Electromagnetic torque Te (Nm) for Tload=0,3Nm
3
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Introduction
Stepper motors are very important in robotics, process control and instrumentation.
They enable precise control of motor angular position, speed and direction of motor
rotation. They are capable of discrete precise movements i.e., movements in precise
steps so they are named as ‘stepper motors. Stepper motors are transforming electrical
energy (excitation) into mechanical movement. They are constructed as rotating or
translating motors. Although stepper motor is known for a long time, they have achieved
their wide popularity in the last thirty years due to development of electronics which
enable construction of cheap and reliable control circuits capable to satisfy complex
requirements regarding motor torque, speed and angular displacement. In order their
transient performance characteristic to be analyzed MATLAB/Simulink is chosen as
simulation tool and motor characteristics are analyzed under different operating
regimes: no-load, rated load and over load. Advantages of stepper motors are: low
costs, small dimensions, possibility to transform the pulses from digital inputs into
angular movement-step, number of steps is equal to the number of control pulses. The
above-mentioned advantages have led to their wide application in control systems and
robotics and have made them irreplaceable moving force of industrial processes [2].
4
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
1. Hybrid stepper motor- Construction and principle of
operation
Hybrid stepper motors have magnetic core which is excited by combination of
electrical windings and permanent magnet. Electrical windings are placed on stator
while rotor is made of permanent magnets (Fig. 1). Number of poles at stator are
usually eight and each pole has two to six teethes. Per pair of poles are placed two
excitation windings for example one winding for pole 1,3,5 and 7 and another for pole
2,4,6 and 8 [1].
a) b)
Figure 1: Construction of hybrid stepper motor
a) side view b) cross-section view
Length of each step can be calculated if number of rotors teethes are known-p. For
hybrid stepper motor length of one seep is calculated from:
90
Steep length= ( )°
p
Hybrid steeper motor has small steep, typically 1.8° and larger torque compared to
variable-reluctance stepper motor. These two parameters can have a decisive
advantage when there is an application with limited operating space.
5
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
2. Simulink Model of Hybrid Stepper Motor
Hybrid stepper motor is operating due to electronically commutated magnetic field which
enables rotor movement. All excitation windings are placed at stator while motor rotor is
constructed of permanent magnet or soft magnetic material. In Fig. 2 is presented block
diagram of motor simulation model constructed of three basic blocks: controller, driver
and motor.
Figure 2: Block diagram of stepper motor
Simulink model from Simulink demo library is presented in Fig.3 and it is consisted of
two sections: electrical and mechanical [4]. According to Simulink model motor input
parameters are: phase voltage (A+, A-, B+ and B-) and mechanical load –TL.
Figure 3: Simulink Hybrid Stepper Motor Model
6
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Output parameters from motor model are: phase current-Iph, electromagnetic torque-
Te, rotor speed-w and rotor position-theta. Electrical part or motor control circuit is
consisted of three functions entities: control block, hysteresis comparator and MOSFET
PWM converter (Fig. 4).
Figure 4: Simulink model of control circuit
Motor movement is controlled by two signals: STEP and DIR which are output signals
from block Signal Builder. Positive value (value of ‘1’) of signal STEP enables motor
rotation while value ‘0’ stops the rotation. DIR signal controls the direction of motor
rotation. Positive value (value of ‘1’) enables rotation in one direction while value of ‘0’
reverses the direction of rotation. Converter bridges “A’ and “B’ are H bridges consisted
of four MOSFET transistors. Bridges are supplied by 28 V DC and their outputs supply
the motor windings with excitation current and enable the motor movement.
7
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
3. Simulation analysis
In this Seminar Paper we will analyze 3 different scenarios, with different control signals
(STEP and DIR) and 6 different loads (T load=0 Nm, Tload=0,1, Tload=0,15 Nm, Tload=0,2
Nm, Tload=0,25 Nm and Tload=0,3 Nm). Time for simulation execution is defined to be
0,25 seconds according to the signals from Signal Builder block and set time in Simulink
model.
3.1 Version 1
First simulation is run at no-load operation or motor is running without any load. The
control signals are as follow.
Figure 5: Control signals from Signal builder block
From the simulation results presented in Fig. 5 it can be concluded that the motor is moving in
one way for 0.1 seconds (STEP=1 and DIR=1), stops in period from 0,1 to 0,15 s (STEP=0,
DIR=0) 0,05 seconds is rotating in opposite direction (STEP=1, DIR=0) and again it stops for
0,05 seconds (STEP=0 and DIR=0).
8
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 6: Phase Current Iph(A) Figure 7: Electromagnetic torque Te(N*m)
Figure 8: Rotor Speed w(rad/s) Figure 9: Rotor Position Theta(degrees)
With adequate zooming of presented results in figure it can be noticed that motor has
reached the speed of 200 (rad/s) and have moved from position 0° to 92° from 0 to
0.104 seconds. It remains in that position for 0.052 seconds before it starts for time of
0,156 to move in opposite direction reaching same speed of 200 (rad/s) and it stops for
time of 0.204 seconds on position 47°. With the change of Load Torque (T load=0,1,
Tload=0,15 Nm, Tload=0,2 Nm, Tload=0,25 Nm and Tload=0,3 Nm) presented in Figure we
can see that there is change in the motor transient characteristics. With grater load
torque we have a very minor change in phase current Iph (increase), rotor speed
(decrease) and rotor position Theta (decrease) which can’t be seen clearly from the
graphs so they won’t be featured. The big change in the motor transient characteristics
is in the electromagnetic torque, with the increase in load torque the electromagnetic
torque is increased (Tload=0,1Nm Te=0,1Nm; Tload=0,15 Nm Te=0,15 Nm; Tload=0,2 Nm
Te=0,2 Nm; Tload=0,25 Nm Te=0,25 Nm and Tload=0,3 Nm Te=0,3 Nm) in order to be
able to drive the load torque (as shown in figure).
9
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 10: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 11: Electromagnetic torque Te (Nm) for Tload=0,15Nm
Figure 12: Electromagnetic torque Te (Nm) for Tload=0, 2Nm
10
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 13: Electromagnetic torque Te (Nm) for Tload=0,25Nm
Figure 14: Electromagnetic torque Te (Nm) for Tload=0,3Nm
11
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
3.2 Version 2
First simulation is run at no-load operation or motor is running without any load. The
control signals are as follow.
Figure 15: Control signals from Signal builder block
From the simulation results presented in Fig. 15 it can be concluded that the motor is
moving in one way for 0.1 seconds (STEP=1 and DIR=1), stops in period from 0,1 to
0,15 s (STEP=0, DIR=1) 0,05 seconds is rotating in same direction (STEP=1, DIR=1)
and again it stops for 0,05 seconds (STEP=0 and DIR=1).
Figure 16: Phase Current Iph(A) Figure 17: Electromagnetic torque Te(N*m)
12
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 18: Rotor Speed w(rad/s) Figure 19: Rotor Position Theta(degrees)
With adequate zooming of presented results in Fig. 15 it can be noticed that motor has
reached the speed of 200 [rad/s] and have moved from position 0° to 92° from 0 to
0.104 seconds. It remains in that position for 0.052 seconds before it starts for time of
0,156 to continue move in same direction reaching same speed of 200 (rad/s) and it
stops for time of 0.204 seconds on position 137°. With the change of Load Torque
(Tload=0,1, Tload=0,15 Nm, Tload=0,2 Nm, Tload=0,25 Nm and Tload=0,3 Nm) presented in
Fig. 10 we can see that there is change in the motor transient characteristics. Withgrater
load torque we have a very minor change in phase current Iph (increase), rotor speed
(decrease) and rotor position Theta (decrease) which can’t be seen clearly from the
graphs so they won’t be featured. The big change in the motor transient characteristics
is in the electromagnetic torque, with the increase in load torque the electromagnetic
torque is increased (Tload=0,1Nm Te=0,1Nm; Tload=0,15 Nm Te=0,15 Nm; Tload=0,2 Nm
Te=0,2 Nm; Tload=0,25 Nm Te=0,25 Nm and Tload=0,3 Nm Te=0,3 Nm) in order to be
able to drive the load torque (as shown in Figure).
13
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 20: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 21: Electromagnetic torque Te (Nm) for Tload=0,15Nm
14
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 22: Electromagnetic torque Te (Nm) for Tload=0,2Nm
Figure 23: Electromagnetic torque Te (Nm) for Tload=0,25Nm
15
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 24: Electromagnetic torque Te (Nm) for Tload=0,3Nm
3.3 Version 3
First simulation is run at no-load operation or motor is running without any load. The
control signals are as follow.
Figure 25: Control signals from Signal builder block
From the simulation results presented in Fig. 25 it can be concluded that the motor is
moving opposite direction for 0.1 seconds (STEP=1 and DIR=-1), stops in period from
0,1 to 0,15 s (STEP=0, DIR=0) 0,05 seconds continues rotating in same direction
(STEP=1, DIR=0) and again it stops for 0,05 seconds (STEP=0 and DIR=0).
16
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 26: Phase Current Iph(A) Figure 27: Electromagnetic torque Te(N*m)
Figure 28: Rotor Speed w(rad/s) Figure 29: Rotor Position Theta(degrees)
With adequate zooming of presented results in Fig. 26 it can be noticed
that motor has reached the speed of 200 [rad/s] and have moved in opposite direction
from position 0° to -92° from 0 to 0.104 seconds. It remains in that position for 0.052
seconds before it starts for time of 0,156 to continue move in same direction reaching
same speed of 200 (rad/s) and it stops for time of 0.204 seconds on position -137°. With
the change of Load Torque (Tload=0,1, Tload=0,15 Nm, Tload=0,2 Nm, Tload=0,25 Nm and
Tload=0,3 Nm) presented in Fig. 27 we can see that there is change in the motor
transient characteristics. With grater load torque we have a very minor change in phase
current Iph (increase), rotor speed (decrease) and rotor position Theta (decrease) which
17
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
can’t be seen clearly from the graphs so they won’t be featured. The big change in the
motor transient characteristics is in the electromagnetic torque, with the increase in load
torque the electromagnetic torque is increased (Tload=0,1Nm Te=0,1Nm; Tload=0,15 Nm
Te=0,15 Nm; Tload=0,2 Nm Te=0,2 Nm; Tload=0,25 Nm Te=0,25 Nm and Tload=0,3 Nm
Te=0,3 Nm) in order to be able to drive the load torque.
Figure 30: Electromagnetic torque Te (Nm) for Tload=0,1Nm
Figure 31: Electromagnetic torque Te (Nm) for Tload=0,15Nm
18
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Figure 32: Electromagnetic torque Te (Nm) for Tload=0,2Nm
Figure 33: Electromagnetic torque Te (Nm) for Tload=0,25Nm
Figure 34: Electromagnetic torque Te (Nm) for Tload=0,3Nm
19
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
Conclusion
Different simulation software packages during recent years have proved itself as
a useful tool in analyses of electro engineering problems. Simulink with its extensive
block libraries enables wide possibilities for electrical machines simulation. In this
seminar paper is analyzed simulation of hybrid stepper motor transient performance
characteristics under different operating regimes: no-load, rated load with different
control versions.
Simulation results proved that motor is running in forward and backward direction
according to the applied signals from PWM inverters to the excitation windings when
applied load is smaller than motor electromagnetic torque. With bigger load there is
increase in current(A) and decrease in the speed(rad/s). Application of simulation
packages has considerably improved electrical machines analysis replacing the
expensive laboratory equipment and enabling performing of different experiments easy
and with no cost.
20
SPECIAL ELECTRIC MACHINES AND THEIR CONTROL
References
1. D.P. Atherton, G.W. Irwin, “Stepping Motors a guide to theory and practice”, 4th
Edition, The institute of Engineering and Technology, 2007.
2. W.H. Yeadon, A.W. Yeadon “Handbook of small electric motors”, McGraw
Hill,2003
3. MATLAB/Simulink, User’s Manual, MathWorks 2007
21