ecg⼼率和ppg⼼率区别_基于ppg的⼼率变异性hrv分析的伪影
去除
ecg⼼率和ppg⼼率区别
Artifact removal is probably the most important and (unfortunately) most overlooked step of the signal processing pipeline required to compute HRV features
⼀个rtifact去除可能是最重要的,(可惜)最容易被忽视需要计算HRV功能的信号处理管道的步骤
While all beat to beat data should go through artifact removal (even when collected with ECG or chest straps, as ectopic beats would still be prent under the circumstances, e an example ), the issue becomes particularly important for PPG measurements, as they are more prone to noi (which means that it’s easier to mess up the signal, just by moving)
尽管所有⼼跳数据都应通过伪影去除(即使使⽤⼼电图或胸带收集,因为在这种情况下仍会出现异位⼼跳,请参见的⽰例),但对于PPG测量⽽⾔,这个问题变得尤为重要更容易产⽣噪声(这意味着仅通过移动就更容易弄乱信号)
The issue of artifact removal is particularly important for HRV analysis. In particular, even a single artifact over a 5 minutes window, can have very large conquences in terms of the derived HRV features (we’ll e an example in a minute). Camera-bad apps, watches, rings, wristbands, are all affected by the issues as soon as you move
去除伪影的问题对于HRV分析尤其重要。 特别是,即使在5分钟的窗⼝内只有⼀个⼯件,也可能在派⽣的HRV功能⽅⾯产⽣⾮常⼤的后果(我们将在稍后看到⼀个⽰例)。 ⼀旦您移动,基于相机的应⽤程序,⼿表,戒指,腕带都会受到这些问题的影响
Thus, if our goal is to correctly compute HRV features in healthy individuals (i.e. individuals without cardiac issues), we need to do our best to clean the beat to beat intervals from any artifacts, regardless of their origin (actual ectopic beats, or
issues becau the ur was moving)
因此,如果我们的⽬标是正确计算健康个体(即⽆⼼脏问题的个体)的HRV特征,则我们需要尽⼒清除节拍以消除任何伪影的间隔,⽆论其来源如何(实际异位搏动或问题)因为⽤户在移动)
问题有多严重? (How bad is the problem?)
Really bad
特别糟糕
This is why 99% of smartwatches on the market do not even bother with HRV analysis and target only heart rate estimation, which still doesn’t really work consistently when exercising (if you are rious about your exerci heart rate, plea get a chest strap)
这就是为什么市场上99%的智能⼿表都不会为⼼率变异性分析⽽烦恼,⽽只针对⼼率估算,这在运动时仍然⽆法始终如⼀地⼯作(如果您对运动⼼率很认真,请系好胸带)
The few devices that do go through the trouble of doing HRV analysis, normally do so while you sleep (e.g. an Oura ring or Fitbit), or using a specific nsing modality (e.g. the Scosche Rhythm24 HRV mode or the Apple Watch using the Breathe app). This choice makes a lot of n as if you are sleeping or doing a breathing exerci, you are not moving that much.
很少有遇到HRV分析⿇烦的设备,通常会在您睡觉时(例如,Oura环或Fitbit)或使⽤特定的感应⽅式(例如,Scosche Rhythm24 HRV模式或使⽤“呼吸”应⽤程序的Apple Watch)进⾏)。 这种选择很有意义,
就好像您正在睡觉或进⾏呼吸运动时,您并没有动那么多。
Additionally, given the limited utility of HRV analysis during exerci, as long as you are able to collect high-quality data at rest or during the night, you are good to go (you can learn more about heart rate variability and when to measure, in our guide ).
此外,鉴于运动期间HRV分析的作⽤有限,只要您能够在休息或夜间收集⾼质量的数据,就可以继续进⾏(您可以了解有关⼼率变异性以及何时进⾏测量的更多信息,我们的导游在)。
For phone or camera-bad measurements, similar to the ones we u in or , issues are typically caud by finger movement, as the apps are ud while at rest, and therefore there is no body movement
对于基于电话或摄像头的测量,类似于我们在或使⽤的,问题通常是由⼿指移动引起的,因为应⽤程序在静⽌时使⽤,因此没有⾝体移动Let’s look at one example:
让我们看⼀个例⼦:
Above we have one minute of PPG data, including detected peaks. In general, the data shown here is good quality, however, there are some clear artifacts (e.g. in the cond row, causing a spike and abnormal gap between beats)
上⽅有⼀分钟的PPG数据,包括检测到的峰。 通常,此处显⽰的数据质量很好,但是存在⼀些明显的伪影(例如,在第⼆⾏中,导致峰值和拍⼦之间的异常间隙)
海尔广告During this test ECG data was collected simultaneously, ud to extract reference RR intervals, and compute rMSSD, which was 163ms. If we u the PPG data and detected peaks we have here to compute rMSSD, we get 229ms (which is a large difference for this metric, repeated measures are in the 5–15ms difference range).
在此测试期间,同时收集ECG数据,⽤于提取参考RR间隔并计算163ms的rMSSD。 如果我们使⽤PPG数据和检测到的峰值来计算rMSSD ,我们将获得229ms (对于该指标⽽⾔,这是⼀个很⼤的差异,重复测量的差异在5-15ms范围内)。
The few artifacts prent have a large effect on our output metric, and therefore we need to address the issue or the data collected will be rather uless. Note that this problem normally does not affect resting heart rate (60 beats over a minute are still 60 beats even if a couple of them are out of place,
hence this is key only in the context of HRV analysis normally)
当前出现的少量⼯件对我们的输出指标有很⼤的影响,因此我们需要解决这个问题,否则收集的数据将⾮常⽆⽤。 请注意,此问题通常不会影响静息⼼率(即使其中⼏个位置不正确,⼀分钟内60次⼼跳仍然是60次⼼跳,因此,这仅在正常HRV分析的情况下才是关键)
三个步骤中的基本⼯件清除 (Basic artifact removal in three steps)
There are many different methods that can be ud to remove artifacts. Something that I found to be effective when波撼岳阳城上一句
looking at data over a broad range of HRV values and PPG-related issues, is the following:
有许多不同的⽅法可⽤于删除⼯件。 在查看有关⼴泛的HRV值和PPG相关问题的数据时,我发现有效的⽅法如下:
1. Remove extreme values (range filter, typically anything that does not result in an instantaneous heart rate between 20
飞得最久的纸飞机and 200+ bpm, depending on the application, e.g. resting physiology or exerci)
删除极限值(范围过滤器,通常根据20到200+ bpm的瞬时⼼率⽽定,这取决于应⽤程序,例如休息⽣理或运动)
2. Remove beat to beat abnormalities. This means removing beat to beat differences that for example are more than X%,
which is not physiologically possible. X should change bad on the actual baline HRV of the person, as the common thresholds (20–25%) can overcorrect. Overcorrection tends to be a minor problem for nonathletes but should be accounted for in a population with particularly high HRV values
删除拍⼦以消除拍⼦异常。 这意味着去除拍⼦之间的拍⼦差异,例如⼤于X%,这在⽣理上是不可能的。 X应该根据⼈的实际基线HRV进⾏更改,因为常见阈值(20–25%)可能会过⾼。 对于⾮运动员,过度矫正往往是⼀个⼩问题,但应在HRV值特别⾼的⼈群中解决
3. Remove remaining outliers. After the previous steps, we could still have some outliers, especially if we are less strict
with the abnormalities filter (say we u 50–70% for athletes, then there will be more artifact that we actually need to remove). For this filter, I found (empirically) the following thresholds to work well: 0.10–0.25 * 25th and 75th
percentiles of the clean data.
删除剩余的异常值。 在前⾯的步骤之后,我们仍然可能有⼀些异常值,特别是如果我们对异常过滤器的要求不严格(例如,我们对运动员使⽤50%到70%的数据,那么实际上我们将需要删除更多的假象)。 对于此过滤器,我发现(凭经验)以下阈值可以正常⼯作:
0.10–0.25 *原始数据的25%和75% 。
In our apps, we u the methods plus a few extra steps that can be feature-dependent, or person-dependent, as well as optimized thresholds bad on the person’s historical data and group-level parameters. However, in almost all cas, what is reported above is already sufficient, as we will e in the validation below
在我们的应⽤程序中,我们使⽤这些⽅法以及⼀些可能与功能相关或与⼈员相关的额外步骤,以及基于⼈员的历史数据和组级别参数的优化阈值。 但是,在⼏乎所有情况下,上⾯报告的内容已经⾜够,正如我们在下⾯的验证中看到的那样
Let’s first look at our example, we can e here in yellow the valid peaks after artifact removal:
让我们⾸先看⼀下我们的⽰例,我们可以在这⾥以黄⾊看到去除伪影后的有效峰:
Lets now look at the PP (and RR) intervals. PP intervals are the beat to beat differences computed after detecting individual beats in our PPG (or ECG, called RR intervals in this ca) data. When we visualize PP intervals over time, normally we can spot easily any artifacts (spikes) as well as any other issues, since the time ries should look very similar between nsing modalities (phone camera, chest strap, or ECG).
现在让我们看⼀下PP(和RR)间隔。 PP间隔是在我们的PPG (或ECG,在此情况下称为RR间隔)数据中检测到单个拍后计算出的拍差。 当我们可视化随时间变化的PP间隔时,通常我们可以轻松发现任何伪像(尖峰)以及任何其他问题,因为时间序列在传感⽅式(⼿机摄像头,胸带或ECG)之间看起来⾮常相似。
In the figure below, we have in the top plot our camera-bad PP intervals (in dark blue before artifact correction, while in light blue after artifact correction), as well as RR intervals reported by a Polar chest strap (cond row) and computed from reference ECG data (third row). We can also e the participant’s breathing pattern (about 10 oscillations per minute)
在下图中,我们在顶部绘制了基于相机的PP间隔(在伪影校正前为深蓝⾊,在伪影校正后为浅蓝⾊),以及Polar胸带报告的RR间隔(第⼆⾏)和根据参考ECG数据计算得出(第三⾏)。 我们还可以看到参与者的呼吸模式(每分钟约10次振荡)
学抄菜
As previously discusd, rMSSD for artifacted data in this example was 229m. On the other hand, after artifact removal rMSSD for the camera-bad algorithm is 166ms (hence very clo to the 163ms of our reference, ECG). Again,
differences in concutive measurements, even using ECG, are in the 5–15ms range, hence our difference here is negligible and we were able to effectively remove all artifacts and estimate HRV correctly (you can find more information on repeated measures for PPG, chest strap and ECG data, ).
管理的本质
如前所述,此⽰例中⽤于伪造数据的rMSSD为229m 。 另⼀⽅⾯,去除伪影后,基于相机的算法的rMSSD为166ms (因此与我们的参考ECG的163ms⾮常接近)。 同样,即使使⽤ECG,连续测量的差异也在5–15ms范围内,因此我们的差异可以忽略不计,并且我们能够有
效去除所有伪像并正确估计HRV (您可以找到有关重复测量PPG的更多信息,胸带和ECG数据,)。
美丽的小兴安岭教学反思
It is of cour key to develop a method that works over a broad range of HRV values (and not only for the person shown in the figures above). Typical values we e for rMSSD in healthy individuals are between 10 and 250ms美景小学
当然,开发⼀种可在较宽的HRV值范围内⼯作的⽅法(不仅限于上图中所⽰的⼈员)是关键。 我们在健康个体中看到的rMSSD的典型值在10到250ms之间
弘扬中华传统文化Let’s look at the results of the method described above for about 100 recordings. In the figure, I also report the
correlation and root mean square error between rMSSD computed from ECG and PPG. We want the correlation to be very high (clo to 1) and rm to be very low (realistically, below 10ms)
让我们看⼀下上述⽅法对⼤约100条记录的结果。 在图中,我还报告了从ECG和PPG计算出的rMSSD之间的相关性和均⽅根误差。 我们希望相关性⾮常⾼(接近1),⽽rm⾮常低(实际上,低于10ms)
First, let’s look at the results without any artifact removal:
⾸先,让我们看⼀下没有去除任何⼯件的结果: