This simulator aims to be as "real time" and interactive as possible.
For that, simulation speed is essential, and non linear components, specially transistors are a big chalenge.
Making fast models means that they will fail to converge in some cases.
Making models that converge in most cases means they must be slow.
I'm working right now to solve this issues. or at least to make it work in as many cases as possible.
I find that in some cases accuracy is essential but not speed, for example in this case (Constant Current Circuit):
https://simulide.forumotion.com/t29-weird-behaviour-of-constant-current-circiut
In this case, the pair of BJTs can converge setting the accuracy a bit higher that default and letting them iterate as much as they want (>50K iterations).
If you don't let them iterate enought it just wont work at all (the "solution space" is very narrow).
In other cases accuracy is not so important and speed is very important, for example in this case (MCU controlling LPO):
https://simulide.forumotion.com/t62-strange-behavior-of-opamp-transistor-circuit
In this case user interaction with the circuit and keep the MCU running is esential.
And after a few hundred iterations the LPO has aproximated a solution that can be good enought for the purposes of the circuit.
There are other cases, like transistor as switches that should be ultra-fast.
This would be possible if we know that there are not feedbacks or emitter-follower (or similar) configurations.
The current model can detect emitter not tied to fixed voltages and do smoother steps.
There is also the "non-linear accuracy" property to set accuracy for the circuit.
But to solve as many cases as possible the only option i can think is that each transistor model is configured for the specific task.
My idea now is to add some properties to non linear components, so the user can configure it for each case, including accuracy, maximum number of iterations, perhaps a "fast mode" for transistor as switches, and may be some other.
I would like to know what do you think about this and what other ideas come to your mind.
For that, simulation speed is essential, and non linear components, specially transistors are a big chalenge.
Making fast models means that they will fail to converge in some cases.
Making models that converge in most cases means they must be slow.
I'm working right now to solve this issues. or at least to make it work in as many cases as possible.
I find that in some cases accuracy is essential but not speed, for example in this case (Constant Current Circuit):
https://simulide.forumotion.com/t29-weird-behaviour-of-constant-current-circiut
In this case, the pair of BJTs can converge setting the accuracy a bit higher that default and letting them iterate as much as they want (>50K iterations).
If you don't let them iterate enought it just wont work at all (the "solution space" is very narrow).
In other cases accuracy is not so important and speed is very important, for example in this case (MCU controlling LPO):
https://simulide.forumotion.com/t62-strange-behavior-of-opamp-transistor-circuit
In this case user interaction with the circuit and keep the MCU running is esential.
And after a few hundred iterations the LPO has aproximated a solution that can be good enought for the purposes of the circuit.
There are other cases, like transistor as switches that should be ultra-fast.
This would be possible if we know that there are not feedbacks or emitter-follower (or similar) configurations.
The current model can detect emitter not tied to fixed voltages and do smoother steps.
There is also the "non-linear accuracy" property to set accuracy for the circuit.
But to solve as many cases as possible the only option i can think is that each transistor model is configured for the specific task.
My idea now is to add some properties to non linear components, so the user can configure it for each case, including accuracy, maximum number of iterations, perhaps a "fast mode" for transistor as switches, and may be some other.
I would like to know what do you think about this and what other ideas come to your mind.