MATLAB Answers


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

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 件のコメント

サインイン to comment.





1 件の回答

Answer by Maadhav Akula on 26 Jul 2019
 Accepted Answer

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 件のコメント

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.
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!
Hi Maadhav,
That was very helpful! Thank you very much!
Much appreciated!!

サインイン to comment.

Translated by