Klarinet Archive - Posting 000736.txt from 1997/11

From: "Jon Delorey" <jondelorey@-----.com>
Subj: RE: Nuyquist
Date: Thu, 20 Nov 1997 11:42:27 -0500

Sorry to get into this so late, but I don't always get to read these
postings in real time.

>Well, I understand now why I am in disagreement with the web page. In
>the case of a sampled waveform, in a non A/D world, you can in fact
>represent the waveform provided you use an interpolating function
>sin(2*pi*t/T/(pi*t/T)) to filter (interpolate) the sampled signal in
>order to reconstruct the sampled signal. I guess the standards page >is
correct ;^)

The interpolation function is not a filter. As a matter of fact you
will get a huge unfiltered spectrum out that contains aliased replicas
of the signal that you are quantizing. If you would like to do
something useful with the spectrum you need to filter out the
componenets that you need. Any aliased copy will do, including the
baseband copy. Every other copy has an inverted spectrum (which still
may be useful) You will find exactly what you are looking for.

>This issue remains however, that a signal sampled by an A/D cannot be
>"exactly" reconstructed from its samples. I thought this over last
>night and have decided that an example is the best way to describe
>this:

You will get exactly (and more).

>An A/D is a discrete quantizing device. It takes a varying analog
>signal (voltage) and converts it into one of several levels. For a 16
>bit A/D it is 32767 levels. But for the sake of example I would like
>to refer to an imaginary A/D converter that converts our music signal
>into 10 levels. Say we have things set up so that a voltage varying
>from 0 to 10 volts are digitized such that anything between 0 and .99
>volts gets a value of 0, anything from 1 to 1.99 gets a value of 1, a
>voltage from 2 to 2.99 a value of 2 and so on up until 9 A/D units (0
>- 9 or 10 different possibilities). The A/D converter will "look" at
>this voltage once every hundredth of a second. This is called the
>sample period.

This is a system with a sample rate of 1 kHz, so is will reproduce
everything up to 500 Hz. Given a very good quality A/D you will get
approx. 96 dB signal to noise ratio and the quantization noise (one of
the real errors in the system) should be down around 96 dB also, though
this varies considerably with the quality of the quantizers. this is
also close t o the dynamic range of the human ear.

>Now we can visualize the problem with the sampling theorem when
>applied to A/D signals for the following reason:

>Suppose the signal was ramping up so that when we first sample it the
>level was 1 volt, this would correspond to a 1. The next period the
>waveform is at 2.9 volts corresponding to a reading of 2. The next
>reading is 3 corresponding to an A/D reading of 3 and so on. Our
>sampled sequence is 1, 2, 3

Back to Oppenheim and Schafer that was quoted in a previous posting:
They caution using intuition based on knowledge of analog processing to
understand digital processing. Try this excersize with a 1 bit A/D.
This can also be made to produce very accurate results.

<snip>

As for the previous posting about the +n, -n, etc. sequence. This will
indeed produce a (sample frequency)/2 signal. When sampling coherently
at the zero crossings you get zero amplitude samples which do not convey
much info, so I guess they are not much use.
Remember, the definition of the samples that are being discussed are
impulses (infinitely narrow) with an amplitude equal to the signal
sample. These impulses when put into a real system (no need for a
mathematical construct which is just used to analyse the system) you
will get a spectrum with the fundamental and all it's harmonics.
Filtering (this is different then the interpolation functions quoted
previously quoted in Oppenheim and Schafer) this will give you the
desired waveform accurately constructed. In many implementations the
sample width is the clock width, but this is not necessary. There are
many cases wher it is useful to allow the voltage of the pulse train to
return to zero between samples, making them more like the ideal samples
called for in the sampling theorem.

As for errors in reproducing music, I have noticed that the total
harmonic distortion numbers of CD players appears very poor relative to
what should be possible with current A/D technology. My only guess is
that the quantizers (A/D's) are not as good quality as they could be (If
you look at the voltage vs sample you will see that the smallest bits
are really below the noise level of most systems and very difficult to
characterize) or recordings are made without filtering components above
the Nyquist frequency causing the previous inaudible components to alias
in band and become audible components. BTW I don't have any idea how
much THD the ear can tolerate without any affect on the music, so that
does not mean that this is a problem.

I don't know if this clears up any of the discussion? A relatively
simple simulation of what happens can be done in Matlab or Mathcad for
the mathematically inclined. I have several Matlab files that can
probably be modified to illustrate some of these points, but I don't
know how to make them really instructive to someone without some
background in math. If anyone is really interested I can probably put
something together.

Well, enough DSP List discussion (oops Klarinet list), back to
lurking...

======================
Jon Delorey
Thousand Oaks, CA
jondelorey@-----.com
delorey@-----.net
======================

Get Your Private, Free Email at http://www.hotmail.com

   
     Copyright © Woodwind.Org, Inc. All Rights Reserved    Privacy Policy    Contact charette@woodwind.org