Sale!

EE 434 Homework # 2 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category: Tags: ,

Description

5/5 - (5 votes)

Question #1: About sampling rate, signal plotting, FFT, plotting the magnitude and
phase spectrums of a signal, and the noise types.
a) Calculate how many samples are there for 1 second for the ECG data you
downloaded?
b) Calculate the total recording times in seconds for each ECG data you downloaded?
c) For each ECG data you downloaded, plot a total of 3 seconds of ECG data based
on time, starting from the beginning of the 2nd second to the end of the 4th second.
How many samples do we have for these 3-second fractions?
d) Now plot the magnitude and phase spectrums separately by calculating the FFT for
each of these parts you have plotted.
i. Can you tell what kind of noise each data has by looking at the magnitude
spectrums? (Low? High? Band-limited? etc.)
ii. Can you tell what kind of phase each data has by looking at the phase
spectrums? (Zero phase?, Linear phase? Non-linear phase?)
e) Now, repeat parts (c) and (d), but this time starting from the beginning of the 5
th
second to the end of the 7
th second.
f) Compare the magnitude and phase spectrums for these two different cases? Are
they exactly same? If there is any difference what can be the reason?
Question #2: About time-and-frequency analysis, Short-time Fourier Transform
(STFT) and plotting the spectrogram.
Again we will use the same signals we downloaded above to make time and frequency
analysis using STFT.
To calculate STFT and plot the spectrogram, we will use Matlab’s stft.m or
spectrogram.m functions. Some versions have stft.m, some have spectrogram.m. But
they perform almost the same thing. Check which one you have! You may use
whatever you want!
These pages may help you:
https://www.mathworks.com/help/signal/ref/stft.html
https://www.mathworks.com/help/signal/ref/spectrogram.html
a) Using a rectangular window with a length of 256 samples and length of overlap as
128 samples: Plot the STFT (spectrogram).
b) Using a hamming window with a length of 256 samples and length of overlap as
128 samples: Plot the STFT (spectrogram).
c) Compare the spectrograms you obtained in parts (a) and (b).
d) If you make a comparison between the spectrograms you obtained in Question#2
and the spectrums in Question#1, what are advantages of spectrograms and
disadvantages of spectrums?
Note: When you make the plots please label all the axes, write their units, and give an
explanatory title for each plot.
Load your homework as a pdf file using the name template:
HW-02-Your_School_ID.pdf