DSPRelated.com
Forums

Nyquist Didn't Say That

Started by Tim Wescott August 22, 2006
steve wrote:

> Jerry Avins wrote: > >>steve wrote: >
-- snip --
> > Tim is making many assumptions (unfairly in my opinion) beforehand > about the signal and anti-alias filter in his original post, and then > saying this and that statement is not correct.
Mostly I'm assuming that things need to be done in the real world, with real equipment that can be bought for real amounts of money. Given those assumptions I think I'm on track.
> Is he assuming frequencies higher then the desired signal exist
Yes I am. That's a direct consequence of assuming a real system that is only turned on for a finite period of time.
> I think so, but I don't know, is he assuming a non-brick wall
> anti-alias filter? Yes I am. That's a direct consequence of assuming that you don't want to wait an infinite amount of time for your filter's output. Falling significantly short of that, I'm staying aware of just how much you have to pay for a filter that's 'practically' brick wall, whatever that means for your particular application.
> I think so but who knows.
Most other old timers who are pitching in here seem to understand.
> Nyquist assumes the ideals, you can't have a theorem otherwise. >
That's true. The problem comes about when newbies who have forgotten all of the addenda, exceptions and quid-pro-quos* assume that Nyquist is a design guideline instead of a theoretical limit. * "Alladin", Walt Disney Co., 1992. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Genome wrote:

> "Tim Wescott" <tim@seemywebsite.com> wrote in message > news:q6mdnZgxjJhQHnbZnZ2dnUVZ_rGdnZ2d@web-ster.com... > >>Kinda off topic -- >> >>A month or two ago there was a spate of postings on these groups >>displaying a profound misunderstanding of how to apply Nyquist's theorem >>to problems of setting sampling or designing anti-alias filters. I helped >>folks out as much as I could, but it really demands an article, which I am >>currently working on. >> >>The misconceptions that I noticed pretty much boiled down to the following >>two: >> >>One, "I need to monitor a signal that happens at X Hz, so I'm going to >>sample it at 2X Hz". >> >>Two, "I can sample at X Hz, so I'm going to build an anti-alias filter >>with a cutoff of X/2 Hz". >> >>I estimate that answering these misconceptions will only take 3-4k words, >>but I don't want to miss any other big ones. >> >>Have you seen any other real howlers that relate to Nyquist, and what you >>should really be thinking about when you're pondering sampling rates, >>anti-aliasing filters and/or reconstruction filters? >> >>Danke. >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com >> > > > I have noticed that for switch mode power supplies the loop crossover > frequency is Fs/2piD and have often modelled such things in spice and they > have behaved themselves where the loop crossover frequency is well above a > half of Fs which rather pisses on Nyquist.... > > What did I miss? > > DNA > >
Can you post a link to an example schematic? I don't think you missed anything. First, a switch mode power supply isn't a sampled data system, really. It's certainly time-varying and shares some aspects of a sampled-time system (including the fact that you can use the z transform to improve the accuracy of the analysis if you're a masochist), but it isn't really sampled. Second, while the switching action may alias all sorts of higher-frequency components of the control voltage into the baseband, that doesn't keep the baseband component of the control voltage from being passed through just fine. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
2^n*3^m

gives m:n ratio of fft overlap

multiply to give correlation

as fast mul done by FFT like thing, so i understand?

then not FFT infered, possibility!

whats up doc?

mw wrote:

> You should discuss the question of whether it is possible to remove > unwanted aliased-in noise by clever digital filtering in a downstream > calculation. In my understanding this is not possible. But maybe I > slept through that part of the class.
No, once it's aliased it's indistinguishable.
> > You should discuss what happens to a signal that is filtered and sampled > in one system at rate X, but is transmitted to a receiving system at > update rate Y, then used by that receiving system at rate Z. How should > one select the analog anti-aliasing filter in this situation? > > mw
Do you mean where the signal has been resampled at each step? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Paul Burke wrote:

> Tim Wescott wrote: > >> >> The misconceptions that I noticed pretty much boiled down to the >> following two: >> >> One, "I need to monitor a signal that happens at X Hz, so I'm going to >> sample it at 2X Hz". >> >> Two, "I can sample at X Hz, so I'm going to build an anti-alias filter >> with a cutoff of X/2 Hz". >> >> I estimate that answering these misconceptions will only take 3-4k >> words, but I don't want to miss any other big ones. > > > Just tell them that they've got to make sure that they sample BELOW the > Nyquist frequency of the HIGHEST frequency present in the signal, and > that the cutoff frequency of a filter isn't the frequency at which the > output is effectively disappeared.
Much of the paper is going to be the explanation necessary for me to make just that assertion -- plus explaining what "effectively disappeared" might mean in different systems. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Jerry Avins wrote:

> Stef wrote: > >> In comp.arch.embedded, >> mobi <mobien@gmail.com> wrote: >> >>> Do consider this interesting (atleast for me) example >>> >>> Consider pure Sin wave at X Hz. I start sample it at 2X. Unfortunately >>> i start sampling from time = 0. What would i get? Aint i statisifying >>> Nyquist here? >> >> >> No you are not. You seemed to have missed Rune's post in this thread >> about '=' vs ' >'. > > > Equality is enough to avoid aliasing. The inequality is needed to enable > reconstruction. Don't ignore the needed sampling duration in the "almost > equal" case. > > Jerry
Or to put it another way: for Fs = (2 + epsilon)F your observation interval is something like 1 t = --------- F*epsilon (more or less -- there's probably a factor of 2 in here that I'm missing). The closer epsilon gets to zero the longer you have to wait. How patient are you? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
RRogers wrote:

> Tim Wescott wrote: > >>Kinda off topic -- >> >>A month or two ago there was a spate of postings on these groups >>displaying a profound misunderstanding of how to apply Nyquist's theorem >>to problems of setting sampling or designing anti-alias filters. I >>helped folks out as much as I could, but it really demands an article, >>which I am currently working on. >> >>The misconceptions that I noticed pretty much boiled down to the >>following two: >> >>One, "I need to monitor a signal that happens at X Hz, so I'm going to >>sample it at 2X Hz". >> >>Two, "I can sample at X Hz, so I'm going to build an anti-alias filter >>with a cutoff of X/2 Hz". >> >>I estimate that answering these misconceptions will only take 3-4k >>words, but I don't want to miss any other big ones. >> >>Have you seen any other real howlers that relate to Nyquist, and what >>you should really be thinking about when you're pondering sampling >>rates, anti-aliasing filters and/or reconstruction filters? >> >>Danke. >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com >> >>Posting from Google? See http://cfaj.freeshell.org/google/ >> >>"Applied Control Theory for Embedded Systems" came out in April. >>See details at http://www.wescottdesign.com/actfes/actfes.html > > More quantitatively, the various questions about anti-alias and > sampling can be answered by reconstructing the signal from the proposed > signal system and them computing the error for antcipated input signals > by taking the difference (in simple systems). Put another way, model > the signal processing path and compare it to what you want, to see if > the approximations you make in your implementation matter. This > provides guidance for sampling rates and anti-aliasing; vesus various > input spectra/signals. In signal processing we typically approximate > perfection (which is sometimes impossible) by various means; the > adequacy depends upon the errors that we allow. Given a description of > what we want and a proposed implementation the errors should be > calculable. Nyquist moerely talks about what can be made to wrk given > perfect resources; reconstruction of an incoming signal of a certain > type. If you feed >2X signals or don't reconstruct/use the data > optimally, you have to do the error analysis to see how much you are > paying for not being perfect. > In other words, you allways have to do an error calculation for an > proposed design and enviroment. > > Ray > > Ray >
Bingo. Yes. I'll be making just that point. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
jacko wrote:
> 2^n*3^m > > gives m:n ratio of fft overlap > > multiply to give correlation > > as fast mul done by FFT like thing, so i understand? > > then not FFT infered, possibility! > > whats up doc?
Can english write? maybe (not)
Jonathan Kirwan wrote:

> On Wed, 23 Aug 2006 12:13:33 -0400, Phil Hobbs > <pcdh@SpamMeSenseless.pergamos.net> wrote: > > >>Tim Wescott wrote: >> >> >>>Kinda off topic -- >>> >>>A month or two ago there was a spate of postings on these groups >>>displaying a profound misunderstanding of how to apply Nyquist's theorem >>>to problems of setting sampling or designing anti-alias filters. I >>>helped folks out as much as I could, but it really demands an article, >>>which I am currently working on. >>> >>>The misconceptions that I noticed pretty much boiled down to the >>>following two: >>> >>>One, "I need to monitor a signal that happens at X Hz, so I'm going to >>>sample it at 2X Hz". >>> >>>Two, "I can sample at X Hz, so I'm going to build an anti-alias filter >>>with a cutoff of X/2 Hz". >>> >>>I estimate that answering these misconceptions will only take 3-4k >>>words, but I don't want to miss any other big ones. >>> >>>Have you seen any other real howlers that relate to Nyquist, and what >>>you should really be thinking about when you're pondering sampling >>>rates, anti-aliasing filters and/or reconstruction filters? >>> >>>Danke. >> >>The other one I run into is that N. really applies to the bandwidth, not >>the highest frequency as is commonly thought. Harmonic mixers make use >>of this all the time, using the equivalence of the sampled interval to >>the fundamental interval [-f_s/2, f_s/2), and alias down to some lower >>frequency in the process. If you really reconstruct with impulses, you >>can use a bandpass filter to get back the original signal at the >>original carrier frequency. >> >>People also routinely neglect the to account for the zero-order hold in >>their DAC circuits--if you take a signal, run it through an A/D and a >>D/A, you don't wind up with the original signal, but one with an >>additional sinc function rolloff. > > > This last paragraph seems worth emphasizing, particularly on the > subject of sampling rates, as it points out a reason why rather more > than 2.00...01 X sampling may be important. I'm not sure how a > practical reconstruction filter to compensate for ZOH could be > arranged, causal or acausal, otherwise. You need some margin for the > skirts, don't you? > > Jon
Actually designing for the sin x / x rolloff isn't too bad as long as you keep your eyes open -- in older digital video systems it was just done with a peaky 2nd-order LC circuit (in newer digital video systems the sampling rate is way higher than the effective resolution of the phosphor, which simplifies things). But you can't avoid the issue of providing sufficiently steep skirts on your filters, both in and out. As you get closer and closer to Nyquist in a 'simple' system your filter complexity goes through the roof, as does the difficulty of actually realizing the filters in analog hardware. This is why many systems that must store or transmit data at close to Nyquist (like music on a CD) have A/D and D/A sample rates that are significantly higher than the internal transmission rate, with digital decimation and interpolation coupled with simplified analog anti-alias and reconstruction filters. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Vladimir Vassilevsky wrote:

> Recently I run into a problem with the digital PLL occasionally locking > on the aliased frequencies. The problem happens when the signal > constellation has N phase angles. That multiplies the difference phase > by N. Thus the error frequency may appear to be higher then baudrate/2, > causing all kinds of problems. Special care has to be taken to avoid this.
I'm not an expert in this area, so maybe you can clarify something. Does the system handle multiple carrier frequencies? If the carrier frequency is fixed, I would expect that the bandwidth of the PLL would be narrow enough to exclude the aliased frequencies. -- Thad