0% found this document useful (0 votes)
102 views

ECE 4664 Digital Communications Laboratory Lab Experiment # 3 The Sampling Theorem

The document describes an experiment to verify the sampling theorem by sampling an analog signal and reconstructing it using a lowpass filter. Key steps include: 1. Measuring the transfer function of a 3 kHz lowpass filter by varying the input frequency and measuring voltage levels. 2. Using a pulse generator and analog switch to naturally sample a 2 kHz sine wave at 8.3 kHz, and observing the samples on an oscilloscope. 3. Reconstructing the sampled signal by passing it through the 3 kHz lowpass filter, recovering the original sine wave. 4. Repeating the process using sample-and-hold to take samples, and observing the reconstructed signal.

Uploaded by

Shehreen Afridi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

ECE 4664 Digital Communications Laboratory Lab Experiment # 3 The Sampling Theorem

The document describes an experiment to verify the sampling theorem by sampling an analog signal and reconstructing it using a lowpass filter. Key steps include: 1. Measuring the transfer function of a 3 kHz lowpass filter by varying the input frequency and measuring voltage levels. 2. Using a pulse generator and analog switch to naturally sample a 2 kHz sine wave at 8.3 kHz, and observing the samples on an oscilloscope. 3. Reconstructing the sampled signal by passing it through the 3 kHz lowpass filter, recovering the original sine wave. 4. Repeating the process using sample-and-hold to take samples, and observing the reconstructed signal.

Uploaded by

Shehreen Afridi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Digital Communication Lab Lab 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

The Lowpass Filter


The lowpass filter plays a fundamental role in the derivation of the sampling theorem. In
this experiment, we will use the built-in 3 KHz lowpass filter provided by TIMS 301C.
The filter is located on the front panel, under the module HEADPHONE AMPLIFIER.
The filter takes input A, and outputs the filtered signal LPF. Make sure the LPF select
switch is set to IN. When deriving the sampling theorem, you probably assumed a brick-
wall, ideal lowpass filter. Such a filter would pass any frequency below 3 KHz, and block
any frequency above 3 KHz. However, such a filter does not exist in real systems. Your
first task in this lab will be to determine the transfer function of the LPF.

You will determine the transfer function as follows:


 Plug in the audio oscillator.
 Set the output sine wave frequency from the oscillator to some frequency f 0 (say 1
KHz)
 Connect the sine wave to the input of the LPF.
 Simultaneously observe the input and the output of the LPF on the Picoscope.
 Using the voltmeter functionality of the Picoscope, record the RMS voltage of the
input and output of the LPF. Let’s note them by Vin and Vout, respectively.
 The gain g of the LPF in decibels can be calculated as g = 20 log10(Vout/Vin)
 Calculate g and record it
 Fill the table below using the same approach, varying the frequency of the signal.
Make sure you measure Vin for each frequency, because it might vary with
frequency. You might not be able to get a frequency of 0 Hz with the audio
oscillator. Try to get a 0 Hz signal from some other source on the front panel.
Specify where you have got that signal from.

Frequency (KHz) Vin (V) Vout (V) g (dB)


0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5

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.

T2 View the message to be sampled, and the samples themselves simultaneously on


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 that the output message is equal
to the input message when the switch is closed, and zero otherwise. This is called natural
sampling. Observe the effect of varying the width of the twin pulse generator on the
sampled message. What type of sampling do we approach as we decrease the duty cycle
of the rectangular wave? Paste the plot into your report.

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.

Figure 3: Reconstruction Circuit

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.

Figure 4: Sample-and-hold Diagram.

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.

Dual Tone Signal


Revert to the original natural sampling circuit (2 KHz message from Masters Signals,
8.333kHz sampling frequency from Masters Signals TTL). Instead of a single 2 KHz
message, we will use a dual tone message, formed of two sine waves. We will need to
generate a new sine wave of frequency 4 KHz. You can obtain such a sine wave from the
audio oscillator.

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.

You might also like