Step-by-Step Calibration of Field Oriented Control for Maximum Torque Density
When you hear “torque density,” you picture a tiny motor that can push a heavy car up a hill without breaking a sweat. In electric‑vehicle powertrains that promise both range and performance, getting the most out of every gram of magnet material is no longer a nice‑to‑have – it’s a must. That’s why a solid calibration of Field Oriented Control (FOC) matters today more than ever.
Why FOC Calibration Is Not Just a Lab Exercise
In the early days of my career I spent a weekend tweaking a motor controller for a university project. I thought I had nailed the settings, only to discover the car stalled on a gentle incline. A quick look at the d‑axis current waveform revealed the culprit: the controller was still operating in a “scalar” mode, ignoring the rotor’s magnetic field. That experience taught me that a well‑tuned FOC is the bridge between raw motor physics and the smooth, high‑torque feel drivers expect.
FOC is a method that keeps the stator currents aligned with the rotating magnetic field of the rotor. By doing so, it lets the motor produce the highest possible torque for a given current – that’s torque density in plain English. But the math behind it assumes perfect knowledge of a few key parameters: resistance, inductance, and the position of the rotor. Those numbers drift with temperature, aging, and even the way you mount the motor. Calibration is the process of measuring and correcting those drifts so the controller can stay on target.
Below is a practical, step‑by‑step guide that you can follow in a lab or a small production line. The goal is to squeeze out every ounce of torque without over‑heating the magnets or the inverter.
Step 1 – Gather the Essentials
Tools you’ll need
- A three‑phase power inverter capable of running the motor in open‑loop mode.
- A high‑precision current sensor (Hall‑effect or shunt) for each phase.
- A temperature probe for the stator windings.
- An encoder or resolver that can give you the rotor angle with at least 0.1° resolution.
- A data‑acquisition system or a laptop running a simple logging script.
Safety first
Make sure the motor is securely mounted, the power supply is limited to a safe voltage, and you have a quick‑stop button within reach. Electric motors can generate a lot of torque even at low speeds, so keep hands and tools clear of the rotating parts.
Step 2 – Measure Phase Resistance (R)
Resistance changes with temperature, so you want a baseline at room temperature.
- Disconnect the motor from the inverter and short the three phase terminals together.
- Apply a low DC voltage (e.g., 5 V) across one phase and measure the resulting current.
- Compute resistance using Ohm’s law: R = V / I.
- Record the temperature at the time of measurement.
If you have a temperature probe on the windings, you can later use the temperature coefficient of copper (≈0.0039 Ω/Ω/°C) to adjust R for operating conditions.
Step 3 – Determine d‑Axis and q‑Axis Inductance (Ld, Lq)
Inductance tells the controller how much voltage is needed to change current. In a surface‑mounted permanent‑magnet motor, Ld and Lq are usually close, but any saliency (different values) will affect torque production.
- Run the motor in open‑loop at a low speed (e.g., 100 rpm) to keep back‑EMF low.
- Inject a small sinusoidal voltage (e.g., 2 V peak) on the d‑axis while keeping the q‑axis current at zero.
- Measure the resulting d‑axis current ripple and calculate Ld = V / (2πf · I), where f is the injection frequency.
- Repeat the same procedure on the q‑axis to get Lq.
Keep the injection amplitude low enough that the motor does not produce noticeable torque – you are only probing the magnetic circuit.
Step 4 – Align the Encoder (or Resolver) Offset
Even a tiny offset between the electrical angle reported by the sensor and the actual magnetic axis can cause a loss of torque.
- Lock the rotor in a known position (many test rigs have a mechanical brake).
- Apply a small d‑axis current (e.g., 1 A) while keeping q‑axis current at zero.
- Observe the motor’s torque ripple using a torque sensor or a load cell. The ripple will be minimal when the d‑axis current aligns with the magnetic axis.
- Adjust the sensor’s angle offset in the controller software until the ripple is minimized.
A quick anecdote: I once spent an entire afternoon chasing a “mysterious” torque dip, only to discover the encoder was mounted a fraction of a degree off because the mounting bolt was loose. A simple torque wrench saved the day.
Step 5 – Set the PI Controllers for Id and Iq
FOC uses two nested Proportional‑Integral (PI) loops: one for the d‑axis current (Id) and one for the q‑axis current (Iq). Proper tuning ensures fast response without overshoot.
- Start with the classic Ziegler‑Nichols method: increase the proportional gain until the current response starts to oscillate, then back off by about 30 %.
- Set the integral gain to eliminate steady‑state error within a few electrical cycles.
- Verify by commanding a step change in Iq (e.g., from 0 A to 10 A) while keeping Id at zero. The current should rise smoothly to the target within 2–3 electrical periods.
If you have a model‑based controller, you can also use the motor’s electrical time constant τ = L / R as a guide: set the PI bandwidth to roughly 1/ (5 · τ).
Step 6 – Validate Torque Density Across the Speed Range
Now that the controller is calibrated, it’s time to see the real benefit.
- Connect the motor to a dynamometer or a calibrated load.
- Sweep the speed from 0 rpm to the rated maximum while commanding a constant Iq that corresponds to the motor’s rated current.
- Record torque, voltage, current, and temperature at each point.
- Compute torque density = torque / (magnet volume). Compare it to the motor’s datasheet value. You should see a 5‑10 % improvement over an uncalibrated setup.
If torque starts to fall off early, revisit the temperature compensation for resistance and the PI gains – heat is often the hidden enemy.
Step 7 – Implement Real‑Time Temperature Compensation
During real driving, the motor can heat up by 50 °C or more. To keep torque density high, the controller must adjust R and possibly L on the fly.
- Use the temperature probe on the stator windings to read the current temperature.
- Update the resistance value in the controller using R(T) = R0 · [1 + α · (T – T0)], where α is the copper temperature coefficient.
- If you have a model that includes magnetic saturation, you can also adjust Ld/Lq slightly with temperature, though the effect is smaller.
Step 8 – Document and Automate
Finally, write a short calibration report that lists all measured values, the temperature at which they were taken, and the final controller settings. If you are producing multiple identical motors, automate the steps with a script that drives the inverter, reads sensors, and writes the results to a CSV file. Automation reduces human error and speeds up production.
By following these eight steps you turn a generic FOC implementation into a torque‑density machine. The extra effort in the lab pays off on the road: drivers feel a smoother acceleration, the vehicle can use a smaller motor for the same performance, and the overall system weight drops – a win for efficiency and range.
Remember, the core of FOC is simple: keep the current vector locked to the rotor’s magnetic field. The calibration steps above are just the tools that let you do that reliably, even as the motor ages and the temperature climbs. When you get it right, the motor sings, and the car glides.