visual3d:tutorials:emg:automatic_emg_events
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:tutorials:emg:automatic_emg_events [2024/06/19 14:05] – created sgranger | visual3d: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: | 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: | ||
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:// | + | **Tutorial data download**: Files used in this tutorial can be found here: [[https:// |
The following pipeline has been provided as a **meta_function**, | The following pipeline has been provided as a **meta_function**, | ||
- | **Meta-Commands download**: Meta-Command file found here: [[[https:// | + | **Meta-Commands download**: Meta-Command file found here: [[https:// |
- | ===== 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: | ||
</ | </ | ||
- | ===== 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/ | 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/ | ||
Line 174: | Line 176: | ||
</ | </ | ||
- | ===== 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: | ||
</ | </ | ||
- | ===== Onset/ | + | ==== Onset/ |
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: | ||
</ | </ | ||
- | ===== 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: | ||
</ | </ | ||
- | {{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:// | 1. [[https:// | ||
Line 460: | Line 462: | ||
2. [[https:// | 2. [[https:// | ||
- | 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