Analog signals, in general, are continuous in time. In digital signal processing, we do not use the whole analog signal but replace it by its amplitudes taken at regular intervals. This is
sampling . The problem is we must sample the signal so that the samples represent correctly the signal, i.e. from the samples we can reconstruct the original analog signal perfectly.
Sampling of continuous-time signals
Sampling a continuous-time signal turns it into a correspond discrete-time signal so that it can be processed on digital systems. Actually, the sampling is followed by two other operations,
quantization and
binary encoding . In reality, the
analog-to-digital converters (abbreviated ADC or A/D) do all the three steps.
[link] depicts the sampling of a signal at regular interval
where n is an integer, positive and negative. This is
uniform sampling that we use routinely. Rarely, nonuniform sampling is mentioned. We denote the samples of the signal x(t) as
or
.
[link] shows the sampling process. It turns out that
sampling is just a multiplication of the analog signal x(t) with a sampling signal (or function) s(t):
The sampling signal s(t) is a regular sequence of narrow pulses
of amplitude 1 (
[link] ) when multiplying s(t) with the signal x(t) we obtain the instantaneous values of x(t) which are the samples. An electric switch (
[link] b) is a way to implement the sampling: When the contact closes in a short time, the signal passes; and when the contact opens, no output signal appears.
The time distance
is called
sampling interval or
sampling period ,
is
sampling frequency (Hz or samples/sec), also called sampling rate. The samples were written as
but
is usually taken as 1, hence the samples will be denoted universally, unless otherwise specified, as x(n). The integer n can represent sample, time, space, but we will often call it
time index , or just index, or sample.
When looking at
[link] and
[link] we may ask if the sampling is appropriate, that is the samples are too close or too far away or just right. This is really a big question and will be answered soon. For the time being, let’s examine the sampling of a sinewave (
[link] ) x(t) having period
and frequency
at the sampling rate
. Different authors use different symbols, this cause certain difficulty for readers. The figure shows the same sinewave but with 3 different sampling frequency
. In the first case
, the samples are quite close and represent very well the signal (from the samples we can reconstruct the signal). In the second case
, still the samples can represent the signal (imagine that we connect the successive sample values to get a triangular wave
which is then passed through an analog lowpass filter to smooth out the wave form). In the last case
, the sampling rate is equal twice the signal frequency. This is the critical case: The samples may or may not represent the signal depending on positions of sampling points.