1
\$\begingroup\$

A circuit is given (see the figure).

schematic

simulate this circuit – Schematic created using CircuitLab

where

$$I= \left\{\begin{matrix} 0, & t < 0\\ I_0 sin(\omega t), & t \geqslant 0 \end{matrix}\right. $$

and the capacitor stores no energy at \$t = 0\$

So, the capacitor voltage can be calculated as

$$V(t) = \frac{1}{C}\int_{\infty}^{t}I(x)dx = -\left. \frac{I_0}{\omega C}cos(\omega t)\right|_0^t$$

This, in particular, gives a DC offset equal to \$\frac{I_0}{\omega C}\$. Let's the parameters values be: \$I_0 = 1A, C = 1\mu F\$ and \$\omega = 1kHz\$. Then the DC offset should be equal to \$1kV\$. But using LTspice I had just about \$150V\$. Moreover, this offset goes down with time to the value of \$0\$ (looks like capasitor discharge curve in response to a voltage step in an RC circuit).

Does it mean that LTspice models the components imperfections (internal resistances, for example)? Or my calculations are wrong? If the former is true, how to model ideal behavior?

Thanks

\$\endgroup\$
7
  • \$\begingroup\$ I have yet to check if this is the culprit in your case, but LTSpice adds a resistive component to capacitors and inductors to facilitate convergence. Have a look at the Control Panel - Hacks! tab and lookup the following commands (actually options as the come after .opt directives) in the help file: Gfarad, Gfloat, Thev_Induct and DampInductors. (I put in those for inductors, too) \$\endgroup\$ – Sredni Vashtar Jun 20 '17 at 1:25
  • \$\begingroup\$ I forgot the source: ltwiki.org/index.php5?title=Undocumented_LTspice#Capacitors \$\endgroup\$ – Sredni Vashtar Jun 20 '17 at 1:32
  • 1
    \$\begingroup\$ Just a reminder that for \$ \omega = 1000 \$ rad/s, \$ f = 1000/(2\pi) \simeq 159\$ Hz \$\endgroup\$ – sstobbe Jun 20 '17 at 1:32
  • 1
    \$\begingroup\$ The last equation is wrong. \$\endgroup\$ – user253751 Jun 20 '17 at 1:37
  • 1
    \$\begingroup\$ I guess I found the culprit: to see the decay you need a large interval and if you do not specify a minimal time step the numerical solution will shift. Try a min time step of 1n (I guess 1u would do as well) - it will take forever but the solution will not drift. (And of course you mixed up f and w for the 1.5kV vs 150 (159, actually) volts offset, and the integral sign in the last formula should be a vertical bar). \$\endgroup\$ – Sredni Vashtar Jun 20 '17 at 2:06
1
\$\begingroup\$

I'm posting the answer since it is instructive to see what can happen with the default timestep when the simulation spans too big an interval.

This is the circuit in LTSpice.

enter image description here

A minimum time step of 50us is more than adequate to give a stable solution on 200 ms interval:

enter image description here

But take it to 60us with .tran 0 200m 0 60u startup and you will see the solution drifting toward the time axis:

enter image description here

With 100us timestep we get shape similar - but only similar - to an exponential decay of the mean value

enter image description here

\$\endgroup\$
2
0
\$\begingroup\$

Or my calculations are wrong?

Sadly, yes.

This, in particular, gives a DC offset equal to \$\frac{I_0}{\omega > C}\$.

Sadly, no. Your term is multiplicative, and simply determines the amplitude of the response. If it were followed by a + or - it would be an offset, but not in this case.

\$\endgroup\$
1
  • \$\begingroup\$ No, he mixed up the integral and vertical bar. When you solve the integral you do the difference between endpoints, and that introduces the offset (corresponding to cos(0) times the external constant) \$\endgroup\$ – Sredni Vashtar Jun 20 '17 at 4:04

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.