STM32 MC SDK discontinuous PWM (new in V5.Y)

Revision as of 17:25, 26 April 2021 by Registered User

1 Discontinuous PWM (DPWM) overview

DPWM feature allows the users to reduce the switching losses with an additional modulation technique according to their application.

This new approach is added to the current default 3-phase modulation.

It is deployed in all supported configurations:

  • 3-Shunt
  • 1-Shunt
  • ICS
  • with sensor or sensorless.

DPWM mode is available to the overall MCU families supported by MCSDK5.x

Target market:

  • Home appliances / High voltage applications: Air-conditioner fan, Air-conditioner compressor, Refrigerator compressor

2 DPWM / 2-phase description

By suppressing (0,0,0) state, two switches per cycle can be removed (here named with low side – usually high side) :

Duty_A is enlarged of PWM_period – Duty_A to cover the whole PWM period.

In this case, as (1,1,1) state is enlarged of Duty_A:

  • Duty_B = Duty_B + Duty_A
  • Duty_C = Duty_C + Duty_A

3 2-phase versus 3-phase modulation

CCR1,CCR2,CCR3 – applied PWM duty on U,V,W

4 DPWM activation via CubeMX setting

As the activation of DPWM is not yet supported by the WB, it is necessary to edit the .ioc file with STM32CubeMX.

To enable the DPWM mode, set to “ON” the DISCONTINUOUS_PWM in parameter settings of Motor Control as shown below.

5 DPWM firmware changes

When a project is generated with the DPWM, the activation of 2-phase modulation is effective at the startup stage, just after the calibration.

DPWM is enabled all-time in the 3-Shunt case, while it is not true in 1-Shunt.

In the 1-Shunt case, since the A and B stages are used for current sensing in boundary 2 or 3, it is not possible in this specific situation to work in 2-phase SVPWM. The workaround consists to automatically switch in 3-phase during these transition stages.

6 DPWM API functions

FW API specific to DPWM:

  • void PWMC_DPWM_ModeEnable( PWMC_Handle_t * pHandle )
    • enables the Discontinuous PWM mode by setting the global variable.
  • void PWMC_DPWM_ModeDisable( PWMC_Handle_t * pHandle )
    • disables the Discontinuous PWM mode by setting the global variable.
  • bool PWMC_GetDPWM_Mode( PWMC_Handle_t * pHandle )
    • returns the status of Discontinuous mode activation 

// annexe ???

7 2-phase versus 3-phase modulation

Dynamically moving from 3-phase modulation to 2-phase modulation:

  • At 10W:
  • At 50W:

Legend: Ch1: Current (Ia) Ch2: UL Ch3: VL Ch4: WL

8 2-phase modulation: Startup in 3-Shunt mode!

Can start successfully: