Help needed with Butterworth bandpass filter corner frequencies

Status
Not open for further replies.

eleidon

Newbie level 2
Joined
Mar 27, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
26
Hi!

I'm making a heart rate measuring app (where you record blood level changes in the fingertip with the rear camera) for fun on the iPhone, but am having trouble setting up a bandpass filter that rejects frequencies outside the 30 - 200 bpm range.

In its current state, the filter works just fine when measuring typical resting heart rates (60~80 bpm) but is unable to measure heart rates that exceed 100 bpm. From what I can tell (with my very limited knowledge of DSP) these higher frequencies get rejected by the bandpass filter and instead I get very low readings such as 40~50 bpm when it should be above or around 100 bpm.

I used this site to generate the Butterworth filter:
The settings I used are the following:

- Filter order: 4
- Sample rate, in samples per second: 30 (I'm capturing at 30 fps)
- Corner frequency 1: 0.5 Hz (30 bpm, e.g. 30 / 60)
- Corner frequency 2: 3.33333333 Hz (200bpm, e.g. 100 / 60)

My question is, what am I doing wrong? What values should I input to achieve what I want?
I apologize in advance if I'm missing something very obvious, but I did do my best searching around for answers but couldn't really make much sense of what I found since my math skills are not up to par.

Thanks!
 

Two issues:

* A heartbeat occurs in 1/5 second or so. Therefore your filter must not attenuate 5 Hz.

* Suppose heart rate goes up. A heartbeat might occur in 1/10 second. Is your sampling rate fast enough and wide enough that it can detect the peak?
 

I'm making a heart rate measuring app (where you record blood level changes in the fingertip with the rear camera) for fun on the iPhone

I don´t know anything about the operating system that runs at this platform, but I believe it is not featured for real time. A fundamental assumption for working with such designs is that the sample frequency must occurs at precise intervals.
 

Suppose heart rate goes up. A heartbeat might occur in 1/10 second. Is your sampling rate fast enough and wide enough that it can detect the peak?

Hmm, I think so. I have another filter designed that is able to capture heart rates of 130bpm+ at least, but I'm not really sure how it works since it's based off of code examples I've found on the web. I'm also doing some interval "corrections" under the hood to not take peaks that are too irregular into account as well.
Anyway, I'll try to play around some more with the corner frequencies then, thanks a lot!


I don´t know anything about the operating system that runs at this platform, but I believe it is not featured for real time. A fundamental assumption for working with such designs is that the sample frequency must occurs at precise intervals.

Hehe, again, just a little project I'm working on for fun. It does work quite well though when I'm using other algorithm though.
 

just a little project I'm working on for fun. It does work quite well though when I'm using other algorithm though.

Just out of curiosity, the heartbeat data processing is being performed from a previously saved file, or is it occurring in real time for some measured reading ?
 

You didn't report any problem with the calculation tool. The response looks reasonable. Did you ever notice that the frequency scale is normalized?

 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…