This protocol describes a method for calculating Heart Rate Variability (HRV) from electrocardiogram (ECG) waveforms. Waveforms from continuous heart rate (HR) recordings during active video game (AVG) sessions were used to measure the aerobic performance of youth with cerebral palsy (CP).
The aim of this study was to generate a method for calculating heart rate variability (HRV) from electrocardiogram (ECG) waveforms. The waveforms were recorded by a HR monitor that participants (youth with cerebral palsy (CP)) wore during active video game (AVG) sessions. The AVG sessions were designed to promote physical activity and fitness (aerobic performance) in participants. The goal was to evaluate the feasibility of AVGs as a physical therapy (PT) intervention strategy. The maximum HR (mHR) was determined for each participant and the Target Heart Rate Zone (THRZ) was calculated for each of three exercise phases in the 20 min AVG session: (warm-up at 40-60% mHR, conditioning at 60-80% mHR, and cool down at 40-60% mHR). Each participant played three 20 min games during the AVG session. All games were played while sitting on a bench because many youth with CP cannot stand for extended periods of time. Each game condition differed with participants using hand icons only, hand and feet icons together or feet icons only to collect objects. The objective of the game (called KOLLECT) is to collect objects to gain points and avoid hazards to not lose points. Hazards were used in the warm-up and cool down phases only to promote slower, controlled movement to maintain HR in the target heart rate zone (THRZ). There were no hazards in the conditioning phase to promote higher levels and more intense physical activity. Analytic methods were used to generate HRV (selected time-domain and frequency-domain measures) from ECG data to examine aerobic workload. Recent applications of HRV indicate that short-term measurements (5 min bouts) are appropriate and that HRV biofeedback may help improve symptoms and the quality of life in a variety of health conditions. Although HR is a well-accepted clinical measure to examine aerobic performance and intensity in PT interventions, HRV may provide information of the autonomic system functions, recovery and adaptation during AVG sessions.
Cerebral palsy (CP) is the most common physical disability of childhood1. CP is caused by a neurologic insult to the developing brain and is associated with motor impairments such as muscle weakness, spasticity, deconditioning, and decreased motor control and balance2,3. CP is a non-progressive condition but with age, children become less physically active and more sedentary compared to their peers with typical development (TD) mostly because of the increased demands of growth on their compromised neuromuscular and musculoskeletal systems4.
Youth with CP usually receive physical therapy (PT) services to improve functional mobility and promote physical activity and fitness (e.g. aerobic and muscular endurance)2. Oftentimes, there is limited access to PT services and community resources to achieve and sustain these PT goals5,6.Active video games (AVGs) may be a feasible strategy in activity-based PT interventions in clinic, home or community settings7,8. Commercial AVGs have limited flexibility to adapt game play and meet the specific needs and PT goals for youth with CP9. However, customized AVGs provide flexible gaming parameters to challenge youth with CP while promoting physical activity and fitness10.
Our team has developed a customized AVG (called KOLLECT) to examine youth exercise responses (e.g., physical activity and aerobic fitness). The game uses a motion sensor to track youth motion during game play. The goal of the game is to 'collect' as many objects as possible for a high score and to avoid the hazards to avoid losing points. Objects may be collected with hand and/or feet icons as determined by the therapist in the flexible game parameters.
Designing activity-based PT interventions that dose physical activity intensity to promote aerobic fitness is critical for youth with CP11. Custom AVGs may be an effective strategy to dose intensity and engage youth in physical activity to promote fitness10. Heart rate (HR) monitors are often used in clinical PT practice to determine aerobic performance and activity intensity. Therefore, HR monitors will help determine feasibility of AVGs in dosing physical activity intensity to promote aerobic fitness9. ECG data generated from a HR monitor can be used to calculate heart rate variability (HRV). Analytic methods were used to generate HRV from ECG data to examine aerobic workload. Recent applications of HRV indicate that short-term measurements (5 min bouts) are appropriate and that HRV biofeedback may help improve symptoms and the quality of life in a variety of health conditions32,33,34. The application of short-term HRV measures is an appropriate means of assessing cardiovascular function during AVG sessions. Given that HRV is derived from the R-R interval of an ECG, we used selected time-domain and frequency-domain measures. Time-domain measure of HRV quantify the amount of variablility in the interbeat intervals which represents the time between successive heartbeats. We used the AVNN (average NN interval), RMSSD (root mean square of successive differences), SDNN (standard deviation of NN interval), NN50 (number of NN intervals >50 ms) and PNN50 (percentage of NN intervals). Frequency domain measures estimate the distributionof absolute or relative power into possibly four frequency bands, we specifically addressed on two bands, low frequency (LF) power and high frequency (HF) power along with the LF/HF ratio. Although HR is a well-accepted clinical measure, HRV may be useful because it provides information about autonomic system function, recovery, adaptation, and provides an estimate of aerobic workload during an AVG session28.
The purpose of this study was to examine the feasibility of using AVG strategies to promote physical activity and fitness. A second purpose was to present the AVG data collection protocol and the methodology to calculate HRV from ECG data obtained via a HR monitor. These measures and this protocol may prove relevant to clinicians to monitor and dose PT intervention sessions.
Institutional Review Board approval was obtained. All youth provided written assent and parents provided consent prior to participation.
1. AVG data collection sessions
2. Acquire ECG Data from the Patient
3. Data Analysis and Calculation of Heart Rate Variability Measures
This method provides data for use in analyzing the effect that a newly developed method has on the subject's Heart Rate Variability (HRV). It does this by locating the R portion of the QRS waveform of a subject's ECG data, as shown in Figure 6, and by calculating various HRV values from it. If the HR monitor is making proper contact with the subject, the data will be uniform, substantially reducing the need for corrections (as seen in Figure 4).
Thresholds should be set to handle messy and irregular data as depicted in Figure 1 and Figure 2. If the data are sufficiently variable due to momentary changes in the HR monitor skin contact, the initial analysis may incorrectly label peaks as shown in Figure 3. This error can be rectified by manually correcting values or entering extra data points as explained in Section 3 of the protocol. Altering the threshold levels and minimum time between peaks can also help to clean up the detection values and produce an adjusted plot like Figure 6 from Figure5.
Once the data have been obtained and analyzed for discrepancies, they can be used to calculate HRV values for statistical analysis. The analysis of ECG data can be used to quantify observations made during sessions for evaluation purposes.
Figure 1. Representative graph of continuous HR (y-axis) in μv) across time (x-axis in s) for subject one game 3 during the warmup session representing 'messy' data. Messy data: In this section R peaks are smaller than the T portion of the waveform. This can cause issues with peak detection.
Figure 2. An example of some electrocardiogram (ECG) irregular waveform patterns. Irregular Waveform Patterns: Changes in contact with the subject due to movement can cause voltage variations reducing uniformity of the waveform. Please click here to view a larger version of this figure.
Figure 3. An example of an electrocardiogram (ECG) output with an incorrectly labeled peak HR Incorrectly Labeled Peak. Near the top of the figure a spike in voltage causes part of the waveform to be detected as matching the R pattern. It can also cause nearby R patterns to be ignored due to proximity such as the one highlighted at (9924, 2074).
Figure 4. Representative graph of continuous HR (y-axis) in μv) across time (x-axis in s) clean electrocardiogram (ECG) waveform. Clean Waveform: An example of a section of uniform ECG data with a relatively even waveform and voltage level.
Figure 5. Representative graph of continuous HR (y-axis) in μv) across time (x-axis in s) of a raw electrocardiogram (ECG) prior to cleaning. Data Prior to Cleaning: A 30 sec segment of ECG data from Subject 01 Game 3 during the conditioning phase is shown. Some peaks have been missed and some are incorrectly labeled due to high voltage variability. Please click here to view a larger version of this figure.
Figure 6. Representative graph of continuous HR (y-axis) in μv) across time (x-axis in s) of a raw electrocardiogram (ECG) after clearning. Data Post cleaning: The same 30 sec of ECG data from Subject 01 Game 3 after it has been properly labeled as described in Section 3 of the protocol. Please click here to view a larger version of this figure.
Phase | Time | THR Zone | Game Features |
Resting | 5 min | Baseline rest | NA |
Warm-up | 5 min | 40-60% mHR | 4 objects + 4 hazards; slower speed |
Conditioning | 10 min | 60-80% mHR | 8 objects + 0 hazards; faster speed |
Cool-down | 5 min | 40-60% mHR | 4 objects + 4 hazards; slower speed |
Recovery | 5 min | Baseline rest | NA |
KEY: THR = Target Heart Rate; NA = Not applicable |
Table 1. Active video game (AVG) game phases. KEY: Target heart rate (THR); NA (Not applicable).
Subject | AVG | Game | Warmup Start | Conditioning Start | Cooldown Start | Recovery Start |
(MM/DD/YYYY) | (MM/DD/YYYY) | (MM/DD/YYYY) | (MM/DD/YYYY) | |||
(HH:MM:SS) | (HH:MM:SS) | (HH:MM:SS) | (HH:MM:SS) | |||
1 | 4 | 1 | 11/25/2015 | 11/25/2015 | 11/25/2015 | 11/25/2015 |
1 | 4 | 1 | 16:33:53 | 16:39:03 | 16:49:04 | 16:54:09 |
1 | 4 | 2 | 11/25/2015 | 11/25/2015 | 11/25/2015 | 11/25/2015 |
1 | 4 | 2 | 17:27:47 | 17:32:57 | 17:43:01 | 17:48:03 |
1 | 4 | 3 | 11/25/2015 | 11/25/2015 | 11/25/2015 | 11/25/2015 |
1 | 4 | 3 | 18:25:22 | 18:30:33 | 18:40:35 | 18:45:38 |
2 | 4 | 1 | 4/10/2016 | 4/10/2016 | 4/10/2016 | 4/10/2016 |
2 | 4 | 1 | 11:59:19 | 12:04:29 | 12:14:36 | 12:19:50 |
2 | 4 | 2 | 4/10/2016 | 4/10/2016 | 4/10/2016 | 4/10/2016 |
2 | 4 | 2 | 12:40:25 | 12:45:37 | 12:55:44 | 13:00:53 |
2 | 4 | 3 | 4/10/2016 | 4/10/2016 | 4/10/2016 | 4/10/2016 |
2 | 4 | 3 | 13:19:57 | 13:25:02 | 13:35:04 | 13:40:11 |
3 | 4 | 1 | 11/18/2015 | 11/18/2015 | 11/18/2015 | 11/18/2015 |
3 | 4 | 1 | 17:08:10 | 17:13:20 | 17:23:21 | 17:28:28 |
3 | 4 | 2 | 11/18/2015 | 11/18/2015 | 11/18/2015 | 11/18/2015 |
3 | 4 | 2 | 17:59:46 | 18:04:48 | 18:14:54 | 18:19:55 |
3 | 4 | 3 | 11/18/2015 | 11/18/2015 | 11/18/2015 | 11/18/2015 |
3 | 4 | 3 | 18:42:03 | 18:47:03 | 18:57:04 | 19:02:02 |
Table 2. Timing File KEY: AVG = Active video game
ID_AVG_Game | AVNN (s) | Avg HR (bpm) | RMSSD (ms) | SDNN (ms) | NN50 | pNN50 (%) | LF / HF (ECG) | LF / HF (RR) | LFP (RR) | HFP (RR) | ||
03_AVG4_G1_Rest | 719.875 | 83.347 | 29.827 | 55.604 | 35 | 8.393 | 1.328 | 0.602 | 0.123 | 0.204 | ||
03_AVG4_G1_WU | 656.373 | 91.411 | 26.52 | 50.372 | 28 | 5.932 | 1.288 | 0.675 | 0.125 | 0.185 | ||
03_AVG4_G1_Con 1 -5 | 557.772 | 107.57 | 20.651 | 43.932 | 4 | 0.743 | 1.187 | 0.76 | 0.119 | 0.157 | ||
03_AVG4_G1_Con 6 10 | 532.483 | 112.679 | 27.771 | 33.481 | 9 | 1.599 | 1.244 | 0.809 | 0.118 | 0.146 | ||
03_AVG4_G1_Con 2 – 7 | 538.546 | 111.41 | 20.389 | 34.351 | 6 | 1.077 | 1.198 | 0.819 | 0.118 | 0.144 | ||
03_AVG4_G1_Con 3 – 8 | 530.761 | 113.045 | 27.756 | 34.26 | 8 | 1.413 | 1.192 | 0.826 | 0.118 | 0.143 | ||
03_AVG4_G1_Cool | 597.019 | 100.499 | 31.806 | 41.96 | 16 | 3.181 | 1.281 | 0.712 | 0.120 | 0.169 | ||
03_AVG4_G1_Recovery | 665.511 | 90.156 | 42.136 | 70.698 | 57 | 12.639 | 1.301 | 0.636 | 0.122 | 0.191 | ||
AVNN = Average NN Interval; Avg HR = Average heart Rate; RMSSD = Root Mean Square of Successive Differences; SDNN – Standard Deviation of NN Interval; NN50 = Number of NN Intervals > 50 ms; pNN50 = % of NN intervals > 50 ms; LF = Low Frequency Power; HF = High Frequency Power; LF/HF = Low Frequency – High Frequency Ratio. bpm = beats per minute; ms = milliseconds; ECG = Electrocardiogram – which contains the QRS complex; RR = where R is a point associated with a peak of the QRS complex of the ECG wave and RR is the interval between successive R points; |
Table 3. Heart Rate Variability (HRV) Data for Subject 03 Game 01
Table 4. Descriptive Statistics of Heart Rate Variability Measures for Various Phases of Exercise for Each Game Please click here to download this table.
Gender | GMFCS Level | Clinical Diagnosis | Movement Disorder | Dominant Side | Height (cm) | Weight (kg) | BMI (kg/m2) | BMI percentile |
boy | 2 | diplegia | dystonia | right | 161.20 | 47.60 | 18.32 | 17.00 |
boy | 3 | diplegia | spasticity | left | 141.17 | 49.20 | 24.70 | 95.00 |
boy | 2 | left hemiplegia | spasticity | right | 165.80 | 50.50 | 18.40 | 13.00 |
boy | 3 | diplegia | spasticity | right | 154.30 | 57.00 | 23.90 | 83.00 |
girl | 2 | left hemiplegia | spasticity | right | 161.20 | 60.30 | 22.86 | 71.00 |
girl | 2 | left hemiplegia | spasticity | right | 146.40 | 40.80 | 19.00 | 30.00 |
girl | 2 | right hemiplegia | spasticity | left | 154.60 | 64.00 | 26.80 | 85.00 |
girl | 3 | left hemiplegia | spasticity | right | 166.10 | 61.20 | 22.20 | 42.00 |
boy | 2 | left hemiplegia | spasticity | right | 168.10 | 49.70 | 17.60 | 51.00 |
boy | 3 | diplegia | spasticity | right | 135.00 | 29.80 | 16.00 | 43.00 |
KEY: GMFCS= Gross Motor Function Classification System; BMI= Body Mass Index |
Table 5. Patient demographics
Ten youth with CP participated in this study (mean + SD) [ age (yrs) = 15.53 ± 3.57 ; height (cm) 154.8 ± 12.6; weight (kg) 50.69 ± 11.1; body mass index (BMI) 50.46 ± 29.2; mHR 9 bpm) = 186.8 ± 12.4]. Please see Table 5 for patient demographics.
There are some considerations for use of HR monitors and the associated measures of HR and HRV which relate to modifications and troubleshooting. Two issues that are apparent, regardless of the technology employed to acquire the data are: 1) motion artifacts and 2) ectopic beats. The problems that arise from motion artifacts and ectopic beats are typically addressed through post-processing activities subsequent to the acquisition of the RR interval12,13,18,22,26. Troubleshooting post-processing manipulations require consideration of the temporal fluctations in HR which highlight respiratory sinus arrythmias as well as calculation of the normalized HRV values so differentiations can be made between physiologically and mathematically mediated changes in HRV13,27,29.
Limitations in HRV measurements were initially identified with the application of spectral analysis techniques (i.e., frequency domain measures)13,27,29. There are physiological considerations which include the respiratory sinus arrythmias, cardiovascular drift, hydration status and environmental factors (e.g., temperature, heat, cold, altitude) that are associated with day-to-day variations in HR27,29. Mathematical considerations involve time domain measures (e.g., SDNN, r-MSSD, pNN-50 index) as well as the recent inclusion of non-linear dynamic analysis techniques13,27,29. To correctly interpret the various HRV measures we need to consider whether the body is in a state of rest or stress. Typically we expect parasympathetic influences when the body is rested which increased variability in the responses and results in higher HRV while during stress we expect sympathetic influences which reduce variability and have lower HRV measures. The limitations in HRV measurements can influence the accuracy autonomic balance hypothesis is associated with the LF/HF ratio. This hypothesis assumes that the sympathetic nervous system and parasympathetic nervous system are in competition to regulate SA node firing. The authors note tha the LF/HR ratio needs to be interpreted with caution while noting the context of obtaining information as well as reviewing the LF and HF values. Concerning the application of LF/HF ratio to AVG games in short-term episodes of HR measurements and HRV, a high LF/HF ratio may indicate higher sympathetic activity that may be observed when meeting a challenge that requires effort and increases the sympathetic nervous system activation35.
It is important to use optimal measures to determine aerobic performance and capacity in youth with CP to examine appropriate intervention dosing and effectiveness6,11. Clinical standards of care most often include measuring HR to determine intervention dosing (intensity)6,11. However the inherent variability in HR measures make it difficult to determine actual workoad in aerobic training12,13,22,27. Therefore, this methodology of calculating HRV from ECG data from a HR monitor provides a more accurate measure to assess intervention outcomes27,28. Also, the HRV measures provide new information on the autonomic nervous system responses, adaptation and recovery during the AVG exercise12,13,29,34,35. We posit that application of HRV measures during short durration exercise may provide information on the improvement of the physiological systems based on work by Kerppers and colleagues with a short duration32.
Noted here are the important applications we have made relative to the existing applications of HR monitoring and HRV measures during exercise performance. This methodology allows the user to extract RR intervals and HRV measures from ECG waveforms during gaming physical activities in youth with CP. The method is currently tailored towards AVG sessions in a specific game but could easily be adapted to other protocols and ECG devices for future experiments. In cases where the data are uniform and the ECG recording device is well fitted to the subject, this protocol will allow for quick data processing with minimal input from the user. However, in the case of non-uniform data with large variances in signal amplitude the protocol will require user input to correctly label missed peaks and to remove false positives from the data set. In the future this method may be improved with a more robust detection method to reduce user aid for peak detection and correction (e.g., non-linear dynamic analysis techniques29).
Throughout execution of the protocol, it is essential that the following critical steps are performed. It is important to ensure a high level of signal confidence throughout data collection sessions to reduce the processing and peak correction time required. This can be improved by ensuring that the ECG recording device is making proper contact with the subject prior to each session. It is also important to keep the conductive contacts moist during the sessions which can be done by rewetting the recorder prior to each session. As well, after the data are collected, post-processing activities need to address the methodological considerations with time domain measures, frequency domain measures, non-linear dynamic analyses as well as calculating normalized HRV values to distinguish between physiologically derived and mathematically mediated changes in HRV12,13,29.
Considerations for future work include application of HRV measurements for children and adults involved in physically challenging activities of different intensities and body positions6,7,8,9,10,17,23,26,29, cognitively challenging games and mental workload24,25,26,27, virtual and simulation type experiences, assessment of overtraining23,31, quality of sleep assessments13,26,27,31, chronic fatigue, physical exhaustion and combat readiness31 as well as the vagal connection between HR and the brain regarding prosocial behavior30.
The authors have nothing to disclose.
The authors thank the participants and their families for their time and effort expended for participation in the study. As well, the authors acknowledge Dr. Yichuan Liu and Dr. Hasan Ayaz for their assistance with the timing calculation of the HR monitoring and Dr. Paul Diefenbach for development of the KOLLECT Active Video Gaming software. Funding for this work was provided by Coulter Foundation Grants #00006143 (O’Neil; Diefenbach, PIs) and #00008819 (O’Neil; Diefenbach, PIs).
BioHarness Bluetooth Module (Electronics sensor) | Zephyr | 9800.0189 | Detects Heart Rate, Resiration Rate, Posture, and Skin Temperature. |
BioHarness Chest Strap | Zephyr | 9600.0189, 9600.0190 | Sizes Small XS-M, Large M-XL |
BioHarness Charge Cradle & USB Cable | Zephyr | 9600.0257 | Used to Transfer Data from the Module to a Computer for Analysis. |
BioHarness Echo Gateway | Zephyr | 9600.0254 | Allows for Realtime Viewing of Subject's Heart Rate. |
MATLAB R2016a | Mathworks | 1.7.0_.60 | Used for All Programming. |