Difference between revisions of "STM32MotorControl:SDK discontinuous PWM"

[quality revision] [quality revision]
m
m
 


1 Discontinuous PWM (DPWM) overview[edit]

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 MCSDK5STM32 MC SDK5.x

Target market:

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

2 DPWM / 2Two-phase description[edit]

STM32 MC DPWM p3 1.png

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

STM32 MC DPWM p3 1.png
STM32 MC DPWM p3 2.png


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 Two-phase versus 3three-phase modulation[edit]

STM32 MC DPWM p4 1.png

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

STM32 MC DPWM p4 2.png

4 DPWM activation via CubeMX STM32 MC Workbench setting[edit]

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 select "Discontinuous PWM" parameter settings in “Firmware Drive Management / Additional Features” as shown below.

STM32 MC DPWM p5.pngSTM32 MC DPWM p5.png

5 DPWM firmware changes[edit]

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.

STM32 MC DPWM p6 1.png
STM32 MC DPWM p6 1.png
STM32 MC DPWM p6 2.png

6 DPWM API functions[edit]

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
STM32 MC DPWM p6 2.png


5.1 Example 1: two-phase versus three-phase modulation[edit]

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

  • At 10W:
STM32 MC DPWM p8 1.jpg
  • At 50W:
STM32 MC DPWM p8 2.jpg

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

8 2

5.2 Example 2: two-phase modulation: Startup in 3-Shunt mode

!

[edit]

Can start successfully: Here is a snapshot capture of the startup phase in DPWM mode.

STM32 MC DPWM p9.jpg



{{DISPLAYTITLE:STM32 MC SDK discontinuous PWM (new in V5.Y)}}

=== 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 MCSDK5STM32 MC SDK5.x

Target market:
* Home appliances / High voltage applications: Air-conditioner fan, Air-conditioner compressor, Refrigerator compressor

=== DPWM / 2Two-phase description ===
[[file:STM32_MC_DPWM_p3_1.png|center]]
By suppressing (0,0,0) state, two switches per cycle can be removed (here named with low side – usually high side) :
:
[[file:STM32_MC_DPWM_p3_1.png|left]][[file:STM32_MC_DPWM_p3_2.png|center]]
right]]<br clear=all>

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

=== 2Two-phase versus 3three-phase modulation ===

[[file:STM32_MC_DPWM_p4_1.png|center]]

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

[[file:STM32_MC_DPWM_p4_2.png|center]]

=== 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. 
STM32 MC Workbench setting ===
To enable the DPWM mode, set to “ON” the DISCONTINUOUS_PWM in parameter settings of Motor Control select "Discontinuous PWM" parameter settings in “Firmware Drive Management / Additional Features” as shown below.

[[file:STM32_MC_DPWM_p5.png|center|900px]]

=== 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.{{ReviewsComments|-- [[User:Escoda Michael|Escoda Michael]] ([[User talk:Escoda Michael|talk]]) 20:47, 22 April 2021 (CEST)<br />Please try to put pictures with better resolution}}
[[[[file:STM32_MC_DPWM_p6_1.png|center|600pxleft|450px]] 
[[file:STM32_MC_DPWM_p6_2.png|center|400px]]

=== 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 ???'''

=== 2-phase versus 3-phase modulation ===right|450px]]<br clear=all>


==== Example 1: two-phase versus three-phase modulation ====
Dynamically moving from 3-phase modulation to 2-phase modulation:* At 10W:[[file:STM32_MC_DPWM_p8_1.jpg|center]]
* At 50W:
[[file:STM32_MC_DPWM_p8_2.jpg|center]]|700px]]
Legend:
Ch1: Current (Ia)
Ch2: UL
Ch3: VL
Ch4: WL

=== = Example 2: two-phase modulation: Startup in 3-Shunt mode! ===

Can start successfully: ====

Here is a snapshot capture of the startup phase in DPWM mode.[[file:STM32_MC_DPWM_p9.jpg|center|700px]]
<noinclude>


[[Category:Motor Control]]
<noinclude>

{{PublicationRequestId|19717| 4/2220062| 5/20/2021| JL LAGOUTTE}}<!--
Internal source: "DPWM_MCSDK5.pptx" V1.0
-->
(7 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
* with sensor or sensorless.
 
* with sensor or sensorless.
   
DPWM mode is available to the overall MCU families supported by MCSDK5.x
+
DPWM mode is available to the overall MCU families supported by STM32 MC SDK5.x
   
 
Target market:
 
Target market:
 
* Home appliances / High voltage applications: Air-conditioner fan, Air-conditioner compressor, Refrigerator compressor
 
* Home appliances / High voltage applications: Air-conditioner fan, Air-conditioner compressor, Refrigerator compressor
   
=== DPWM / 2-phase description ===
+
=== DPWM / Two-phase description ===
   
[[file:STM32_MC_DPWM_p3_1.png|center]]
+
By suppressing (0,0,0) state, two switches per cycle can be removed (here named with low side – usually high side):
 
+
[[file:STM32_MC_DPWM_p3_1.png|left]]
By suppressing (0,0,0) state, two switches per cycle can be removed (here named with low side – usually high side) :
+
[[file:STM32_MC_DPWM_p3_2.png|right]]
 
+
<br clear=all>
[[file:STM32_MC_DPWM_p3_2.png|center]]
 
   
 
Duty_A is enlarged of PWM_period – Duty_A to cover the whole PWM period.
 
Duty_A is enlarged of PWM_period – Duty_A to cover the whole PWM period.
Line 32: Line 31:
 
* Duty_C = Duty_C + Duty_A
 
* Duty_C = Duty_C + Duty_A
   
=== 2-phase versus 3-phase modulation ===
+
=== Two-phase versus three-phase modulation ===
   
 
[[file:STM32_MC_DPWM_p4_1.png|center]]
 
[[file:STM32_MC_DPWM_p4_1.png|center]]
Line 40: Line 39:
 
[[file:STM32_MC_DPWM_p4_2.png|center]]
 
[[file:STM32_MC_DPWM_p4_2.png|center]]
   
=== DPWM activation via CubeMX setting ===
+
=== DPWM activation via STM32 MC Workbench 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.
+
To enable the DPWM mode, select "Discontinuous PWM" parameter settings in “Firmware Drive Management / Additional Features” as shown below.
   
[[file:STM32_MC_DPWM_p5.png|center]]
+
[[file:STM32_MC_DPWM_p5.png|center|900px]]
   
 
=== DPWM firmware changes===
 
=== DPWM firmware changes===
Line 55: Line 52:
   
 
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.
 
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.
{{ReviewsComments|-- [[User:Escoda Michael|Escoda Michael]] ([[User talk:Escoda Michael|talk]]) 20:47, 22 April 2021 (CEST)<br />Please try to put pictures with better resolution}}
+
[[file:STM32_MC_DPWM_p6_1.png|left|450px]]  
[[file:STM32_MC_DPWM_p6_1.png|center|600px]]  
+
[[file:STM32_MC_DPWM_p6_2.png|right|450px]]
[[file:STM32_MC_DPWM_p6_2.png|center|400px]]
+
<br clear=all>
   
=== DPWM API functions ===
+
==== Example 1: two-phase versus three-phase modulation ====
   
FW API specific to DPWM:
+
Dynamically moving from 3-phase modulation to 2-phase modulation:
* void PWMC_DPWM_ModeEnable( PWMC_Handle_t * pHandle )
+
[[file:STM32_MC_DPWM_p8_1.jpg|center|700px]]
** 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 ???'''
 
 
=== 2-phase versus 3-phase modulation ===
 
Dynamically moving from 3-phase modulation to 2-phase modulation:
 
* At 10W:
 
[[file:STM32_MC_DPWM_p8_1.jpg|center]]
 
* At 50W:
 
[[file:STM32_MC_DPWM_p8_2.jpg|center]]
 
 
Legend:
 
Legend:
 
Ch1: Current (Ia)
 
Ch1: Current (Ia)
Line 83: Line 67:
 
Ch4: WL
 
Ch4: WL
   
=== 2-phase modulation: Startup in 3-Shunt mode! ===
+
==== Example 2: two-phase modulation: Startup in 3-Shunt mode ====
   
Can start successfully:
+
Here is a snapshot capture of the startup phase in DPWM mode.
[[file:STM32_MC_DPWM_p9.jpg|center]]
+
[[file:STM32_MC_DPWM_p9.jpg|center|700px]]
   
 
<noinclude>
 
<noinclude>
Line 93: Line 77:
   
 
<noinclude>
 
<noinclude>
{{PublicationRequestId|19717| 4/22/2021| JL LAGOUTTE}}
+
{{PublicationRequestId|20062| 5/20/2021| JL LAGOUTTE}}
 
<!--
 
<!--
 
Internal source: "DPWM_MCSDK5.pptx" V1.0
 
Internal source: "DPWM_MCSDK5.pptx" V1.0
 
-->
 
-->