I've been trying to simulate the following circuit in spice. (I'm plotting the voltage over R7)

enter image description here

Everything is okay, and works as expected until I change the gain of the current controlled current source to a value that's greater than 58. And I should simulate this with a value of 290. Any idea on how to fix this?

Here is another photo with the gain in 290 enter image description here

When I set the gain in 58. Spice trows the following error "spice analysis: Time step too small; initial timepoint: trouble with node n002" The node n002 is the node that connects R4 with R1. For greater values the error doesn't show up anymore but the result is the one from the picture.

Thank you for any help you can give me on this issue!

  • \$\begingroup\$ At time = 0 the simulator tries to find a stable DC solution. When you set the CCCS to have a gain of 280 I suspect that positive feedback is introduced into the system in such a way that there is no stable DC solution. I am also suspect of the direction of the output current of the CCCS, I think the arrow should point to R3 (the emitter?). It is unclear what the direction of a positive current through R1 is, down or up? \$\endgroup\$ – Bimpelrekkie Dec 4 '19 at 12:12
  • \$\begingroup\$ I've just changed the orientation of the CCCS as you said, you are right. The positive direction of the current through R1 is down. But the problem still arises. With a gain of 50 the voltage on is inverted with respect of the voltage on V1. So it's working as expected. But when I take the gain to higher values it continues to fail. Any idea on how to fix this? \$\endgroup\$ – Gaston Dec 4 '19 at 12:28
  • \$\begingroup\$ If this is the small signal equivalent circuit of a BJT common emitter circuit and you want to make \$\beta\$ = 290, look at how the values of the small signal components vary when \$\beta\$ varies. Is R1 always 16 k ohm? Other option: try using a voltage controlled current source instead of the CCCS (using a VCCS is much more common). \$\endgroup\$ – Bimpelrekkie Dec 4 '19 at 12:38
  • \$\begingroup\$ I think the problem lies at the points where V1 becomes zero and there is a recursive dependency: the current through R1 is (solely) determined by B1 (because V1=0), while the current B1 is determined by the current through R1. The simulator probably steps across the points where V1=0 for small gains, but fails to do so for big gains. \$\endgroup\$ – Huisman Dec 4 '19 at 12:42
  • \$\begingroup\$ I've tried to add a 1V dc in the voltage generator. So te voltage never reaches 0V. But it does the same. The problem as you say is clearly the feedback, beacuse I shorted R3 and it worked perfectly. However that isn't what I need. \$\endgroup\$ – Gaston Dec 4 '19 at 13:18

Behavioural sources are very versatile, but sometimes can suffer. Using the VCCS (aka G-source) should eliminate the problem. In this case, since you are only taking a current and multiply it by a constant, you can replace B2 by a VCCS like this:


It takes the voltage across R3, divides it by its value (1/16k), and then multiplies it by some constant (290).

Alternately, you can either insert a zero-valued voltage source in series with R3 (let's presume it's called Vx), then use an F-source with the value Vx 290 (careful at the direction of the source, + ---> -), or replace R3 with the same zero-valued voltage source, but with Rser=16k added, same F-source.

  • \$\begingroup\$ Thank you so much! That completly solved the problem. Someone mentioned it upthere but I didn't think it was for solving it. But now I'm wondering why does this work and mine doesn't. \$\endgroup\$ – Gaston Dec 5 '19 at 11:29
  • \$\begingroup\$ @Gaston If you look in the manual at LTspice > Circuit Elements > B. Behavioural ..., you'll see Expressions can contain the following: and then, at the 3rd bullet: it is assumed that the circuit element current is varying quasi-statically [...] (plus explanation). My advice would be to only use behavioural sources when the expressions cannot be replaced by elementary VCCS or CCCS (and their voltge counterparts), but that would be just that, advice, based on opinion. \$\endgroup\$ – a concerned citizen Dec 5 '19 at 18:00
  • \$\begingroup\$ Thank you! I'll keep on reading the manual. This has been a great help! \$\endgroup\$ – Gaston Dec 6 '19 at 12:53
  • \$\begingroup\$ @Gaston If you think this answer helped you, mark it down (the check mark below the arrows), so that others, in the future, looking for similar problems, will know that that this question has an answer. Up-/downvoting is optional. \$\endgroup\$ – a concerned citizen Dec 6 '19 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.