Complementary PWM Signals overlaps at Digital Input Pins at RT Box 2

Hello all,

My goal is to create a Dual Active Bridge in PLECS and test the controller with the RT Box 2. The control comes from a STM32 G474RE. There are 2 PWM Signals complimentary for the Primary and Secondary side. The PWM output of the external controler works as expected and is connected to Digital Inputs of the RT Box (PWM Capture Block).

Here we come to the problem:

When building the Plant on the RT Box the PWM Signals are overlaping and the Box gives an “DAB shoot-through error“. I tested it with only the 2 PWMs for the primary side - works fine. Same for only the secondary side. But when connecting all 4 Digital Inputs from the STM32 to the Box the 2 PWM Signals from the Primary side are shifted. That means the High side and low side are both high at the same time (There comes the shoot-trough error).

I can’t explain why it shifts at first place. Could it be a Problem with the GND connection between RT Box and STM32?

Hope someone can help me.Thanks in advance,

Chris

I added also the working Simulation of the DAB. Can’t get the real measurements from the PWM right now.

dab_model_codegen.plecs (91.8 KB)

Hello Chris,

Thank you for your question and thank you for attaching a PLECS model!

I wasn’t able to reproduce the shoot-through problem. Is there an exact test sequence that reliably reproduces the shoot-through problem? Are you using an interface board to connect the STM32 to the RT Box, or do you have a custom setup? What version of PLECS, the RT Box TSP, and the STM32 TSP are you using (and does the issue persist after upgrading to the latest version if applicable)?

I did notice two things in the PLECS model:

  1. In top-level schematic, HRTIM Prim is connected to PWM Capture Sec and HRTIM Sec is connected to PWM Capture Prim.
  2. The digital input channels specified in the PWM Capture block mask for the complementary channels don’t appear to be correct (see the attached screenshot). The interface card manual can be downloaded on the Plexim website: Documentation | Plexim

First of all thanks for your answer!

Yeah didn’t see that Prim and Sec was the wrong way ( had 1 PWM Capture block before) but the error came before too.

About the Pins. I tried to use different ones to see if the error still occurs (Answer is yes).

Versions: RT Box 3.1.8 and STM32 1.5.6 and Plecs is 4.9.8. (Attached Image)

The setup is an STM32 G474RE connected to the interface board to the digital inputs and the voltage as a feedback as analog output. On the STM is a shield for specific outputs but I also tried it without.

With the first setup where I used 1 PWM Capture block the Digital Input channels were 0:3 for all 4 PWM signals.

The problem occurs when building the Plant on the RT Box. When the STM is connected and measured at the interface board the PWMs looks good but when building on the RT Box the 2 PWMs of the first signal shifts and the error occurs. Without any connection the RT Box works. One thing is that it makes a difference if a Ground is connected between STM and RT Box.

I could provide Pictures of the setup and the measurement on the oscilloscope on Wednesday.

Hello Chris,

The Digital Input channels 0:3 are connected to different HRTIM timing units if you are using the Launchpad-Nucleo Interface board. DI-0 is connected to HRTIM1_CHA1, and DI-2 is connected to HRTIM1_CHA2, but the other channels are connected to two different timing units (DI-1 is connected to HRTIM1_CHC2 whereas DI-3 is connected to HRTIM1_CHD1).

Is it possible that signals from different timing units are connected to the same half-bridge, thereby causing a shoot-through?

If this can be excluded, I think the most efficient way forward would be to set up a web meeting. I will reach out to you privately!

Thanks for your offer of the online meeting and your help!!

We tried it again today and it worked. (We are using the analog and digital interface board)

The issue came from the connected input PWM Signals. Yes they were valueable PWMs at the output of the STM32 but the high and lowside of the complementary pwm was somehow turned around from the PWM Cap or the Mux behind. So I guess you had the right guess :slight_smile:

Not quite sure where exactly the problem is but anyway now it is working.

Thanks again for your help :slight_smile:

1 Like