Making a formula based on a blood pressure curve
Show older comments
Can anyone help us out with the following problem: We have measured data from a blood pressure signal. With the fft function, we made a fourieranalysis of this signal. Now we want to derive the first four harmonic components from this signal. How do we do this?
Answers (1)
Image Analyst
on 23 May 2013
0 votes
The FFT is a bunch of sine waves at different frequencies. To get the first four, wouldn't you just zero out anything at element 5 and beyond?
2 Comments
Klaske
on 23 May 2013
Image Analyst
on 23 May 2013
I don't think you need to explicitly get the first 4 time domain signals and add them, unless that's what an instructor is asking for. But I'm pretty sure that the first 4 elements of the FFT would reconstruct to give a pretty smooth and poor representation of the ecg. I think to get it to be flat inbetween the heartbeats you'd have to include a lot more frequencies. But it's easy enough to play around with zeroing out starting from some element, just do
fftSignal = fft(timeDomainSignal);
filteredSignal = fftSignal; % Initialize.
filteredSignal(4:end) = 0; % Keep only 1-4.
reconstructedSignal = ifft(filteredSignal);
plot(reconstructedSignal);
If you do need the individual signals, just do something like
% Get time domain harmonic #1
filteredSignal = zeros(length(fftSignal)); % Initialize
filteredSignal(1) = fftSignal(1); % Change to 2, 3, 4 for other harmonics.
timeDomainHarmonic1 = ifft(filteredSignal);
Then after you have them all, add them
timeDomainHarmonic = timeDomainHarmonic1 + timeDomainHarmonic2 + ...
timeDomainHarmonic3 + timeDomainHarmonic4;
If you're looking for ecg algorithms to remove noise, you can look here: http://iris.usc.edu/Vision-Notes/bibliography/medical888.html#Heart%20Analysis,%20ECG,%20Electrocardiogram,%20Other%20Electrical%20Signals though they are probably more imaging oriented than signal oriented. I'm not really an expert in 1D signals.
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!