Line 8: Line 8:
  
 
<insert nyquist sampling rate conditions here>
 
<insert nyquist sampling rate conditions here>
 +
 +
There are several ways to think about this idea, if it is not already intuitive. First, consider a sinusoid of arbitrary frequency. The Nyquist Sampling theorem says we must sample at least two points within one period of this sinusoid in order to determine the frequency its frequency, given that we won't be doing any guess work. Now consider what the Fourier Transform is. The Fourier Transform is a weighted sum of complex exponentials. For a real signal, the Fourier Transform allows us to break this signal up into a sum of sines and cosines of varying magnitude and phase. All this information is conveniently packaged within the complex coefficients of the Fourier Transform. So if it is understood that a sinsuoid must be sampled twice within a single period to determine its frequency, then one can also understand that once we break up the signal into a sum of sinusoids, the sampling frequency must be fast enough to properly sample the fastest sinusoid in the signal.
  
 
== The Sampling Process ==
 
== The Sampling Process ==

Revision as of 19:00, 12 September 2009

SAMPLING PART 1

Basic Definition of Sampling

Sampling is the extraction of values of a continuous signal at fixed intervals. We learn more about the frequency spectrum of a signal the faster we sample it. Naturally, if the signal changes much faster than the sampling rate, these changes will not be captured accurately and aliasing occurs.

Nyquist Sampling Theorem

The Nyquist Sampling theorem says that in order to capture all the frequency information of a bandlimited signal, the sampling frequency must be twice the maximum frequency of the signal. In other words, each frequency component must be sampled at least twice per period.

<insert nyquist sampling rate conditions here>

There are several ways to think about this idea, if it is not already intuitive. First, consider a sinusoid of arbitrary frequency. The Nyquist Sampling theorem says we must sample at least two points within one period of this sinusoid in order to determine the frequency its frequency, given that we won't be doing any guess work. Now consider what the Fourier Transform is. The Fourier Transform is a weighted sum of complex exponentials. For a real signal, the Fourier Transform allows us to break this signal up into a sum of sines and cosines of varying magnitude and phase. All this information is conveniently packaged within the complex coefficients of the Fourier Transform. So if it is understood that a sinsuoid must be sampled twice within a single period to determine its frequency, then one can also understand that once we break up the signal into a sum of sinusoids, the sampling frequency must be fast enough to properly sample the fastest sinusoid in the signal.

The Sampling Process

In theory, here is how we would like to sample our signals.

Step 1: Begin with a continuous function x(t).

Step 2: Sample x(t) using an impulse generator or comb function.

Step 3: Discretize the signal.

After Step 3, the signal is ready to be put through a discrete filter.

It is important to note that this is an idealization of the sampling process. To adhere to the Nyquist sampling theorem, the sampling frequency must be at least twice the maximum frequency. Often, we do not know what the maximum frequency of the signal is. To minimize the effects of aliasing, the signal is first put through a lowpass filter. This allows us to base the sampling frequency off of the cutoff frequency of the filter. This will reduce the effects of aliasing, but may also distort the signal, since higher frequencies are inevitably lost. We also cannot generate an impulse in real life. The actual methods used to sample a continuous time signal will be introduced in sampling part 2. Finally, a sampled signal must be quanitized before discretization. This is because digital filters are limited in what numbers they can represent. This depends on the number of bits your computer is based off of.

To get a better understanding of what is actually happening between Steps 1-3, it is good to observe the frequency domain representation of the signal as it passes through each stage of the sampling process. The following explanation adheres to the idealization of the sampling process.

From a Frequency Standpoint

Step 1: The signal x(t) may be periodic or aperiodic. If the signal is periodic, the frequency domain representation is discrete. If the signal is aperiodic, the frequency domain representation is continuous. A good way to remember this is to remember that sampling in time is convolving the frequency domain representation of your signal with an impulse train in the frequency domain. Conversely, sampling in the frequency domain is equivalent to convolving the time domain representation of your signal with an impulse train.

Step 2: When the signal x(t) is multiplied by the dirac comb p(t), this is equivalent to convolving the frequency domain representation of x(t) with the frequency domain representation of p(t). Since the Fourier Transform of the comb is also an impulse train in the frequency domain, the convolution of X(f) with P(f) simply makes copies of X(f) at each impulse with the magnitude of X(f) scaled by the sampling frequency. The sampled signal now has a frequency domain representation which is periodic with respect to the sampling frequency.

<insert math stuff to show this>

Step 3: To discretize the sampled signal, the frequency must be scaled such that the frequency is periodic with respect to 2*pi. This is because discrete time filters are periodic with respect to 2*pi.

<insert proof for discrete signals being periodic wrt 2*pi>

To transform the continuous time sampled signal the its discrete time representation, let f_d = [2*pi*f_c - 2*pi*k]/f_s (for all k = integer), where f_s is the sampling frequency and f_c is a frequency corresponding to the continuous time frequency domain representation. f_d is the corresponding frequency for the discrete time representation of the sampled signal. Since the sampled signal is periodic in the frequency domain, the 2*pi*k term is there to account for this. How this is actually done will be discussed on sampling part 2.

Now that the signal has been discretized, a discrete time filter may be applied to it.

Reconstructing the Signal

After the signal has been sampled, discretized, and processed in discrete time, the signal must be reconstructed. The discrete time signal is periodic with respect to 2*pi. To place it back into context with the continuous time domain, the frequency must be scaled again such that the frequency domain is periodic with respect to the sampling frequency. To do this, let f_c = [f_d*f_s - f_s*k]/2*pi.

An impulse generator is used to create impulses separated by a time interval equal to the sampling rate with the weight of each impulse equal to the values of the discrete time signal. In the frequency domain, we now have the frequency domain representation of the filtered signal periodic with respect to the sampling frequency. To extract just 1 period of the frequency domain representation of the signal, the signal is convolved with sinc(t/T_s). This is equivalent to an ideal lowpass filter with a cutoff frequency of fs/2 and magnitude of T_s. Remember that the when the original signal was sampled, the frequency domain was scaled by f_s. Multiplying by T_s will undo this scaling. The end result is a perfect reconstruction of the processed signal.

Alumni Liaison

Followed her dream after having raised her family.

Ruth Enoch, PhD Mathematics