Author Topic: Second order Sallen-Key high pass filter distortion  (Read 3233 times)

0 Members and 1 Guest are viewing this topic.

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Second order Sallen-Key high pass filter distortion
« on: October 02, 2017, 03:52:09 pm »
Hello everyone,

I'm built up a simple second order Sallen-Key high pass filter but I'm seeing some weird distortion on the output.  The schematic and scope output is attached.  The op amp I am using is a LM224.

The yellow trace is the input and the blue trace is the output.  I have this weird spike on the output that I don't know what is causing it.  The spike will move its relative position on the waveform if I change the frequency.  It will go completely away if I'm above the cutoff point.  Since the spike happens at different voltages I don't think this is crossover distortion.  I've tried googling but I don't think I know the right terminology because I can't seem to find much. 

Does anyone have an idea what is causing this?
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Second order Sallen-Key high pass filter distortion
« Reply #1 on: October 02, 2017, 04:02:20 pm »
±100V , bit much

Little difficult to say anything about it without knowing the rest of the circuit.
But first question, did you decouple the power pins of the opamp?

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14217
  • Country: de
Re: Second order Sallen-Key high pass filter distortion
« Reply #2 on: October 02, 2017, 04:19:57 pm »
The LM324 is known to show quite some cross over distortion at the output for anything faster than line frequency. The LM224 is just the extended temperature range version - should have the same distortion.
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Second order Sallen-Key high pass filter distortion
« Reply #3 on: October 02, 2017, 04:22:57 pm »
Also for simulation purposes, it is always good to check in advance which the supply voltages are allowed.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2086
Re: Second order Sallen-Key high pass filter distortion
« Reply #4 on: October 02, 2017, 04:23:38 pm »
Since the spike happens at different voltages I don't think this is crossover distortion.
Why not? The cross-over will happen when the current changes direction - this is not necessarily at the middle output voltage swing. The LM224 appears to share the same output stage as the LM358:

https://youtu.be/VgodYtiD_F0

Note the 50uA offset in the output stage - you will only see distortion when the output requirements exceed 50uA.
 

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: Second order Sallen-Key high pass filter distortion
« Reply #5 on: October 02, 2017, 06:53:42 pm »
@b_force the +/- 100v was only in simulation.  The physical circuit was +/-7 volts.  The input was a 5Vpp sine wave.  As for the rest of the circuit, this is basically it.  There is no load besides the scope probes.   I'm not exactly sure what you mean by decouple the power pins.  Adding bypass caps?

@Kleinstein Oh, I think my understanding of crossover distortion is lacking.  With my understanding of crossover distortion, it should happen at the same voltage level.  I'm seeing distortion at two different voltages.  Also varying the input signal offset didn't seem to move the distortion.  Maybe I haven't thought about it enough but I would expect if I shifted the input voltage by 1 volt the output distortion location would shift by 1 volt(assuming unity gain).

@Andy Watson That was actually the first hit on google I found.  I watched it but I got from it that the crossing should happen at the same voltage level(I'm not claiming this is true, just what I thought).  I tried changing the offset of the input waveform but it didn't affect where the distortion happened on the waveform.  Which I would have thought would have changing the input signal offset would move the distortion location if it was crossover distortion.  But I'm not AC coupling the output so I'm not very confident in this.

To check if this is crossover distortion I'll try adding a load to the output to see if it goes away.  I'm thinking this is it but I'm still a little confused about the output I'm seeing. 
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Second order Sallen-Key high pass filter distortion
« Reply #6 on: October 02, 2017, 10:47:40 pm »
Btw, crossover distortion looks very different.
Just image two parts (upper and bottom) of a sine wave that have some space in between them
google is your friend, tons of images about crossover distortion.

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: Second order Sallen-Key high pass filter distortion
« Reply #7 on: October 02, 2017, 11:20:51 pm »
I know, that's why I said I didn't think it was crossover distortion.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Second order Sallen-Key high pass filter distortion
« Reply #8 on: October 02, 2017, 11:45:30 pm »
The LM224 has plenty of crossover distortion and the highpass filter passes the distortion harmonics with phase shift.
Try the same circuit with a normal opamp that has NO crossover distortion.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2086
Re: Second order Sallen-Key high pass filter distortion
« Reply #9 on: October 02, 2017, 11:57:12 pm »
It is crossover distortion. Again: it occurs when the current changes direction. Since the current is not in phase with the voltage, the "spike" does not necessarily occur at the mid-point of the voltage span. The phase difference occurs because it is driving the filter components. Also, the phase changes with frequency (as you would expect in a filter), which is why you observe this:
The spike will move its relative position on the waveform if I change the frequency. 
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Second order Sallen-Key high pass filter distortion
« Reply #10 on: October 03, 2017, 12:25:32 am »
In addition to crossover distortion, the lousy old LM358 and LM324 (LM224) have lots of noise and very poor high frequency slew rate. The frequency in this circuit is too high for it. Its spec's are bad because it was one of the first opamps to use low power supply current.
 

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: Second order Sallen-Key high pass filter distortion
« Reply #11 on: October 03, 2017, 02:03:43 am »
It is crossover distortion. Again: it occurs when the current changes direction. Since the current is not in phase with the voltage, the "spike" does not necessarily occur at the mid-point of the voltage span. The phase difference occurs because it is driving the filter components. Also, the phase changes with frequency (as you would expect in a filter), which is why you observe this:
The spike will move its relative position on the waveform if I change the frequency. 
Ah ok, that makes sense.  It was the current and voltage being out of phase that I wasn't thinking about.  I've added a load to the output and the distortion goes away.  What's neat is if I put a weak load on the output the distortion looks more symmetrical like I was expecting which I'm guessing is because the load is now mostly resistive.  Thanks for the help!

In addition to crossover distortion, the lousy old LM358 and LM324 (LM224) have lots of noise and very poor high frequency slew rate. The frequency in this circuit is too high for it. Its spec's are bad because it was one of the first opamps to use low power supply current.

Yeah I figured the op amp was not the best.  It's just what I had in a parts bin.  I'm looking to make some bandpass filters for the audio range of frequencies so I need to do a little looking around for op amps.  Thanks again!
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Second order Sallen-Key high pass filter distortion
« Reply #12 on: October 03, 2017, 02:10:31 am »
You can eliminate the cross over distortion by adding a resistor from the opamp output to the negative rail. It needs to be low enough so that the opamp is always sourcing current. You just don't let the opamp output crossover. Not a great solution, but it can make the LM324 perform adequately.

It is better using a faster, low distortion opamp. The results will be much better then the LM324 can ever manage.
 

Offline b_force

  • Super Contributor
  • ***
  • Posts: 1381
  • Country: 00
    • One World Concepts
Re: Second order Sallen-Key high pass filter distortion
« Reply #13 on: October 03, 2017, 02:17:32 am »
Yeah, there are tons of much better opamp that are cheap.
Or just simply sample them

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19536
  • Country: gb
  • 0999
Re: Second order Sallen-Key high pass filter distortion
« Reply #14 on: October 03, 2017, 06:28:49 pm »
Since the spike happens at different voltages I don't think this is crossover distortion.
Why not? The cross-over will happen when the current changes direction - this is not necessarily at the middle output voltage swing. The LM224 appears to share the same output stage as the LM358
The LM358 is the same op-amp as the LM224. It's just in a dual, rather than quad package. A single variant, the LM321 is also available.

Yes, it's crossover distortion, which occurs when the current changes direction. Change the op-amp a proper one such as the NE5532 or TL072 and it will go away.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf