variation of the parameters of a diode during simulation

8 views (last 30 days)
I want to vary the Reverse breakdown voltage of the diode, during simulation on simulink, the new parameter will be calculated using a small algorithm on state flow, this algorithm retrieves simulation values and calculates the new optimal voltage, then impose it on the diode, which means, state flow retrieves data during the simulation and calculates the new parameters and applies them to the subsystem, all without stopping the simulation

Answers (1)

Fangjun Jiang
Fangjun Jiang on 13 Feb 2023
The value of a "parameter" of a block is designed to be constant during a simulation. There are ways to pause a simulation, change its value and then continue the simulation. It is not designed to work in your expected fashion, which is to change its value at every simulation step, which is the same as any other dynamic variable.
You may have to change your modeling. One example I always give is that, if you want to change the "gain" value of a Gain block at every simulation step, then you should use a "Product" block to "multiply" those two signals instead.
I am not aware of any block that can implement what you described.
  9 Comments
Fangjun Jiang
Fangjun Jiang on 20 Feb 2023
I don't see any way other than you model it yourself. In R2022b, there is only one type of "Diode" block that has "Breakdown", "Reverse breakdown voltage" parameter. It doesn't have any option to make it a dynamic input.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!