[comp.dsp] Discreet Sampling

rob@alzabo.ocunix.on.ca (Robert Hilchie) (03/01/91)

I hope this question isn't too elementary for this newsgroup.

It is claimed that any signal sampled at a rate of 2s can be reproduced exactly,
provided that the original signal did not contain frequencies above s.

Now suppose the sampling rate is 40 kHz and the signal being sampled is a
sine wave of constant amplitude at 19 999 Hz. At some point the samples will
occur near the peaks and troughs of the sine wave, while, half a second later,
the samples will occur at the midpoints between the peaks and troughs. Thus,
the reproduced signal will fluctuate in amplitude every second.

How can this "beating" be avoided? Thanks in advance,

Rob Hilchie
rob@alzabo.ocunix.on.ca

jbuck@galileo.berkeley.edu (Joe Buck) (03/02/91)

In article <1991Feb28.194203.27097@alzabo.ocunix.on.ca>, rob@alzabo.ocunix.on.ca (Robert Hilchie) writes:
|> I hope this question isn't too elementary for this newsgroup.
|> 
|> It is claimed that any signal sampled at a rate of 2s can be reproduced exactly,
|> provided that the original signal did not contain frequencies above s.
|> 
|> Now suppose the sampling rate is 40 kHz and the signal being sampled is a
|> sine wave of constant amplitude at 19 999 Hz. At some point the samples will
|> occur near the peaks and troughs of the sine wave, while, half a second later,
|> the samples will occur at the midpoints between the peaks and troughs. Thus,
|> the reproduced signal will fluctuate in amplitude every second.
|> 
|> How can this "beating" be avoided? Thanks in advance,

You will get no "beating" at all if you reconstruct the signal by filtering
impulses with heights equal to the samples through an ideal lowpass filter
with cutoff at 20 kHz.  You're imagining a "connect the dots and smooth"
type of reconstruction, and that's not what the sampling theorem calls for.

Of course, in the real world there's no such thing as an ideal
lowpass filter, so you're simply not going to be able to reproduce accurately
a signal that close to the Nyquist frequency.  That's why CDs run at 44.1 KHz
and only attempt to reproduce signals up to 20 KHz.  The extra 2.1 KHz
bandwidth is to allow for filter rolloff (and even then you need to get
fancy to get that steep a rolloff).

--
Joe Buck
jbuck@galileo.berkeley.edu	 {uunet,ucbvax}!galileo.berkeley.edu!jbuck	

mcmahan@netcom.COM (Dave Mc Mahan) (03/03/91)

 In a previous article, rob@alzabo.ocunix.on.ca (Robert Hilchie) writes:
>It is claimed that any signal sampled at a rate of 2s can be reproduced exactly
>(provided that the original signal did not contain frequencies above s).
>
>Now suppose the sampling rate is 40 kHz and the signal being sampled is a
>sine wave of constant amplitude at 19 999 KHz. At some point the samples will
>occur near the peaks and troughs of the sine wave, while, half a second later,
>the samples will occur at the midpoints between the peaks and troughs. Thus,
>the reproduced signal will fluctuate in amplitude every second.
>
>How can this "beating" be avoided?

It can't be avoided.  What you need after you do your reconstruction is a low
pass filter that can handle your reconstructed waveform.  In the case listed
above, you would need a filter that can pass 19.999 KHz with no attenuation
and would provide 100% attenuation at 20.000 KHz (minus a little bit).  This
kind of filter is sometimes known as a 'brick-wall filter' and usually only
exists on the blackboards of professors who teach about Nyquist and sampling.
In the real world, you have to take your output filter into account when you
develop your sampling system.  Your example above is theoretically quite
correct assuming you use the brickwall filter, in the real world it will be
quite difficult to implement.

>Rob Hilchie
>rob@alzabo.ocunix.on.ca

   -dave

-- 
Dave McMahan                            mcmahan@netcom.com
					{apple,amdahl,claris}!netcom!mcmahan

mberg@dk.oracle.com (Martin Berg) (03/08/91)

In article <11588@pasteur.Berkeley.EDU> jbuck@galileo.berkeley.edu (Joe Buck) writes:
>Of course, in the real world there's no such thing as an ideal
>lowpass filter, so you're simply not going to be able to reproduce accurately
>a signal that close to the Nyquist frequency.  That's why CDs run at 44.1 KHz
>and only attempt to reproduce signals up to 20 KHz.  The extra 2.1 KHz
>bandwidth is to allow for filter rolloff (and even then you need to get
>fancy to get that steep a rolloff).

One of the consequenses of an ideal lowpass filter is that it would have an 
infinite time-responce - thus never give an answer.

A real-world lowpass filter also gives an delayed answer - the steeper the 
longer. This means that the extremely steep filter required for the 
original question in other words would be able to 'store' (computer
language ! ) all the information about the signal to eliminate the 'beating'.

A FIR-filter with 20000 (40000 ?) taps may be able to implement the required
filter - but talk about hardware requirements !


My usage of terms may be somewhat primitive, but it's been a long time
since I attented classes i DSP.

Martin Berg

Oracle Denmark