# One, Two Step

Wrist pedometers are used by many to count their steps, and notify users when they “reach their 10,000”. These wearable devices quantify step activity and give indiviudals an idea of exactly how much they are moving throughout the day.

Accelerometers are often used within these wearable devices to detect the force acting on the device. The force acting on the accelerometer is correlated to an analog voltage output, which must be processed through a series of op amps to turn a users movement into an electrical output that can be analyzed through signal processing, but what signal processing circuitry is needed following the accelerometer within a wrist pedometer to correlate force acting on the pedometer to steps taken by the user?

In this post we will solve at the following engineering problem associated with pedometers: what signal processing circuitry is needed to convert the analog voltage input from an accelerometer to a binary digital signal that can be correlated to steps taken by a user?

Background

Figure 1. Force acting on wrist pedometer during gait cycle[1].

The average person takes between 0 and 120 steps per a minute. Throughout each gait cycle, a wrist pedometer experiences forces relative to its position, as shown in Figure 1. While standing the force detected by the pedometer is 1G (one times the force of gravity). When a user is pushing against the ground to step forward the force detected by the pedometer can rise above 1G, and while the user is between steps the force detected by the pedometer can go below 1G. The pedometer can detect when a user takes a step by monitoring forces and determining when the 1G threshold is crossed. Many wrist pedometers use a threshold of at least +/- 0.2G to prevent noise and standing movements from being accounted for in step count. So a step count will be equal to crossing the 1.2G and -1.2G thresholds[1].

Figure 2. Voltage Output as a function of force for Analog Devices+/- 2g accelerometer [2]

Accelerometers are often used to relate the force acting on an object to an electrical signal. Analog Devices, a circuitry component manufacturer, produces an +/- 2g accelerometer that relates forces between -2g and +2g to a voltage output, as shown in Figure 2. A linear region exists between +/- 2g, which can be defined by the following simplified function V(g)=(.875*g)+2.5 [2].

Approach

In designing the signal processing circuitry necessary to convert an analog signal from an accelerometer to a binary digital signal, we will do the following:

1.Define the input signal in terms of force acting on a wrist pedometer, and the voltage output of an accelerometer

2.Determine the signal processing necessary to convert the analog signal into binary digital output

3.Select circuit components to complete desired signal processing, and appropriate values for integrated components

4.Use LTSpice to model desired circuitry, and confirm that designed circuit solves the defined engineering problem

Signal Input

It is known that the force acting on a wrist pedometer can be defined by a sine wave function fluctuating +/ 0.5g around 1g, with a frequency of 0-2Hz. Therefore we will define the force acting on the pedometer as F(t)= 0.5sin(t) + 1g. Given the voltage output of analog devices accelerometer is V(g)=(.875*g)+2.5, the voltage output of the accelerometer can be defined as V(t)=0.4105sin(t)+3.375.

Figure 3. Force acting on pedometer throughout gait cycle

Figure 4. Voltage signal generated by accelerometer from force input signal

Signal Processing

To generate a digital binary signal from an analog voltage input signal processing through circuitry is required.

Figure 5. Flow chart of signal processing of input analog signal from accelerometer to binary output signal

First, the input signal should be passed through a low pass filter, with a cutoff frequency of 2Hz to remove high frequency noise from the signal. The force acting on the pedometer, and voltage output of an accelerometer can be defined by sine wave functions. The baseline of accelerometer voltage output exists above zero volts, therefore a subtractor should be used to bring the baseline of this signal to 0V. A full wave rectifier will be used as an AC to DC converter, converting both polarities of the signal to a pulsating DC signal. A compactor will be used to produce a binary DC output that indicates whether the signal is above a given threshold, voltage relative to passing +/- 0.2g force threshold. This binary signal is the system output and can be used to count total steps taken by a user.

Circuit Components

Circuit components were selected to complete necessary signal processing, and assumed to be ideal for simplification of solving this problem.

Low pass filter

Figure 6. Low pass filter

With a cutoff frequency of 2Hz, a low pass filter with a Capacitor of 4.7 nF and resistor of 0.0169 Ohms can be used to filter out high frequency noise

Follower

Figure 7. Op amp acting as follower

Follower used to preserve signal and prevent current flow back to the user

Subtractor

Figure 8. Op amp acting as a subtractor

A subtractor can be used to reduce the baseline signal to zero. Given our voltage input is V(t)=0.4105sin(t)+3.375 V, and the Voltage output of this component is Vout = (R3/R1)*(Vin-Vs), we will set Vs=3.375V DC and R1=R2=R3=100 Ohm to bring the baseline signal down to 0V.

Full Wave Rectifier

Figure 9. Op amps acting as a full wave rectifier

A full wave rectifier will be used to convert all polarities of the input signal to the same polarities. If R1=R2=R3=R4=R5, then if Vin>0 Vout=Vin and Vin<0 Vout=-Vin. Therefore, we will set all the resistors equal to each other to achieve a rectified DC signal.

Comparator

Figure 10. Op Amp acting as a comparator

A comparator will be used to convert the pulsating DC signal to a binary digital output. Op amps functioning as comparators follow the rule that if V+>V- Vout = Vc+ and V->V+ Vout=Vc-. In our ideal circuit, we aim our binary signal to be either 0 or 1.

V+ terminal will be our signal, and we look to determine if this signal represents crossing the 1.2g threshold. To find what the V- terminal should be we need to determine the voltage at this point in the circuit if it has crossed the threshold. Given, V(g)=(.875*g)+2.5, V(g=1.2)=3.52. The signal is brought through a subtractor where it is reduced by 3.375 and afterword is no longer amplified or modified, so the threshold voltage at this point is 0.1534 V. The negative input terminal will be set to be a DC voltage of 0.1534V.

To generate a binary output where 0V= not crossing the threshold and 1V= crossing threshold, the op amp terminals will be set to be Vc+ = 1V and Vc-=0V.

LTSpice Modeling and Verification

Figure 11. LTSpice signal processing circuit following accelerometer to convert analog accelerometer signal input to binary output

LTSpice was used to model the designed circuit, as shown in figure 11. This circuit was simulated using LTSpice software and it’s ability to produce a binary digital output from an analog signal was verified as depicted in figure 12.

Figure 12. Voltage input, green, and output, blue, of signal processing circuit in figure 11

Solution

Our goal was to design signal processing circuitry is needed to convert the analog voltage input from an accelerometer to a binary digital signal that can be correlated to steps taken by a user.

Figure 13. Accelerometer analog output signaling processing circuit to produce binary digital output

A series of signal processing components were integrated within a circuit, depicted in figure 13, to convert an analog voltage signal from an accelerometer into a binary digital signal. This circuit removes high frequency signal noise, reduces the signal baseline, generates a pulsating DC signal, and generates a binary signal output, as shown in figure 14.

Figure 14. Binary digital output of accelerometer signal processing circuit

This binary digital output can be correlated to steps taken, as two square waves is equal to one step taken. These square waves can be counted by an integrated software and used to count user steps. Thus, turning the analog accelerometer voltage output into a binary digital signal.

This binary signal can be used to count steps and step frequency, and when integrated with GPS and other technologies can be used to determine step distance and user speed.

With one two sqaure waves equaling a step, the designed integrated circuit turns user movement into step count, enabling the signal processing necessary to count those 10,000 steps everyone is so desperately trying to reach!

References

[2] “Accelerometer Specifications – Quick Definitions.” Accelerometer Specifications – Quick Definitions | Analog Devices, www.analog.com/en/products/landing-pages/001/accelerometer-specifications-definitions.html.

# How accurate is your Garmin’s VO2max estimate?

Traveling along the trails, sidewalks, and main streets of the towns they reside in, runners, cyclists, and endurance sports athletes everywhere all know a familiar sound. The delightfully gratifying chirp of a fitness tracker as you complete your next mile, achieve a new PR (personal record), or record a new VO2max.

Ever since I entered the world of endurance sports training eight years ago, I’ve heard athletes talking about their VO2 max, how to improve it, and how accurate (or not?) fitness trackers are at actually measuring these values.

I decided to explore the technology of Garmin fitness watches to understand how VO2max is calculated and do a baseline comparison of how these wearable technologies VO2max predictions compare to laboratory testing.

Firstbeat Technology’s Fitness Test is used by Garmin and other fitness companies to calculate VO2max for a variety of different activities. Described in patent US20110040193A1, this Fitness Test calculates users’ VO2 in the following steps:

1) The personal background info (at least age) is logged
2) The person starts to exercise with a device that measures heart rate and speed
3) The activity collected data is segmented to different heart rate ranges based off the persons background info and the reliability of different data segments is calculated(reliability is measured based off how continuous the activity is- uninterrupted segments are better than those where the user has to stop)
4) The most reliable data segments are used for estimating the person’s aerobic fitness level (VO2max) by utilizing the person’s heart rate and speed data

Speed data from reliable segments are used to calculate a VO2, oxygen consumption, during that segment. 20-30s bouts are used to calculate VO2 across segments using one of the following theoretical VO2 calculations:

Walking and Pole Walking: Theoretical VO2 (ml/kg/min)=1.78*speed*16.67[tan(inclination)+0.073]
Running on a Level Ground: Theoretical VO2 (ml/kg/min)=3.5 speed
Running in a Hilly Terrain: Theoretical VO2 (ml/kg/min)=3.33*speed+15*tan(inclination)*speed+3.5
Cycling: Theoretical VO2 (ml/kg/min)=(12.35*Power+300)/person’s weight
Rowing (Indoor): Theoretical  VO2 (ml/kg/min)=(14.72*Power+250.39)/person’s weight                                Unit of speed=kilometers per hour (km/h)
Unit of inclination=degrees)(°)
Unit of power=watts (W)
Unit of weight=kilograms (kg)

From these calculated theoretical VO2 values, heart rate information is used to determine effort of segments. Heart rate zones based on user information are utilized to evaluate effort, and then effort is used to determine that VO2 as a %VO2max. VO2max estimates are made for each segment using %VO2max. These segment VO2max can be weighted based off heart beat derived parameters and performance parameters, and then used to calculate VO2max.[1]

An affordable mode of tracking your VO2max through measuring heart rate and speed data – pretty neat, right? But how accurate is this technology and how does it match up to laboratory testing?

Firstbeat conducted their own study to validate the technology and its effectiveness at estimating VO2max. They found that “[t]he accuracy of the method when applied for running is 95% (Mean absolute percentageerror, MAPE ~5%), based on a database of 2690 freely performed runs from 79 runners whose VO2max was tested four times during their 6-9 -month preparation period for a marathon”(4). Error in estimated VO2max was less 3.5ml/kg/min in most cases, which is fairly accurate considering most submaximal testing has an error of 10-15%. Method accuracy varied with respect to estimated maximum heart rate(HRmax). ” If the HRmax is estimated 15 beats/min too low, the error in the VO2max result is about 9%. Respectively, if the HRmax is estimated 15 beats/min too high, the error in VO2max result is 7%. If the person’s real HRmax is known, the VO2max assessment error falls to the 5% level”(5). This study suggests a high degree of accuracy for Firstbeat’s fitness test technology in predicting VO2max.[2]

A group of scientists at Southern Illinois University Edwardsville evaluated the wearable technology’s accuracy by conducting a laboratory VO2max test on male and female runners, then allowing participants to use the wearable technology to calculate VO2max in a 10 minute self guided run. They found that the Garmin Forerunner 230MAX and 235MAX measured VO2max within -0.3 ± 3.4 ml/kg/min, p=0.02 for the 230MAX and -1.1 ± 4.0 ml/kg/min, p=0.026 for the 235MAX for female runners, and -1.1 ± 3.4 ml/kg/min, p=0.149 for the 230MAX and -3.2 ± 4.2 ml/kg/min, p=0.002 for the 235MAX for male runners. There is a greater amount of variability in the male group; however, this could be due to miscalculations in HRmax and potential variations in levels of effort in participant during the 10 minute self guided run. Although there is greater variability within the male group, the devices still appear fairly accurate at predicting VO2max.[3]

Wearable conducted an evaluation of their own putting fitness watches to the test – assessing the accuracy of Garmin, Fitbit, and Jabra devices in measuring VO2max. They found that Garmin technology provided a VO2max estimation within 0.3 ml/kg/min of their study participant, which was the most accurate of all devices tested. The high degree of accuracy found in their study remains consistent with other larger scientific studies.[4]

Across the board, there appears to be a high degree of accuracy with Firstbeat’s Fitness Test in estimating VO2max. For endurance athletes everywhere, this is a huge sigh of relief. Rather than partaking in expensive, strenuous VO2max testing, we can monitor our progress utilizing the technology in the watches we wear everyday. In addition to watching our paces, heart rates, and overall progress, we can also monitor our cardiovascular health and athletic progress as we continue to train and push ourselves everyday.

References:

[1]Seppanen, M., Pulkkenin, A., Kurunmaki, V., Saalasti, S., & Kettunen, J. (2016). U.S. Patent No. US20110040193A1. Washington, DC: U.S. Patent and Trademark Office

[2] Firstbeat Technology(2014). Automated Fitness Level (VO2max) Estimation with Heart Rate and Speed Data.

[3]Snyder, N. C. , Willoughby, C. A. & Smith, B. K. (2017). Accuracy of Garmin and Polar Smart Watches to Predict VO2max. Medicine & Science in Sports & Exercise, 49(5S), 761. doi: 10.1249/01.mss.0000519024.10358.0b.

# Just Trying To Reach 10,000 Or Competing To Step Above The Rest – How Do Wrist Pedometers Count Our Steps?

People everywhere are getting their steps in. Whether they’re attempting to reach 10,000 steps a day or participating in competitions with friends, family, or coworkers to see who can step the most, people are moving – and they want to know exactly how much. Wrist fitness trackers with built in pedometers have become a popular mode for individuals to track their daily activity, but how do these devices work?

Let’s look at Apple Incorporated’s Wrist Pedometer Step Detection technology. This technology uses motion data to determine a force comparison threshold that can be used to accurately count steps while a user is running and walking.

An illustration of a person using a wrist pedometer for step detection, included in United States Patent No. US20140074431A1

Patent title: Wrist Pedometer Step Detection

Patent number: US20140074431A1

Patent filing date: 2012-09-10

Patent issue date: 2014-03-13

Inventor: Yash Rohit Modi

Assignee: Apple Inc

U.S. classification: G01C22/006 Pedometers

How many claims: 18

Forces acting on a wrist pedometer can be associated with user movement, specifically when they’re walking or running. The force of gravity as well as the forces exerted by the user against the force of gravity are measured by the pedometer; changes in forces acting on the device can be used to determine step count as well as type of exercise. While standing the force detected by the pedometer is 1G (one times the force of gravity). When a user is pushing against the ground to step forward the force detected by the pedometer can rise above 1G, and while the user is between steps the force detected by the pedometer can go below 1G. The pedometer can detect when a user takes a step by monitoring forces and determining when the 1G threshold is crossed.

Forces are compared based off magnitude and frequency to accurately count user steps. Other pedometer technologies worn at the trunk have used a 0.2G comparison threshold to account for steps, meaning when the pedometer experiences a for change of at least 0.2G one step will be added onto the step count. This threshold has been set to prevent noise and standing movements from being accounted for in step count.  However, the force differential experienced by wrist pedometers change with alternating steps. With the step on the side opposing the pedometer, the force acting on the pedometer is often less than 0.2G and may not be detected by the device with this threshold in place. To overcome this issue, this devices step algorithm has included frequency of threshold crossing to account for opposing steps. If the comparison threshold has been crossed twice over a set step time, then the technology will account for two steps rather than one. This prevents the technology from missing steps – thus, increasing device accuracy.

Motion data is also utilized in this technology to account for user activity and adjust parameters appropriately count steps . Fast Fourier Transform (FFT) is used to determine dominant frequency of motion and determine user activity. If the dominant frequency is below run threshold, then steps are counted for within walking parameters, described above. If the dominant frequency is above run threshold, then steps are counted for within running parameters. While running, there is a reduction in change of force acting on the pedometer; the change of parameters takes this into account and utilizes this information to properly account for steps.

Unlike other step counting technologies on the market, this product has improved accuracy in step count. The step counting algorithm has parameters that better define noise and non-walking movement as well as a mode to account for the imbalance in force acting on the wrist pedometer during walking. Less steps are unaccounted for and less random movements are counted – making for more accurate step counts.

There are a number of pedometer technologies that exist on the market today. Regardless of brand and step counting algorithm – these technologies are giving indiviudals the ability to count their steps and measure their fitness levels, promoting an active lifestyle for those who utilize them.

Reference

# A Closer Look At: Cupping

Among Olympic athletes you may have noticed something different in recent years – spots. Big red spots. Elite athletes from a variety of different sports have been spotted with – well- spots. But where are these markings coming from?

Michael Phelps, Alex Naddour, and Natalie Coughlin are a few of many athletes who have utilized cupping, an ancient therapeutic technique that has given them their spots.

Michael Phelps, male US swimmer, 2016 Rio Olympics

Cupping is a practice used in traditional medicine in which suction is created using a glass, bamboo, plastic, or ceramic cup. Negative pressure is generated within the cup and used to lift the skin and surrounding tissues. There are over ten different types of cupping therapy, each utilized to treat a variety of ailments. Most broadly cupping can be categorized in to wet cupping, where incisions are made on an indiviudal prior to applying negative pressure via cup, and dry cupping, where no incisions are made. However, treatments can be further classified by their power of suction, method of suction, and material inside the cup [1].

Since 3500 BC cupping has been practiced across several cultures. The earliest references to cupping therapy are found in the Ebers Papyrus, one of the oldest and most important medical papyri of ancient Egypt dating back 1550 BC. However, this form of therapy has not just been exclusively used by the Egyptians, rather it has been used across many cultures for thousands of years. In ancient Macedonia, cupping therapy was used to treat diseases and health disorders. Ancient Arab practitioners utilized cupping therapy to treat hypertension, polycythemia, headache and migraine, and drug intoxication. Hippocrates advocated cupping therapy as a treatment for many ailments in his treatise Guide to Clinical Treatment. Greek and Roman practitioners regularly used wet and dry cupping to treat a variety of diseases. To this day, Cupping therapy acts as one of the cornerstones of traditional Chinese medicine [2].

Today, athletes utilize cupping to decrease recovery time between training sessions, improve range of motion, alleviate inflammation, and reduce pain [3,4,5].

Research suggests that cupping may alleviate pain in individuals. A 2012 pilot study was conducted to assess the effects of a single wet cupping session on pain. Fifty individuals suffering from non-specific chronic neck pain were selected to receive a single wet cupping therapy session. Relative pain levels were measured through participant questioners and mechanical sensory and pain threshold values. Measures taken directly before therapy sessions and three days after treatment and were compared to assess changes in pain levels. Participants reported a statistically significant reduction in pain three days after treatment; however, because measures in reduction of pain are directly correlated with patient reporting, findings may be based on placebo effect or patient bias making it difficult to draw significant conclusions from this study [6].

Several systematic reviews (SR) assessing the impact of cupping on pain relief suggest there may be a positive correlation between the treatment and pain reduction. Several published randomized clinical trials including cupping interventions have been associated with a reduction in pain; however, these studies are limited by size and potential bias, and share a poor study design. Many studies are limited in longevity, participant sample size, and lack of a sufficient placebo for cupping therapy making it difficult to draw significant conclusions regarding the impact of cupping on pain relief [7,8,9,10].

Little is known about the mechanism of action of cupping. Several theories look to explain the pain relief experienced by individuals, including the following two:

• The Pain Gate Theory: Chronic pain is influenced by altering pain signaling at the nociceptor level. Through stimulating pain via cupping, the frequency of nociceptor impulses will be increased, leading to the closure of pain gates and inevitably pain reduction.
• Diffuse Noxious Inhibitory Controls: “Cupping therapy may produce an analgesic effect via nerves that are sensitive to mechanical stimulation. This mechanism is similar to acupuncture in that it activates A∂ and C nerve fibers which are linked to the DNICs system, a pain modulation pathway which has been described as ‘pain inhibits pain’ phenomenon”[9]

The potential mechanisms by which cupping may alleviate pain are not well understood, and certainly require validation by scientific studies. However, in addition to participant pain relief, reported effects of cupping also include increased blood flow to the skin [11] and a reduction in inflammation [12]. These physiological impacts may also influence pain relief experienced in clinical trial participants; however, further research is required to draw any conclusions about the mechanisms by which cupping works to potentially reduce pain.

Although it is difficult to draw significant conclusions relating cupping therapy with pain relief, research study participants, athletes, and thousands of other people claim cupping has helped reduce their pain. Cupping has been practiced for over 5000 years across a number of cultures and has alleviated the pain of many. It’s long history of helping indiviudals enduring pain and illness gives it promise as an effective treatment method. Bottom line- whether it directly facilitates pain relief or acts as a placebo – cupping has helped alleviate pain for thousands of years and can be beneficial.

Questions to consider

• Cupping therapy – placebo or effective? Does it matter?
• Measures of patient pain have been qualitative in many clinical trials, is an effective way to evaluate the impact of treatment? Are there any other ways to measure pain that may be more effective?
• Recently cupping has become more commonly seen in popular culture – featured in films such as The Karate Kid and The Gua Sha Treatment and publicly displaced on the bodies of Olympic athletes: what impact does the integration of this traditional treatment in popular culture have on public perception?

References

[1] Aboushanab, T.S., AlSanad, S. (2018). Cupping Therapy: An Overview from a Modern Medicine Perspective. Journal of Acupuncture and Meridian Studies, 11(3), 83-87.

[2] Qureshi, N. A., Ali, G. I., Abushanab, T. S., El-Olemy, A. T., Alqaed, M. S., El-Subai, I. S., & Al-Bedah, A. M. (2017). History of cupping ( Hijama ): A narrative review of literature. Journal of Integrative Medicine,15(3), 172-181. doi:10.1016/s2095-4964(17)60339-x

[4] Is cupping therapy effective among athletes?. (2018, January 13). Retrieved from https://medicalxpress.com/news/2018-02-cupping-therapy-effective-athletes.html

[5] What is Cupping Therapy? (Or Why Do Athletes Have Red Spots?). (2019, January 29). Retrieved from https://wellnessmama.com/129773/cupping-therapy/

[6] Lauche, R., Cramer, H.,Hohmann, C., Choi, K.E., Rampp, T., Saha, F.J, Musial, F., Langhorst, J., Dobos, G. (2011). The Effect of Traditional Cupping on Pain and Mechanical Thresholds in Patients with Chronic Nonspecific Neck Pain: A Randomised Controlled Pilot Study. Evidence-Based Complementary and Alternative Medicine, 2012. doi:10.1155/2012/429718

[7] Kim, J.I., Lee, M.S., Lee, D.H., Boddy, K, Ernst, E. (2011) Cupping for Treating Pain: A Systematic Review. Evidence-Based Complementary and Alternative Medicine, 2012.

[8] Kwon, Y.D., Cho, H.J. (2007). Systematic Review of Cupping Including Bloodclotting Therapy for Musculoskeletal Diseases in Korea. Korean Journal of Oriental Physiology and Pathology, 21(3), 789-793.

[9]Al-Bedah, A.M.N., Ibrahim, S.E., Qureshi, N.A., Aboushanab, T.A., Ali, G.I.M., El-Olemy, A.T., Khalil, A.A.H, Khalil, M.K.M., Alqaed, M.S. (2018). The medical perspective of cupping therapy: Effects and mechanisms of action. Journal of Traditional and Complement Medicine, 1-8.

[10] Mehta, P., Dhapte, V. (2015) Cupping therapy: A prudent remedy for a plethora of medical ailments. Journal of Traditional and Complementary Medicine, 5(3), 127-134.

[11] Liu, W., Piao, S.A., Meng, X.W., Wei, L.H. (2013). Effects of cupping on blood flow under skin of back in healthy human. World Journal of Acupuncture, 23(3), 50-52.

[12] Lin, M.L., Lin, C.W., Hsieh, Y.A., Wu, H.C.,Shih, Y.S., Su, C.T., Chiu, I.T., Wu, J.H. (2014). Evaluating the effectiveness of low level laser and cupping on low back pain by checking the plasma cortisol level. 2014 IEEE International Symposium on Bioelectronics and Bioinformatics.