Electrical
Communications Systems
Course No. ECE.09.433
Laboratory
Project 1
Waveform Synthesis and Spectral Analysis
Objectives
This project has 4 parts. In Part 1, you will:
- Generate arbitrary waveforms with specified SNR's using
software;
- Synthesize this waveform using an arbitrary waveform
generator.
In Part 2, you will study the differences between the Continuous Fourier
Transform (CFT) and the Discrete Fourier Transform (DFT) (this is homework!).
In Part 3, you will synthesize AM and FM bandpass
signals and analyze their spectra. In Part 4, you will capture and analyze the
spectra of a segment of any piece of music that you like.
Equipment
and Software
- You will be synthesizing waveforms in Matlab and creating their corresponding electrical
signals using the Arbitrary Waveform Generator. In order to do this, you
will need the Keysight IO Libraries Suite. Instructions
have been created by Yang Qi with sample Matlab code.
- You will be capturing signals from the
Oscilloscope/Spectrum Analyzer and will be analyzing them in Matlab.
Part
1: Digital synthesis of arbitrary waveforms with specified SNR
Background
Pre-Lab Lecture
- SNR in dB = 10 log10
(ss2/sn2); where ss2:signal variance, sn2: noise variance
- Given signal, s(t),
find ss2
- Compute required sn2
- Generate noise signal,
n(t) = snN(0,1), where N(0,1) is
a Normally (Gaussian) distributed random variable with Zero mean and
Unit variance
- Message signal with
desired SNR, m(t) = s(t) + n(t)
|
Procedure Overview
- Synthesize a 1 second A-Sharp sinusoidal tone (466.16
Hz) sampled at 8 kHz.
- Plot this waveform; observe and listen using the sound
command in Matlab.
- Corrupt this signal with a Gaussian noise source to get
an SNR of 10 dB. Observe, listen and save
waveform as before.
- Synthesize 1 cycle of the noisy waveform.
- Download the original and noisy signals to the HP33120A
Arbitrary Function Generator.
- Vary the frequency and amplitude.
- Observe waveform using the Oscilloscope.
- Repeat experiment with various SNRs.
- Experiment with other waveforms:
- s(t) = Ac[1 +
cos(2pfmt)]cos(2pfct) with
varying Ac, fm and
fc.
- s(t) = Accos[2pfct + bsin(2pfmt)] with
varying Ac, b,
fm and fc.
Example Matlab Code
%ECOMMS
Lab Project 1 Example
%S. Mandayam, Rowan University
%This program generates a 1-second duration
%Asharp signal (466.16 Hz) with a specified SNR
%Specify SNR
snr=10;
%Generate Asharp signal
t=[0:1/8e3:1.0]';
s = 0.5*sin(2*pi*466.16*t);
sound(s);
%Compute signal variance
var_s = cov(s);
%Calculate required noise variance
var_noise=var_s/(10^(snr/10));
%Generate noise
n=sqrt(var_noise)*randn(length(s),1);
sound(n);
%Add signal to noise and generate message
m=s+n;
sound(m);
|
Part 2: Comparison between CFT and DFT (FFT)
(Uses Matlab only) (This is Homework!)
Consider the signal shown in Figure 1:
Figure 1: Time-domain signal
- Model the signal as a continuous-time function and
plot.
- Obtain, analytically, the CFT of the signal, and
plot.
- Based on your observations of the frequency components
of the signal, determine the maximum sampling period/minimum sampling
frequency that will allow reconstruction of the continuous-time signal.
- Plot the DFT magnitude spectrum using Matlab's fft
function.
- Attempt to reconstruct the original continuous-time
function from its samples, either by:
- Convolving the time
domain samples with appropriate Sinc function
(difficult), or
- Windowing the Fourier
transform and taking the inverse Fourier transform (easier).
Comment on your results.
- What is the maximum sampling period/minimum sampling
frequency that will allow reconstruction of the discrete-time signal from
its DFT, which adequately represents the original continuous-time signal?
Show plots of the discrete-time signals, the corresponding DFTs and
reconstructions, for sampling intervals at, above and below this maximum
allowed sampling period.
Part 3: Spectral Analysis of AM and FM Signals
(Uses Matlab, Oscilloscope, Function
Generator and Spectrum Analyzer)
- Synthesize a bandpass AM
signal, s(t) = Ac[1 + Amcos(2pfmt)]cos(2pfct) where fm = 5 kHz and fc = 25 kHz.
- Obtain and plot the spectral components of this signal
using:
- Matlab's fft
function.
- The spectrum analyzer/
FFT module.
- Add noise to the RF signal, observe the signal in the
time and spectral domains.
- Experiment with various fms,
fcs and SNRs.
- Synthesize a bandpass FM
signal, s(t) = Accos[2pfct + bf Amsin(2pfmt)] wherebf
= Frequency Modulation Index (choose initially = 10).
- Repeat earlier experiments.
Part
4: Spectral Analysis of Music Signal
(Uses Matlab, Oscilloscope, VCR, and
Spectrum Analyzer/FFT Module)
Legally, download a
segment of your favorite piece of music, import into Matlab
and listen. Compute its spectrum in Matlab, observe.
Compare with the spectrum displayed in the Spectrum Analyzer.
Click here for required lab project
report format.
Click here for suggestions for a good lab
report.