visual3d:documentation:emg:filtering:linear_envelope
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:emg:filtering:linear_envelope [2024/07/03 17:25] – removed sgranger | visual3d:documentation:emg:filtering:linear_envelope [2024/07/17 15:45] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Linear Envelope ====== | ||
+ | |||
+ | Computing the onset of an EMG signal can be quite tricky. In this example, we describe a pipeline for a straightforward estimation of EMG onset based on the EMG envelope and [[Visual3D: | ||
+ | |||
+ | {{: | ||
+ | Three event labels are identified on this figure. The yellow and red events specify the "rest period" | ||
+ | |||
+ | < | ||
+ | !Apply a high pass and low pass filter assuming that the surface emg signal contains information | ||
+ | !from 20 to 500 Hz | ||
+ | |||
+ | Highpass_Filter | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Lowpass_Filter | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | !Compute the RMS of the emg signal based on a 100 ms window | ||
+ | |||
+ | Moving_RMS | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | !Create events that define the resting baseline of the muscle | ||
+ | |||
+ | Event_Explicit | ||
+ | / | ||
+ | /FRAME=1 | ||
+ | ! /TIME= | ||
+ | ; | ||
+ | |||
+ | Event_Explicit | ||
+ | / | ||
+ | /FRAME=150 | ||
+ | ! /TIME= | ||
+ | ; | ||
+ | |||
+ | !Compute the median and standard deviation of the EMG envelope during rest | ||
+ | |||
+ | Metric_Median | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | Metric_StdDev | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | !Identify the event EMG2_ON based on a threshold crossing | ||
+ | !of the median + 3 * standard deviation | ||
+ | |||
+ | Event_Threshold | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | ==== Count the Number of Frames the signals is ON ==== | ||
+ | |||
+ | < | ||
+ | ! Create a signal that is zero when the EMG is off, and one when it is ON | ||
+ | |||
+ | ! Start with creating a signal that is zero at all frames | ||
+ | Evaluate_Expression | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! Set all frames between the ON/OFF events to one | ||
+ | Set_Data_To_New_Values | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! /END_FRAME= | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | |||
+ | ! Add the signal during the gait cycle | ||
+ | ! The result will be the number of frames the signal is ON during the gait cycle | ||
+ | Metric_Sum | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | |||
visual3d/documentation/emg/filtering/linear_envelope.1720027519.txt.gz · Last modified: 2024/07/03 17:25 by sgranger