Electronic – LC Filter Response

ltspicepassive-networks

I've been trying to replicate the step response of an LC filter in LTSpice but so far I haven't been successful.

schematic

simulate this circuit – Schematic created using CircuitLab

That is the circuit I want to get the step response for. As expected, if I take the transfer function and run the step command in MATLAB, I get sustained oscillations.

$$H(s)=\frac{\frac{1}{Cs}}{\frac{1}{Cs}+ Ls} $$

enter image description here

Now, when I try to do it in LTSpice, I don't get that result:

enter image description here

enter image description here

I suspect the issue is that LTSpice doesn't really provide a step input as it doesn't go instantly from 0 to the final value when the source is turned on (which is what is done in MATLAB when using the step command).

Best Answer

V1 is a currently a constant DC source of 1v. To replicate the first circuit, all you need to do is "remove" V1 after some energy has been put into the L and C components.

There are many ways in which this could be done, one such way is to right-click V1, advanced, set to PWL (piece-wise linear) and specify time and voltage levels, such as 0ms 1v, 0.999ms 1v, 1.0ms 0v (which produces a sharp turn-off edge) then observe the result in the chart. As Dave says, these values of L and C will produce a relatively fast oscillation - plan on zooming in quite a bit.

If you recall from inductor theory, a charged inductor suddenly presented to an open-circuit will try to produce an infinite voltage (in order to maintain the current flowing through it.) Thus, simply removing the voltage source altogether will not work. Instead, it has to go to 0v (in other words, be a solid conductor.) Then the circuit will oscillate.

Edit: to further illustrate this phenomenon, here is a screenshot of LTspice performing the complete impulse response. Click for full-size. Note some "loss" was added to the inductor (resistance) and capacitor, to better model real-world characteristics. This is why the amplitude decays slightly over time, and was shown because real-world electronics are far from ideal, with many kinds of losses.

LC Step Response.