# FOC current control autotuning PI Controller for BLDC Motors

I try to understand, how the guys from odrive tuned the current control PI parameters for Field Oriented Control:

In the Function "motor_calibration", K_i and K_p are choosen as:

// Calculate current control gains
float current_control_bandwidth = 1000.0f;  // [rad/s]
motor->current_control.p_gain = current_control_bandwidth * motor->phase_inductance;
float plant_pole = motor->phase_resistance / motor->phase_inductance;
motor->current_control.i_gain = plant_pole * motor->current_control.p_gain;


How they came up with this dependecies of K_i and K_p from L and R? They somehow must place the poles the right way with this, but I don't see how they guarantee to shift the poles to the negative half plane.

The State Space Model of a BLDC motor looks like this, but from here we cannot simply assume, that the input u is F*x, such that we come up with a closed loop system, because the back EMF voltages we cannot control directly:

Edit: Is it possible, that the following simple model was used? So the closed loop system has the transfer function:

$$G(s)= \frac{K_p s + K_i}{s^2 L + s(R+K_p) + K_i}$$

• A quick method is just Pole-Zero Cancellation. An R-L load has a certain placement so tune the controller to cancel them Mar 26 '18 at 12:23
• Ok, and that's done here? How is this R-L placement in this case here? Mar 26 '18 at 12:48
• The PI controller places a zero in the left half plane. Its value can be adjusted to drag a right half plane open-loop pole into the left half plane, thereby giving a stable closed loop. E.g. the open loop TF: $G(s)=\frac{1+as}{s(s-b)}$, with a>b.
– Chu
Mar 26 '18 at 23:53
• the method used in the controller by Odrive is well explained here by TI: ti.com/lit/an/sprt703/sprt703.pdf This is a simplified model as you said! Oct 2 '18 at 16:57