Zack Cilliers wrote: > > Hi there! > > Can some one send me some more information as how the sinewave can improve > on a squarewave. > > thanks Zack, Are you asking how the sinewave can be generated from the square wave? Well, if you aren't then I'm answering the wrong question... A couple of weeks ago John Payson and I were discussing some details on how it is possible to suppress the 2nd and 3rd harmonics in a sampled square wave. This led me on an analytical rabbit chase that turns out to be the inverse of the so called "magic sine wave". Skipping over the details, let me just pull a formula out of my magic hat. Suppose you have a very narrow duty cycle pulse train: ^ | tau | <----> | | +----+ +----+ | | | | | -+-----+ +------------------------+ +---------> t phi <-----> <-------------- T ------------> In other words, if you have a pulse stream that has a frequency of 1/T, pulse widthes of tau, and an initial phase of phi, then one (of an infinite many) series expansion is: f(t) = d + inf ---- \ sin(n*pi*d) / n*2*pi tau \ 2* / ----------- * cos| ------ *( t - --- - phi) | ---- n*pi \ T 2 / n=1 where, d = tau/T is the duty cycle pi = 3.141592653... t = time For 50% duty cycles, you may recall that there are no even harmonics present in the fourier series. So as one simple check, you can substitute d=0.5 and see that the sin(n*pi/2) kills the even harmonics in this parameterized expansion. The goal of the magic sinewaves is to suppress many if not all of the harmonics beyond the fundamental. This can be accomplished by chopping the period into many fine pieces; in other words, let tau<