DSPRelated.com
Forums

fourier anlysis of square wave...

Started by suren November 29, 2007
Ron N. wrote:
> On Dec 1, 9:36 am, Jerry Avins <j...@ieee.org> wrote: >> Peter K. wrote: >>> Steve Underwood <ste...@dis.org> writes: >>>> This "once you are digitised you are safe" idea is often used like a >>>> mantra, for some reason. I'm puzzled where the idea even comes >>>> from. Has some popular book pushed the idea? >>> Not that I'm aware of, but I can see why people get the idea: >>> If we define aliasing to be the effect of sampling at a frequency that >>> is too low for the frequency content of the sampled signal, then that >>> is _not_ the effect this thread is talking about. The thread is >>> (mostly) referring to the case where the signal is already sampled. >>> Once a signal is sampled, the maximum frequency it can contain is pi >>> (or 1, depending on how you define "frequency"). >>> So is applying a nonlinearity to an already-sampled signal really >>> aliasing (as defined above)? >>> I agree that it has similar aspects to aliasing, but I don't think >>> that the effect should necessarily go by the same name. >>> Comments? Criticisms? Witticisms? >> Consider the signal sin(Fs/3). Square it to get [1 - cos(2Fs/3)]/2. >> Sample it at Fs; see the DC and the alias. Sample sin(Fs/3) at Fs and >> square each sample. I contend that if squaring the samples produces the >> same result as squaring (and not filtering) the signal, then both are >> aliasing. Without actually doing it, the sameness seems evident to me. > > Perhaps you would first have to prove that there cannot > exist any form of low-pass or bandlimiting filter that > would result in a waveform producing the same samples > at those pre-existing sample points, after removing the > added high frequency spectra that would alias.
I don't think so. I think that all you need to show is that the squares of the samples of the original waveform are equal to the samples of the squared waveform, sample for sample. That seems pretty self evident. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Dec 1, 12:11 pm, Jerry Avins <j...@ieee.org> wrote:
> Ron N. wrote: > > On Dec 1, 9:36 am, Jerry Avins <j...@ieee.org> wrote: > >> Peter K. wrote: > >>> Steve Underwood <ste...@dis.org> writes: > >>>> This "once you are digitised you are safe" idea is often used like a > >>>> mantra, for some reason. I'm puzzled where the idea even comes > >>>> from. Has some popular book pushed the idea? > >>> Not that I'm aware of, but I can see why people get the idea: > >>> If we define aliasing to be the effect of sampling at a frequency that > >>> is too low for the frequency content of the sampled signal, then that > >>> is _not_ the effect this thread is talking about. The thread is > >>> (mostly) referring to the case where the signal is already sampled. > >>> Once a signal is sampled, the maximum frequency it can contain is pi > >>> (or 1, depending on how you define "frequency"). > >>> So is applying a nonlinearity to an already-sampled signal really > >>> aliasing (as defined above)? > >>> I agree that it has similar aspects to aliasing, but I don't think > >>> that the effect should necessarily go by the same name. > >>> Comments? Criticisms? Witticisms? > >> Consider the signal sin(Fs/3). Square it to get [1 - cos(2Fs/3)]/2. > >> Sample it at Fs; see the DC and the alias. Sample sin(Fs/3) at Fs and > >> square each sample. I contend that if squaring the samples produces the > >> same result as squaring (and not filtering) the signal, then both are > >> aliasing. Without actually doing it, the sameness seems evident to me. > > > Perhaps you would first have to prove that there cannot > > exist any form of low-pass or bandlimiting filter that > > would result in a waveform producing the same samples > > at those pre-existing sample points, after removing the > > added high frequency spectra that would alias. > > I don't think so. I think that all you need to show is that the squares > of the samples of the original waveform are equal to the samples of the > squared waveform, sample for sample. That seems pretty self evident.
How would that prove that they are not also the samples of a bandlimited filtered version of the squared signal?
Ron N. wrote:
> On Dec 1, 12:11 pm, Jerry Avins <j...@ieee.org> wrote: >> Ron N. wrote: >>> On Dec 1, 9:36 am, Jerry Avins <j...@ieee.org> wrote: >>>> Peter K. wrote: >>>>> Steve Underwood <ste...@dis.org> writes: >>>>>> This "once you are digitised you are safe" idea is often used like a >>>>>> mantra, for some reason. I'm puzzled where the idea even comes >>>>>> from. Has some popular book pushed the idea? >>>>> Not that I'm aware of, but I can see why people get the idea: >>>>> If we define aliasing to be the effect of sampling at a frequency that >>>>> is too low for the frequency content of the sampled signal, then that >>>>> is _not_ the effect this thread is talking about. The thread is >>>>> (mostly) referring to the case where the signal is already sampled. >>>>> Once a signal is sampled, the maximum frequency it can contain is pi >>>>> (or 1, depending on how you define "frequency"). >>>>> So is applying a nonlinearity to an already-sampled signal really >>>>> aliasing (as defined above)? >>>>> I agree that it has similar aspects to aliasing, but I don't think >>>>> that the effect should necessarily go by the same name. >>>>> Comments? Criticisms? Witticisms? >>>> Consider the signal sin(Fs/3). Square it to get [1 - cos(2Fs/3)]/2. >>>> Sample it at Fs; see the DC and the alias. Sample sin(Fs/3) at Fs and >>>> square each sample. I contend that if squaring the samples produces the >>>> same result as squaring (and not filtering) the signal, then both are >>>> aliasing. Without actually doing it, the sameness seems evident to me. >>> Perhaps you would first have to prove that there cannot >>> exist any form of low-pass or bandlimiting filter that >>> would result in a waveform producing the same samples >>> at those pre-existing sample points, after removing the >>> added high frequency spectra that would alias. >> I don't think so. I think that all you need to show is that the squares >> of the samples of the original waveform are equal to the samples of the >> squared waveform, sample for sample. That seems pretty self evident. > > How would that prove that they are not also the samples of > a bandlimited filtered version of the squared signal?
They are necessarily the samples of /some/ bandlimited signal. To find out which one, run them through a DAC and a reconstruction filter. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Peter K. wrote:
(snip)

> Once a signal is sampled, the maximum frequency it can contain is pi > (or 1, depending on how you define "frequency").
> So is applying a nonlinearity to an already-sampled signal really > aliasing (as defined above)?
> I agree that it has similar aspects to aliasing, but I don't think > that the effect should necessarily go by the same name.
A nonlinear operation on an analog signal often creates harmonics. It would seem that it also would for a sampled signal, and those could come out high enough to alias. Jerry had an example, sampling a sine with a period of Fs/3, then squaring it. The result is the same as squaring and then sampling, in which case the alias is more obvious. -- glen
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:

> A nonlinear operation on an analog signal often creates harmonics. > It would seem that it also would for a sampled signal, and those > could come out high enough to alias. > > Jerry had an example, sampling a sine with a period of Fs/3, > then squaring it. The result is the same as squaring and then > sampling, in which case the alias is more obvious.
Yes, Jerry's example is a good one. I was just trying to answer Steve's question as to why people might think that you're "safe" from aliasing once things have been sampled. Thanks, Glen! Ciao, Peter K. -- "And he sees the vision splendid of the sunlit plains extended And at night the wondrous glory of the everlasting stars."
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> writes:

> Any time a new frequency is created (including with sampling or subsampling) > then if the spectra mix with the original such that interpretation of > frequency becomes ambiguous, there's aliasing. If there's no ambiguity then > there's no aliasing. Examples of the latter are well known in down-shifting > schemes.
Thanks, Fred! That's a good way to think about it. Ciao, Peter K. -- "And he sees the vision splendid of the sunlit plains extended And at night the wondrous glory of the everlasting stars."
Jerry Avins <jya@ieee.org> writes:

> Consider the signal sin(Fs/3). Square it to get [1 - > cos(2Fs/3)]/2. Sample it at Fs; see the DC and the alias. Sample > sin(Fs/3) at Fs and square each sample. I contend that if squaring the > samples produces the same result as squaring (and not filtering) the > signal, then both are aliasing. Without actually doing it, the > sameness seems evident to me.
Jerry, that's a great example, thanks! In that case, the similarities are pretty clear. Ciao, Peter K. -- "And he sees the vision splendid of the sunlit plains extended And at night the wondrous glory of the everlasting stars."
"Steve Underwood" <steveu@dis.org> wrote in message
news:finqb3$1q0$1@home.itg.ti.com...

> This "once you are digitised you are safe" idea is often used like a > mantra, for some reason. I'm puzzled where the idea even comes from. Has > some popular book pushed the idea?
Folded aliasing is one of the standard gotchas of the DSP. It seems counter intuitive, so it is very easy to fall into the trap unless you know about it already. Another typical trap is the quantization problem in IIR filters: it seems like with 32bits you have a lot of precision :) Vladimir Vassilevsky DSP and Mixed Signal Consultant www.abvolt.com
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in 
news:svidnQJFlPbaFMzanZ2dnUVZ_tWtnZ2d@centurytel.net:

> If there's no ambiguity then > there's no aliasing.
Exactly. -- Scott Reverse name to reply
Scott Seidman wrote:
> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in > news:svidnQJFlPbaFMzanZ2dnUVZ_tWtnZ2d@centurytel.net: > >> If there's no ambiguity then >> there's no aliasing. > > Exactly.
Sure, but how do you know /a priori/? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;