Frequency Response of RC filter for Square wave input

Discussion in 'General Electronics Chat' started by aneesh566, Jul 4, 2012.

  1. aneesh566

    Thread Starter New Member

    Jul 4, 2012
    1
    0
    I have a RC low pass filter, I am applying square wave input, I am running a frequency analysis. Can anybody clarify what is the expected output?
     
  2. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    The fast changes, both up and down, will be sloped instead of vertical.
     
  3. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    A square-wave has harmonics of the fundamental frequency due to the sharp edges of the waveform. The low pass filter will roll off the harmonics above (and starting at) the filter corner frequency [1/(2\piRC)] and thus round the edges of the square-wave.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Implied by the this is that the effect depends on the ratio of the filter corner frequency to the square wave's fundamental frequency.

    The higher this ratio, the more harmonics will pass the filter and the more like a squarewave the output will look.

    The lower the ratio, the fewer harmonics will pass and the more like a sine wave (only the fundamental) the response will look. If the ratio is less than one, even the fundamental will be attentuated and, as the ratio drops further, you will get an increasingly small response, but what does get through will look more and more like a clean sine wave.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    I hope I didn't just mess up and answered someone's homework problem for them.
     
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Actually, at frequencies far above the -3dB frequency, the output will be a triangle wave, becoming lower in amplitude as the frequency increases. It will never look like a sine wave.
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Dooh! You're right.

    It will look more and more like a linear ramp due to only seeing the first part of the charge and discharge curves. It will look most like a sine wave near the cutoff frequency, but the skirt for a first-order filter won't be nearly steep enough to keep a significant amount of the first one or two harmonics from getting through.

    That's actually an interesting question? At what frequency, relative to the cutoff frequency, would a square-wave look "most" like a sine wave? It's not a particularly simple question, either, leaving aside the fact that what defines "most" has to be dealt with. But I think it would be an educational question to have students play with because it forces them to think about what the spectrum will look like below the cutoff frequency -- and how to calculate it. It's particularly useful if you have them visually decide where they think the best sine wave approximation is by looking at a scope in the lab.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
    An RC low pass filter is an integrator. Hence you will be integrating a constant +V and -V signal.
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    It behaves "like" an integrator for signals that meet certain conditions.

    What does the output look like for a step change in voltage? It is an exponential response with an RC time constant. This is NOT the integral of the input signal. So you need the frequency to be high enough such that you are staying in the early part of the exponential curve (where it looks pretty linear) but low enough that the higher harmonics are getting to play too much. I'm not sure it will ever look very sine-wavy and, if it does, if it will be a signal frequency above or below the cutoff frequency. Once you get an octave or so above the cutoff frequency, the harmonic content should be pretty stable with the overall amplitude dropping at 3db/decade, so the shape should be pretty constant, just getting smaller and smaller quickly.
     
Loading...