How can I set the parameter ioc (prior open circuit current) of the supercapacitor block as a real-time variable parameter?
6 次查看(过去 30 天)
显示 更早的评论
I am planning to simulate a circuit configuration in Simulink to implement regenerative braking before conducting a direct experiment. In the actual experiment, I am using a supercapacitor, and since Simulink has a Supercapacitor block, I am using it.
When setting the parameters of this supercapacitor block, I encountered an issue. In the self-Discharge settings, under Discharge, there is a parameter called "Current prior open-circuit."
I would like to simulate this as closely as possible to the specifications of the actual supercapacitor I am using, but I cannot find this parameter in my datasheet.
So, I am trying to substitute the ioc parameter by measuring the real-time current value.
Here is my simulink code.

Then, I capture instant current using "Parameter Writer", and this parameter insert to ioc(prior open circuit current) of Supercapcitor block.
However, it has a error.


Here is my error

error: This is because this block is initialized with the mask parameters of the dialog box or workspace variables. Writing to these parameters using the Parameter Writer block is not supported.
Here is my previous question link:
If you possible, read my previous question!
Thank you for reading!
回答(1 个)
Sabin
2025-8-11
Parameter Writer is not supported in this context because it is used to initialize the block. The workarounds are:
- Do a calibration simulation, obtaining the parameter at postprocess rather than on-line.
- Implement a custom component that will allow this parameter to be an input. This approach would not make much sense if the parameter is going to be constant over the duration of the simulation.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Power Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!