On Oct 20, 5:53�am, Guy Macon <http://www.GuyMacon.com/> wrote:> robert bristow-johnson wrote: > >okay, well independent of what Jerry said (dunno if i agree), i > >thought the only problem with sampling something at Nyquist was phase > >vs. amplitude is ambiguous. > >that's the only thing i think is wrong with sampling something with a > >component at the Nyquist frequency. > > You don't consider an output taht is a flat line after some > powerups and not after otherpowerups to be a problem? �With > no output at all (which is what you get when you sample a > sine wave at Nyquist and every sample hit a zero crossing) > you lose both phase and amplitude information. >yeah, i guess it's a problem, but it's still this phase related problem. if you hit the Nyquist sine wave at the zero crossings, don't think of the aliasing as a new frequency, it's still a sinusoidal component at Nyquist that is aliased to one have zero- amplitude. so like the problem i outlined, sampling x(t) = (1/cos(theta)) * cos(w0*t + theta) where w0 = 2*pi*(Fs/2) and x[n] = x(n/Fs). what happens, is that amplitude information is lost because of phase. set theta to pi (i guess you have to do something about the 1/ cos(theta) amplitude), but you get the same thing as what you are describing. r b-j
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
low pass digital filter on a fixed point microcontroller
Started by ●August 5, 2008
Reply by ●October 20, 20082008-10-20
Reply by ●October 20, 20082008-10-20
On a related topic, I have to do something I have never done (Nooooo!) I need to collect amplitude and phase and represent it as a complex number. It is a fixed frequency (SONAR app -- would love a chirp but can't do it cheaply). So, I need to produce samples Scos(wt) and Ssin(wt). Do I use an analog multiplier before sampling or sample then digital multiply? Would I use a very high oversampling and multiplying or enough above Nyquist to be safe? I use a very high Q band pass to isolate the signal. -- Charlie Springer
Reply by ●October 20, 20082008-10-20
Charlie Springer wrote:> On a related topic, I have to do something I have never done (Nooooo!) I need > to collect amplitude and phase and represent it as a complex number. It is a > fixed frequency (SONAR app -- would love a chirp but can't do it cheaply). > So, I need to produce samples Scos(wt) and Ssin(wt). Do I use an analog > multiplier before sampling or sample then digital multiply? > > Would I use a very high oversampling and multiplying or enough above Nyquist > to be safe? I use a very high Q band pass to isolate the signal. > > -- Charlie Springer >Please start another thread for this! Depending on how much time you want to spend doing specialized hardware to save pennies on the processor vs. spending pennies on the processor to save engineering time, you can go either way. For moderate volumes you'll save money by using a processor and sampling over Nyquist. One convenient way to get quadrature data is to sample at 4x the carrier; then your inphase data is just [1 0 -1 0 ...] * input, and your quadrature data is just [0 1 0 -1 ...] * input. When everything else is handed to me on a platter I like to sample about as fast as the ADC will go, and average a lot. This allows me to minimize the ADC front end noise by averaging. Sometimes you can even get more useful bits out of the data this way than the ADC claims to have. Oversample enough, and you can relax your bandwidth requirements on your bandpass filter, too. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by ●October 21, 20082008-10-21
>When everything else is handed to me on a platter I like to sample about >as fast as the ADC will go, and average a lot. This allows me to >minimize the ADC front end noise by averaging. Sometimes you can even >get more useful bits out of the data this way than the ADC claims tohave.> >Oversample enough, and you can relax your bandwidth requirements on your>bandpass filter, too.And if you work the hardware enough, it will even keep you warm in winter. :-) I guess you don't build too many battery powered systems. Steve







