Field-Oriented Control: Current Loop Fundamentals and PI Tuning
Field-Oriented Control: Current Loop Fundamentals and PI Tuning
Introduction
If you’re commissioning a servo drive or implementing Field-Oriented Control (FOC) for a permanent magnet synchronous motor (PMSM), understanding the current loop is critical. The current loop is the innermost—and fastest—control loop in a cascaded drive architecture. Poor current loop tuning leads to torque ripple, acoustic noise, and instability that cascades into velocity and position loops.
This post is for motor controls engineers implementing FOC on PMSMs, brushless DC motors, or induction motors. We’ll cover the theory behind d-q frame transformations, derive the PI controller transfer function, and walk through practical tuning steps with real-world parameter examples.
By the end, you’ll know how to select current loop bandwidth, tune PI gains, and validate stability using both simulation and scope measurements.
Theory
What is Field-Oriented Control?
Field-Oriented Control (FOC), also called vector control, decouples torque and flux control in AC motors by transforming three-phase currents into a rotating reference frame aligned with the rotor flux. This makes AC motor control behave like DC motor control, where armature current directly controls torque.
Clarke and Park Transforms
The Clarke transform converts three-phase currents into a stationary two-phase frame :
The Park transform rotates into a synchronous frame aligned with the rotor position :
In this frame:
- controls flux (kept at zero for surface PMSMs)
- controls torque:
Key Tradeoffs
- Higher bandwidth: Faster response, but increases noise sensitivity and requires higher PWM frequency
- Lower bandwidth: More filtering, but slower tracking and potential instability with mechanical resonances
- Rule of thumb: Current loop bandwidth
Math
Motor Voltage Equations in d-q Frame
For a PMSM, the voltage equations in the d-q frame are:
where:
- : stator resistance
- : d-q axis inductances
- : electrical angular velocity
- : permanent magnet flux linkage
PI Controller Transfer Function
The PI controller for the q-axis current loop is:
The open-loop plant (motor electrical dynamics, neglecting cross-coupling and back-EMF for simplicity) is:
The closed-loop transfer function is:
PI Gain Calculation
For a desired current loop bandwidth and damping ratio (critically damped):
Example: For a motor with , , and target :
Flow Diagrams
graph TD
A[Speed Reference] --> B[Speed PI Controller]
B --> C[Torque Reference]
C --> D[iq* Reference]
D --> E[Current PI q-axis]
E --> F[Vq* Voltage]
F --> G[Inverse Park Transform]
G --> H[Space Vector PWM]
H --> I[3-Phase Inverter]
I --> J[PMSM Motor]
J --> K[Position Encoder]
K --> L[Park Transform]
L --> M[id, iq Feedback]
M --> E
K --> G
style D fill:#e1f5ff
style E fill:#ffe1e1
style J fill:#e1ffe1
This diagram shows the cascaded control structure with the current loop (PI q-axis) as the innermost loop. The d-axis current reference is typically set to zero for surface PMSMs.
Real Scenario Use
Commissioning a 2.2 kW PMSM Servo Drive
Motor Parameters:
- Rated power: 2.2 kW
- Rated speed: 3000 RPM
- Pole pairs: 4
- Stator resistance
- q-axis inductance
- Back-EMF constant: 50 V/kRPM
Drive Setup:
- PWM frequency: 10 kHz
- Current measurement: Hall-effect sensors, 10-bit ADC
- Target current loop bandwidth: (159 Hz)
Step 1: Calculate PI Gains
Using the formulas above:
Step 2: Implement Decoupling
Add feed-forward decoupling terms to compensate for cross-coupling:
Step 3: Verify on Scope
- Set motor in current control mode with step
- Measure response with current probe or ADC readback
- Check:
- Rise time
- Overshoot
- No oscillations
Step 4: Adjust if Necessary
- Too much overshoot: Reduce by 10-20%
- Sluggish response: Increase (ensure )
- High-frequency noise: Add low-pass filter on current feedback or reduce bandwidth
Related Reading
- Servo Tuning: Using Bode Plots for Stability Analysis — Learn how to validate current loop stability in the frequency domain
- VFD Commissioning: A Practical Checklist for Induction Motors — Covers V/Hz control as a comparison point
- Coming soon: “FOC for Induction Motors: Rotor Flux Estimation Techniques”
References
- IEC 61800-7-201:2015 — Adjustable speed electrical power drive systems, Part 7-201: Generic interface and use of profiles for power drive systems
- Texas Instruments Application Note SPRABQ2 — “Field Oriented Control of 3-Phase AC Motors”
- Bose, B. K. (2002). Modern Power Electronics and AC Drives. Prentice Hall. Chapter 6: Vector Control of AC Drives.
- Leonhard, W. (2001). Control of Electrical Drives (3rd ed.). Springer. Chapter 9: Field-Oriented Control.
- Infineon Application Note AP32370 — “PMSM FOC with Hall Sensors for Motor Control Applications”
Videos
- Brian Douglas - “Understanding PID Control” — Excellent primer on PI controllers
- Texas Instruments Motor Control Theory — Visual explanation of Clarke and Park transforms
Summary + Key Takeaways
- FOC decouples torque and flux by transforming AC currents into a rotating d-q frame
- Clarke transform converts 3-phase to 2-phase stationary frame; Park transform rotates to rotor frame
- Current loop bandwidth should be ~1/10 of PWM frequency to avoid aliasing
- PI gains are calculated based on motor inductance, resistance, and target bandwidth
- Use damping ratio for critically damped response with minimal overshoot
- Always implement decoupling feed-forward to cancel cross-coupling between d-q axes
- Validate on scope: Check rise time, overshoot <10%, no oscillations
Glossary
- d-q frame: A rotating reference frame aligned with the rotor flux, simplifying AC motor control to DC-like quantities
- Clarke transform: Converts three-phase currents to stationary two-phase frame
- Park transform: Rotates stationary frame to synchronous frame aligned with rotor position
- Bandwidth: Frequency at which closed-loop response drops to -3 dB (70.7% of DC gain)
- Cross-coupling: Interaction between d-axis and q-axis voltages due to motor back-EMF and inductance
- Decoupling: Feed-forward compensation to cancel cross-coupling effects
- PWM: Pulse Width Modulation, switching technique to generate variable voltage for motor phases
FAQ
Q: What’s the difference between FOC and V/Hz control?
A: V/Hz is open-loop scalar control that adjusts voltage proportionally with frequency to maintain constant flux in the motor. It’s simple, robust, and widely used for applications like pumps and fans where dynamic performance isn’t critical. However, it provides poor torque control at low speeds and cannot respond quickly to load changes. FOC (Field-Oriented Control) is closed-loop vector control that independently controls torque-producing current (q-axis) and flux-producing current (d-axis) by transforming three-phase currents into a rotating d-q reference frame. This allows precise, fast torque response similar to DC motor control, with better efficiency, dynamic performance, and torque capability across the entire speed range including zero speed.
Q: Why is the d-axis current set to zero for surface PMSMs?
A: Surface-mounted permanent magnet synchronous motors (SPMSMs) have magnets glued to the rotor surface, which means the d-axis and q-axis inductances are equal due to the uniform air gap. This is called non-salient pole construction. With no magnetic saliency, there’s no reluctance torque benefit from d-axis current, and any d-axis current would only create additional copper losses without contributing to torque production. Setting maximizes efficiency by dedicating all available current to q-axis (torque production) and simplifies the control structure. For interior PMSMs with saliency , negative d-axis current can be strategically used for field weakening at high speeds or to exploit reluctance torque.
Q: How do I know if my current loop is stable?
A: Stability can be verified through multiple complementary methods. In the frequency domain, analyze the open-loop Bode plot and verify that phase margin is >45° (ideally 60°) and gain margin is >6 dB at the gain crossover frequency. In the time domain, perform a step response test by commanding a current step (e.g., 10-20% of rated current) and verify that overshoot is <10%, settling time is <5 ms, and there’s no sustained oscillation or ringing. Also monitor the current waveform for high-frequency noise amplification near the PWM frequency, which indicates insufficient phase margin and potential instability. Most modern drives have built-in current scope functions or parameter monitoring that allows you to capture and analyze the step response directly from the drive interface.
Q: Can I use the same PI gains for d-axis and q-axis?
A: Yes, if the motor has equal d-axis and q-axis inductances , which is typical for surface-mounted permanent magnet motors and squirrel-cage induction motors. In this case, the current loop dynamics are identical for both axes and can share the same PI gains, simplifying implementation and reducing tuning effort. However, for interior permanent magnet motors with magnetic saliency , you should calculate and use separate gains optimized for each axis inductance to achieve the same bandwidth and phase margin. The proportional gain is , so if , then will be half of . Using the same gains on a salient motor may result in different bandwidths and phase margins for each axis, potentially causing instability or poor performance.
Q: What happens if current loop bandwidth is too high?
A: Setting the bandwidth too high (approaching or exceeding 1/10 of the PWM frequency) causes several serious problems. First, you’ll see significant noise amplification from high-frequency sources like switching ripple, sensor noise, and quantization effects, which can cause erratic motor behavior and acoustic noise. Second, you may encounter PWM aliasing artifacts where the control loop responds to harmonics that are aliased by the discrete-time sampling, leading to instability or torque ripple. Third, the phase lag from computational delays (typically 1-2 PWM periods) becomes significant relative to the loop period, reducing phase margin and potentially causing instability. As a general rule, keep current loop bandwidth to 1/10 of the PWM frequency or lower, and always verify stability margins with a step response test before pushing bandwidth higher.