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
BlockPMSMKindpmsmLibraryElectrical

Description

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.

Speed commandrpm → rad/sSpeed errorKp · speedKi · speedIntegralPI sumCurrent limitq-axis errorq-axis PIid* = 0 Ad-axis errord-axis PIInverse Park / ClarkeAveraged inverterPMSMMechanical loadClarkePark
In Gradara, select a PMSM block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:SumSubtractConstantLimited integratorCurrent PIClarke transformPark transformInverse transformsThree-phase inverterMechanical loadStepGainSaturation

Ports

Inputs 3

  • ava

    Phase a voltage, in volts.

  • bvb

    Phase b voltage, in volts.

  • cvc

    Phase c voltage, in volts.

Outputs 7

  • ia

    Phase a current, in amperes.

  • ib

    Phase b current, in amperes.

  • ic

    Phase c current, in amperes.

  • θetheta

    Electrical rotor angle, in radians: polePairs times the shaft angle. It is not wrapped to one turn.

  • ωwm

    Mechanical shaft speed, in rad/s.

  • rpm

    Mechanical shaft speed, in revolutions per minute.

  • Tetorque

    Electromagnetic torque Te, in N·m.

Conserving terminals 1

  • shaftflange

    Rotor shaft. The motor applies torque Te to what is connected.

Parameters

  • Stator resistanceR0.35 Ω

    ≥ 0.001

    Stator phase resistance, in ohms.

  • d-axis inductanceLd0.001 H

    ≥ 0.000001

    d-axis inductance, in henries.

  • q-axis inductanceLq0.001 H

    ≥ 0.000001

    q-axis inductance, in henries. Ld = Lq gives a surface-mount machine with no reluctance torque.

  • PM flux linkagepsi0.035 Wb

    ≥ 0.0001

    Permanent-magnet flux linkage, in webers.

  • Pole pairspolePairs4

    ≥ 1

    Number of pole pairs.

Equations

Modelica
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.