Real time simulation gives different results for Vienna rectifier

Hello,

My real time simulation using RT Box gives a very different result from the offline simulation? My circuit is Vienna rectifier using voltage oriented controller (cascaded control), I have set the scaling and time step the same as a working model. The PWM capture shows overmodulated PWM. Do you know why is this happening?
vienna rectifier RT BOX mod 1.plecs (397.2 KB)

Hello,

Without executing your model, I can make some initial suggestions:

  • The multi-tasking setup in the RT Box sends data across CPUs. CPU2 has a 20 usec step size while CPU0 (converter) has a 5 usec step size. The analog outputs are on CPU2 so you will see the 20 usec update rate an not the 5 usec update rate on those IO, plus CPU transmission latency. I recommend moving all analog outputs to the core where the power converter is simulated. It might be wise to have the THD calculated on CPU2.
  • The controls do not have any anti-windup mechanism proposed. If you program the MCU before the RT Box, the controls may wind-up and not recover. You can verify if this is happening in the MCU scopes. See the approach taken in various C2000 demo models for reference.

I also want to complement you on your clean and well organized model!

Regards,
Bryan

Hi Bryan, thank you for the suggestions. I tried to move the tasks as you suggested, and it didn’t show any different results. As for the anti-wind up mechanism, I have seen a similar working model with similar control, and it doesn’t have the problem doing real-time simulation. I provide a working model of a 3-level T-type rectifier below to compare to my model.
RT-BOX for T-type Rectifier Bipolar.plecs (306.0 KB)