# Output of AC op amp circuit has unknown superimposed signal on top of expected output signal

I am trying to find the voltage gain of a certain ideal op amp circuit with a sinusoidal input. However, when I simulate the circuit, the output shown seems to be my calculated output but with a higher frequency wave superimposed on it. Why is this?

Update: The 5th harmonic has been mentioned in some answers. I may be wrong but as far as I know, a sine wave has 1 harmonic so shouldn't the output signal be the same frequency as the input signal?

This is the reference question:

My working:

Ltspice window:

• Looks like a 3rd harmonic. – StainlessSteelRat Feb 23 '19 at 3:14
• Actually, it is the 5th harmonic. yet no clues why – Tony Stewart Sunnyskyguy EE75 Feb 23 '19 at 3:34

If you'd plot the frequency reponse, all will become clear:

The transfer function has infinite gain at 1.59k, which happens to be 318*5. I'll leave it up to you to find the transfer function (it should be in the text book). Minor hint: reduce the gain and see what happens, say make it 39k instead of 40k. This also happens because the default ideal opamp in LTspice has no output limitation, it's just a VCCS+(R||C) inside.

• Thanks for your response. I've lessened the gain of the op amp and it still produces this output. Also I don't understand why the gain being infinite at 5 times the input frequency will cause that frequency to appear in the output. Are you saying this is an error in LTspice or is the output it shows correct? – Lachlan Feb 23 '19 at 8:57
• @Lachlan Never blame the tool first, not while it's used, successfully, by millions of people around the world. Did you change the 40k valued resistor to 39k? If you did, you should have seen the peak reduced, and the transient response oscillatory only for a few periods. What happens is you have infinite gain at the corner frequency and whatever imperfections you have at the input (nothing is perfect, even computers have tolerances) is translated as noise in the frequency domain and amplified to appear at the output. In short, you're causing oscillations. – a concerned citizen Feb 23 '19 at 13:55

You have a 16Vpp signal going into a HPF with a gain of about 10dB (1+2) creating ~ 48Vpp signal above the breakpoint near 1.5kHz but tested at 318Hz or 2 octaves down where the gain should be 12dB down from +10 or < -2dB but the 5th harmonic has a gain of 10dB.

However I do not know your supply voltage and if there is any saturation going on to create these harmonics.

Try a lower level to see if that makes any difference and do a sweep of your HPF.

• I haven't learnt about HPF just yet but I did try lowering the input voltage down to 8uV but I still get the exact same output voltage shape/pattern. – Lachlan Feb 23 '19 at 4:41