User Tools

Site Tools


visual3d:tutorials:emg:automatic_emg_events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:tutorials:emg:automatic_emg_events [2024/06/19 14:05] – created sgrangervisual3d:tutorials:emg:automatic_emg_events [2024/10/09 14:42] (current) – Fixed external links. wikisysop
Line 1: Line 1:
 +====== Automatic EMG Events ======
 +
 \\ \\
  
  
-===== Overview =====+==== Overview ====
  
 Processing motion files with multiple EMG signals can become tedious when manually extracting events and identifying points of “rest”. We can manually detect sections of minimal activity within a motion trial to set as a reference threshold. Using the data download from [[Visual3D:Tutorials:EMG:Typical_EMG_Processing|Tutorial EMG]], we can look at automatically detecting periods of low muscle activity to help us auto populate EMG onset/offset detection. Processing motion files with multiple EMG signals can become tedious when manually extracting events and identifying points of “rest”. We can manually detect sections of minimal activity within a motion trial to set as a reference threshold. Using the data download from [[Visual3D:Tutorials:EMG:Typical_EMG_Processing|Tutorial EMG]], we can look at automatically detecting periods of low muscle activity to help us auto populate EMG onset/offset detection.
Line 18: Line 20:
   - Visualize the event detection and demonstrate the effects of changing the meta parameters   - Visualize the event detection and demonstrate the effects of changing the meta parameters
  
-===== Preparing for the Tutorial =====+==== Preparing for the Tutorial ====
  
-**Tutorial data download**: Files used in this tutorial can be found here: [[[https://www.has-motion.com/download/examples/EMG_Tutorial.zip|EMG Tutorial]]]+**Tutorial data download**: Files used in this tutorial can be found here: [[https://www.has-motion.com/download/examples/EMG_Tutorial.zip|EMG Tutorial]]
  
 The following pipeline has been provided as a **meta_function**, and you may copy and paste it into your **Visual3D x64 > Plugins > Meta-Commands** folder. For more information on Meta-Commands and how they work, follow see [[Visual3D:Documentation:Pipeline:Meta_Commands:Meta_Commands_Overview|here]]. The following pipeline has been provided as a **meta_function**, and you may copy and paste it into your **Visual3D x64 > Plugins > Meta-Commands** folder. For more information on Meta-Commands and how they work, follow see [[Visual3D:Documentation:Pipeline:Meta_Commands:Meta_Commands_Overview|here]].
  
-**Meta-Commands download**: Meta-Command file found here: [[[https://www.has-motion.com/download/examples/EMG/Automatic_EMG_Events.v3m|Automatic_EMG_Events]]]+**Meta-Commands download**: Meta-Command file found here: [[https://www.has-motion.com/download/examples/EMG/Automatic_EMG_Events.v3m|Automatic_EMG_Events]]
  
-===== Loading Data and Calling the Meta-Function =====+==== Loading Data and Calling the Meta-Function ====
  
 Open the **trial_1.c3d** file from the Tutorial download into Visual3D. Open the **trial_1.c3d** file from the Tutorial download into Visual3D.
Line 53: Line 55:
 </code> </code>
  
-===== Processing and Filtering Raw EMG Signals =====+==== Processing and Filtering Raw EMG Signals ====
  
 This meta command can be used to process EMG data in two ways; First, through the **moving RMS** filtering to remove noise from the analog signal while maintaining overall power, amplitude and energy, muscle activation patterns, and fatigue properties [**1**]. Second, **TKEO** will be used on the raw signals to perform a more rigorous filtration that will allow for onset/offset contraction detection. The **TKEO** will reduce power and amplitude but is more accurate when finding exact timing of events [**2**]. This meta command can be used to process EMG data in two ways; First, through the **moving RMS** filtering to remove noise from the analog signal while maintaining overall power, amplitude and energy, muscle activation patterns, and fatigue properties [**1**]. Second, **TKEO** will be used on the raw signals to perform a more rigorous filtration that will allow for onset/offset contraction detection. The **TKEO** will reduce power and amplitude but is more accurate when finding exact timing of events [**2**].
Line 174: Line 176:
 </code> </code>
  
-===== Detecting Low Activity Signal Regions =====+==== Detecting Low Activity Signal Regions ====
  
-{{ENVELOPE.png}}+{{:ENVELOPE.png}}
  
 This section will essentially perform on/off detection of the **ENVELOPE** signal with an arbitrary baseline that we define with a user-given parameter. This section will essentially perform on/off detection of the **ENVELOPE** signal with an arbitrary baseline that we define with a user-given parameter.
Line 288: Line 290:
 </code> </code>
  
-===== Onset/Offset Detection =====+==== Onset/Offset Detection ====
  
 Now that we have **ASCENT** and **DESCENT** events of our EMG envelopes, we can consider low activity or “rest” periods to be between descent - ascent events. The reason we cannot officially define these events as **onset** or **offset** of the muscle, is because it is more correct to use the **TKEO** signal with a threshold of **median + 3*stdv** of the “resting” signal. So now we have identified the resting periods of each signal and can find our official **onset** and **offset** thresholds. Now that we have **ASCENT** and **DESCENT** events of our EMG envelopes, we can consider low activity or “rest” periods to be between descent - ascent events. The reason we cannot officially define these events as **onset** or **offset** of the muscle, is because it is more correct to use the **TKEO** signal with a threshold of **median + 3*stdv** of the “resting” signal. So now we have identified the resting periods of each signal and can find our official **onset** and **offset** thresholds.
Line 428: Line 430:
 </code> </code>
  
-===== Visualizing Event Detection =====+==== Visualizing Event Detection ====
  
 There we go! We have automatically found onset and offset for all signals, and can look at these events in our data. Before this, we end the for loop for the meta-function. There we go! We have automatically found onset and offset for all signals, and can look at these events in our data. Before this, we end the for loop for the meta-function.
Line 438: Line 440:
 </code> </code>
  
-{{TKEO_NEW.png}}+{{:TKEO_NEW.png}}
  
-{{ZOOMED.png}}+{{:ZOOMED.png}}
  
 We can now take a look at our onset and offset detection. We can now take a look at our onset and offset detection.
Line 452: Line 454:
 We can see from these figures that there are a lot of **ON** and **OFF** detections for the **TKEO** signal. This is due to a lot of fluctuation and noise in the signal, and the threshold is passed through many times where there is large muscle activity. We can see from these figures that there are a lot of **ON** and **OFF** detections for the **TKEO** signal. This is due to a lot of fluctuation and noise in the signal, and the threshold is passed through many times where there is large muscle activity.
  
-If you find the automatic detection is identify data fluctuation that is too low in amplitude for your liking, we can adjust the **ThresholdPercent** parameter to change this. For example, this meta-command was re-run on this data using **ThresholdPercent = 0.6**, and the following results were found. We can see that only muscle activity of high magnitude were noted as **ON/OFF** events. {{THRESH60.png}}+If you find the automatic detection is identify data fluctuation that is too low in amplitude for your liking, we can adjust the **ThresholdPercent** parameter to change this. For example, this meta-command was re-run on this data using **ThresholdPercent = 0.6**, and the following results were found. We can see that only muscle activity of high magnitude were noted as **ON/OFF** events. {{:THRESH60.png}}
  
-===== References =====+==== References ====
  
 1. [[https://www.sciencedirect.com/science/article/abs/pii/S0966636208000994|Amedeo Troiano, Francesco Naddeo, Erik Sosso, Gianfranco Camarota, Roberto Merletti, Luca Mesin, Assessment of force and fatigue in isometric contractions of the upper trapezius muscle by surface EMG signal and perceived exertion scale, Gait & Posture 2018]] 1. [[https://www.sciencedirect.com/science/article/abs/pii/S0966636208000994|Amedeo Troiano, Francesco Naddeo, Erik Sosso, Gianfranco Camarota, Roberto Merletti, Luca Mesin, Assessment of force and fatigue in isometric contractions of the upper trapezius muscle by surface EMG signal and perceived exertion scale, Gait & Posture 2018]]
Line 460: Line 462:
 2. [[https://ieeexplore.ieee.org/abstract/document/7096455|José A. Biurrun Manresa, Carsten D. Mørch, and Ole K. Andersen, Teager-Kaiser Energy Operator Improves the Detection and Quantification of Nociceptive Withdrawal Reflexes From Surface Electromyography, IEEE]] 2. [[https://ieeexplore.ieee.org/abstract/document/7096455|José A. Biurrun Manresa, Carsten D. Mørch, and Ole K. Andersen, Teager-Kaiser Energy Operator Improves the Detection and Quantification of Nociceptive Withdrawal Reflexes From Surface Electromyography, IEEE]]
  
-3. [Solnik S, DeVita P, Rider P, Long B, and Hortobágyi T (2008) Teager–Kaiser Operator improves the accuracy of EMG onset detection independent of signal-to-noise ratio, Acta Bioeng Biomech. 2008 ; 10(2): 65–68]+3. Solnik S, DeVita P, Rider P, Long B, and Hortobágyi T (2008) Teager–Kaiser Operator improves the accuracy of EMG onset detection independent of signal-to-noise ratio, Acta Bioeng Biomech. 2008 ; 10(2): 65–68
  
  
  
visual3d/tutorials/emg/automatic_emg_events.1718805908.txt.gz · Last modified: 2024/06/19 14:05 by sgranger