I am currently working on building my RT Box coder for implementing phase shift modulation in a three-phase dual active bridge design. As part of the process, I need to generate a phase delay of 60° between each signal. Despite trying various approaches w

I am currently working on building my RT Box coder for implementing phase shift modulation in a three-phase dual active bridge design. As part of the process, I need to generate a phase delay of 60° between each signal. Despite trying various approaches within my knowledge, I have not been able to achieve the desired phase delay.

This issue is critical as I am unable to provide the necessary signals to my controller without resolving it. I would greatly appreciate your guidance in troubleshooting and resolving this problem. Your support in helping me figure this out at the earliest would be invaluable.

You have asked the same question in both the Plexim forum and through the support@plexim.com support channel. In the future please ask in only one location as it results in duplicate efforts from our engineering team.

In response to your support ticket where a model was included, my colleague suggested to use a PWM Out (Variable) block from the RT Box Target Support Library. The PWM Out (Variable) block can have a variable phase (and switching frequency) that is controlled by the block inputs. This approach allows PWM generation on the RT Box FPGA which has a significantly smaller clock resolution than is achievable when explicitly modeling carriers using blocks like the Triangular Wave Generator within the simulation.

You should be able to model most modulation schemes using this approach.

The problem for me is about the integer number When I try to build the RT box with my simulation with use PWM Out (Variable) but still have the same issues. I provide a constant value of 1/8 to get the required output the which will go to the triangular signals and used frequency is 65000 Now I’m facing the sampling time issues again. Can you guide me to fix it like how to fix the integer issues? Kindly help me to sort out this. with out figure out I can’t able to go forward.

which will go to the triangular signals

You should not directly generate the PWM carriers in the PLECS simulation model but rather use the PWM Out (Variable) block which includes an internal modulator.

Have you seen the “Three Phase Dual Active Bridge” minimal example demo, accessible in the RT Box Demo Models + Basic Topologies + Minimal Example? It shows how to generate the PWM signals for this converter. The model is attached for your convenience and shows the recommended approach to generate these signals with the PWM Out (Variable) block.

three_phase_dual_active_bridge.plecs (49.9 KB)



I attempted setting up the reference for my requirements, but encountered some errors. I have attached the details for your review. Kindly check and provide an update.

Your model is not prepared to run on the RT Box as you are using discrete switching devices rather than the appropriate components from the PLECS library. The error message is intended to prevent users from making this common modeling mistake.

I would recommend reviewing the RT Box: From Offline to Real-Time tutorial to better understand how to configure a model to run on the real-time simulator.

The “3-Phase Dual Active Bridge” component from the Electrical + Nanostep section of the PLECS library is the closest analog to your topology. Note the component does not include the magnetizing inductance or secondary capacitance. If the magnetizing inductance is sufficiently large then it could be neglected and the secondary capacitance could be reflected to the primary side.

Real-time thermal modeling is not supported with the Nanostep implementation of this model.

There are other, less optimal, ways to construct a real-time model for this converter but the real-time accuracy will likely be insufficient without using workarounds such as running the model in slower than real-time (i.e. time scaling).

Lastly, there also is the question of the overall simulation goals as this model has both the converter and controller modeled on one RT Box. Will you eventually interface this with a controller or hardware prototype?

Hello,
I’m trying control my duty cycle in my simulation using python. I need to check the phase shift in ON Stage so its possible though externally do you have any refence python script for it

I do not have a python script for that specific application but there are many general resources on using python with PLECS.

  • There are demo model examples on using python including “Buck Converter with Parameter Sweep” for automating PLECS and the " XML/JSON-RPC Scripting Interface" demo model for the RT Box.
  • Both the PLECS and the RT Box manual have chapters fully describing the python interface.
  • See the “XML-RPC Interface and Controller Design in Python” tutorial for a more advanced example of scripting PLECS .