Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Use the RT Box like a gate driver (one high side one low side) in the 200k-500k Hz range

0 votes
I made a simple simulation where I have 2, 200Khz switching frequency signals and a 20nS dead time. One output is high, while the other is low and there is 20ns of dead time in between. This is often how one would drive 2 MOSFETS; though that is not my exact application. See attached example. Maybe this is not the best method, so please feel free to recommend a better one.

Step two is to then use the RT box to do the same. AKA send the 2 signals to a physical scope through the digital outs on the RT box.

I have tried several methods and have failed to do so and was hoping to get some recommendations. In the attached example I added the “digital output” to the pulse generators. Not show in the example I have also tried using the “PWM Out” signal as that is what is recommended. In the Coder options for the RT box, if I set the “Discretization step size” to high I get an error on the RT Box. If I set the step size to low I get software error saying the step size is not a multiple of the base step size.

Please recommend a best practice for what I am trying to do.


Edit: grammar.
asked Oct 13 by Todd (17 points)
edited Oct 13 by Todd

1 Answer

0 votes
Best answer
Please see the attached model.

You should use the PWM Out component for generating PWMs with the RT Box.  With the Digital Out component the output can only change once per model time step.  With the PWM Out component the output's are generated by the RT Box's programmable logic and can change state between model steps. The PWM Out component also has a configurable dead-time setting.

For a control applications, generally the model step should be synchronized with the PWM generation as configured in the PWM Out component.  The step size is then set to an integer multiple of the PWM period.

The following video on the Plexim YouTube page might be informative:
answered Oct 14 by Bryan Lieblick (900 points)
selected Oct 14 by Todd
@Bryan Lieblick

I do not have PLECS 4.5 with a matching coder license so I got multiple errors trying to open your example. Ignoring the errors I was able to see what you did and recreated it in my older version.  

I attached an image of what I did and it worked just the same. Thank you very much,