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.

How to change input values in the midst of simulation?

0 votes
62 views
I'm trying to simulate some faults using the BLDC Circuit in the PLECS Library. One of the faults is instantaneous power stop, which is pretty much a loss of power in the midst of the simulation. However, I am unable to figure out how to change input parameters during simulations or set a specific timestep where the value changes. I've looked into C-script and doesn't look like it could do what I require. Below is the attached file, I plan to change the Udc to 0 in the midst of simulation to replicate an instantaneous power stop fault. Please advice on the situation.
asked May 8 by spintern (14 points)

1 Answer

0 votes

> Below is the attached file

It seems you did not attach a model as you intended.

> I plan to change the Udc to 0 in the midst of simulation to replicate an instantaneous power stop fault. Please advice on the situation.

Block mask parameters are static during a simulation run unless manually changed by the user during run-time.  For example, the "Voltage Source (DC)" block has one parameter that defines the DC voltage.

Signals in the PLECS schematic are intended to update dynamically during a simulation run. A straightforward way to set the voltage to zero would be a "Step" block connected to a "Voltage Source (Controlled)" block, with a voltage step from Udc to 0.

If you have a more sophisticated voltage profile, then a look-up table or "From File" block might be appropriate.  See this forum post for an example of the From File approach.  There also the "Motor Drive with Failure Modes" PLECS Demo Model may be relevant for your work..

 

answered May 9 by Bryan Lieblick (1,941 points)
...