Sinusoidal PWM Modulation#

struct uz_DutyCycle_t uz_spwm_abc(uz_3ph_abc_t input, float V_dc_volts)#

SPWM for 3ph system with abc inputs.

Parameters:
  • input – abc values

  • V_dc_volts – DC voltage

Returns:

duty cycle for PWM module

struct uz_DutyCycle_t uz_spwm_dq(uz_3ph_dq_t input, float V_dc_volts, float theta_el_rad)#

SPWM for 3ph system with dq inputs.

Parameters:
  • input – dq values

  • V_dc_volts – DC voltage

  • theta_el_rad – electrical rotor angle for park transformation

Returns:

duty cycle for PWM module

struct uz_DutyCycle_2x3ph_t uz_spwm_abc_6ph(uz_6ph_abc_t input, float V_dc_volts)#

SPWM for 6ph system with abc inputs.

Parameters:
  • input – abc values

  • V_dc_volts – DC voltage

Returns:

duty cycle for PWM module

struct uz_DutyCycle_2x3ph_t uz_spwm_dq_6ph(uz_6ph_dq_t input, float V_dc_volts, float theta_el_rad)#

SPWM for 6ph system with dq inputs.

Parameters:
  • input – dq values

  • V_dc_volts – DC voltage

  • theta_el_rad – electrical rotor angle for park transformation

Returns:

duty cycle for PWM module

struct uz_DutyCycle_3x3ph_t uz_spwm_abc_9ph(uz_9ph_abc_t input, float V_dc_volts)#

SPWM for 9ph system with abc inputs.

Parameters:
  • input – abc values

  • V_dc_volts – DC voltage

Returns:

duty cycle for PWM module

struct uz_DutyCycle_3x3ph_t uz_spwm_dq_9ph(uz_9ph_dq_t input, float V_dc_volts, float theta_el_rad)#

SPWM for 9ph system with dq inputs.

Parameters:
  • input – dq values

  • V_dc_volts – DC voltage

  • theta_el_rad – electrical rotor angle for park transformation

Returns:

duty cycle for PWM module

Example#

Listing 164 Example function call to generate PWM values for three-phase systems.#
1int main(void) {
2   float V_dc_volts = 24.0f;
3   float theta_el_rad = 1.0f;
4   struct uz_3ph_abc_t UVW = {.a = 0.0f, .b = -0.866f, .c = 0.866f};
5   struct uz_DutyCycle_t output = uz_spwm_abc(UVW, V_dc_volts);
6   struct uz_3ph_dq_t dq = {.d = 1.0f, .q = -0.866f, .zero = 0.0f};
7   output = uz_spwm_dq(dq, V_dc_volts, theta_el_rad);
8}
Listing 165 Example function call to generate PWM values for six-phase systems.#
1int main(void) {
2   float V_dc_volts = 24.0f;
3   float theta_el_rad = 1.0f;
4   struct uz_6ph_abc_t voltages = {.a1 = 0.0f, .b1 = -0.866f, .c1 = 0.866f, .a2 = 0.011f, .b2 = 0.739f, .c2 = 0.108f};
5   struct uz_DutyCycle_2x3ph_t output = uz_spwm_abc_6ph(voltages, V_dc_volts);
6   struct uz_6ph_dq_t dq = {.d = 1.0f, .q = -0.866f, .x = 1.010f, .y = -1.040f, z1 = 0.0f, z2 = 0.0f};
7   output = uz_spwm_abc_dq(dq, V_dc_volts, theta_el_rad);
8}

Description#

Duty cycle generation for three-, six- and nine-phase systems. Input is possible with abc values and dq values if electric rotor angle is provided. The generated PWM-signals can be directly fed to PWM and SS Control V4. The generation uses the continuous sinusoidal PWM (SPWM) modulation and is scaled to a duty cycle from 0.0 to 1.0. It has an output limitation, so that the values never exceed the given range. The more advanced functions for duty cycle generation can be found in Space vector Modulation.