How to use a real current source?

2 次查看(过去 30 天)
Fernando Belda
Fernando Belda 2021-9-22
回答: Ankita 2025-2-8
Hello everyone!
I have to simulate the operation of a battery under current demand. In this circuit I have to control a switch which connect and disconnect the battery when certain limits of voltage and/or current are overpassed.
My problem is that what I have to work with is a current demand curve, not the voltage demand. When I transform the data over time values to current values due to a current source, even if the switch is open, the current continues flowing. I think that the problem is that this source is ideal, so it has enough power to generate an infinite voltage so the current can continue flowing. I have tried with different types of switchs, MOSFETS, CircuitBreaker blocks and the result is the same.
Please, do you know of a way/block that I can apply to my circuit to the current curve but when the switches open this current is interrupted?
To simplify my circuit I have created this one with the same problem (also attached). The current demand as well as the switch control signal are generated by two different pulses:
Data:
-Switch Threshold: 0.5V
-Switch Control Pulse: Amplitude=1V, Period=100s, Pulse width=50%, Delay=0s
-Switch Control Pulse: Amplitude= +-5A, Period=400s, Pulse width=50%, Delay=0s
  1 个评论
Fernando Belda
Fernando Belda 2021-9-22
This is hwhat the scope shows (real current and current pulse generator signal coincide).

请先登录,再进行评论。

回答(2 个)

Jonas
Jonas 2021-9-22
Instead of using an ideal current source, use an ideal voltage source with a resistor in parallel.
  1 个评论
Fernando Belda
Fernando Belda 2021-9-22
Hi Jonas,
Unfortunately I cannot do that because the purpose of the simulation is to apply exactly the current curve that I have to the battery.

请先登录,再进行评论。


Ankita
Ankita 2025-2-8
I'm sure you must have solved the problem by now, but just answering for anyone else who comes across this. Using any circuit breaker or switch did not work because of the current source being ideal as you mentioned in your question.
Using a controlled current source that is fed current demand profile based on your control conditions should do the trick!

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by