Electrical Switch doesn't work
6 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I am trying to use a switch in a simulation of an electrical circuit and I dont know why, but it is not working correctly. I have created a simplifyed system to check the switch function and it also doesn't work. I paste a screenshot of the system so you can check it.
The idea was to activate and desactivate the switch with a pulse generator, so the current of the circuit, which is a constant 1A DC, fluctuates between 0A and 1A. Despite of it, the current is 1A during the whole simulation.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/724694/image.png)
6 个评论
Walter Roberson
2021-8-30
The Pulse generator you are using uses an output of 0 when the pulse is not underway, and uses an output according to the given Amplitude when the pulse is underway.
However, the Circuit Breaker https://www.mathworks.com/help/physmod/sps/ref/circuitbreaker.html?s_tid=doc_ta only closes when the voltages crosses below the threshold... so we need to know what threshold you configured... and what you configured the initial state as ?
采纳的回答
Jonas
2021-8-30
编辑:Jonas
2021-8-30
You are using an ideal current source set to 1 A. This means that whichever load you attach to it, it will maintain 1A.
By opening and closing the switch, you are just changing the required voltage the ideal current source needs to maintain the 1A. Even when your switch is opened, it has a certain 'Open conductance'. This means that in the open position, the switch still has 1/1e-6 Ohm = 1000 000 Ohm resistance, which means the ideal current source will employ 1000 000 Volts to maintain the 1A current through it.
You are basically simulating huge sparks and fireworks. Yes, Simscape is also able to simulate those. It will not prevent you from doing so.
This is why the current measurement with scope will always read 1A. Try to add a voltage measurement accross the switch and see the large voltage.
5 个评论
Jonas
2021-8-30
You are using a Circuit Breaker block, you need to use a Switch block.
Read the text displayed for the Block Parameters of the Circuit Breaker block. "If vT rises above the threshold, then the circuit is broken when the current next crosses zero". In your case, the current never goes to zero again (because it is a static supply) so it stays closed.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Switches and Breakers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!