ee4820_ps4

pdf

School

California State University, Los Angeles *

*We aren’t endorsed by this school

Course

4820

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

5

Uploaded by luistepox244

Report
Luis Tepox EE 4820 – Biomedical Signal Processing Problem Set 4 1. Semmlow P3.8 For this problem, two arrays of white noise need to be constructed of different lengths. One array has a length of 128 points and the other has a length of 1024 points. Then we need to take the Fourier Transform of these arrays and plot the magnitude. To accomplish this, the fft function in MATLAB must be used. By doing this, we get the following plots: Figure 1: White Noise Magnitude Spectrum of 128 Points Figure 2: White Noise Magnitude Spectrum of 1024 Points
From the figures above, we are supposed to determine whether increasing our length of the array will somehow improve our spectral density for white noise. For spectral density the more data you have the better the estimations is when it calculates the different averages. In this case, for the one with longer length of array of 1024 points is better for better spectral estimation. Therefore, when increasing the length, more data points, will further improve spectral estimation. 2. Semmlow P3.13 Loading in the ECG_1min.mat file we obtain ECG data for 1 minute duration in a variable called ecg. For this variable, the Fourier Transform will be calculated using MATLAB but we only want up to 20 Hz of data excluding the DC value of data and the sampling frequency was given of 250 Hz. First, the magnitude and phase unwrapped spectrum must be obtained where it is shown in the following figures down below: Figure 3: Magnitude Spectrum for ECG Data Figure 4: Unwrapped Phase Spectrum for ECG Data
From the magnitude spectrum we can see that there are several peaks from the graph but we want to find the highest. And notice that happens at low frequency in which I used MATLAB and got f = 1.445 Hz. The reason why we need the highest peak frequency is to find the heart rate. From the frequency we can get the time from t = 1/f. And for the heart rate we can calculate using bpm = 60/t which in our case is approximately 69 beats/min. 3. An audio file was provided for this problem where we had to extract 3-5 seconds in. The frequency spectrum must be obtained for this audio file but only the magnitude portion of it. Using the fft function and MATLAB I was able to produce the following plot of the signal: Figure 5: Magnitude Spectrum for Audio File 3-5 Seconds From the magnitude spectrum to find the bandwidth we have to see at the peaks because that is essentially the data we care about, so our bandwidth is approximately 1595 Hz. For the topic of aliasing that is something we want to avoid but for our understanding of the concept we want to change our sampling frequency to the frequency that will cause
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
aliasing. To produce aliasing fs < 2B, this condition means the sampling frequency must be less than twice the bandwidth the achieve aliasing. So, our sampling frequency has to be less than 3190 Hz. Figure 6: Magnitude Spectrum of Different Sampling Rates From here I plotted the differences between 3 cases from the original, just a bit below Nyquist condition, and half Nyquist condition. Comparing it to the original spectrum more overlaps occur in the other cases meaning more distortion since the overlaps of the signals is more frequent and the original data gets lost because of the combining of samples making it something completely different. You see for just below the Nyquist condition for case 2 although it does not look like the original you can probably hear something. But as you go lower in frequency for case 3 for my sampling frequency being the bandwidth it starts being more and more distorted. Now we have to down sample to a sampling frequency of 1103 samples. When we change it to this frequency we get a different sound from the original one. We hear a very fast sound almost like breathing in type of sound therefore, something entirely different.
By plotting the magnitude spectrum of this case we get the following: I also included the plot of the original sampling frequency provided by the data. As you can see for the new case we created of down sampling to 1103 samples/s. We do not have any noisy signal since what we had was distorted giving us a completely different sound. I mentioned before that it was a quick sound and is the reason why there is only a spike in the beginning and since it is symmetrical it also shows up at the end. For the original there is noise and the reason why there are spikes where it shows is because we can still hear the word ‘cool’ but for new case it is non-existent.