Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do you integrate a square wave?

  1. Mar 5, 2012 #1
    I'm doing homework where i have to find a function representation of the output signal from a simple op amp integrator circuit with a 4.7k resistor and a .01uf capacitor. I know i'm supposed to use the equation -1/rc * int vin(t) but the input is a square wave signal. I never learned how to integrate that. Can i anyone help me out? Do i have to use something called a fourier series or fourier transform?
  2. jcsd
  3. Mar 5, 2012 #2
    This quote from wikipedia also applies to a square wave:

    A definite integral of a function can be represented as the signed area of the region bounded by its graph.
    Does that help?
  4. Mar 5, 2012 #3
    This is a discontinuous function, so it is easier to integrate in sections. You need to do integrals over specifc intervals and you need to account for the initial conditions at each interval.
  5. Mar 5, 2012 #4
    As pointed out above, you have to integrate each half cycle of the input square wave in sections. The basic form of the integration is

    [tex]V_{out}(t)=\frac{-1}{RC}\int_t V_{in}(t) dt[/tex]

    Each segment is a straight line. The line is continuous, but its derivative is not. The output of the square wave is a triangle wave.

    Bob S
  6. Mar 5, 2012 #5
    Yes I finally got the answer i think. I set the square wave input to 2V peak and i got an answer of (-4Vp/.000047)*t and since the frequency of the input square wave is 2000khz, the period is 500us. so (-4v/.00047)*t should be the graph of a triangle wave for the an interval of 0-500us and repeat itself every period after that. I think that's the answer anyway. Oh well whether I'm wrong or right, thx for help.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook