5
\$\begingroup\$

I know that capacitor slows the rise of voltage, but why is this not happening in the LTspice simulation?

I got the input voltage at the output instantly.

enter image description here

enter image description here

\$\endgroup\$

1 Answer 1

16
\$\begingroup\$

Go to your simulation setting and check the "Start external DC supply voltages at 0V".

As noted in the comments below, there are several ways to solve this. Initial point solution and detect steady state are both methods to speed up a simulation at the cost of dynamic behavior at startup. I personally don't like options like these and "cheat" with a spice directive like ".ic V(Vcc)=0" if it's charged externally or use a voltage source which does its own ramp.

Be aware of the shenanigans going on behind the scene in LTspice and find a method you are comfortable with.

enter image description here

\$\endgroup\$
8
  • 5
    \$\begingroup\$ @NBKSOFT To clarify further: the reason this occurs is because LTspice starts the simulation by finding the DC operating point, and the DC operating point of your circuit occurs when the voltage across the capacitor is equal to the source voltage (i.e. the capacitor is fully charged). Starting the external supplies at 0V fixes your simulation because the initial DC operating point then occurs when the voltage across the capacitor is 0V. \$\endgroup\$
    – Polynomial
    Commented Sep 21, 2022 at 12:17
  • 4
    \$\begingroup\$ @Polynomial In other words, this is not a bug, but intended behaviour, even if a bit non-obvious. \$\endgroup\$
    – Hearth
    Commented Sep 21, 2022 at 12:32
  • 3
    \$\begingroup\$ Or in other other words LTspice is letting your circuit "warm up" before doing the real simulation. \$\endgroup\$
    – user20574
    Commented Sep 21, 2022 at 12:36
  • 3
    \$\begingroup\$ Don't forget that the startup flag will add a fixed 10 us ramp to the supply. OP's is 1 ms so it should be fine (100x less) but, if the time constant is close to that value, uic will be a better choice, which adds an instantaneous step. Or use a PWL() source, no flags. \$\endgroup\$ Commented Sep 21, 2022 at 13:35
  • 1
    \$\begingroup\$ @aconcernedcitizen Is it always 10µs no matter what the other .tran or .options parameters are? I'm asking cuz I seem to always get 20µs no matter what and can't figure out why yours is different. \$\endgroup\$
    – Ste Kulov
    Commented Sep 22, 2022 at 4:44

Your Answer

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

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