## Documentation Center |

Implement stepper motor model

The Stepper Motor (STM) block implements a generic model that represents two most popular families of stepper motors:

Variable-reluctance stepper motors

Permanent-magnet or hybrid stepper motors

The Stepper Motor model consists of electrical and mechanical sections. The electrical section is represented by an equivalent circuit, configuration of which depends on the motor type. The equivalent circuits have been built with the supposition that the magnetic circuit is linear (no saturation) and the mutual inductance between phases is negligible. The mechanical section is represented by a state-space model based on inertia moment and viscous friction coefficient.

For a variable-reluctance stepper motor, the equivalent circuit for one phase is shown in the following figure.

In this model, *R _{a}* and

*L _{a}*(

where *L*_{0} is the average
inductance, *L*_{1} is the maximum
inductance variation and *N _{r}* is
the rotor teeth number.

Note that at the reference position (*θ* =
0), the rotor tooth is fully aligned with A-axis pole so that the
A-phase winding inductance is then maximum.

The total electromagnetic torque produced by the motor is the sum of the torques produced by the motor phases:

where *m* is the phase number, *i _{x}* is
the winding current in phase

For a permanent-magnet (PM) or hybrid stepper motor, the equivalent circuit for one phase is shown in the following figure.

In this model, *R _{a}* and

where *p* is the number of pole pairs 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.

The electromagnetic torque produced by a two-phase PM or 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:

*T _{e}* = –

**Motor type**Select

`Variable reluctance`to implement a variable-reluctance stepper motor.**Number of phases**You can select 3, 4 or 5 phases.

**Maximum winding inductance**The maximum inductance L

_{max}(Henry) of each phase winding.**Minimum winding inductance**The minimum inductance L

_{min}(Henry) of each phase winding.**Winding resistance**The resistance R

_{a}(ohm) of each phase winding.**Step angle**The step angle (degrees) of the rotor movement.

**Total inertia**The total inertia momentum J (kg.m

^{2}) of the motor and the load.**Total friction**The total viscous friction coefficient B (N.m.s) of the motor and the load.

**Initial speed**The initial rotation speed ω

_{0}(rad/s).**Initial position**The initial rotor position Θ

_{0}(degrees).

**Motor type**Select

`Permanent-magnet/Hybrid`to implement a permanent-magnet or hybrid stepper motor.**Number of phases**You can select 2 or 4 phases.

**Winding inductance**The inductance L

_{a}(Henry) of each phase winding.**Winding resistance**The resistance R

_{a}(ohm) of each phase winding.**Step angle**The step angle (degrees) of the rotor movement.

**Maximum flux linkage**The maximum flux linkage ψ

_{m}(V.s) produced by the magnets.**Maximum detent torque**The maximum detent torque T

_{dm}(N.m) resulting from the saliency of the rotor.**Total inertia**The total inertia momentum J (kg.m

^{2}) of the motor and the load.**Total friction**The total viscous friction coefficient B (N.m.s) of the motor and the load.

**Initial speed**The initial rotation speed ω

_{0}(rad/s).**Initial position**The initial rotor position Θ

_{0}(degrees).

`TL`The mechanical load torque (in N.m). TL is positive in motor operation and negative in generator operation.

`m`The Simulink

^{®}output of the block is a vector containing 5 signals. You can demultiplex these signals by using the Bus Selector block provided in the Simulink library.Signal

Definition

Units

Symbol

1

Phase voltage

V

V

_{ph}2

Phase current

A

I

_{ph}3

Electromagnetic torque

N.m

T

_{e}4

Rotor speed

rad/s

w

5

Rotor position

rad

Theta

The parameters used in the stepper model are usually obtained from the manufacturer data sheets. In the case where the parameters are not available, they can be determined from experimental measurements.

The parameters provided by manufacturer data sheets are usually:
number of phases, holding torque, step angle, voltage per phase, current
per phase, winding resistance (R_{a}), maximum
inductance (L_{max}), average inductance (L_{0}),
and rotor inertia (J).

The parameters provided by manufacturer data sheets are usually:
number of phases, holding torque, step angle, voltage per phase, current
per phase, winding resistance (R_{a}), winding
inductance (L_{a}), and rotor inertia (J).

The maximum detent torque (T_{dm}) is not
always specified. This parameter can be assumed to be equal to 1-10%
of the maximum holding torque.

The maximum flux linkage (ψ_{m}) is
not always specified. This parameter can be obtained experimentally
by driving the motor to a constant speed N (rpm) and by measuring
the maximum open-circuit winding voltage E_{m} (V).

The parameter ψ_{m} is then computed
by the following relation:

*ψ _{m}* =
(30/

where *p* is the number of pole pairs given
by *p* = 360 / (2*m*·*step*).
Here *m* = phase number, *step* =
step angle in degrees.

The `power_steppermotorpower_steppermotor` example
illustrates the operation of a stepper motor drive using a two-phase
hybrid stepper motor model.

The motor phases are fed by two 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. Square-wave current references are generated using the current amplitude and the step frequency parameters specified in the dialog window. The movement of the stepper drive is controlled by the STEP and DIR signals received from external sources.

The following waveforms are obtained from a simulation of 0.25 sec operation of the stepper motor drive during which the stepper rotates during 0.1 sec in the positive direction, stops for 0.05 sec, rotates in the reverse direction for 0.05 sec and stops.

Detailed waveforms are shown in the following figure.

Was this topic helpful?