4
\$\begingroup\$

I solved this circuit by hand.Which asks to calculate vo and Io in the circuit.

Transistor circuit

And I tried to verify results with LTSpice.

LTSpice circuit

If I change dependent current source B2's equation to I = I(R1)* 50 it gives an error like that:

LTSpice error

If I use I = I (R1) it works fine. What might be the problem here?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ I think it has to do with roundings. Check what happens to V(n001) when using I = I(R1)* 20. \$\endgroup\$
    – Huisman
    Mar 14, 2019 at 7:33
  • 1
    \$\begingroup\$ It has also to do with how the initial operating point is calculated. When using I = -I(B1)*50 or I = -I(V1)*50 it works nicely. \$\endgroup\$
    – Huisman
    Mar 14, 2019 at 7:43
  • \$\begingroup\$ Thanks. If I use I = -I(B1)*50 voltage it works fine. If you answer I may select it as accepted answer. \$\endgroup\$
    – user211748
    Mar 14, 2019 at 8:08
  • 1
    \$\begingroup\$ Well, it's not the answer but the solution to "What might be the problem here?" ... Mind to keep it unanswered till someone can explain the cause? I'm curious as well. \$\endgroup\$
    – Huisman
    Mar 14, 2019 at 8:16
  • 1
    \$\begingroup\$ If you specify I(R1) alone you don't know the direction of the current. Make sure you get that right. \$\endgroup\$ Mar 14, 2019 at 10:46

1 Answer 1

2
\$\begingroup\$

If you open up the manual (F1) and look at LTspice > Circuit Elements > B. Arbitrary Behavioural Voltage or Current Source, you'll see this bullet point:

Circuit element currents; for example, I(S1), the current through switch S1 or Ib(Q1), the base current of Q1. However, it is assumed that the circuit element current is varying quasi-statically, that is, there is no instantaneous feedback between the current through the referenced device and the behavioral source output. Similarly, any ac component of such a device current is assumed to be zero in a small signal linear .AC analysis.

What you have there is a direct feedback which violates the above condition. If, instead of behavioural sources, you use primites such as VCVS and CCCS, everything works:

bla

For the CCCS, I have used V1, for comodity, since it's already there, otherwise you would have had to add a zero-valued voltage source in series with R1 (with correct polarity).

As a side note, in your schematic, you're labeling the ground net with C, which can be done, but it's completely useless. IIRC, except the ground, naming the same net more than once means LTspice will use the latest label.

Also see this answer, it's the same.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.