S1E5: How is Pulse Rate measured by your Fitbit?

Fitness watches can display your pulse rate while you’re wearing the fitness watch. First, heartbeats are detected by your fitness watch using a PPG sensor, read my blog post on the same. This information is later post-processed to determine the pulse rate which we’ll discuss now. Before we jump in, I just want to say that there are many algorithms out there for the same. The following is a patent that was granted to Fitbit in 2022.

Introduction

The heartbeats detected by the fitness watch within a certain sampling time period (STP) are interpreted as peaks in Figure 1. The section of data during this time period is processed to compute the number of heartbeats and is later extrapolated for a minute to display heartbeats per minute. In this example, the STP is 5.2 seconds.

Figure 1: Heartbeats considered in a sampling time period

Description of the figure

  1. X axis is time and the sampling time period (STP) of 5.2 seconds is used as an example here. The y axis is heartbeat instances represented as vertical lines.

  2. The green and red vertical lines are basically heartbeats originally detected by your fitness watch.

  3. A, B, C, E, F, G, and I are 7 heartbeats originally detected by the fitness watch (except orange lines)

  4. The red vertical line F is a phantom heartbeat - It is originally detected by the fitness watch, but the user had no heartbeat at this instance.

  5. The orange vertical lines, D and H are instances where heartbeats should have been detected by the fitness watch but weren’t.

Heartbeats are pretty evenly spaced in a human. The algorithm considers this fact to process the information in the following way. We’ll now look at how some of the above observations were made.

Algorithm

Step 1: Add and subtract 1 and 2 heartbeats to our estimated 7 heartbeats

The fitness watch originally detected 7 heartbeats within our sampling time period of 5.2 seconds. One and Two heartbeats are added and subtracted to get additional estimates of 5, 6, 8, and 9 heartbeats within the sampling time period. We do this to analyze our results further considering the possibility that 7 heartbeats could be faulty. All these newly estimated heartbeat counts are evenly spaced within the sampling time periods and are marked with black circles in Figure 2 across each heartbeat estimate of 5 beats to 9 beats on Y-axis. (5 circles for 5 heartbeats and so on until 9) The black circle represents times when the heartbeat should have been detected for the corresponding heartbeat estimate in the Y-axis - by evenly spacing them.

Figure 2: Heartbeats in sampling time period for different heartbeat estimates in Y-axis

Step 2: Score each of the estimates by counting the heartbeats (black circles) that overlap with the originally detected 7 heartbeats - A, B, C, E, F, G, I

The 5-beat estimate - Heartbeats (black circles) overlap with A and F heartbeats. So the score is 2

The 6-beat estimate - Heartbeats (black circles) overlap with A, E, and G heartbeats. So the score is 3.

The 7-beat estimate - Heartbeats (black circles) overlap with A, B, C, and F heartbeats. So the score is 4.

The 8-beat estimate - Heartbeats (black circles) overlap with A, B, C, E, G, and I heartbeats. So the score is 6.

The 9-beat estimate - Heartbeats (black circles) overlap with A, F, and I heartbeats. So the score is 3.

Thus, the estimate with the highest score is 8 heartbeats. But only 7 were originally detected, so our new candidate of 8 heartbeats could be wrong. Hence, this has to be evaluated further. So, more information is extracted from the originally detected 7 heartbeats A, B, C, E, F, G, and I as follows.

Step 3: Find the potential beat interval from the originally detected heartbeats.

The interval between the 7 originally detected heartbeats are measured. Recall that human heartbeats are evenly spaced and there are 3 peaks A, B, and C which are evenly spaced. Thus, the interval between the successive beats A and B is taken as a potential beat interval (time)

Step 4: Find missing beats not detected by the fitness watch and remove faulty beats that were detected

The potential beat interval computed in the last step is compared to the remaining detected beat intervals between peaks C and E, between E and F, between F and G, and between G and I to identify any timing intervals closely corresponding to whole number multiples of the potential beat interval to identify missed beats. The interval between C and E, G and I are both twice the potential beat interval. This means that we are missing two beats (each between C and E, G and I) that were not originally detected by the fitness watch. These are D and H.

Similarly, the interval between E and F, F and G is substantially smaller than the potential beat interval. This implies that F is a phantom heartbeat and was detected by mistake.

Step 5: Perform scoring by repeating Step 2, but with phantom heartbeat F removed and new beats D and H included.

You can see that the best estimate again is the 8-heartbeat one on the Y axis. All of them (heartbeats represented as black circles) overlap with our vertical detected peaks. Other heartbeat estimates in the Y-axis have lower values after Step 2 is completed again. Thus, it is determined that the 8-heartbeat estimate is the best one.

Step 6: Computing pulse rate

The computed estimate is 8 heartbeats for 5.2 seconds. Hence the heartbeats per minute are 8* 60/5.2 = 81 bpm

Conclusion

The algorithm runs in real-time for a continuous set of heartbeats detected for a certain sampling time period. The processed result is then constantly updated on your fitness watch.

Thank you for taking the time to read my blog post. If you liked what you read, consider subscribing to my newsletter for exclusive content and understand how a gadget works in only 3 minutes, sent directly to your inbox every Wednesday. We'd love to have you as a part of our community. Also, if you found this post to be informative or enjoyable, please share this with your friends on social media. Thank you!

Previous
Previous

S1E6: How do Self-cleaning water bottles work?

Next
Next

S1E4: How are Heartbeats detected in a Fitness Watch?