PMSMParams
def PMSMParams(
p:int, Ld:float, Lq:float, psi_m:float, Rs:float=0.0, J:float=0.0
):Container for PMSM parameters.
The back-EMF is the voltage induced by the rotating permanent magnet flux.
Peak phase back-EMF:
\[E_p = \omega_e \cdot \psi_m\]
where: - \(\omega_e\) = electrical angular velocity [rad/s] - \(\psi_m\) = permanent magnet flux linkage [Wb]
Relationship to mechanical speed:
\[\omega_e = p \cdot \omega_m = p \cdot \frac{2\pi N}{60}\]
where \(p\) is the number of pole pairs and \(N\) is mechanical speed in rpm.
Physical significance: Back-EMF represents the voltage that must be overcome to drive current through the motor at a given speed. Higher flux and higher speed → higher back-EMF → reduced available voltage for current production (important at high speeds).
Purpose: Control and simulate AC permanent magnet motors
What it does: Analyze PMSM (Permanent Magnet Synchronous Motor) in dq-frame.
A control engineer designs field-oriented control (FOC) algorithms and needs steady-state current/torque relationships.
Inputs: Motor parameters (inductances, flux linkage, resistance), operating speed, applied voltages
Outputs: dq-axis currents, torque, back-EMF, motor profile (constant-torque and flux-weakening regions)
Upstream (depends on): Uses winding concepts from 01_winding.ipynb,
Downstream (used by): control system design
A dq-frame model for AC synchronous machines with permanent magnet excitation.
The dq-frame (synchronously rotating reference frame) is the foundation of AC motor control.
Key concepts:
Voltage equations in dq-frame:
\[V_d = R_s i_d + \frac{d\psi_d}{dt} - \omega_e \psi_q\]
\[V_q = R_s i_q + \frac{d\psi_q}{dt} + \omega_e \psi_d\]
Flux linkages:
\[\psi_d = L_d i_d + \psi_m\]
\[\psi_q = L_q i_q\]
In steady-state (constant speed), the derivatives vanish, yielding the simplified equations used here.
Non-salient (SPM) vs. Salient (IPM) machines:
Torque breakdown:
\[T_e = \underbrace{\frac{3}{2}p\psi_m i_q}_{\text{Excitation torque}} + \underbrace{\frac{3}{2}p(L_d - L_q)i_d i_q}_{\text{Reluctance torque}}\]
For maximum torque at low speed: set \(i_d = 0\) (all current goes to \(i_q\))
At high speed (flux-weakening): apply negative \(i_d\) to reduce back-EMF and maintain voltage margin
At high speeds, the back-EMF becomes large, limiting the available voltage for current production.
Voltage constraint:
\[|\mathbf{V}| = \sqrt{(R_s i_d - \omega_e L_q i_q)^2 + (R_s i_q + \omega_e(L_d i_d + \psi_m))^2} \leq V_b\]
Flux-weakening strategy:
Apply negative \(i_d\) to weaken the total flux (\(\psi_d = L_d i_d + \psi_m\)), reducing back-EMF and extending the speed range.
Operating regions:
The back-EMF is proportional to speed and PM flux: \(E = \omega_e \cdot \psi_m\)
The instantaneous torque has two components:
\[T_e = \frac{3}{2} p [\psi_m i_q + (L_d - L_q) i_d i_q]\]
Component breakdown:
Control implications: - Low speed (constant-torque region): Use \(i_d = 0\), vary \(i_q\) for torque control - High speed (flux-weakening region): Use \(i_d < 0\) to reduce back-EMF and maintain power output
Solve the 2×2 linear system for steady-state dq currents from applied voltages.
Steady-state voltage equations (neglecting transients):
\[V_d = R_s i_d - \omega_e L_q i_q\]
\[V_q = R_s i_q + \omega_e (L_d i_d + \psi_m)\]
Physical interpretation: - d-axis: Resistive voltage drop plus cross-coupling from q-axis current - q-axis: Resistive drop plus back-EMF and cross-coupling from d-axis current
Matrix form:
\[\begin{bmatrix} V_d \ V_q - \omega_e\psi_m \end{bmatrix} = \begin{bmatrix} R_s & -\omega_e L_q \ \omega_e L_d & R_s \end{bmatrix} \begin{bmatrix} i_d \ i_q \end{bmatrix}\]
Solving this system gives the steady-state currents needed to produce a given voltage vector.
Steady-state dq currents.
Surface-mount PMSM with constant-torque and flux-weakening regions.
PMSM dq-model validated against analytical expressions.