You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
high pass filter with cutoff set at 0.003Hz
11 views (last 30 days)
Show older comments
Hi,
I have a data set consisting of a mean bloodpressure and I want to high-pass-filter this signal with a DC cutoff set at 0.003 Hz. I'm not really familiar with signal processing (filter type, freq domain etc) so if anyone could help me out a bit, that would be great.
thanks in advance,
Paul
Accepted Answer
Star Strider
on 16 Feb 2016
Before you design a filter with such a low stopband, consider your sampling frequency. If you have a ‘high enough’ sampling frequency, consider a Chebyshev Type II filter.
16 Comments
Star Strider
on 16 Feb 2016
A sampling interval of 1 Hz is not high enough to design a filter with a stopband as low as you want it. (I actually did that experiment with different filter designs, the reason for the delay in my reply. None worked.)
I would consider one of two options:
1. Simply subtract the mean from the signal to eliminate the d-c offset;
2. If you have a varying baseline, use the Savitzky-Golay filter on the baseline to model it, then subtract the filter output from your signal to eliminate the baseline drift.
Most filter design requires experimenting to get the best result, including the Savitzky-Golay filter.
I don’t know what experiment you are doing, but mean blood pressure is normally relatively stable in healthy individuals, unless you are doing something deliberately to perturb it (alpha or beta adrenergic receptor antagonists or agonists, rapid postural changes, etc.) so filtering out the baseline drift could filter out much of your signal as well.
A third possibility (that I do not recommend) is to resample it to a higher sampling frequency. The problem with such significant interpolation is that you are creating data where none actually exist.
paul kaam
on 22 Feb 2016
thank you for your input! well the individuals go on bypass (heart-lung machine),so i compensate for the fases that occure (according to an article) during this process.
the thing is that have little experience in signal processing i thought something like --> fft (MAP) -- a filter -- ifft(filtered MAP) but it is probably a little bit more complicated unfortunately
thanks, Paul
Star Strider
on 22 Feb 2016
My pleasure. Interestingly enough, I actually helped develop a pulsatile cardiopulmonary bypass pump and got it approved for clinical trials in the U.S. (part of my checquered past). So I’ll help as I can.
If you can upload a representative sample of your signal here, and tell me what you want as output from it, I’ll see what I can do to help you process it.
paul kaam
on 23 Feb 2016
Interesting! did you develop it on / for a centrifugal or a roller pump?
Well I added the signal in an excel file. According to the article; I want the arterial blood pressure waveforms high-pass-filtered with a DC cutoff set at 0.003 Hz. This step removed slow drifts associated with hemodilution at the onset of bypass, blood transfusions, cooling, and rewarming.
If you could help out, that would be so great!
Thanks, Paul
Star Strider
on 23 Feb 2016
Actually, it was a hydraulic chamber with two valves, the pressure in the chamber driven by a reciprocating cylinder. (The basic design existed before I got there.) The idea was to get away from from flexing the tubing with the fracturing, shearing, and particle liberation inherent in that technology. We had very low hemolysis values and good results in the animal studies. I wrote the protocols and guided the R&D effort in the preclinical trials, including the data analysis and writing the IDE. The benefit here is that I know a bit about the technology and physiology involved.
I did some analysis on your signal. Looking at the fft in figure(3), virtually all your signal energy is below 0.003 Hz. If you filtered it out with a high-pass filter, you would have only noise left.
My guess is that the paper sampled at a much faster rate, and therefore could sample with such a low frequency to eliminate baseline drift and d-c offset. I still wonder if their experimental setup was similar to yours, because a highpass filter with a 0.003 Hz cutoff makes no sense to me with your data. A lowpass filter with the same cutoff (assuming designing one is possible with such a low sampling frequency) definitely does. Let me know what you want to do.
The code:
[MAP,s,r] = xlsread('paul kaam MAPdata.xlsx');
L = length(MAP);
Ts = 1; % Sampling Interval (sec)
Fs = 1/Ts; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
t = 0:Ts:L-1;
figure(1)
plot(t, MAP);
grid
title('Time Domain Plot Of Unprocessed MAP')
xlabel('Time (sec)')
ylabel('MAP (Torr?)')
FMAP = fft(MAP)/L; % FFT Of Raw Data
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:length(Fv); % Index Vector
figure(2)
plot(Fv, 2*abs(FMAP(Iv)))
grid
axis([0 0.01 ylim])
title('Frequency Domain Plot Of Unprocessed MAP')
xlabel('Frequency (Hz)')
ylabel('Amplitude (Torr?)')
MAP0 = MAP-mean(MAP); % Subtract d-c Offset
FMAP0 = fft(MAP0)/L;
figure(3)
plot(Fv, 2*abs(FMAP0(Iv)))
grid
axis([0 0.01 ylim])
title('Frequency Domain Plot Of Mean-Corrected MAP')
xlabel('Frequency (Hz)')
ylabel('Amplitude (Torr?)')
paul kaam
on 23 Feb 2016
Wow nice especially the part of getting away from the conventional way! If you have any articles on the subject I would like to read them.
Thanks for your help!! I already thought that most of my signal energy was below 0.003 Hz, because of the low sample frequency..
hmm they also collected data with 1Hz I assume (because the device does not allow you to do it faster.. but they did the following which I do not completely understand:
Analog arterial pressure data from the operating room hemodynamic monitor were sampled with an analog-to-digital converter at 60 Hz and then processed.. (as I thought the signal was already digital)
Star Strider
on 23 Feb 2016
My pleasure!
No papers, and I wasn’t allowed to take anything with me. (That was more than 30 years ago, so much of the technology is obsolete, and any patents — as well as my non-disclosure and non-competition agreements — have long since expired.) You might be able to get the IDE application from the FDA, but I doubt it would be of much help if it was in any way redacted. I did get high praise from the FDA reviewers and the cardiovascular life support devices advisory group for my experimental design, protocols, and data analysis though, so those might be helpful. I advocated replacing the piston pump with an oscillating roller pump, so the shards of tubing stayed in the drive system and not in the blood, but that idea got shot down quickly.
‘... sampled with an analog-to-digital converter at 60 Hz and then processed ...’
That is of course 60 times per second, not 1 time per second. If you have the opportunity to revise your experimental protocol, amend it to increase the sampling frequency to 60 Hz from 1 Hz. Then you can filter at 0.003 Hz easily.
The filter for a 60 Hz sampling frequency is easy to design:
Fs = 60; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
Wp = 0.005; % Passband Frequency (Hz)
Ws = 0.003; % Stopband Frequency (Hz)
Rp = 1; % Passband Ripple (dB)
Rs = 20; % Stopband Ripple (dB)
[n,Wn] = buttord(Wp, Ws, Rp, Rs); % Optimal Filter Order
[b,a] = butter(n,Wn, 'high'); % Calculate Filter Coefficients For Highpass Filter
[sos,g] = tf2sos(b,a); % Convert To Second-Order-Sections For Stability
figure(1)
freqz(sos, 2048, Fs) % Assess Filter Passband & Stability
Then use filtfilt for the actual filtering.
I would still do the fft analysis first, to be certain you are not filtering out relevant parts of your signal, and not only the baseline drift and d-c offset. That the paper chose those parameters does not mean they are appropriate for your experimental design or instrumentation.
paul kaam
on 24 Feb 2016
30yr ago already! hmm strange they shot your idea down!
Thanks star strider for your help and input on the matter! I really appreciate it.
I think the data I'm getting is already filtered, so the thing is to figure out if it is still necessary to filter at all..(for the slow drifts associated with hemodilution at the onset of bypass, blood transfusions, cooling, and rewarming)
Star Strider
on 24 Feb 2016
Not really strange if you knew that company (now long out of business).
My pleasure.
I’m confused. If your data is already filtered, then it is likely not necessary to filter it. The problem is that you don’t know what the original data were, and what was filtered out. What is gone may or may not be important. I like to have all the original data so that I can decide what is important and what isn’t. Baseline drift (low-frequency components of your signal) could be important if those signals are actual data and not extraneous noise.
Haemodilution should either initially increase or have no effect on MABP, depending on how rapidly the saline is infused. There will be ‘third-spacing’ of the saline because the plasma oncotic pressure will not be enough to counter the physical intravascular pressure, favouring transudation of the saline at the onset of bypass. So MABP will decline once the third-spacing has equilibrated and plasma oncotic pressure once again is enough to oppose significant transudation. Blood transfusions may increase MABP depending on whether it is whole blood or packed erythrocytes. Cooling will cause peripheral vasoconstriction, and rewarming peripheral vasodilatation, so those will have an effect.
There is some pulsatile component of even older (I would like to believe obsolete) constant-flow roller pump designs, so you may have to take that into account as well. If you are using a pulsatile pump, you need to track the pulse rate, pulse pressure and pulse contour as well, because the vascular systems of animals with complex hearts evolved to provide optimal systemic perfusion with pulsatile blood flow, exemplified in the technological superiority of a-c over d-c for long-distance electrical distribution systems. The same principles apply to cardiovascular physiology.
You need the perfusionist’s and anaesthesiologist’s records as to what was infused when,, the pump and other settings, what vasoactive drugs were given, and all other information. I can guarantee you that what you are doing is not trivial! Physiology is absolutely fascinating, but it can be frustrating to analyse from an engineering perspective, much less model.
paul kaam
on 25 Feb 2016
Okai the whole story will probably make more sense:
What I'm trying to accomplish is to measure cerebral blood flow autoregulation by using both NIRS data and MAP data. (The paper: http://stroke.ahajournals.org/content/41/9/1951.full.pdf )
Both NIRS and MAP I recieve at 1 Hz. The MAP data comes out of the patient monitoring system (so I'm very sure it is filtered) Unfortunately (careless of me) I overlooked the part where they describe how they get the data and at what sample frequency. The difference is that they collect the waveform and use an AD converter and apply filters while I collect already filtered (by the monitor) digital data.
I still apply a moving average filter and pearson correlation.
the question is now; is it still possible to use this method in the way I am collecting my data. (maybe difficult to answer, maybe i just need to get some data and compare the results with those of the paper)
Star Strider
on 25 Feb 2016
Interesting. When we were doing preclinical trials with the pulsatile pump on 70 kg male Holstein calves, we monitored internal carotid blood flow with an electromagnetic flowmeter (we used the same technology to monitor all flows in our system), and found that shortly going on bypass, carotid blood flow declined to undetectable levels, yet the animals suffered no neurologic injury as determined by intraoperative EEG and post-recovery neurologic examination (by a veterinary anaesthesiologist with particular skills in this area). In our FDA filings, I cited some papers that went into some detail on cerebrovascular autoregulation, and the FDA was happy. I also pointed out that in most tissues, the mitochondrial cytochrome chain is usually saturated at a PO2 of 10 mm Hg (and 5 mm Hg in the liver), so as long as arterial PO2 remains high enough and flow high enough, hypoxia is unlikely.
The problem is relying on the patient monitoring system for your data. They are heavily filtered, because they are intended for clinical interpretation in real time, not research. You should be collecting your signals independently. (I’m not quite sure how I would monitor cerebral blood flow in a clinical situation, perhaps bilateral internal carotid ultrasound to replace the electromagnetic flowmeter, since ultrasound transducers and signal processors are significantly more sophisticated than in the mid-1980s.) Their use of transcranial ultrasound monitoring only the middle cerebral artery involves significant assumptions.
Notably:
‘Analog arterial pressure data from the operating room hemodynamic monitor, TCD, and NIRS signals were sampled with an analog-to-digital converter at 60 Hz ...’
So they got their signals directly from the analogue instrumentation and digitised them with their own equipment. They also used a moving average filter, something that I never advocate. I want to design my filters with specific frequency characteristics so I know what I’m doing with my signals.
I don’t quite follow some of their derived indices and statistics. It seems consulting with a statistician, and a biomedical engineer with expertise in instrumentation, before they designed their study would have been beneficial.
That cerebral blood flow (CBF) as determined by their indices decreases as MAP increases mirrors my own experience.
I haven’t kept up with the cardiopulmonary bypass (CPB) literature since my experience with it. (I’m a Board-Certified M.D. Internal Medicine Physician and M.S. Biomedical Engineer, not a cardiovascular surgeon.) However it saddens me that everyone continues to use peristaltic continuous-flow pumps when true pulsatile pumps provide much better clinical outcomes.
paul kaam
on 29 Feb 2016
Interesting. I'm also convinced that true pulsatile has much better clinical outcomes.. but it is difficult to implement this. We use a centrifugal pump but this will ofcourse not give you a true pulse at all..however i am convinced that the true factor behind this is just "pressure" (the higher the better until a certain point)
hmm the paper compares (MAP and TCD) with (MAP and NIRS) to see if it is possible to use NIRS because it is easier te apply (just two stickers on the forhead of the patient) and the conclusion was that it can be used to measure cerebral autoregulation.
Now I am sort of doubting my method.. 1 Hz and a filtered MAP might not be the way to go.
Star Strider
on 29 Feb 2016
Pulsatile is definitely the way to go, since it also makes the transition off the pump easier. A correctly-designed pulsatile pump also reduces haemolysis, although the correct valve design is critical. I believe a valve-based design is better than a pulsatile roller pump because the roller pump stresses the tubing too much, and causes plastic embolisation.
I would do what the authors of the paper did — multiplex off the analogue instrumentation signals digitising them with their own equipment. (That also has the advantage that the analogue hardware incorporate a hardware threshold to prevent the instruments from being wiped out by the Bovie (electrocautery) signals.)
I guarantee you 1 Hz is definitely too low a sampling frequency. I always suggest at least 250 Hz, because physiological signals are generally band-limited by the physiology of excitable membranes to about 100 Hz, so you’ll have a high enough Nyquist frequency (at least 125 Hz) to allow for a stable filter. Besides, disk storage is inexpensive enough these days to allow you to write to an outboard 1 TB disk drive, large enough to hold even data from long pump time. Record all your unfiltered signals with your own digitising equipment, and do the processing offline. You need to be certain that your ADC board can handle the voltages you’re receiving from the analogue sensors, but other than that, you should have no problems.
I don’t see any serious deficiencies with their comparing MAP and TCD with MAP and NIRS (I like their experimental setup), although I’d likely have opted for a different statistical design (and the assistance of a biostatistician, since it seems they didn’t). I believe these are valuable, although I might record EEG as well (since I believe that’s becoming standard practice in anaesthesiology). More data is generally better than less data.
I believe the essence of your study is correct. You just need to record the correct signals correctly.
Star Strider
on 4 Mar 2016
My pleasure.
I know I couldn’t design your filter because of the low sampling frequency. If I was enough help, I would appreciate it if you would Accept my Answer.
More Answers (0)
See Also
Categories
Find more on Multirate Signal Processing 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!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)