{"id":871,"date":"2016-01-28T15:48:39","date_gmt":"2016-01-28T20:48:39","guid":{"rendered":"https:\/\/support.mindwaretech.com\/?post_type=ht_kb&#038;p=871"},"modified":"2018-06-12T11:16:19","modified_gmt":"2018-06-12T15:16:19","slug":"kb0034","status":"publish","type":"ht_kb","link":"https:\/\/support.mindwaretech.com\/knowledge-base\/kb0034\/","title":{"rendered":"KB0034: How to Use R Peak Detection Settings"},"content":{"rendered":"<p>Detecting the R peak on the ECG waveform is crucial to deriving statistics related to Heart Rate Variability (HRV) and Impedance Cardiography (IMP). \u00a0In\u00a0the MindWare HRV and IMP\u00a0applications, you will find a tab labeled\u00a0<strong>R Peak and Artifact Settings<\/strong> which contains within it settings related to the automatic R peak identification in the application. Setting these properly can minimize editing time and reduce potential error.<\/p>\n<p><strong><em>Select analysis version to view the applicable content:<\/em> <\/strong><select class='consel_dropdown consel_name_app'>\n<option value='app_none'>Choose...<\/option>\n<option value='app_three_two'>3.2<\/option>\n<option value='app_three_one'>3.1<\/option>\n<\/select><\/p>\n<span class=\"consel_content consel_name_app consel_sel_app_three_one\">\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1.png\" rel=\"attachment wp-att-971\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-971 size-full\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1.png\" alt=\"Peak Detection Settings\" width=\"1032\" height=\"736\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1.png 1032w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-300x214.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-768x548.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-1024x730.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-920x656.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-600x428.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peak-Detection-Settings-1-320x228.png 320w\" sizes=\"auto, (max-width: 1032px) 100vw, 1032px\" \/><\/a><\/p>\n<p>By default, the HRV and IMP applications automatically detect R peaks based on an algorithm which takes into account expected characteristics of an R peak including:<\/p>\n<ul>\n<li>Slope of waveform ascent<\/li>\n<li>Sharpness of peak<\/li>\n<li>Amplitude of peak relative to the rest of the waveform<\/li>\n<\/ul>\n<p>The adjustable parameter for this algorithm is the\u00a0<strong>Peak Detection Sensitivity<\/strong>, which allows you to specify how precisely a peak needs to fit the above criteria for it to be marked as an R peak. The lower the sensitivity, the most closely it must match the expected characteristics of an R peak.<\/p>\n<p>The default peak detection algorithm works great for the majority of ECG signals, but certain irregularities in the signal can render the algorithm less effective. Take for example a large amplitude spike in the ECG waveform:<\/p>\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected.png\" rel=\"attachment wp-att-966\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-966 size-full\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected.png\" alt=\"Peaks not Detected\" width=\"1027\" height=\"740\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected.png 1027w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-300x216.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-768x553.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-1024x738.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-920x663.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-600x432.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-not-Detected-320x231.png 320w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/a><\/p>\n<p>In this situation, the large amplitude spike has disrupted the algorithm in such a way that peaks which are clearly visually identified as R peaks have not been marked as such. Of course you could manually insert each of these peaks using the R Peak Editor, but a much faster way would be to change the peak detection algorithm to\u00a0<strong>Manual Override<\/strong>.<\/p>\n<p><em><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override.png\" rel=\"attachment wp-att-967\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-967 size-full\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override.png\" alt=\"Manual Override\" width=\"1027\" height=\"740\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override.png 1027w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-300x216.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-768x553.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-1024x738.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-920x663.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-600x432.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Manual-Override-320x231.png 320w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/a><\/em><\/p>\n<p><strong>Manual Override<\/strong> peak detection simply identifies all peaks found above a given voltage threshold as an R peak. While this isn&#8217;t necessarily ideal for an ECG waveform with baseline movement (which can be helped by enabling the <strong>Baseline and Muscle Noise Filter<\/strong> found on the same tab), it is great for the signal seen in the example above. By setting the voltage threshold appropriately, we go from many manual peak insertions to a single manual point deletion.<\/p>\n<p><em>Note &#8211; The <strong>Peak Detection Settings\u00a0<\/strong>can be modified on a segment-by-segment basis depending on the signal characteristics of the given segment by pressing the\u00a0<strong>Peak Detection<\/strong> button on the analysis screen. The chosen settings are reported in the Excel output file for each segment as well.<\/em><\/p>\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected.png\" rel=\"attachment wp-att-968\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-968 size-full\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected.png\" alt=\"Peaks Detected\" width=\"1027\" height=\"740\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected.png 1027w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-300x216.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-768x553.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-1024x738.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-920x663.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-600x432.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Peaks-Detected-320x231.png 320w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/a><\/p>\n<p>Now with a single simple edit, the segment is usable.<\/p>\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks.png\" rel=\"attachment wp-att-969\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-969 size-full\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks.png\" alt=\"Edited Peaks\" width=\"1027\" height=\"740\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks.png 1027w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-300x216.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-768x553.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-1024x738.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-920x663.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-600x432.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2016\/01\/Edited-Peaks-320x231.png 320w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/a><\/p>\n<\/span>\n<span class=\"consel_content consel_name_app consel_sel_app_three_two\">\n<p>By default, the application will automatically detect R peaks using the <a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S1746809411000292\">Shannon Energy Envelope technique<\/a>\u00a0which has been shown to be highly successful even in difficult situations such as motion artifact and abnormal morphology. If you have a particularly abnormal ECG series, or you are using a different signal to study HRV (such as plethysmography), you may want to instead use an absolute threshold peak detector. To do this, enable <strong>Manual Override<\/strong> on the <strong>R Peak &amp; Artifact Settings<\/strong> tab and adjust the\u00a0<strong>Threshold (volts)<\/strong> to just below the expected fiducial point amplitude.<\/p>\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4874\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override.png\" alt=\"\" width=\"1015\" height=\"676\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override.png 1015w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-300x200.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-768x511.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-50x33.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-920x613.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-600x400.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Manual-Override-320x213.png 320w\" sizes=\"auto, (max-width: 1015px) 100vw, 1015px\" \/><\/a><\/p>\n<p>This may be easier to determine when actually looking at the data. These peak detection settings are also available from the analysis screen by pressing the blue\u00a0<strong>Peak Detection<\/strong> button.<\/p>\n<p><a href=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4875\" src=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings.png\" alt=\"\" width=\"1045\" height=\"752\" srcset=\"https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings.png 1045w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-300x216.png 300w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-768x553.png 768w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-1024x737.png 1024w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-50x36.png 50w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-920x662.png 920w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-600x432.png 600w, https:\/\/support.mindwaretech.com\/wp-content\/uploads\/2018\/06\/Peak-Detection-Settings-320x230.png 320w\" sizes=\"auto, (max-width: 1045px) 100vw, 1045px\" \/><\/a><\/p>\n<\/span>\n","protected":false},"excerpt":{"rendered":"<p>Detecting the R peak on the ECG waveform is crucial to deriving statistics related to Heart Rate Variability (HRV) and Impedance Cardiography (IMP). \u00a0In\u00a0the MindWare HRV and IMP\u00a0applications, you will find a tab labeled\u00a0R Peak and Artifact Settings which contains within it settings related to the automatic R peak identification [&hellip;]<\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"ht-kb-category":[40,39,3],"ht-kb-tag":[109,44,94,29,30,108,107],"class_list":["post-871","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-imp","ht_kb_category-hrv","ht_kb_category-analysis","ht_kb_tag-detection","ht_kb_tag-ecg","ht_kb_tag-editing","ht_kb_tag-hrv","ht_kb_tag-imp","ht_kb_tag-peak","ht_kb_tag-r-peak"],"_links":{"self":[{"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/comments?post=871"}],"version-history":[{"count":12,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb\/871\/revisions"}],"predecessor-version":[{"id":4876,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb\/871\/revisions\/4876"}],"wp:attachment":[{"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb-category?post=871"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/support.mindwaretech.com\/wp-json\/wp\/v2\/ht-kb-tag?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}