# LTspice resonant circuit simulation: Output not building up as expected

1. What changes should I make to get the output buildup continuously in the simulation, until I get some warning, maybe "simulation out of bounds?"

2. What is this underlying frequency of around 1kHz? How is it related to the source frequency aka resonant frequency of 39.9kHz?

• What is the ESR of the inductor set to? Commented Aug 11 at 7:37
• It is a "logical" response of a "pure" L-C circuit to a "step-sinusoidal" input ... Commented Aug 11 at 7:48
• @Rohat Kılıç your "deleted" answer is the "good" answer". See my remark in the comment. It is the "mismatch" between the fr and f applied that creates this behavior. Commented Aug 11 at 10:34
• @Antonio51 Yes but the question was closed already before I posted my answer (I noticed afterwards). Also, the question appears to have answers in the linked question (haven't checked if any of them mentioned the mismatch, though). Commented Aug 11 at 10:57
• @Antonio51: Wow! Perfect plotting! Can you post the script as an answer? Commented Aug 11 at 17:11

The answer to the "same" question is not complete.
Think that it is the response of a circuit to a "step sinusoidal" input.

The behavioral of this circuit is ok.
Here is the mathematical demonstration.

Here is the "a" value = 0.98.
Axis are not very visible (0.004 ms at max).
The first plot is with a resistor <> 0 ( R = 1 mOhm).
The second plot is the theoretical plot with R = 0 Ohm (envelope pass to zero).

Here is the case with a=1.05, the "low" frequency is a bit "higher"
(plots with R = 0.001 Ohm, and R = 0 Ohm).

Your circuit has an underdamped response, hence the initial oscillatory output. It'll settle over time.

There's a non-zero ESR of the L1 which is by 1 mΩ by default. So the circuit is a simple series RLC circuit with C as the output. So the transfer function is

$$\mathrm{ H(s)=\frac{V_{OUT}(s)}{V_1(s)}=\frac{1}{LCs^2+RCs+1} }$$ Re-write in std form:

\begin{align} H(s)&=\frac{\omega_n^2}{s^2+2\zeta\omega_ns+\omega_n^2}\\ &=\frac{1/LC}{s^2+\frac{R}{L}s+\frac{1}{LC}}\\ \end{align}

where the natural frequency, $$\\omega_n\$$, is

$$\omega_n=\frac{1}{\sqrt{LC}}\approx 258.2 \ \text{krad/s}$$

and the damping factor, $$\\zeta\$$, is

$$\zeta=\frac{R}{2}\sqrt{\frac{C}{L}}\approx 6.5\ 10^{-4}$$

Remember that having the damping factor less than 1 results in an underdamped response. Since the damping factor is too low in your circuit, the settling time which is

$$t_s=\frac{3 \ \text{...} \ 4}{\zeta \omega_n}$$

will be relatively high.

1. In the below simulation what changes should i make to get the output buildup continuously ( till I get some warning may be- simulation out of bounds or so)?

If you increase the R which is the equivalent series resistor (i.e. the sum of the power source's output resistance and the L's ESR) the damping factor will increase and the output will build up more gradually. The inductor's default ESR is 1 mΩ, so you can try with a higher ESR e.g. 10 mΩ and see the difference. Note that the output amplitude should be ~71% of the input amplitude if the input signal frequency is equal to the natural frequency of the circuit for a critically damped circuit (settling time will be longer for an overdamped circuit). But for an underdamped circuit, there's going to be a resonant peak around the natural frequency, so the output amplitude will be higher than the input's. To make the response critically damped, the resistance should be a few hundred mΩ, you can calculate from the damping factor formula above.

1. What is this underlying frequency of around 1kHz? How is it related to source frequency aka resonant frequency (39.9kHz)?

I'm not quite sure but that's quite possibly because of the mismatch between the signal source frequency and the natural frequency. Note that the natural frequency which can be calculated from $$\\omega_n=2\pi f_n\$$ is NOT 39.9 kHz as shown in your question, it's ~41.09 kHz. The underdamped response was supposed to oscillate with the natural frequency but it's kinda "enveloped" or "modulated" by the input signal frequency. You can see the difference by using a DC source instead. I also think that the maximum timestep, which is set to 10 ns in your simulation, plays a role here.

• Why should the output amplitude be equal to input? "Note that the output amplitude should be equal to the input amplitude so the resistance should be a few hundred mΩ." Commented Aug 11 at 17:37
• @Dynamic_equilibrium there's a grammatical mistake there. Fixing it now. To answer your question better, think about the frequency response of an RLC circuit. There's a resonant peak for an underdamped circuit, that's why you get higher amplitudes. For a critically damped or overdamped system that resonant peak will disappear and you'll get 0 dB amplification for frequencies lower than the natural frequency. Commented Aug 11 at 17:50

From a more abstract approach:

Consider the differential equation of the system:

$$V_1(t) + V_{L_1}(t) + V_{C_1}(t) = 0$$

$$A \sin \omega t + L_1 \frac{dI(t)}{dt} + \int \frac{I(t)}{C_1} dt = 0$$

(There is also an implied resistance, not shown here, as LTSpice normally sets default values for these components, and there is some error due to the stepwise numerical integration that SPICE uses to solve the general nonlinear systems it's tuned for.)

We have an nonhomogeneous, linear time invariant, integro-differential equation. In general, the solutions to such equations are a superposition of the homogeneous solution, of the form

$$I(t) = e^\frac{-t}{\tau} \left( c_1 \sin \omega_0 t + c_2 \cos \omega_0 t \right)$$

...or something to that effect (more particularly, $$\\tau \rightarrow \infty\$$ because there is no resistance (damping, 1st-order) term); and the nonhomogeneous solution

$$I(t) = c_1 \sin \omega t + c_2 \cos \omega t$$

where coefficients $$\c_1\$$, $$\c_2\$$ can be solved in terms of $$\A\$$, $$\L_1\$$ and $$\C_1\$$.

(And of course we can convert back to V(OUT) by applying the relevant branch equation.)

Or, just taking the easy way out and using the Laplace transform or what have you.

Since we are applying a sinusoid, and expect a sinusoidal response from the network, we can describe the result as the superposition of two sine waves, which when equal amplitude, gives the cuspy-envelope waveform plotted above.

Note that, even with $$\V_1\$$ and the initial conditions all start at zero, there is still an effective step-function stimulus to the system, which is that the source $$\V_1\$$ was zero for all time $$\t < 0\$$, then suddenly starts up. To the LC network, this very much looks like a frequency-shifted step input, and thus sets it ringing at its natural frequency, at equal amplitude, as a "DC" step would.