Sale!

ECED 4502 Lab 2–Sampling using GNU Radio solved

Original price was: $35.00.Current price is: $28.00. $23.80

Category:

Description

5/5 - (8 votes)

Objectives
The objective of this lab is to become familiar with the use of GNURadio and to observe
the effects of sampling the signal below the Nyquist sampling rate, which is twice the
maximum frequency in the spectrum of the original analog signal. In this lab we
demonstrate this effect for sinusoidal, square & triangular waveforms. The background
material for this lab is provided at the end of this lab write-up.
Procedure
I. Use the previously posted instruction on Brightspace to install GNURadio. Once
Installation is finished. Open “GNURadio Companion”. It will open an initial
screen of GNURadio as illustrated in Fig. 1.
II. When the initial splash screen appears, choose “File→Open”. Navigate to the
downloaded file directory and choose “Exercise_Sampling_and_Aliasing.grc”,
it should bring the screen shown in the Fig. 2. Then run the program by going into
“Run→Execute” or pressing F6. The window shown in Fig.5 should appear with
the default configuration.
III. Figure 3 illustrates the different blocks of the Flow Chart. Before starting part 1 of
the lab that uses the Cosine signal, double click on the signal source block and
make sure your amplitude is 1 and offset value is 0 (see Fig.4a) such that the DC
offset is eliminated. Make sure Cosine is selected on the Output GUI (Fig 5).
Then perform parts 1 through 5.
IV. For parts 6 through 9, double click on the signal source block and make sure your
amplitude is 1 and offset value is -0.5 (see Fig.4b). Then, select the Square wave
when the Output GUI (Fig. 5) pops up on the screen. For the triangular wave (part
10), keep amplitude and offset values as they are (see Fig.4b) and when the
Output GUI (Fig. 5) pops up on the screen select Triangle.
ECED 4502 2 Lab 2
Fig.1. Initial GNURadio welcome screen
Fig. 2 Sampling and Aliasing GNURadio Experiment Setup
ECED 4502 3 Lab 2
Fig. 3 Introduction to Flow Graph
(a) For cosine wave, Signal Source
Block configuration
(b) For Square & Triangle wave, Signal
Source Block configuration
Fig. 4 Signal Source Block configuration
ECED 4502 4 Lab 2
Fig. 5 Output GUI
There are two graphs located on the screen. The top graph is the sampled signal in time
domain as seen by the computer. The bottom graph is the same signal in the frequency
domain, its Fourier transform.
Questions
1. The initial set-up for the sampling frequency Fs is 10 kHz. The input signal to be
sampled is a sinusoidal waveform. Please observe the sampled signal at the
output of the GUI, its waveform in the time domain and its frequency spectrum
with log-scale (dB). Is this signal the same as the original input signal? Explain.
2. Keep the sampling frequency on 10 kHz. Increase the input frequency from
1 to 20 kHz and describe changes you see in the time domain sampled signal.
3. Varying the frequency of the sinusoidal signal from 1 to 20 kHz, please observe
the spectrum of the sampled signal on screen, record the signal frequencies
observed and enter them in the table as follows:
fin (kHz) 1 3 5 7 9 11 13 15 17 19
fout (kHz)
ECED 4502 5 Lab 2
From the observations above, you will observe the foldback effect of the sampled
signal. Can you find the frequency of input signal when the foldback effect
occurred? How does the foldback effect happen?
4. Change the sampling frequency to 40 kHz, repeat the procedure in step 3 above
and enter your results in the table below:
fin (kHz) 1 3 5 7 9 11 13 15 17 19
fout (kHz)
Similarly, from the table above, can you find the foldback effect? Explain.
5. Comparing step 3 with step 4, what can you conclude? When and why does the
foldback effect happen?
6. In this part you will observe the aliasing effect introduced in the sampling of
another periodic signal. Change the input signal from the sine wave to a
50% square wave with 1 Vp-p, 1 kHz, and set the sampling frequency to 20 kHz.
Observe the harmonics characteristics of the output signal on your screen and
sketch your results. Explain each frequency of the spikes your observed.
7. Keeping the sampling frequency at 20 kHz, use 2 kHz first & 3 kHz next as the
frequency of the input signal. Can you find any aliasing effect on the spectrum of
the output signal? If your answer is “Yes”, please explain how the spectrum
aliasing happen for each input signal, 2 kHz and 3 kHz. If your answer is “No”,
please give a reason and comment on your observations.
8. Change the sampling frequency to 10 kHz, repeat step6 with the same 1 kHz,
50% square wave, pay attention to the behavior of the spikes and their frequencies
in the spectrum of the sampled signal.
9. Keeping the sampling frequency at 10 kHz, use 2 kHz first & 3 kHz next as the
frequency of the signal. Can you find any aliasing effect on the spectrum of the
sampled signal? If your answer is “Yes”, please explain how the spectrum
ECED 4502 6 Lab 2
aliasing happens for each input signal, 2 kHz and 3 kHz. If your answer is “No”,
please give a reason and comment on your observations.
10. Keeping the sampling frequency at 10 kHz, use now a triangular waveform with
2 kHz first & 3 kHz next as its frequency. Can you find any aliasing effect on the
spectrum of the sampled signal? If your answer is “Yes”, please explain how the
spectrum aliasing happens for each input signal, 2 kHz and 3 kHz. If your answer
is “No”, please give a reason and comment on your observations.
Also, acknowledge any difference in the amplitude spectrum of these triangular
sampled signals with respect to the amplitude of the spectral components
observed for the corresponding 2 & 3kHz square waves in step 9.
ECED 4502 7 Lab 2
Theoretical Background
When a signal is sampled, it is multiplied in the time domain by another signal called a
pulse train. A pulse train is just a repeating pulse at constant time intervals the sampling
period. The Fourier transform of the pulse train is again a pulse train with deltas
separated in the frequency domain by the sampling frequencies fs. In the frequency
domain, the sampling procedure produces the same result as convolving the spectrum of
the original signal with the pulse train. This procedure creates an exact duplicate of the
Fourier transform of the input signal (analog prototype) centered at different multiples of
the sampling frequency (the frequency of the pulses in the pulse train), as shown in figure
below.
Ideally, the original signal can be filtered out from the sampled signal with the aid of
low-pass reconstruction filters. These filters will attenuate or “cut-off” any duplication of
the spectrum of the analog prototype signals occurring at higher frequencies. However,
this can only happen if the sampling rate is large enough to prevent the replicated signals
from interfering with one another. For example, if the signal is sampled at too low of a
rate, then the neighboring duplicate signals will start to overlap. This overlapping of
signals prevents us from filtering out the original. This distortion is referred to as aliasing.
To avoid aliasing, the sampling frequency must be higher than two times the maximum
frequency of the original signal. At exactly two times the original signals frequency, the
spectrum of the sampled signal is composed of segments of the original that just barely
touches one another. This frequency is known as the Nyquist rate.
ECED 4502 8 Lab 2
Assume we are sampling a sine wave of frequency f0 at the rate fs higher than the Nyquist
rate (fs/2). After filtering out the duplicate images of spectrum, we get the following
signal at the output in the frequency domain, which is the same as the spectrum of the
original sinusoidal waveform.
However, if we increase the frequency of the original signal, the sidebands move further
apart, until they surpass the limits of the filter. However, the sidebands of the adjacent
duplicates also spread apart, causing them to enter the range of the low-pass
reconstruction filter as shown below:
So rather than observing at the output of the reconstruction filter the sinusoidal signal
with frequency f0, we observe the sinusoid with frequency fs – f0. This effect is known as
foldback. Foldback is an effect of filtering out the higher frequencies. In general case, we
can have a foldback from higher segment so the relation for the output signal frequency is
kfs – f0 (where k is the integer –the segment number from which we are getting the
foldback).