- I don't see anything obviously wrong with your R_ele_variable module. At least if I remove the switch, your model runs OK.
- Both the switch and the resistor are now contributing to a resistance of R.
- One real problem: your equations for closed swith is OK, but the open switch one needs more work. There is no equation on how the voltage or current should behave. And you are specifying an equation for Inputs and parameters. There is nothing to solve!! Inputs and parameters are externally prescribed values. The equation must have some "variables" to solve for.
- Another (maybe) real problem: how should things behave when it's melt? cut the current I suppose? You have a current source in the circuit right now. It will force the prescribed current through the network. If you force the i=0 at the component, you will get an error like making 1==0. Need to think about this more carefully to set up the problem right.
How do i get Temperature derating Curve of Fuse?
2 views (last 30 days)
Yifeng Tang on 25 Jun 2021
One suggestion: consider using modechart to model discrete states (melt & normal) of your component. You definite how and when the two modes (or more) switch to each other, and the sets of equations in each mode. Your code should be more readable and robust. Here are the details: https://www.mathworks.com/help/releases/R2019a/physmod/simscape/lang/mode-chart-modeling.html
And I THINK it would be easier if you include the derating equation in the same custom resistor block. You shouldn't have two resistors of value R as you now have in your model.
Hope this helps. Happy modeling!