PMSM
Three-phase permanent-magnet synchronous motor. Sinusoidal flux, fixed d/q inductances, ideal rotor-angle and current measurements.
- signal
- rotational
- Gradara equations
- 11 ports
- 5 parameters
pmsmLibraryElectricalDescription
A three-phase permanent-magnet synchronous motor modeled in the rotor d/q frame. Phase voltages come in as signals, are transformed to d/q using the rotor’s electrical angle, and drive the d/q current equations. Torque acts on the mechanical shaft.
It also outputs the phase currents, electrical angle, speed, and torque as ideal measurements, ready for field-oriented control.
Example
PMSM · Field-oriented control 1500 rpm speed command with cascaded d/q current control. A 48 V averaged inverter drives a surface PMSM and a mechanical load that increases at 0.45 s. Ideal current and rotor-position feedback; continuous controllers; no PWM ripple or sensor noise.
Also in this example:SumSubtractConstantLimited integratorCurrent PIClarke transformPark transformInverse transformsThree-phase inverterMechanical loadStepGainSaturation
Ports
Inputs 3
-
a
vaPhase a voltage, in volts.
-
b
vbPhase b voltage, in volts.
-
c
vcPhase c voltage, in volts.
Outputs 7
-
ia
Phase a current, in amperes.
-
ib
Phase b current, in amperes.
-
ic
Phase c current, in amperes.
-
θe
thetaElectrical rotor angle, in radians: polePairs times the shaft angle. It is not wrapped to one turn.
-
ω
wmMechanical shaft speed, in rad/s.
-
rpm
Mechanical shaft speed, in revolutions per minute.
-
Te
torqueElectromagnetic torque Te, in N·m.
Conserving terminals 1
-
shaft
flangeRotor shaft. The motor applies torque Te to what is connected.
Parameters
-
Stator resistance
R0.35 Ω≥ 0.001
Stator phase resistance, in ohms.
-
d-axis inductance
Ld0.001 H≥ 0.000001
d-axis inductance, in henries.
-
q-axis inductance
Lq0.001 H≥ 0.000001
q-axis inductance, in henries. Ld = Lq gives a surface-mount machine with no reluctance torque.
-
PM flux linkage
psi0.035 Wb≥ 0.0001
Permanent-magnet flux linkage, in webers.
-
Pole pairs
polePairs4≥ 1
Number of pole pairs.
Equations
theta = polePairs · flange.phi, wm = d(flange.phi)/dt, we = polePairs · wm vd = (2/3) · Σ vk · cos(theta − θk), vq = −(2/3) · Σ vk · sin(theta − θk), θk = 0, 2π/3, −2π/3 for a, b, c Ld · did/dt = vd − R · id + we · Lq · iq Lq · diq/dt = vq − R · iq − we · (Ld · id + psi) torque = 1.5 · polePairs · (psi · iq + (Ld − Lq) · id · iq), flange.tau = −torque ia = id · cos(theta) − iq · sin(theta), and likewise for b and c rpm = wm · 60 / (2π)
Assumptions and limitations
- The phase voltages are signals, not pins: the motor draws no power from an electrical circuit. Drive it from Three-phase inverter or voltage commands.
- Sinusoidal back-EMF, constant inductances; no saturation, iron losses, cogging, or zero-sequence current.
- No rotor inertia or friction; connect an inertia to the shaft. The d/q currents start at 0.
Used in
These larger examples use it too. Open them from Examples in the app.
- PMSM · Field-oriented control
See also
Select a block in Gradara and press F1 to open its page offline.