0
$\begingroup$

I am recording data from an accelerometer attached to the chest (1000Hz). I need to extract the respiratory waveform. I tried an adaptive bandpass filter based on a dominant frequency in my signal based on https://cutt.ly/j24zdj.

Steps in brief: Take frequency spectra, find dominant freq f0, Make a bandpass filter as [max(0.1,f0-0,4), 0.4+rm]

The respiration rate could be between anything from 0.1 to 2 Hz. For deep and normal breathing, the filter works just fine. But for rapid and shallow breathings (low amplitude but high freq), it fails. It identifies the dominant freq incorrectly and thus the entire filter goes wrong.

For example in the image below: The dominant freq should have been around 0.6, but is identifies as 1.7 (Slight diff in amplitude). So filter works badly.

1) How do I design a filter for this? Any suggestions. I can't control the noise in this freq range. The person is as still as possible.

2) The red line is spectra after filtering. Why has the amplitude of certain frequencies increased? I am using the 'spec' function in R: uses the hanning window for computing.

It's not the issue with plotting. The amplitudes have actually increased. enter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Can I please ask if this was resolved? $\endgroup$ – A_A Sep 6 at 8:58
0
$\begingroup$

Under the extremely controlled conditions required to measure respiratory rate using this method, you can try to use the autocorrelation (which is more robust in the presence of noise) to determine the "dominant" frequency in your signal.

2) The red line is spectra after filtering. Why has the amplitude of certain frequencies increased? I am using the 'spec' function in R: uses the hanning window for computing.

If that is not a mere rescaling of the waveform as it gets plotted over the same figure (?), then it would be safe to assume that the filter included some overall gain.

Hope this helps.

$\endgroup$
  • $\begingroup$ Is that normal or ok to have such overall gain? $\endgroup$ – Rutuja Chhajed Aug 1 at 5:42
  • $\begingroup$ @RutujaChhajed Overall gain at that point does not matter much. It is trivial to set it to any value you like by multiplying the filter response by a factor. Do you see this as something to worry about it? $\endgroup$ – A_A Aug 1 at 6:00
  • $\begingroup$ That is true! Nothing to worry about that. $\endgroup$ – Rutuja Chhajed Aug 14 at 6:33
  • $\begingroup$ I need a little more help in this. Can I contact you somewhere? $\endgroup$ – Rutuja Chhajed Aug 14 at 6:34
  • $\begingroup$ @RutujaChhajed You are contacting me here or we might talk about this on the DSP Chat (?) $\endgroup$ – A_A Aug 14 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.