0
\$\begingroup\$

Below is a plot of a sweep which shows how Vo changes versus Vi in LTspice:

enter image description here

How can I plot the "derivative of Vo" i.e dVo/dVi versus Vi? How can I plot the "integral of Vo" versus Vi?

Edit: I was trying to see how the voltage gain for a transistor changes with input. I tried to plot -dVout/dVin versus Vin below which is the plot of voltage gain:

enter image description here

For 10mV change in Vin causes very different gain in the middle of active region. "Change in Vin" must be around 1mV or less for a stable gain.

\$\endgroup\$
  • \$\begingroup\$ Try D(V(Vo)) for derivative of Vo. And LTspice does not "support" the integral as the old PSpice do, s(x) integral. At least I did not hear about it. \$\endgroup\$ – G36 Feb 6 '18 at 19:08
  • \$\begingroup\$ Yes this works for derivative. \$\endgroup\$ – HelpMee Feb 6 '18 at 19:15
  • \$\begingroup\$ See my edit do you think it is correct? \$\endgroup\$ – HelpMee Feb 6 '18 at 19:39
  • 1
    \$\begingroup\$ This is not a surprise since the BJT's gain is gmRc ≈ 40*IcRc. As you can see the voltage gain changes with Ic. This is why we add RE resistor and if RE > 1/gm the gain becomes Rc/RE. \$\endgroup\$ – G36 Feb 6 '18 at 19:44
  • \$\begingroup\$ Since the gain of grounded-emitter CE arranged BJT is \$R_C\cdot g_m\$ and since \$g_m\$ depends upon \$I_C\$ and since \$I_C\$ depends on the instantaneous signal voltage value being applied, the output applies a variable gain to the signal. No shock. This is called "distortion." (Temperature also matters.) The solution is to use the excess gain and provide lots of NFB. That can be done with an emitter resistor, or with a resistor from collector back to base (or using an emitter follower's output back to base), or by wrapping a whole circuit with global NFB. \$\endgroup\$ – jonk Feb 6 '18 at 20:02
1
\$\begingroup\$

Oh, cripes. It's not so hard:

enter image description here

Then just plot the formulas you already seem to have known about:

enter image description here

From the above pair of curves, you can see that when the collector voltage is near halfway between the rails, that the voltage gain is about 200. Given that \$I_C=\frac{6\:\text{V}}{1\:\text{k}\Omega}\approx 6\:\text{mA}\$ and that \$A_V=R_C\cdot g_m=1\:\text{k}\Omega\cdot\frac{6\:\text{mA}}{26\:\text{mV}}\approx 230\$, there's no real shock here.

Also notice the sudden demise of the voltage gain when the collector voltage plummets and the BJT enters into saturation.

No matter where you position your operating point on this gain curve, with a large enough input signal you will experience an output signal that is a distorted result of that input signal because of the significant gain variations. (Temperature and part variations will also dramatically shift that operating point around, by the way.)

This grounded emitter amplifier is a case where either local or global NFB is pretty much required.

\$\endgroup\$
  • \$\begingroup\$ Great answer thanks! People like you should write the books. \$\endgroup\$ – HelpMee Feb 7 '18 at 0:33
  • 1
    \$\begingroup\$ @user1234 Hehe. Thanks. Now my wife is going to go beat on me to write something. Sheesh. ;) \$\endgroup\$ – jonk Feb 7 '18 at 1:00
1
\$\begingroup\$

Bad news, you can't plot a derivative of a variable with respect to another derivative in LT spice. You can however plot the derivative with respect to time like this \$ \frac{dx}{dt}\$ or \$ \int{x}dt\$.

You can plot integrals with respect to time like listed here There is also a way to integrate a signal by holding down control in the time domain.

I was able to get a graph by inserting d(V(vo)) on the horizontal axis and d(V(vi)) (my signals are not the same as yours) however, I'm not sure that \$ {\frac{dx}{dt}}/{\frac{dy}{dt}}\$ is going to get you the same as \$ \frac{dx}{dy} \$

If not you can always export into python, excel or matlab and use the math functions there. enter image description here

\$\endgroup\$
  • \$\begingroup\$ Please see my edit. Is the plot in my edit correct? Or atleast close to correct? \$\endgroup\$ – HelpMee Feb 6 '18 at 19:38

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.