AutoVoltix

← Back to all lessons

MOTORAdvancedReading time: 35 min
Learning Objectives
  • Detail the complete closed-loop signal architecture and dataflow of Field-Oriented Control (FOC).
  • Formulate the cross-coupling dynamic terms (\omega_e L_q I_q and \omega_e L_d I_d) in the d-q synchronous frame.
  • Derive the feedforward cross-coupling decoupling network to enforce true SISO control channels.
  • Synthesize PI current regulator gains ($K_p, K_i$) via analytical pole-placement matching motor parameters ($R_s, L_d, L_q$).
  • Manage 10–20 kHz discrete sampling delays and ensure ISO 26262 ASIL-D torque plausibility safety.

MOTOR-17 — Field-Oriented Control (FOC)

FACT — In virtually every modern road-going electric vehicle (Tesla, Porsche, Hyundai, BYD), the Motor Control Unit (MCU) runs Field-Oriented Control (FOC) at its core. By decoupling complex AC dynamics into orthogonal magnetic flux and electromagnetic torque axes, FOC translates driver pedal demands into instantaneous, ripple-free wheel torque within fractions of a millisecond.

In this lesson, we examine the complete closed-loop architecture of FOC, the dynamics of cross-coupling decoupling, and analytical PI loop tuning for high-performance automotive traction:

  1. FOC Closed-Loop Architecture & Signal Flow
  2. Synchronous d−qd-q Voltage State Equations
  3. Cross-Coupling Dynamics & Feedforward Decoupling Networks
  4. Current Loop Synthesis & Analytical PI Tuning (Kp,KiK_p, K_i)
  5. Managing 10–20 kHz Discrete Sampling & Execution Delays
  6. Inverter Integration & ISO 26262 ASIL-D Plausibility Monitoring

1. FOC Architecture and Closed-Loop Signal Flow

The core principle of FOC is to orient the stator current vector relative to the rotor magnetic field.

The signal chain executes cyclically:

  1. Current Sensing: Stator phase currents (ia,ib,ici_a, i_b, i_c) are sampled simultaneously by isolated Hall-effect or shunt sensors.
  2. Rotor Angle Synchronization: A Resolver-to-Digital Converter (RDC) provides rotor electrical angle (θe\theta_e).
  3. Clarke & Park: Currents are mapped into the synchronous rotating frame, yielding DC quantities IdI_d and IqI_q.
  4. Current Regulators: Dedicated PI controllers compare feedback currents (Id,IqI_d, I_q) against torque-derived setpoints (Id∗,Iq∗I_d^*, I_q^*).
  5. Decoupling Network: Speed-dependent coupling voltages are cancelled via feedforward injection.
  6. Inverse Park & SVPWM: Demanded voltages (Vd∗,Vq∗V_d^*, V_q^*) are rotated into α−β\alpha-\beta coordinates and modulated onto the physical inverter switches via Space Vector PWM.
FOC Signal Flow:
   Torque Request ---> [ MTPA Table ] ---> I_d*, I_q*
                                              |
      +---------------------------------------+
      |
      v
  I_d* --(+)--> [ PI_d ] --(+)--> V_d* -----\
          ^ -               ^ +              \
          |                 |                 \
         I_d       -w_e*L_q*I_q (Decoupling)   \
          |                                     \
          |                                      +--> [ Inv. Park ] ---> [ SVPWM ] ---> [ Inverter ] ---> Motor
          |                                     /          ^
         I_q       +w_e*(L_d*I_d + psi_m)      /           |
          |                 |                 /         theta_e
          v -               v +              /             |
  I_q* --(+)--> [ PI_q ] --(+)--> V_q* -----/              |
                                                           |
   [ ia, ib ] ----> [ Clarke ] ----> [ Park ] <------------+ [ Resolver: theta_e ]

2. PMSM Voltage Equations in the d−qd-q Frame

In the synchronously rotating d−qd-q reference frame, the dynamic voltage equations of a PMSM are expressed as:

Vd=RsId+LddIddt−ωeLqIq⏟Cross-CouplingV_d = R_s I_d + L_d \frac{dI_d}{dt} - \underbrace{\omega_e L_q I_q}_{\text{Cross-Coupling}}

Vq=RsIq+LqdIqdt+ωeLdId⏟Cross-Coupling+ωeψpm⏟Back-EMFV_q = R_s I_q + L_q \frac{dI_q}{dt} + \underbrace{\omega_e L_d I_d}_{\text{Cross-Coupling}} + \underbrace{\omega_e \psi_{pm}}_{\text{Back-EMF}}

Where:

  • RsR_s: Stator phase resistance (Ω\Omega)
  • Ld,LqL_d, L_q: Direct and quadrature inductances (HH)
  • ωe\omega_e: Stator electrical angular velocity (ωe=p⋅ωm\omega_e = p \cdot \omega_m)
  • ψpm\psi_{pm}: Rotor permanent magnet flux linkage (WbWb)

3. Cross-Coupling Dynamics and Feedforward Decoupling

Notice the speed-dependent cross-coupling terms:

  • The VdV_d equation contains IqI_q (−ωeLqIq-\omega_e L_q I_q).
  • The VqV_q equation contains IdI_d (+ωeLdId+\omega_e L_d I_d).

At high rotor speeds (ωe\omega_e), these mutual coupling terms dominate. If left uncompensated:

  • Step commands in IqI_q (acceleration) induce severe voltage disturbances across the dd-axis, corrupting the flux state.
  • The two axes cross-interfere, leading to regulator fighting, severe current overshoot, and potential inverter overcurrent tripping.

Feedforward Decoupling Synthesis:

To present the linear PI regulators with purely uncoupled, first-order R−LR-L plants, the cross-coupling terms are cancelled feedforward:

Vd∗=ud⏟PI Output−ωeLqIqV_d^* = \underbrace{u_d}_{\text{PI Output}} - \omega_e L_q I_q

Vq∗=uq⏟PI Output+ωe(LdId+ψpm)V_q^* = \underbrace{u_q}_{\text{PI Output}} + \omega_e (L_d I_d + \psi_{pm})

This decoupling cancels the nonlinearities, yielding two perfectly uncoupled SISO linear plants:

Id(s)ud(s)=1Lds+Rs\frac{I_d(s)}{u_d(s)} = \frac{1}{L_d s + R_s}

Iq(s)uq(s)=1Lqs+Rs\frac{I_q(s)}{u_q(s)} = \frac{1}{L_q s + R_s}


4. Current Loop Synthesis & Analytical PI Tuning

With the plant decoupled into a standard first-order lag, controller synthesis proceeds via pole-zero cancellation:

The PI regulator transfer function:

C(s)=Kp+Kis=Kps+KisC(s) = K_p + \frac{K_i}{s} = \frac{K_p s + K_i}{s}

Placing the controller zero directly over the motor electrical pole (s=−Rs/Ls = -R_s/L):

KiKp=RsL  ⟹  Ki=KpRsL\frac{K_i}{K_p} = \frac{R_s}{L} \implies K_i = K_p \frac{R_s}{L}

The open-loop transfer function reduces to a pure integrator:

Gol(s)=C(s)⋅1Ls+Rs=KpL⋅sG_{ol}(s) = C(s) \cdot \frac{1}{L s + R_s} = \frac{K_p}{L \cdot s}

The resulting closed-loop transfer function exhibits clean first-order low-pass filter dynamics:

Gcl(s)=Gol(s)1+Gol(s)=KpLs+KpL=ωbws+ωbwG_{cl}(s) = \frac{G_{ol}(s)}{1 + G_{ol}(s)} = \frac{\frac{K_p}{L}}{s + \frac{K_p}{L}} = \frac{\omega_{bw}}{s + \omega_{bw}}

Where ωbw\omega_{bw} is the targeted angular closed-loop current bandwidth (rad/s\text{rad/s}).

The PI gains are calculated analytically:

Kp=ωbw⋅LK_p = \omega_{bw} \cdot L

Ki=ωbw⋅RsK_i = \omega_{bw} \cdot R_s

EXAMPLE — For a traction e-motor with Rs=15 mΩR_s = 15\text{ m}\Omega and Lq=300 μHL_q = 300\ \mu\text{H}, selecting a closed-loop current bandwidth fbw=1000 Hzf_{bw} = 1000\text{ Hz} (ωbw=2π×1000≈6283 rad/s\omega_{bw} = 2\pi \times 1000 \approx 6283\text{ rad/s}) yields:

Kp,q=6283×300×10−6≈1.885 V/AK_{p,q} = 6283 \times 300 \times 10^{-6} \approx 1.885\text{ V/A}

Ki,q=6283×0.015≈94.25 V/(A⋅s)K_{i,q} = 6283 \times 0.015 \approx 94.25\text{ V/(A}\cdot\text{s)}


5. Discrete Sampling and Timing Delays

Automotive traction inverters typically switch at fsw=10 kHzf_{sw} = 10\text{ kHz} (16−20 kHz16 - 20\text{ kHz} for Silicon Carbide).

In digital embedded execution, discrete time delays inevitably affect phase margin:

  1. Sampling & Hold Delay (Ts/2T_s / 2): Currents are sampled at the PWM carrier midpoint to avoid switching noise.
  2. Computational Processing Delay (TsT_s): Transform calculations and PI loops execute during the cycle and update the PWM registers at the next carrier boundary.

The total effective delay is approximately 1.5⋅Ts1.5 \cdot T_s (150 μs150\ \mu s at 10 kHz10\text{ kHz}). To maintain robust stability margins (>60∘>60^\circ phase margin), the current loop bandwidth is rule-of-thumb constrained to:

fbw≤fsw10f_{bw} \le \frac{f_{sw}}{10}


6. ISO 26262 ASIL-D Safety Architecture

Under automotive functional safety requirements, the MCU executes continuous plausibility monitoring:

  • Torque Plausibility Check: Estimated instantaneous shaft torque (TeT_e) is compared against driver demand. Discrepancies exceeding safety limits trigger an automatic shutdown into Active Short Circuit (ASC) within 50 ms50\text{ ms}.
  • Voltage Circle Limiter: When demanded vector voltage exceeds physical DC rail capability (Vd∗2+Vq∗2>Vmax2V_d^{*2} + V_q^{*2} > V_{max}^2), the voltage vector is scaled down radially to maintain stability without windup.

7. Summary

  • FOC provides decoupled, high-dynamic control of magnetic flux (IdI_d) and electromagnetic torque (IqI_q).
  • Feedforward decoupling cancels speed-induced cross-coupling terms (ωeLqIq\omega_e L_q I_q and ωeLdId\omega_e L_d I_d), converting coupled nonlinear dynamics into linear SISO plants.
  • Analytical pole-placement matches PI gains directly to motor electrical constants (Kp=ωbwLK_p = \omega_{bw} L, Ki=ωbwRsK_i = \omega_{bw} R_s).
  • Executing at 10−20 kHz10 - 20\text{ kHz}, the current loop delivers millisecond-grade torque responsiveness, maximum drive-cycle efficiency, and smooth traction control.

Next Lesson

  • MOTOR-18 — Space Vector PWM (SVPWM): Modulating d−qd-q voltage commands into physical inverter switching times, DC bus utilization benefits, and dead-time distortion compensation.

Technical Diagrams

A control block diagram showing closed-loop current control, inverter switching, and motor feedback in FOC.
Field-Oriented Control (FOC) Architecture — Current sensing, Clarke/Park, PI controllers, inverse Park, SVPWM, and resolver feedback (MOTOR-17).

Quiz

Basic

What does Iq control in FOC?

Basic

What are the inner loops in FOC?

Intermediate

What is a common current reference strategy for SPMSM?

Intermediate

What does MTPA aim for?

Advanced

Why is Id made negative in field weakening?

Advanced

What is the main benefit of FOC?

Glossary

English TermDefinition
Field-Oriented ControlA vector control method that drives an AC motor by separately controlling the current components that produce torque and flux, yielding DC-motor-like control.
Space Vector PWM (SVPWM)A modulation technique that synthesizes a reference voltage vector by time-weighting the inverter's eight switching vectors (6 active + 2 zero); it extracts roughly 15.5% more usable DC-bus voltage than sinusoidal PWM.