Current controller PI gains by SDK code generation looks different from what intended to be through space vector PWM
(Environment)
MC_SDK 5.Y.3 + STM32CubeMX 6.3.0 with HAL + IAR EWARM 8.5
(What I found)
In page 12, document UM2392, the current controller PI gains are
designed as follows:
=========================================
...
The transfer function of block "A" are expressed as:
(12) A = Vbus-dc / 65536
...
=========================================
Then PI gains can be obtained from this A value together with the other parameters (L, R, B and cut-off frequency of PI controller).
I verified the SDK-generated PI gains(in "drive_parameters.h") are exactly the same of what I calculated from the equations.
I found, however, circle limitation and space vector implementation tell a slightly different value for A.
(a) In circle limitation, maximum voltage are limited to 32767(=max of 16bit-integer), which corresponds to the radius of the inscribed circle of space vector hexagon.
(b) From (a), maximum modulation voltage in space vector PWM becomes (2/sqrt(3) * 32767), which corresponds to the vertex of space vector hexagon.
(c) By the way, maximum modulation voltage for one phase in space vector PWM is (2/3 * Vbus-dc).
(d) From (b) and (c), we get the following correspondence:
(2/3 * Vbus-dc) ===> (2/sqrt(3) * 32767)
Vbus-dc ===> sqrt(3) * 32767
(e) From (d), the equation (12) is not correct, but A = Vbus-dc / (sqrt(3)*32767)
This results in difference in gain calculation – (12) generates (2/sqrt(3)) times higher gains than the expected ones.
If the above is wrong, please correct my misunderstanding with detail information.
