Linear decoupling#
-
uz_3ph_dq_t uz_CurrentControl_linear_decoupling(uz_PMSM_t config, uz_3ph_dq_t i_actual_Ampere, float omega_el_rad_per_sec)#
function to calculate linear decoupling values for d- and q-axis
- Parameters:
config – uz_PMSM_t_config struct
i_actual_Ampere – uz_dq_t struct with the measured d- and q-currents in ampere
omega_el_rad_per_sec – electrical rotational speed in rad/s
- Returns:
uz_dq_t outputs latest values
Example#
1#include "uz/uz_CurrentControl/uz_linear_decoupling.h"
2int main(void) {
3 struct uz_PMSM_t config_pmsm = {
4 .Ld_Henry = 0.0001f,
5 .Lq_Henry = 0.0002f,
6 .Psi_PM_Vs = 0.008f
7 }; //only these parameters are needed
8 float omega_el_rad_per_sec = 100.0f;
9 struct uz_3ph_dq_t i_actual_Ampere = {.d = 1.0f, .q = 2.0f, .zero = 0.0f};
10 struct uz_3ph_dq_t output = uz_CurrentControl_linear_decoupling(config_pmsm, i_actual_Ampere, omega_el_rad_per_sec);
11}
Description#
Calculates the values for a linear decoupling according to the following formulars:
\[\begin{split}v_{d,decoup} &= -\omega_{el} \cdot L_q \cdot i_q \\
v_{q,decoup} &= \omega_{el} \cdot (L_d \cdot i_d + \psi_{PM})\end{split}\]
This function is already included in the CurrentControl, but it can be used independently for any other purpose.