DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Novice question - ideal continuous squarewave

Started by hcvst ●May 18, 2011
On May 20, 1:01&#4294967295;am, Tim Wescott <t...@seemywebsite.com> wrote:
> On 05/19/2011 09:15 PM, Jerry Avins wrote: > > > > > > > > > > > On May 19, 5:01 pm, Clay<c...@claysturner.com> &#4294967295;wrote: > >> On May 19, 4:21 pm, Jerry Avins<j...@ieee.org> &#4294967295;wrote: > > >>> On May 19, 2:48 pm, Clay<c...@claysturner.com> &#4294967295;wrote: > > >>>>> As an example, take a filter that presents a 'brick wall' at 2Hz. &#4294967295;Put > >>>>> that square wave into it, and you'll get a sine wave at 1Hz out. &#4294967295;If the > >>>>> filter has unity DC gain, then you'll see some overshoot (I can't > >>>>> remember -- 9%?). &#4294967295;So, just measure or calculate the peak-peak > >>>>> excursion, and adjust the filter gain as necessary. > > >>>> Tim, you remember well. > > >>>> For the OP, the overshoot is 1/2 + G/pi where G is the Gibbs-Wilbraham > >>>> constant > > >>>> G is the integral of the sync from 0 to pi. > > >>>> G =approx 1.8519370519... > > >>>> so the overshoot = aprox 1.0894898722... > > >>>> So google Gibbs' phenomenom and you will learn some more that will > >>>> help you with what Rick put in his book. > > >>> Clay, I'm confused. The series for a square wave is > > >>> &#4294967295; &#4294967295; &#4294967295; &#4294967295; inf > >>> (4/pi)*SUM[(sin(n*w*t)/n] > >>> &#4294967295; &#4294967295; &#4294967295; &#4294967295; n=1 > > >>> A brick wall filter removes all but the first term, leaving > >>> (4/pi)*sin(w*t) (w is a standin for small omega.) Isn't the peak > >>> amplitude then 4/pi = approx 1.273? > > >>> Jerry > >>> -- > >>> Engineering is the art of making what you want from things you can get.- Hide quoted text - > > >>> - Show quoted text - > > >> Hello Jerry, > > >> Sorry for the confusion. > > >> Seehttp://www.claysturner.com/dsp/gibbs.pdf > > >> So here you can see a square wave defined to nominally go between 0 > >> and 1. > > >> The Gibbs overshoot then goes up to about 1.09 and down to -0.09. > > >> If a brickwall high pass filter is used so that all but the > >> fundamental are retained then the over/undershoot is as before. > > >> In the case of a brickwall lowpass filter then the amplitude of the > >> fundamental is 2/pi. I believe the series you gave goes between -1 and > >> 1 so yes the amplitude there would be 4/pi. > > >> I left in the DC bias in my example so as to not add confusion. Or > >> maybe it does. > > > If the filter were truly a brick wall (we know that's not possible in > > the real world) then the cut-off needed to isolate the fundamental > > could be any frequency greater than the fundamental and less than its > > second harmonic. The Gibbs ringing is correspondingly variable. It is > > in any case less than 4/pi and adds to that. > > The Gibbs ringing _can't_ be variable if you are cleanly omitting > harmonics, which is what you do with a brick-wall filter with cutoff not > equal to a harmonic.
Oeps! You're right. Jerry -- Engineering is the art of making what you want from things you can get.