How to dynamically change a block parameter value during simulation run-time?
19 次查看(过去 30 天)
显示 更早的评论
I have been trying to find an easy way of doing this, but have failed till now. The problem is like this: I want to implement a diode using an exponential approximation model (Shockley model). In the exponential model, I have the option of modifying the Saturation Current value only at the beginning of simulation, as it is not a tunable parameter. Is there any way by which I can allow the simulation to itself calculate the value of I_S at every fixed number of steps and update the Diode parameter periodically?
I have attached the model which I am working on. My objective is to reproduce a diode thermal behavior by constantly changing the I_S value of a thermally-invariable diode model in Simulink. In this example, I have used a thermally-ACTIVE diode to behave as a real diode, approximated its I_S based on real-time i-v values. Now, I want periodically update the I_S value of the second diode (thermally-INACTIVE) so that it emulates the real diode. I want to see the effects of transmission delay/jitter on the accuracy of reproduction.
This is an introductory step into doing a similar exercise for a full-fledged automotive converter/inverter for remote simulation.
0 个评论
回答(1 个)
Chinmayi Lanka
2017-4-11
编辑:Chinmayi Lanka
2017-4-11
Simulink provides an API that allows programmatic access to block data. You could use this API to achieve what you want to do. You can refer to the following documentation on 'Access Block Data During Simulation': https://uk.mathworks.com/help/releases/R2017a/simulink/ug/accessing-block-data-during-simulation.html
Here is a tutorial on how to tune and experiment with Block Parameter Values: https://uk.mathworks.com/help/releases/R2017a/simulink/ug/using-tunable-parameters.html
You could also use a GUI to easily tune parameters, as explained in the following example: https://uk.mathworks.com/help/simulink/ug/tune-and-visualize-your-model-with-dashboard-blocks.html
2 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!