PART 1. CLEANING A SIGNAL (80 PTS)
As an engineer, you’ll sometimes have to analyze data that you know contains a signal, but it isn’t immediately
clear from the dataset you’re given. In this case, your boss has handed you Q1.mat to analyze.
1. Load the data into your command space. You’ll need to determine a few basic pieces of information about
this dataset before you can move forward:
a) What was the time step, dt?
b) What, then, must be the sampling frequency, Fs?
c) What is the sampling period, T0?
d) What, then, must be the sampling resolution, dF, in the Fourier domain?
Note, you don’t have to answer these in your lab report, but you’ll need these values to move on with the
2. Create a spectrogram plot of the signal to get a sense of how the frequency content is changing with time.
Make your window size 1000 samples and the overlap size 500 samples. Plot frequencies between 0 Hz and
the Nyquist frequency. Make sure time is on the xaxis. Based on your plot, at what time(s) are you
anticipating changes in the frequency content of the signal? (10 pts)
3. Create a 2×1 plot. In the top plot, plot the signal versus time. In the bottom plot, plot the amplitude of the
FFT of the signal versus frequency using the same range as you used in your spectrogram. Based on this plot,
can you clearly see the time(s) that you identified in the spectrogram()? What are the dominating frequencies
in this signal? (10 pts)
4. Being the astute engineer that you are, you notice that you’ll need to perform some filtering. There are some
obvious frequencies visible both in your spectrogram and the FFT that are not changing in time. An
unchanging signal does not contain much or any information. You’ll need to filter these frequencies out.
Your spectrogram also reveals frequencies that that probably do contain information, although you may not
be able to see these frequencies in the FFT. Now you must decide what type of filter you want to use to
remove this noise. You can choose any filter you might like. You may also filter however you want. After
each filter you apply, re-plot the figure you created in 3) and determine the effect the filter had on your signal
and on your FFT. Be sure to include your figures in your lab report and discuss why you chose the filter(s)
and the passband and stopband frequencies you chose. (40 pts)
5. A physician happens to be looking over your shoulder when you plot your filtered signal and immediately
recognizes the signal. What did the physician recognize the signal as? There is one value that the physician
would use to characterize this signal. What is that value? Report in terms the physician would want (events
per unit of time). Discuss any transition times/values. (10 pts)
6. They physician then asks what the patient was doing when this signal was collected. You reply that the patient
was sedentary and relaxed. Should the physician be concerned? Why or why not? (10 pts)