Unipolar Stepper Motor
Stepper motor with center taps on two-phase windings
Description
The Unipolar Stepper Motor block represents a stepper
motor that has center taps on the two phase windings. The winding currents and
mechanical output are defined by the following equations:
where:
eA+ is the back emf induced
across the A+ to A0
half-winding.
eA- is the back emf induced
across the A- to A0
half-winding.
eB+ is the back emf induced
across the B+ to B0
half-winding.
eB- is the back emf induced
across the B- to B0
half-winding.
iA+ is the current flowing from
the A+ port to the A0 center tap
port.
iA- is the current flowing from
the A- port to the A0 center tap
port.
iB+ is the current flowing from
the B+ port to the B0 center tap
port.
iB- is the current flowing from
the B- port to the B0 center tap
port.
vA+ is the voltage at the
A+ port relative to the A0
center tap port.
vA- is the voltage at the
A- port relative to the A0
center tap port.
vB+ is the voltage at the
B+ port relative to the B0
center tap port.
vB- is the voltage at the
B- port relative to the B0
center tap port.
Km is the motor torque
constant.
Nr is the number of teeth on
each of the two rotor poles. The Full step size
parameter is (π/2)/Nr.
R is the half-winding resistance. For example, it is
the resistance between A+ and A0
ports.
L is the half-winding inductance. For example, it is
the inductance between A+ and A0
ports.
Rm is the magnetizing
resistance.
B is the rotational damping.
J is the inertia.
ω is the rotor speed.
Θ is the rotor angle.
Td is the detent torque
amplitude.
Te is the electrical
torque.
If the initial rotor is zero or some multiple of
(π/2)/Nr, the rotor is aligned with the
A-phase winding. If a positive current flows from the A+ port to
the A0 center tap port, then the stepper acts to stay aligned with
the A-phase. Equivalently, a positive current flowing from the A0
center tap port to the A- port also acts on the rotor to stay
aligned with the A-phase.
The Unipolar Stepper Motor block produces a positive torque acting from
the mechanical C to R ports for either of the following sequences. Both sequences assume
the rotor initial angle is zero or some multiple of
(π/2)/Nr.
Sequence | Center taps connected to ground | Center taps connected to positive supply |
---|
1 | Positive current from A+ to
A0
| Positive current from A0 to
A-
|
2 | Positive current from B+ to
B0
| Positive current from B0 to
B-
|
3 | Positive current from A- to
A0
| Positive current from A0 to
A-
|
4 | Positive current from B- to
B0
| Positive current from B0 to
B-
|
Averaged Mode
If you set the Simulation mode parameter to
Averaged
, both for a Unipolar Stepper
Motor block and for the Unipolar Stepper Motor
Driver block that controls it, then the individual steps are not
simulated. This can be a good way to speed up simulation. In Averaged mode, under
non-slipping conditions, the motor and driver are represented by a second-order
linear system that tracks the specified step rate. The demanded step rate is
determined directly from voltage across A+ and
A-. So, for example, a voltage of +10V across the
A+ and A- terminals is interpreted as
a step rate demand of ten steps per second. See the Unipolar Stepper Motor Driver reference page for more
information on how to connect the Unipolar Stepper Motor
Driver to your step angle controller.
Averaged mode includes a slip estimator to predict whether the stepper motor would
have slipped if running in Stepping simulation mode. Slip is predicted if the motor
torque exceeds the Vector of maximum torque values parameter
value for longer than one step period, the step period being determined from the
current step rate demand. Upon detecting slip, the simulation will proceed or stop
with an error, according to the Action on slipping parameter
value. If you choose the action that lets the simulation continue, note that
simulation results may be incorrect: when slipping occurs, the torque generated by
the motor will not generally be the maximum available torque; the maximum torque is
only achieved if the stepper controller detects slip and adjusts the step rate
command accordingly.
The dynamics of the equivalent second-order system are determined from the values
that you specify for the Approximate total load inertia and
Maximum step rate command parameters. It is important that
you set as accurate values as possible for these parameters, so that the step rate
command is tracked, and the block does not generate false slipping warnings or
errors.
If you run the motor in Averaged mode with the optional thermal ports exposed (see
Thermal Ports), then heat is added to the thermal ports assuming that
the windings are always powered, even when the step rate command is zero. The block
makes adjustments for half stepping and for reduced torque (and winding currents) at
higher speeds. For these adjustments to be correct, the Vector of maximum
torque parameter values must be correct. For half stepping, at zero
speed the heat generated by the block is the average of that generated when stopped
at a half step and at a full step.
If you simulate or predict slip, MathWorks recommends that you do some validation
runs comparing Stepping and Averaged modes before using the averaged model
representation for simulation studies.
Thermal Ports
The block has five optional thermal ports, one for each of the four half-windings and one for
the rotor. These ports are hidden by default. To expose the thermal ports, right-click the
block in your model, and then from the context menu select
> >
. This action displays the thermal ports on
the block icon, and exposes the Temperature Dependence and
Thermal Port parameters. These parameters are described further on
this reference page.
Use the thermal ports to simulate the effects of copper resistance
and iron losses that convert electrical power to heat. For more information
on using thermal ports in actuator blocks, see Simulating Thermal Effects in Rotational and Translational Actuators.
Assumptions and Limitations
The model neglects magnetic saturation effects and any magnetic coupling
between phases.
When you select the Start simulation from steady state
check box in the Simscape™
Solver Configuration block, this block will not initialize an
Initial rotor angle value between –π and π.
All four half-windings are assumed to be identical, and therefore have the
same resistance temperature coefficient, alpha, and the same thermal
mass.
To use Averaged mode, the Unipolar Stepper Motor block must be directly
connected to a Unipolar Stepper Motor Driver block also running in Averaged
mode.
The Averaged mode is an approximation, and exact step tracking compared to the
Stepping mode should not be expected.
Slip detection in Averaged mode is approximate, and depends on a good estimate
for load inertia and maximum step rate. Incorrect values may result in false
slip detection.
When simulating slip in Averaged mode, it is assumed that the stepper motor
controller adjusts the step rate command so as to achieve maximum possible
torque.
Ports
Conserving
expand all
A+
— Top A-phase electrical connection
electrical
Electrical conserving port associated with the top A-phase electrical
connection.
A0
— A-phase center tap connection
electrical
Electrical conserving port associated with the A-phase center tap
connection.
A-
— Lower A-phase electrical connection
electrical
Electrical conserving port associated with the lower A-phase
electrical connection.
B+
— Top B-phase electrical connection
electrical
Electrical conserving port associated with the top B-phase electrical
connection.
B0
— B-phase center tap connection
electrical
Electrical conserving port associated with the B-phase center tap
connection.
B-
— Lower B-phase electrical connection
electrical
Electrical conserving port associated with the lower B-phase
electrical connection.
C
— Case
mechanical
Mechanical rotational conserving port associated with the case.
R
— Rotor
mechanical
Mechanical rotational conserving port associated with the
rotor.
HA+
— Thermal port for winding between A+ and A0
thermal
Thermal port for winding between A+ and
A0. For more information, see Thermal Ports.
HA-
— Thermal port for winding between A- and A0
thermal
Thermal port for winding between A- and
A0. For more information, see Thermal Ports.
HB+
— Thermal port for winding between B+ and B0
thermal
Thermal port for winding between B+ and
B0. For more information, see Thermal Ports.
HB-
— Thermal port for winding between B- and B0
thermal
Thermal port for winding between B- and
B. For more information, see Thermal Ports.
HR
— Rotor thermal port
thermal
Thermal port for rotor. For more information, see Thermal Ports.
Parameters
expand all
Electrical Torque
Simulation mode
— Simulation mode
Stepping
(default) | Averaged
Select Stepping
or
Averaged
. Use
Averaged
only if the block is connected
directly to a Unipolar Stepper Motor
Driver block also running in Averaged mode.
Vector of rotational speeds
— Vector of rotational speeds
[0, 1000, 3000]
rpm
(default)
Vector of rotational speeds at which to define maximum torque values,
for slip prediction.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Averaged
.
Vector of maximum torque values
— Vector of maximum torque values
[2, 2, 1]
N*m
(default)
Vector of maximum torque values, to be used for slip prediction in
conjunction with the Vector of rotational speeds
parameter. The maximum torque values are often given on a datasheet, and
should correspond to the supply voltage and stepping type (half step or
full step) specified in the driver.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Averaged
.
Action on slipping
— Action upon detecting slip
none
(default) | warn
| error
Select the action for the block to perform during simulation upon
detecting slip:
none
— Continue simulation,
limiting the load torque according to the Vector of
maximum torque values.
warn
— Continue simulation,
limiting the load torque according to the Vector of
maximum torque values, and generate a warning
that the rotor is slipping.
error
— Stop the simulation
and generate an error message that the rotor is slipping.
Note that if you choose an action that lets the simulation continue,
simulation results may be incorrect: when slipping occurs, the torque
generated by the motor will not generally be the maximum available
torque; the maximum torque is only achieved if the stepper controller
detects slip and adjusts the step rate command accordingly.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Averaged
.
Approximate total load inertia
— Approximate total load inertia
1e-4
kg*m^2
(default)
The approximate total load inertia, including the rotor inertia. This
value is used to help predict when slipping will occur due to rapid
acceleration demands.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Averaged
.
Maximum step rate command
— Maximum step rate command
10
Hz
(default)
The maximum step rate that your system will command. It is used to
determine a suitable bandwidth for the second order system approximation
to the stepper motor and driver.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Averaged
.
Half-winding resistance
— Half-winding resistance
0.55
Ohm
(default)
Half of the resistance of the A and B phase windings as measured
between the A+ and A-, and the
B+ and B- ports.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Stepping
.
Half-winding inductance
— Half-winding inductance
1.5e-3
H
(default)
Half of the inductance of the A and B phase windings as measured
between the A+ and A-, and the
B+ and B- ports.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Stepping
.
Motor torque constant
— Motor torque constant
0.19
N*m/A
(default)
Motor torque constant Km.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Stepping
.
Detent torque
— Detent torque
0
N*m
(default)
The amplitude of the sinusoidal torque variation observed when
rotating the shaft of the unpowered motor.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Stepping
.
Magnetizing resistance
— Magnetizing resistance
inf
Ohm
(default) | positive scalar
The total magnetizing resistance seen from each of the phase windings,
for example across A+ and A0.
The value must be greater than zero. The default value is
Inf
, which implies that there are no iron
losses.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter to
Stepping
.
Full step size
— Full step size
1.8
deg
(default)
Step size when changing the polarity of either the A or B phase
current. The default value is 1.8
°.
Coefficient of coupling
— Coefficient of coupling for mutual inductance
0
(default)
Coefficient of coupling of the windings for mutual inductance.
Mechanical
Rotor inertia
— Rotor inertia
4.5e-5
kg*m^2
(default)
Resistance of the rotor to change in motor motion. The value can be
zero.
Rotor damping
— Rotor damping
8.0e-4
N*m/(rad/s)
(default)
Energy dissipated by the rotor. The value can be zero.
Initial rotor speed
— Initial rotor speed
0
rpm
(default)
Speed of the rotor at the start of the simulation.
Initial rotor angle
— Initial rotor angle
0
deg
(default)
Angle of the rotor at the start of the simulation.
Temperature Dependence
This tab appears only for blocks with exposed thermal ports. For more information,
see Thermal Ports.
Resistance temperature coefficient
— Resistance temperature coefficient
3.93e-3
1/K
(default)
Parameter α in the equation defining resistance as a function of
temperature, as described in Thermal Model for Actuator Blocks. It is assumed that all
windings are made of the same material, and therefore have the same
resistance temperature coefficient.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter in the
Electrical Torque setting to
Stepping
.
Measurement temperature
— Measurement temperature
25
degC
(default)
The temperature for which motor parameters are defined.
Vector of maximum torque values at second measurement temperature
— Vector of maximum torque values at second measurement temperature
[1.7, 1.7, .85]
N*m
(default)
Vector of maximum torque values at second measurement
temperature.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter in the
Electrical Torque setting to
Averaged
.
Second measurement temperature
— Second measurement temperature
125
degC
(default)
Second measurement temperature.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter in the
Electrical Torque setting to
Averaged
.
Stepping mode
— Stepping mode
Full stepping
(default) | Half stepping
Specify stepping mode.
Dependencies
This parameter is visible only when you set the
Simulation mode parameter in the
Electrical Torque setting to
Averaged
.
Thermal Port
This tab appears only for blocks with exposed thermal ports. For more information,
see Thermal Ports.
Half-winding thermal mass
— Half-winding thermal mass
100
J/K
(default)
The thermal mass for half of either the A or B winding. The thermal
mass is the energy required to raise the temperature by one degree. It
is assumed that all four half-windings have the same thermal
mass.
Half-winding initial temperatures, [T_A+ T_A- T_B+ T_B-]
— Half-winding initial temperatures
[25, 25, 25, 25]
degC
(default)
A 1 by 4 row vector defining the temperature of the four half-windings
at the start of simulation.
Rotor thermal mass
— Rotor thermal mass
50
J/K
(default)
The thermal mass of the rotor, that is, the energy required to raise
the temperature of the rotor by one degree.
Rotor initial temperature
— Rotor initial temperature
25
degC
(default)
The temperature of the rotor at the start of simulation.
Percentage of magnetizing resistance associated with the rotor
— Percentage of magnetizing resistance associated with the rotor
90
(default)
The percentage of the magnetizing resistance associated with the
magnetic path through the rotor. It determines how much of the iron loss
heating is attributed to the rotor thermal port HR, and how much is
attributed to the four winding thermal ports.
References
[1] M. Bodson, J. N. Chiasson, R.
T. Novotnak and R. B. Rekowski. “High-Performance Nonlinear Feedback Control of a
Permanent Magnet Stepper Motor.” IEEE Transactions on Control Systems Technology,
Vol. 1, No. 1, March 1993.
[2] P. P. Acarnley.
Stepping Motors: A Guide to Modern Theory and Practice. New
York: Peregrinus, 1982.
[3] S.E. Lyshevski.
Electromechanical Systems, Electric Machines, and Applied
Mechatronics. CRC, 1999.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2012b