# LCR circuit with squarewave input: Why does the output take a decreasing amplitude through each cycle?

I understand a square-wave will be made up of a sum of sine waves in the form $$\frac{1}{n}sin(nf_0)$$

So when a squarewave is input to a LCR circut designed to be a bandpass filter, it will attenuate the signals either side of the resonant frequency, eg say $$f_0 = 5000 Hz$$

The signals other than the 5th harmonic will be filtered out (with elements of the 3rd and 7th coming through since it isn't a perfect band-pass filter).

I do not understand the output waveform however.

So there should be 5 peaks between each cycle of the square wave right? Due to it being the 5th harmonic. That's about all I understand, and I'm really struggling to find good sources which discuss the square-wave input to tuned bandpass filters.

The output I have has the 5 peaks between one cycle of the squarewave. When the squarewave is high, the output's first peak is at the peak amplitude, which then decreases until the squarewave switches to low, once it switches to low the output will increase in amplitude (but less than the first peak) and then decrease again until the squarewave switches back to high and the cycle repeats.

What is the cause of the decreasing amplitudes of the output and the relation between the increase in amplitude when the square-wave switches from high to low?

edit: The LCR is in series.

edit: scale on channel 1 is 2V, had to resize to decrease the file size to <2MB • Can you add your output? Seeing is easier than imagining (is this even a word?) – Vladimir Cravero Feb 25 '17 at 16:24
• Done. Also note I made a mistake on which frequency the resonance etc was at (supposed to be 5, but actual is 4.89 as displayed, the main post has been updated). Also, imagining is a word :) – Maitiu Feb 25 '17 at 16:34

Your LCR resonator has losses, so it is a decaying sinusoid wave at 5 MHz. Before it decays to zero, it is re-excited by the negative-going edge of your 1 MHz square wave. Then re-excited by the next positive-going edge of your 1 MHz square wave....and so on.
If you wish to see more of the exponentially-decaying envelope, try changing the frequency of your generator to 714.3 kHz so that you pick out the 7th harmonic. Or try 555555 Hz to see the 9th harmonic. These will be lower amplitude of course, since the excitation energy for each harmonic is smaller.
Be aware that your oscilloscope frequency display is incorrect. It is a difficult wave to measure because of its complex shape, so perhaps frequency error is understandable. The frequency content is exactly five times your source frequency.

• Right ok, so it is making more sense now. Is this known as a damped oscillator output? One of the sources I found stated that the frequency of oscillation should be at the resonant frequency? If that is true, wouldn't that justify the 4.89kHz output? (F_0 was at 4.81). Or am I confusing two different concepts? – Maitiu Feb 25 '17 at 17:27
• @Maitiu Yes, damped oscillations. Because of circuit resistance in LRC, resonance is visible over a small range of frequency around 5 MHz. If you measure these oscillations more carefully, frequency will be 5X that of the square wave exciter. – glen_geek Feb 25 '17 at 20:21

It is not just 3rd and 7th that leak thru, but also the fundamental at 1/5th the output frequency, it is attenuated sure, but it is there.

Looking at how quickly the amplitude of the 5th harmonic decays, you have a fairly low Q filter network there, higher Q networks will ring for longer, and have narrower 3dB bandwidth (One of the definitions of Q factor is the ratio of center frequency to 3dB bandwidth).

For an interesting experiment, try designing a higher Q BPF, what happens to the waveform? Lower Q, again what happens...

If, instead of a square wave you applied a step change, would it surprise you to see a decaying sine wave at the output?

So, how can a simple series resonant circuit predict the future; at the moment the square wave starts, the LCR produces a decaying sinwave until the square wave changes polarity and resets the LCR to produce a new form of the decaying sine wave.

Should this surprise you if you just think about it a little.

Here is the predicted buildup, show with Signal Wave Explorer; the LRC circuit is one of 13 builtin: find under "examples", pick the "scope probe ringing". [the 4rth and 5th screen shots illustrate the exact setup for 100 & 700MHz] This first screen shows "impulse" response, with (1) input 100MHz impulses, (2) input FFT magnitude (3) input FFT phase (4) system FFT magnitude (5) system FFT phase (6) output FFT magnitude (7) output FFT phase (8) output 700 MHz resonator: Q=100 (little dampening), L=100nH, C=517fF Now we turn OFF all but Input Wave and Output Wave [unclick Mag & Phase, edit ChartHeight=300, then Update/Reset]; the Q=100 causes drop in magnitude between each input impulse. Now for the squarewave, 100MHz 50% duty cycle, into 700MHz LRC, Q=100. Edit ChartHt = 50, to view all eight plots. Here are the Menu Settings: "Signal" (input Waveform) menu "System" (circuit) menu (edit params, and view the BODE) Here we zoom into Input 100MHz square wave, and output ringing. What is happening? why the baseline shift? Now increase the Q, to One Million [bring up "system" menu, edit "Q", click "solve".] You will also need to enter the "system definition" worksheet, look on left side for the "Dominant Tau worksheet" and edit "User Chosen" to 1uS, then click "Solve"; otherwise the FFT would be 65,000,000 samples which robustcircuitdesign.com does not allow at present. And find this behavior: Note the bottom scroll bar is moved slightly to the right, to view the dip.