What is Sampling?

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave (a continuous-time signal) to a sequence of samples (a discrete-time signal).
A sample refers to a value or set of values at a point in time and/or space.
A sampler is a subsystem or operator that extracts samples from continuous signal. A theoretical ideal sampler multiplies a continuous signal with a Dirac comb. This multiplication “picks out” values but the result is still continuous-valued. If this signal is then discredited (i.e., converted into a sequence) and quantized along all dimensions it becomes a discrete signal.
In general, an n-bit analog-to-digital converter divides the analog range into 2n – 1 increment. Image below presents four graphs, each with a different number of bits providing different levels of resolution. The figure shows how the addition of a bit can improve the resolution of the values represented by the binary integers.
Earlier, it was mentioned how a computer can only capture a “snapshot” or sample of an analog voltage. This is sufficient for slowly varying analog values, but if a signal is varying quickly, details might be missed.
To improve the signal’s digital representation, the rate at which the samples are taken, the sampling rate, needs to be increased. There is also a chance of missing a higher frequency because the sampling rate is too slow. This is called aliasing, and there are examples of it in everyday life.
1. When riding in a car at night, you may have noticed that at times the wheels of an adjacent car appear to be spinning at a different rate than they really are or even appear to spin backwards. (If you have no idea what I’m talking about, watch the wheels of the car next to you the next time you are a passenger riding at night under street lights.)
2. The effect is caused by the fact that the light from street lamps actually pulses, a fact that is usually not detectable with the human eye. This pulsing provides a sampling rate, and if the sampling rate is not fast enough for the spinning wheel, the wheel appears to be spinning at a different rate than it really is. Street lights are not necessary to see this effect. Your eye has a sampling rate of its own which means that you may experience this phenomenon in the day time.
img
Aliasing is also the reason fluorescent lights are never used in sawmills. Fluorescent lights blink much like a very fast strobe light and can make objects appear as if they are not moving. If the frequency of the fluorescent lights and the speed of a moving saw blade are multiples of each other, it can appear as if the spinning blade is not moving at all.
Both of these examples are situations where aliasing has occurred. If a signal’s frequency is faster than the sampling rate, then information will be lost, and the collected data will never be able to duplicate the original.
To avoid aliasing, the rate at which samples are taken must be more than twice as fast as the highest frequency you wish to capture. This is called the Nyquist Theorem. For example, the sampling rate for audio CDs is 44,100 samples/second. Dividing this number in half gives us the highest frequency that an audio CD can play back, i.e., 22,050 Hz.
For an analog telephone signal, a single sample is converted to an 8-bit integer. If these samples are transmitted across a single channel of a T1 line which has a data rate of 56 Kbps (kilobits per second), then we can determine the sampling rate.
img
This means that the highest analog frequency that can be transmitted across a telephone line using a single channel of a T1 link is 7,000÷2 = 3,500 Hz. That’s why the quality of voices sent over the telephone is poor when compared to CD quality. Although telephone users can still recognize the voice of the caller on the opposite end of the line when the higher frequencies are eliminated, their speech often sounds muted.