PMSM Field-Oriented Control Example¶
Permanent magnet synchronous motor with vector control.
Overview¶
Field-Oriented Control (FOC) provides: - Torque and flux decoupling - Maximum torque per ampere - Smooth low-speed operation - Four-quadrant operation
Specifications¶
| Parameter | Value |
|---|---|
| Rated Power | 2.2 kW |
| Rated Speed | 3000 RPM |
| Pole Pairs | 4 |
| Rs (Stator Resistance) | 1.5 Ω |
| Ld (d-axis Inductance) | 8 mH |
| Lq (q-axis Inductance) | 12 mH |
| ψm (PM Flux Linkage) | 0.175 Wb |
Circuit Files¶
pmsm_foc_basic.ipes- Basic FOC implementationpmsm_foc_mtpa.ipes- Maximum torque per amperepmsm_sensorless.ipes- Sensorless FOC
Theory¶
dq Reference Frame¶
Transform abc quantities to rotating dq frame:
Clarke Transform (abc → αβ): $\(\begin{bmatrix} i_\alpha \\ i_\beta \end{bmatrix} = \frac{2}{3}\begin{bmatrix} 1 & -1/2 & -1/2 \\ 0 & \sqrt{3}/2 & -\sqrt{3}/2 \end{bmatrix}\begin{bmatrix} i_a \\ i_b \\ i_c \end{bmatrix}\)$
Park Transform (αβ → dq): $\(\begin{bmatrix} i_d \\ i_q \end{bmatrix} = \begin{bmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{bmatrix}\begin{bmatrix} i_\alpha \\ i_\beta \end{bmatrix}\)$
Motor Equations (dq Frame)¶
Torque Equation¶
For surface PM (Ld = Lq): τe = (3/2)p·ψm·iq
Control Structure¶
┌──────────────┐
Speed Ref ─────────►│ Speed PI │
│ Controller │
Speed fb ──────────►│ │
└──────┬───────┘
│ iq*
id*=0 ▼
├─────────────────────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ id PI │ │ iq PI │
│ Control │ │ Control │
└────┬─────┘ └────┬─────┘
│ vd* │ vq*
└──────────┬─────────┘
▼
┌──────────┐
│ Inverse │
│ Park/SVM │
└────┬─────┘
▼
┌──────────┐
│ Inverter │
└────┬─────┘
▼
┌──────────┐
│ PMSM │
└──────────┘
Current Controller Tuning¶
PI Gains¶
d-axis: $\(K_{p,d} = L_d \cdot \omega_c, \quad K_{i,d} = R_s \cdot \omega_c\)$
q-axis: $\(K_{p,q} = L_q \cdot \omega_c, \quad K_{i,q} = R_s \cdot \omega_c\)$
Where ωc is desired current loop bandwidth.
Decoupling¶
Add feedforward terms: - ωe·Lq·iq to d-axis - ωe·Ld·id + ωe·ψm to q-axis
Exercises¶
- Basic FOC: Implement current loops, verify iq tracking
- Speed Loop: Add speed controller, tune response
- MTPA: Implement id* curve for IPM motor
- Field Weakening: Extend speed range above base speed