cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to do deadtime compensation

Ruben_vd_bos
Associate II

Dear all,

I'm new to this forum, so apologies if I post this in the wrong category. I'm trying to find a way to implement a deadtime compensation mechanism using a STM32G4. I have a 3-level 3-phase VSI. The switching frequency is 50kHz, the deadtime is 200ns. I want to compensate for this deadtime, but during the phase currents zero crossings the polarity of the current changes every switching period, and even throughout a switching period. It is not really possible to determine the phase current polarity using my ADC at the switching frequency.

Does the MCU have a compensation mechanism built in? I thought of detecting the phase current polarity with an analog circuit, feed it to one of the input pins of the MCU and based on that delay or advance the switching instances so the output gets compensated for the deadtime. Is there some way to do this?

In my simulation I have implemented a deadtime compensation circuit as shown in the figure. You see the four gate pulses to the switches, on which the deadtime is already applied. The phase current polarity gets detected and based on that, with the help of some logic gates and pulse delays, compensated gate pulses are being output to the gates of the switches. It would be great to find a way to do this properly in my hardware.

Thanks in advance.

4 REPLIES 4
AScha.3
Chief II

Hi,

You can set/use deadtime in the motor-timer , G4 has 2 :

– 2 x 16-bit 8-channel advanced motor
control timers, with up to 8 x PWM
channels, dead time generation and
emergency stop

 

Usually the deadtime should be set a bit longer, than the switches (mos or igbt) need, to avoid shoot through (at all temperatures ).

See rm -> Advanced motor control timer (TIM1, TIM8)   about deadtime registers and use them.

If you feel a post has answered your question, please click "Accept as Solution".

Dear AScha.3,

Thank you for the reply. I know that I can set-up dead-time in the timer. Actually, I'm already doing that. Now I am looking for a way to compensate for this dead-time. Could you or somebody else help me?

Regards,

Ruben

Hi,

I dont understand, what you wanna "compensate " , or how to do this,

because the deadtime is needed by the switches and so IS your signal now, ( on_time - deadtime.).

I just know, there are some sync buck (etc.) switchers with adaptive deatime, adjusting it with signal current, temperature etc.  This is not built in in any cpu timer.

 

+

>the polarity of the current changes every switching period

Thats the nature of switching inductive or resonant loads.

 

>The phase current polarity gets detected and based on that, with the help of some logic gates and pulse delays, compensated gate pulses are being output

This is something different, you shoudld look how LLC converters do it. Basically this is possible with the "motor-timer" (i did it 🙂 )  , by using some hardware (comparator on output current, to "get" the phase at hi speed) and using the break input for the timer, mode: not stopping (for overcurrent), but just finish the actual switching pulse.

This works fine, just read in rm about the break inputs and what they can do.

If you feel a post has answered your question, please click "Accept as Solution".

Dear AScha.3,

Thanks again. I want do compensate for the dead-time, because the dead-time is introducing a different result than what I actually want at the output. See the figure. Based on the polarity of the current, the output voltage is either bigger or smaller than the reference.I want to compensate for this, using a circuit as shown in my simulation.

For this I need to delay the whole output by the dead-time. After detecting the phase current polarity, I need to delay some of the pulses based on the logic circuit shown in the figure. I want to know if this is something that ST is implementing, either in the STM32G4 or using additional hardware.

Regards,

Ruben