Linear decoupling

uz_3ph_dq_t uz_FOC_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 1/rad

Returns

uz_dq_t outputs latest values

Example

Listing 50 Example function call for linear decoupling. For uz_PMSM_t struct check PMSM config.
 1#include "uz/uz_FOC/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_FOC_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 Field Oriented Control (FOC), but it can be used independently for any other purpose.

Figure made with TikZ

Fig. 47 linear decoupling