Re: Does not have any harmonics

• posted

>> Why does a sinusoidal waveform alone does not have any harmonics or

>> distortion ? >> >> For example, (Reference ->
>> Sawtooth wave of constant period contains odd and even harmonics >> Square wave of constant period contains odd harmonics >> Triangle wave, (an integral of square wave) contains odd harmonics >> >> But, How is it possible that sinusoidal wave alone does not have any >> harmonics or distortion ? > simple answer.. saw and square waves are made up of hundreds of sine > waves.. sine wave is made up of one.

At the risk of wandering in and appearing ignorant in two newsgroups at once...

I think my answer to Karthik's original question would be that a sine wave only appears "perfect" because sines (and cosines) are (normally) the "units" of our analysis of periodic waveforms. Once you start down that path, that is, once you say that every waveform is "made up of" ("will be described as the combination of") some set of scaled and shifted sine waves, then your "units" will appear to be... um, "unitary".

But suppose some truly evil and sadistic mathematician decided that his classes would forever analyze periodic waveforms using some other basis, say square waves?

Suddenly a sine wave would be seen as a truly horrible combination of shifted and scaled square waves, a thing chock-full of "harmonics"... it would no longer be the pristine, pure thing it appeared when we looked at it through Fourier's eyes.

Does this make sense (even if my choice of square waves turns out to be poor)? Or did I miss something?

-- It is a profoundly erroneous truism, repeated by all copy-books and by eminent people when they are making speeches, that we should cultivate the habit of thinking about what we are doing. The precise opposite is the case. Civilization advances by extending the numbers of important operations which we can perform without thinking about them. Operations of thought are like cavalry charges in battle -- they are strictly limited in number, they require fresh horses, and must only be made at decisive moments. -- Alfred North Whitehead

-- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)

• posted

Yes, this was what I was trying to explain in my post.

Essentially sine waves are the "Basis"(in fact, that is what it is called in mathematics) that we use to write signals in terms of.

Now sine waves have very special properties but you could try and decompose a sine wave in terms of other functions.

Again, this happens all the time. Polynomial expansion, Exponential expansion, Gabor expansion, Wavelet decomposition, etc are all ways to decompose signals(functions) in terms of some units.

Sine waves are just special in that they have very simple ways to decompose and nice properties. They are not necessarily the best for all types of signals or for all types of analysis but they work very well and lots of theoretical research has been done.

Its kinda like if your "units" are nickels and you ask why a quarter can be "decomposed" into nickels but a nickel cannot be decomposed in terms of a nickel(in fact it can, its just "special" in this case). Now if we use pennies then we can decompose both but again a penny is "special" because it is now our "basis".

A side note: "Square waves" are essentially whats call a haar wavelet(sorta) and one can decompose any "normal" signal in terms of them. The decomposition it a bit different than fourier analysis but in some sense its also very similar.

Basically the idea is to try to explain some phenomena(functions, signals, etc) in terms of things we understand very well. We understand sinusodial functions very well.

• posted

On Jan 3, 11:53 pm, "Jon Slaughter" wrote: [.....]

The code for docomposing into Walsh waveforms looks a lot like the one for doing an FFT. It runs a lot faster than FFT because no sin(X) needs to be done.

Even the non-fast version looks like the non-fast FT. You need the ability to do a parity check computation. It looks a lot like this:

Sum = 0 Mask = BitReverse(Freq)

for I = 0 to N-1 if Parity(Mask AND I) Sum = Sum + X[I] else Sum = Sum - X[I] next I

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.