Electronic – How to empirically tune DQ current PI controllers in BLDC/PMSM motor for vector control

brushless-dc-motorpid controllerpmsmtuner

I need to experimentally set the \$k_p\$ and \$k_i\$ parameters of PI controllers for the DQ-axes of a vector controlled BLDC motor. I have been looking for papers and application notes proposing practical tuning and fine tuning techniques, but could not find much.

control architecture

Because the DQ-axes influence each other, I feel I cannot treat the two completely separately.

This is how I currently do it. For each point, I apply a 1 A amplitude step response for about 1 second, having the motor reaching a speed of about 400 rad/s:

  1. Tune \$k_{pq}\$
  2. Tune \$k_{pd}\$
  3. Tune \$k_{iq}\$
  4. Tune \$k_{id}\$
  5. Reiterate all gains until they result into instability, then settle them to 80% of their value.

The biggest challenge I face is that at locked rotor, or applying the step to \$i_{d}\$, closed-loop dynamics are extremely easy to shape to my desires, but if I let the motor spin at high velocities (more than 400 rad/s in my case) large disturbances begin to appear (where they come from is a longer and unrelated story) and these can turn my closed-loop systems unstable.

Are there good practical tuning rules for parameters of such control architecture?

Best Answer

  1. Tune kpq
  2. Tune kpd
  3. Tune kiq
  4. Tune kiq # typo... expecting to see kid

Why do you feel the need to tune D and Q separately? D-component is non-torque producing current which manifests itself in the ABC reference frame as a phase shift. Why is this important? well it depends on whether you intentionally require D-component or not...

If for instance you wanted field weakening then yes you would want to control the D-component however this isn't the case here as you have a fixed D-current demand of 0, the standard method. In doing so the displacement power factor is minimized.

Why state this... well the four listed steps is implying independent tuning steps for D and Q which opens the possibility of different frequency response between the D control and the Q control. Think for a minute what this will result in? if the D-control had a bandwidth a 10th of the Q-control, there would be a lag in controlling the D-component to zero resulting in unwanted D voltage/current for a longer period of time during and after acceleration resulting in a sluggish performance, inefficiency and possibly stability considerations.

Traditionally the Q and the D share the same control parameters ( note: not always the case as there are benefits in limiting the D-demand).

So if it can be accepted that \$K_{pq} \equiv K_{pd}\$ and \$K_{iq} \equiv K_{id}\$ how to tune? there are a couple of empirical methods (Ziegle-Nichols, Cohen-Coon) and these are useful if you do not know the plant, but you should. in this instance the plant is the line-line resistance and inductance of your machine (at rated current)

The plant transfer function is thus

\$\frac{I(s)}{V(s)} = \frac{1}{Ls + R} \$ which is of the form: \$ \frac{K_{dc}}{\tau s + 1}\$

\$K_{dc} = \frac{1}{R}\$
\$ \tau = \frac{L}{R}\$

Consider the classic close loop block diagram

enter image description here

where in this instance H = -1 and G = P*G (plant time Gain)

The canonical form of a feedback control system is thus: \$ \frac{G}{1+G}\$

A PI controller has a transfer function equal to

\$C(s) = K_p + \frac{K_i}{s} = \frac{K_p\cdot s + K_i}{s}\$

\$P(s) = \frac{K_{dc}}{\tau s + 1}\$

Thus: \$G(s) = C(s)\cdot P(s) = \frac{K_p\cdot s + K_i}{s} \cdot \frac{K_{dc}}{\tau s + 1}\$

The the feedback control system is:

\$\frac{Y(s)}{X(s)} = \frac{G(s)}{1 + G(s)} = \frac{K_{dc}\cdot K_p\cdot s + K_{dc}\cdot K_i}{\tau \cdot s (1+K_{dc}\cdot K_p)\cdot s + K_{dc}\cdot K_i}\$

This can be rearranged into one of the many standard forms:

\$ \frac{ \frac{K_p}{K_i}\cdot s + 1} { \frac{\tau}{K_{dc} \cdot K_i}\cdot s^2 + \frac{1 + K_{dc}\cdot K_p}{K_{dc}\cdot K_i} \cdot s + 1} \$

With a desired damping factor and a target resonance frequency, Ki and Kp can be determined to match your known plant.