MATLAB Answers

How to model a switch to charge/discharge a battery and/or supercapacitor equivalent circuit.

10 ビュー (過去 30 日間)
Fraser Lloyd
Fraser Lloyd 2019 年 7 月 17 日
コメント済み: Fraser Lloyd 2019 年 7 月 31 日
So I am very new to simscape and I was wondering if anyone could help me model a switch for charging and discharging an equivalent circuit. Basically, I just need to figure out how to get the switch to open and close using either a voltage or time threshold.
Any help would be VERY appreciated as ive been stuck at this for some time now.

  0 件のコメント



Maadhav Akula
Maadhav Akula 2019 年 7 月 26 日
I understand from your question that you want to implement a switch that can be controlled using voltage/time threshold and in that context the Simscape library has a switch block in it, and you can access it by going to Simulink Library Browser>Simscape>Foundation Library>Electrical>Electrical Elements>Switch.
You can also check the documentation page for Switch block below:

  3 件のコメント

Fraser Lloyd
Fraser Lloyd 2019 年 7 月 29 日
Thanks for the reply. I have accessed these swtiches before, but im not entirely sure how they work. The switch doesnt seem to be closthing when the the current circuit or voltage goes above a certain threshhold.
Maadhav Akula
Maadhav Akula 2019 年 7 月 31 日
I am attaching a basic model, where the Switch is activated for positive values of the sine wave, you can look at the scope which is attached to the voltage sensor to verify that.
Hope this helps!
Fraser Lloyd
Fraser Lloyd 2019 年 7 月 31 日
Hi Maadhav,
That was very helpful! Thank you very much!
Much appreciated!!


その他の回答 (0 件)





Community Treasure Hunt

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

Start Hunting!

Translated by