Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Option in Current Source to make it voltage limited/real world #149

Open
Steve132 opened this issue Feb 20, 2025 · 1 comment
Open

Comments

@Steve132
Copy link

Steve132 commented Feb 20, 2025

The "current source" in the simulation will generate arbitrarily higher or lower voltages than is physically possible in the circuit and is therefore intrinsically non-physical.

In most circuit diagrams, a "current source" or "current sink" as used in block diagrams of devices such as the implementation of the TLV431 or LM4041 (and many others, including current mirrors and other basic analog building blocks), actually are referring to a "current-limiting-diode" ideal active device which will increase or decrease it's resistance until a specified pre-programmed amount of current flows through the device.

The non-physical infinite-voltage characteristics of the "current source" node in the status quo means it's very very difficult to simulate or model simple block functional diagrams or designs that include such current-limiting active devices.

Although it's possible to ad-hoc construct such a diode using a jfet and a resistor in the simulator, it's painstaking and time-consuming and requires individually tweaking the jfet and resistor parameters, AND changes the impedance of the underlying circuit in a way that an ideal "current source" current limiter would not. Additionally, the jfet model itself seems to have some major convergence issues.

It's also difficult to construct such a device using the VCCS or CCCS builtins, because technically such a device is dependent on BOTH inputvoltage and current and outputs both voltage and current changes in a feedback.

What would be easiest and simplest is if the existing "current source" node could be given a checkbox which would enable enforce the min/max clamping behaviors of what the ideal current source node in other circuits is intending to represent. Nobody believes that when you put a "current source" /current clamper bjt or symbol in a block diagram that said current source is supposed to represent infinite energy.

I have looked into adding this myself as a patch but I don't really have the time to do it.

@Steve132
Copy link
Author

Minor correction: I was able to get something working using the following VCCS-based subcircuit. This should show that it can be done convergently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant