JMAG

Stepper Motor $—$ two-phase stepper motor model using a JMAG-RT model

 • The Stepper Motor JMAG-RT component uses external code, provided through an attached .rtt file, to model a two-phase stepper motor.
 • The stepper motor has two four-phase plugs connected to four windings. The positive plug, ${\mathrm{plug}}_{p}$, connects to one end of each of the four windings, the negative plug, ${\mathrm{plug}}_{n}$, connects to the other end of the corresponding windings.
 • Use the following steps to attach and connect to an external rtt file:
 1 Select the Attached Files tab.
 2 Right-click on Documents, and then select Attach File....
 3 In the Attach Document dialog, browse to the location of the .rtt motor file, select it, and then click Attach....
 4 Select the JMAG-RT component in the Model Workspace.
 5 Select the Properties tab, open the Parameters > General section, and then select the attached .rtt file from the rtt_filename list.
 • This component should be used with a fixed-step solver. To select a fixed-step solver, click the Settings tab, expand the Simulation section, and then select Fixed from the Solver Type list.

Variables

 Name Value Units Description Modelica ID $v$ $V$ 4-phases of voltage v $i$ $A$ 4-phases of current i $\mathrm{\phi }$ $\mathrm{radian}$ Angular position of shaft phi $\mathrm{\tau }$ $\mathrm{N·m}$ Torque on shaft tau

Connections

 Name Description Modelica ID ${\mathrm{plug}}_{p}$ Positive 4-phase plug plug_p ${\mathrm{plug}}_{n}$ Negative 4-phase plug plug_n $\mathrm{flange}$ Rotational flange of shaft flange $\mathrm{support}$ (optional) Support/housing of component support

Parameters

 Name Default Units Description Modelica ID rtt filename Name of rtt file rtt_filename ${\mathrm{\tau }}_{\mathrm{sense}}$ 0 $s$ Time-constant of current/voltage sense filter (typical number when enabled is 0.0003) tau_sense use support false True means add a 1D rotational port to support the torque on the shell of the motor useSupport set initial angle false True means set the initial angular displacement of the shaft setDisplacement0 initial angle 0 $\mathrm{rad}$ Initial angular position of the shaft displacement0 set resistance false True means set the winding resistance setRes ${R}_{\mathrm{winding}}$ 0 $\mathrm{\Omega }$ Winding resistance; used only if set resistance is true Rwinding open term low voltage true True means open the terminal when the voltage is extremely low open_term_low_voltage