Simulink: THERMAL resistor with variable resistance during simulation

2 views (last 30 days)
Hi. I´m trying to find a way to change the resistance in a THERMAL resistor during simulation in simulink. There is no ready to use block for that in simulink library (theres just one for eletrical resistor).
I would like to you my Signal * R* as a variable value of the thermal resistor block. Maybe there is a way to save that signal as variable in Model explorer and use it as a value for this Block?

Answers (1)

Vandana Rajan
Vandana Rajan on 16 Jun 2017
You can create a custom component for your use case.
See the code structure of "my_resistor.ssc". Here R is a fixed parameter. You can change it to be an input parameter. To see how to do this, take the source code of the block 'variable resistor'. Double click on the block and you will see a link for 'source code'. Open it and examine how R is given there. You will see like this
R = { 0.0, 'Ohm' }; % PS:left
This will make R as an input parameter.


Find more on Programmatic Model Editing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!