0
\$\begingroup\$

I needed an active low pass filter for my project that can produce an output voltage within the required settling time and ripple voltage ranges. Although I managed to get a good enough output voltage with the shown resistance/capacitance values, if you calculate the cut-off frequency of this Sallen-Key low pass filter it's around ~4250 Hz. The input signal however, is 20 kHz.

The Sallen-Key low pass filter:

enter image description here

The output waveform:

enter image description here

My questions are:

How does a low pass filter with a cut-off frequency of 4250 Hz let a 20 kHz signal through?

Are cut-off frequencies, and therefore, stopbands of filters ignored in LTspice for some reason?

Additional info:

  • Op amp used in the circuit is the ideal single pole amplifier model of LTspice named "opamp" in op amps directive.

  • Input signal is 20 kHz 0-5 V pulse waveform with 50% duty cycle.

  • If the op amp is switched for different models such as LT1001, the output voltage level is around a few pV. This still happens when the resistance and capacitance values are changed and the cut-off frequency is more reasonable. Example: 5k resistors, 1n capacitors, ~32 kHz cut-off.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ What is the peak-to-peak voltage of your 20kHz input? Perhaps the filter is performing correctly. \$\endgroup\$ Apr 12, 2021 at 19:59
  • 2
    \$\begingroup\$ LTSpice has absolutely no notion of your "cut-off frequency"; that's an emergent property. I think your circuit might just be incorrectly designed (or as Math.. mentions, your expectations are unreasonable). \$\endgroup\$ Apr 12, 2021 at 19:59
  • 2
    \$\begingroup\$ If your cutoff was 5 kHz you'd expect 12 dB/octave attenuation (2 poles), so 24 dB total at 20 kHz. For a 5V sine you'd expect your signal to be attenuated to around 300 mV at the output. Since you're using a pulse the higher order harmonics will be attenuated more, but you shouldn't expect to see no 20kHz component on the output. \$\endgroup\$
    – John D
    Apr 12, 2021 at 20:08
  • \$\begingroup\$ The problem was that I incorrectly assumed the filter would pass no 20 KHz component since the signal has a frequency of almost 5 times the cut-off frequency. I have been using high order (20-25) filters for digital filtering a lot lately which left the picture of a very fine transition band in my mind and that led to the confusion in the first place. However I really do appreciate the calculations and the comments, thanks everyone. \$\endgroup\$ Apr 12, 2021 at 21:31
  • 1
    \$\begingroup\$ @CuriousStudent If those filters were FIRs, then they were not as high as you think they were. Because IIRs of that order have a ton of numerical issues. \$\endgroup\$ Apr 12, 2021 at 22:04

1 Answer 1

5
\$\begingroup\$

Back of the envelope calculation...

20k/4250 = about 4

It's a second order filter, so at a frequency 4x above its -3dB point it should attenuate the signal by 4 squared, or about 16.

Output signal is about 0.3Vpp.

Input signal is 5Vpp.

5/0.3 = about 16.

So it delivers the correct attenuation.

If you want more attenuation, use a lower -3dB point, or a higher order filter, or a much higher PWM frequency so it gets attenuated a lot more.

If you used a high -3dB point of 4250 Hz because you wanted fast settling time, then don't use a PWM for analog output when you want fast settling time, unless your micro supports high PWM frequencies. Use a DAC instead.

if the op amp is switched for different models such as LT1001, the output voltage level is around a few pV.

Did you forget the opamp power supplies?

\$\endgroup\$
3
  • \$\begingroup\$ I did not forget the supply voltages and I find it strange that the output is still only a few pV. However, the ideal model is the main op amp model I will be using for the design so that doesn't cause me any trouble. I really appreciate the detailed response, thanks. \$\endgroup\$ Apr 12, 2021 at 20:25
  • 1
    \$\begingroup\$ Nice answer (+1), just a minor correction: 20k/4.25k is closer to 5 than to 4, and if the number 16 is closely satisfied it's because 5/4~4/pi (for the square wave). \$\endgroup\$ Apr 12, 2021 at 22:08
  • 1
    \$\begingroup\$ It's engineering math ;) \$\endgroup\$
    – bobflux
    Apr 12, 2021 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.