Using MATLAB Code to estimate PSD (Power Spectral Density of various Biomedical Signals including ECG, EEG, EMG, and PCG: Infographic Diagram
Steps outlining the signal processing chain :
1) Download "psd.m" which has the code needed to evaluate the desired biomedical signals.
2) Select the segment of interest from the signal (This will vary depending on the signal selected, download desired data file).
If PSD of ECG Signal desired, in this case "eeg1-c4.dat" will be selected...you will need to edit the code to correspond the input file being read in ( see image)
2) Subtract the mean of the segment; this will set the DC component in the PSD to zero.
In this example the mean was equal to, -1.8516 x 10^+03 which is the DC component in the PSD to be subtracted.
3. Obtain the Fourier transform (FT) of the segment. The Matlab command for the computation of the FT is fft (representing the fast Fourier transform or FFT algorithm). Note a sampling frequency must be selected, in this case 100 Hz was used with a max frequency of 2 Hz.
4. Obtain the squared magnitude of the FT.
5. Normalize the squared magnitude spectrum by dividing by its maximum.
6. Convert the result to dB: take the logarithm to base ten of the result above and multiply by ten.
This is an estimate of the PSD of the original signal in dB.
7. Select the first half of the PSD as above. Prepare the corresponding frequency axis in Hz, spanning the range [0, fs/2], where fs is the sampling frequency of the signal.
8. Plot and analyze the result. Ensure that the axes are labeled in Hz and dB.
Below is the final output graphs after following steps 1-8 showing the PSD of the signal.
Summary of the Characteristics of ECG Signals
Each of these signals had a different input and resulting output of power. ECG3 and ECG4 were both very similar as they had almost identical sinus rhythms; however, they did show different outputs of peak power with ECG 3 showing 3 clear spikes of power frequencies and ECG4 showing only 2 clear ones. ECG3 had a higher output frequency than ECG4 at roughly 1.9 Hz. ECG5 had a rhythm which was abnormal and the resulting power spectrum showed a peak in the beginning at the lower frequencies then one more peak later. The phase diagram appears to decline from the start of recording in comparison to ECG3 and ECG4 where it appears to increase from the start of recording. ECG6 showed a number of peaks in its power graph and as a result had a number of spikes in its phase graph despite looking like a completely normal sinus rhythm with a fewer number of peaks in its ECG compared to the others. The high frequency noise filter showed more higher peaks in terms of the power frequencies in comparison to the low frequency noise filter; however, they both appeared to show peaks in power frequencies at the same locations. They did show two completely different phase power graphs as the high frequency noise graph appears to increase like the first two ECG3 and ECG4. The low frequency phase graph did appear to decrease from the beginning then spike up and decrease again which was different from the other phase graphs.
Summary of the Characteristics of EMG Signals
|X(f)| is the magnitude of the power present in the signal, coming from the muscle plotted versus the frequency of the signal. The time is the duration of the signal.
There is a major difference in power spectral density (PSD) at the very start of the contracting and the end of the contraction. The frequency vs |X(f)| graphs for both EMG force and EMG squeeze show the power (Watts) at the highest point at the very beginning (frequency = 0) and quickly drops off, and begins to flatten out as the magnitude for power |X(f)| reaches zero. The PSD for the Force EMG was higher than the PSD for the squeeze EMG. This is because the more force opposing the muscles causes the body to recruit more muscle fibers and provide a higher power output. The EMG force has this factor while the EMG squeeze only shows the muscle contracting with no external force. There is no major differences between the PSD at various levels of contraction, it appears that the graphs of force and squeeze are almost identical meaning that the power of the signal did not change much between the two recording methods.
Summary of the Characteristics of EEG Signals
Summary of the Characteristics of PCG Signals
The pec33 file contained a systolic murmur. Looking at the power graph in systole of pec1 versus pec33 is is clear that the power frequency wave was almost identical for both of them; however, the pec1 is the same general curve but higher on the graph indicating it has more power in its frequencies while the pec33 was alot lower and showed to have less power in its frequencies. This makes sense because the murmur is preventing the heart electrical signal from getting through the heart valves and allowing it to pump all of the blood out which is why pec1 shows to be strong with the valves opening normally and closing while pec33 is weaker with the valves struggling to fully open and close with power. The diastole power graphs do look extremely similar as it appears the heart is able to pump out blood normally but struggles with systole and filling up its chambers.
The Equations which define the Power Spectral Density (PSD) of a continuous signal x(t) including Parseval's identity can be seen below: