ECE 4664 Digital Communications Laboratory Lab Experiment # 3 The Sampling Theorem
ECE 4664 Digital Communications Laboratory Lab Experiment # 3 The Sampling Theorem
ECE 4664
Digital Communications Laboratory
Lab Experiment # 3
The Sampling Theorem
Experiment Objectives
Sampling is the process of converting an analog signal into a sequence of discrete values.
If done correctly, sampling does not introduce distortions into the system. The sampling
theorem defines the conditions for such successful sampling. The minimum rate at which
samples must be taken (the sampling frequency) is of particular interest. The main
objective of this lab is to experimentally verify the sampling theorem. You will first
sample an analog signal, and then reconstruct it using a lowpass filter. You will
investigate two types of sampling.
Prerequisites
Completion of the previous experiment (“Modeling an equation”)
Sampling theorem lecture
Basic mathematical knowledge of the following
o Impulse (instantaneous) sampling
o Natural sampling
o Sample-and-hold (flat-top) sampling
1
Digital Communication Lab Lab 3, The Sampling Theorem
Plot g versus f (use MATLAB). This is the amplitude response of the filter. What is the
-10 dB bandwidth of this filter?
2
Digital Communication Lab Lab 3, The Sampling Theorem
Natural Sampling
Taking Samples
In the second part of the experiment you will set up the arrangement illustrated in Figure
1. Conditions will be such that the requirements of the Sampling Theorem, not yet given,
are met. The message will be a single audio tone (a sine wave).
open
To model the arrangement of Figure 1 with TIMS, the modules required are the TWIN
PULSE GENERATOR (only one pulse is used), to produce s(t) from a clock signal, and
the DUAL ANALOG SWITCH (only one of the switches is used). The TIMS model is
shown in Figure 2 below. You can get familiar with the TWIN PULSE GENERATOR
and the DUAL ANALOG SWITCH by referring to the TIMS user manual, which has
been posted on our course website.
3
Digital Communication Lab Lab 3, The Sampling Theorem
T1 patch up the model shown in Figure 2 above. You can ignore the oscilloscope
connections for now. Notice that the CLK input of the Twin pulse generator is connected
to an 8.3 KHz sample clock. Observe the output Q1 of the twin pulse generator on
Picoscope. Note that the width knob controls the duty cycle of the rectangular waveform.
Set the duty cycle to 10% of the period. Clearly explain how you got and checked the
duty cycle. Also, note that the output of the twin pulse generator is connected to the
CONTROL2 input of the dual analog switch. Input IN2 the switch is connected to a sine
wave of frequency 2 KHz. This sine wave will be sampled. The samples appear at the
output OUT of the analog switch.
4
Digital Communication Lab Lab 3, The Sampling Theorem
Reconstruction / Interpolation
Having generated a train of samples, we will now verify that it is possible to recover, or
reconstruct (or interpolate) the message from these samples, by passing through a
lowpass filter. The reconstruction circuitry is illustrated in Figure 3. Since the sine wave
has a frequency of 2 KHz, the built-in LPF that you studied in the first part of the
experiment should be able to recover the message.
T3 connect the message samples, from the output of the DUAL ANALOG SWITCH, to
the input of the 3 kHz LPF in the HEADPHONE AMPLIFIER module, as shown in the
diagram of Figure 2.
T4 Observe the original message and the output of the LPF simultaneously on the
Picoscope. Do you see a sine wave at the output of the LPF? What is the amplitude of
this sine wave? Does the amplitude make sense? Explain any difference with the
theoretical amplitude that you expect to see. Paste the two waves into your report. Note
that you can amplify the output LPF amplitude by using a buffer amplifier. If you choose
to use a BUFFER AMPLIFIER, do you think it is better to place the amplifier at the
output or the input of the LPF? Why?
T5 Instead of the 2 KHz sine wave input, use the 100 KHz carrier sine wave located on
the MASTER SIGNALS built-in module. Observe both the original signal and the signal
at the output of the LPF. What happened?
T6 We will now study the effect of the sampling frequency at the output of the LPF. You
will use the audio oscillator to control the sampling frequency. You can use the TTL
output of the oscillator as the control input to the dual analog switch. Use the 2kHz
message from Master Signals again as the IN2 input to the Dual Analog Switch. First, set
the frequency of the oscillator to 8.3 KHz. Observe both original input and the LPF
output. Now, set the sampling frequency to 3 KHz. What happens to the output? Why?
Paste your plot in the report. Set your sampling frequency to 10 KHz. Now, while
observing the output of the LPF, keep decreasing the sampling frequency until you see
distortion (in other words, until the output is no longer a sine wave). Slightly increase the
sampling frequency until the distortion disappears. What is this frequency? Does the
answer make sense? Explain.
5
Digital Communication Lab Lab 3, The Sampling Theorem
Flat-Top Sampling
Make sure you keep the previous circuit connections. You will need them later. We will
now sample the same signal using flat-top sampling, or sample-and-hold. The
INTEGRATE-AND-DUMP module has a built-in sample-and-hold mini module. You
can get familiar with this module by reading its data sheet. Before plugging the module
in, set the on-board switch SW1 to the S&H 1 position (‘0’). Analog signals connected to
the input socket labeled I&D1 will now undergo a sample-and-hold (S&H1) operation,
the samples appearing at the I&D1 output socket.
T7 Observe the original signal and the sampled signal on the Picoscope. The sweep speed
should be set to show two or three periods of the input message. Save the plot and paste it
into your report. Note the difference between this sampling method and the previous
method.
T8 Pass the sampled signal through the 3 KHz LPF. Observe both original and filtered
signals. Paste the plot. What is the amplitude of the reconstructed tone? How does it look
compare to the amplitude you got in T4? Explain.
T9 After generating the 4 KHz sine wave, add the 2 KHz and 4 KHz waves using the
2sin 2 f1t 2sin 2 f 2t
adder. Make sure the adder output is equal to , where f1 = 2
KHz and f2 = 4 KHz. Explain your procedure.
6
Digital Communication Lab Lab 3, The Sampling Theorem
T10 Pass the output of the adder directly through the 3 KHz LPF. Observe the output of
the LPF and the output of the adder. Explain the result. Paste the plot into your report.
T11 Now, use the output of the adder as the input IN2 for the dual analog switch (the
sampling frequency should be 8.33 KHz). Pass the sampled output through the LPF.
Observe the original adder output and the LPF output. Explain. Paste the plot into your
report.
T12 We will now change the sampling frequency. Since we are already using the audio
oscillator, we will use the VCO module to generate different sampling frequencies. Read
the VCO data sheet. Set the TTL output frequency of the VCO to 6 KHz. Use this
frequency as your sampling frequency. Observe the output of the LPF now. Explain.
Paste your plot into your report.