MATLAB: Battery variable heat transfer question

Simscape Electricalsimulinkspecialized power systems

I am using the Specialized Power Systems Simscape block. I would like to be able to change the thermal resistance/thermal time constant over the course of the simulation (see image). I was thinking about changing the value of Batt.Rth (see image) but I can not find where I can edit this value.
Thanks in Advance,
Matt

Best Answer

Hello Matthew,
to make that value editable, you will need to create a custom block and modify the battery. To do this, you would use the powergui block customize function. Customize the battery block, then delete the gain block and replace it with a product block. Then you can add an input port to be the thermal resistance so that you can control it externally while the simulation is running. Most specialized power systems blocks cannot have their parameters changed durring simulaiton unless modified like this.
Regards,
Joel