visual3d:documentation:emg:processing:total_emg_power
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:emg:processing:total_emg_power [2024/06/19 12:47] – sgranger | visual3d:documentation:emg:processing:total_emg_power [2024/07/17 15:45] (current) – created sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{{{===== introduction | + | ====== Total EMG Power ====== |
- | to determine when a muscle is activated a threshold needs to be chosen from a period of inactivity. when the signal surpasses the threshold, the muscle is turned on. there are three different ways to do so. | + | ==== Introduction ==== |
- | - emg onset using event_threshold | + | To determine when a muscle is activated a threshold needs to be chosen from a period of inactivity. When the signal surpasses the threshold, the muscle is turned |
- | - emg onset based on tkeo | + | |
- | - emg onset based on automatic detection | + | |
- | ===== emg onset using event_threshold ===== | + | - EMG Onset using Event_Threshold |
+ | - EMG Onset based on TKEO | ||
+ | - EMG Onset based on automatic detection | ||
- | 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: | + | ==== EMG Onset using Event_Threshold ==== |
- | emg2.jpg | + | Computing the onset of an EMG signal can be quite tricky. In this example, we describe a pipeline |
- | ==== pipeline | + | |
- | the following pipeline first includes a low pass filter, a high pass filter and a moving | + | {{: |
+ | === Pipeline === | ||
+ | |||
+ | The following pipeline first includes a low pass filter, a high pass filter and a moving | ||
< | < | ||
- | !apply a high pass and low pass filter assuming that the surface emg signal contains information | + | !Apply a high pass and low pass filter assuming that the surface emg signal contains information |
- | !from 20 to 500 hz | + | !from 20 to 500 Hz |
- | highpass_filter | + | Highpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | /result_folder=rms | + | /RESULT_FOLDER=RMS |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=20 | + | /FREQUENCY_CUTOFF=20 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
- | lowpass_filter | + | Lowpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | ! /signal_names= | + | ! /SIGNAL_NAMES= |
- | /signal_folder=rms | + | /SIGNAL_FOLDER=RMS |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | /result_folder=rms | + | /RESULT_FOLDER=RMS |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=500 | + | /FREQUENCY_CUTOFF=500 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
- | !compute | + | !Compute |
- | moving_rms | + | Moving_RMS |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | /signal_folder=rms | + | /SIGNAL_FOLDER=RMS |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | /result_folder=rms | + | /RESULT_FOLDER=RMS |
- | /num_window_frames=1+0.1*parameter::analog::rate | + | /NUM_WINDOW_FRAMES=1+0.1*PARAMETER::ANALOG::RATE |
; | ; | ||
- | !create | + | !Create |
- | event_explicit | + | Event_Explicit |
- | /event_name=rest1 | + | /EVENT_NAME=REST1 |
- | /frame=1 | + | /FRAME=1 |
- | ! /time= | + | ! /TIME= |
; | ; | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=rest2 | + | /EVENT_NAME=REST2 |
- | /frame=150 | + | /FRAME=150 |
- | ! /time= | + | ! /TIME= |
; | ; | ||
- | !compute | + | !Compute |
- | metric_median | + | Metric_Median |
- | /result_metric_name=_med | + | /RESULT_METRIC_NAME=_MED |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg | + | /RESULT_METRIC_FOLDER=EMG |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | /signal_folder=rms | + | /SIGNAL_FOLDER=RMS |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=rest1+rest2 | + | /EVENT_SEQUENCE=REST1+REST2 |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
- | metric_stddev | + | Metric_StdDev |
- | /result_metric_name=_sd | + | /RESULT_METRIC_NAME=_SD |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg | + | /RESULT_METRIC_FOLDER=EMG |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | /signal_folder=rms | + | /SIGNAL_FOLDER=RMS |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=rest1+rest2 | + | /EVENT_SEQUENCE=REST1+REST2 |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
- | !identify | + | !Identify |
!of the median + 3 * standard deviation | !of the median + 3 * standard deviation | ||
- | event_threshold | + | Event_Threshold |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | /signal_folder=rms | + | /SIGNAL_FOLDER=RMS |
- | /event_name=emg2_on | + | /EVENT_NAME=EMG2_ON |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y=false | + | ! /SELECT_Y=FALSE |
- | ! /select_z=false | + | ! /SELECT_Z=FALSE |
- | ! /select_residual=false | + | ! /SELECT_RESIDUAL=FALSE |
- | /threshold=metric::emg::emg2_med+3*metric::emg::emg2_sd | + | /THRESHOLD=METRIC::EMG::EMG2_MED+3*METRIC::EMG::EMG2_SD |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | /ascending=true | + | /ASCENDING=TRUE |
- | ! /descending=false | + | ! /DESCENDING=FALSE |
- | ! /ensure_range_frames_before_threshold_crossing=false | + | ! /ENSURE_RANGE_FRAMES_BEFORE_THRESHOLD_CROSSING=FALSE |
- | /ensure_range_frames_after_threshold_crossing=true | + | /ENSURE_RANGE_FRAMES_AFTER_THRESHOLD_CROSSING=TRUE |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /event_instance=1 | + | /EVENT_INSTANCE=1 |
; | ; | ||
</ | </ | ||
- | ==== pipeline | + | === Pipeline |
- | to calculate how long a signal is on or how long a muscle is active, a signal will be created to be set as zero when below the threshold, and one when the signal is above the threshold. | + | To calculate how long a signal is on or how long a muscle is active, a signal will be created to be set as zero when below the threshold, and one when the signal is above the threshold. |
< | < | ||
- | ! create | + | ! Create |
- | ! start with creating a signal that is zero at all frames | + | ! Start with creating a signal that is zero at all frames |
- | evaluate_expression | + | Evaluate_Expression |
- | /expression=frame_numbers::original::frames | + | /EXPRESSION=FRAME_NUMBERS::ORIGINAL::FRAMES |
- | ! /signal_types= | + | ! /SIGNAL_TYPES= |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | ! /signal_names= | + | ! /SIGNAL_NAMES= |
- | /result_types=derived | + | /RESULT_TYPES=DERIVED |
- | /result_folders=emg_count | + | /RESULT_FOLDERS=EMG_COUNT |
- | /result_name=emg2 | + | /RESULT_NAME=EMG2 |
- | ! /apply_as_suffix_to_signal_name=false | + | ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE |
; | ; | ||
- | ! set all frames between the on/off events to one | + | ! Set all frames between the ON/OFF events to one |
- | set_data_to_new_values | + | Set_Data_To_New_Values |
- | /signal_types=derived | + | /SIGNAL_TYPES=DERIVED |
- | /signal_folder=emg_count | + | /SIGNAL_FOLDER=EMG_COUNT |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /result_types=derived | + | /RESULT_TYPES=DERIVED |
- | /result_folders=emg_count | + | /RESULT_FOLDERS=EMG_COUNT |
- | /result_suffix= | + | /RESULT_SUFFIX= |
- | /event_sequence=emg2_on+emg2_off | + | /EVENT_SEQUENCE=EMG2_ON+EMG2_OFF |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
- | ! /event_instance=0 | + | ! /EVENT_INSTANCE=0 |
- | ! /start_frame= | + | ! /START_FRAME= |
- | ! /end_frame= | + | ! /END_FRAME= |
- | ! /use_point_rate=true | + | ! /USE_POINT_RATE=TRUE |
- | /replacement_values=1 | + | /REPLACEMENT_VALUES=1 |
- | ! /threshold_high=no_data | + | ! /THRESHOLD_HIGH=NO_DATA |
- | ! /threshold_low=no_data | + | ! /THRESHOLD_LOW=NO_DATA |
- | ! /set_data_at_single_event=false | + | ! /SET_DATA_AT_SINGLE_EVENT=FALSE |
; | ; | ||
- | ! add the signal during the gait cycle | + | ! Add the signal during the gait cycle |
- | ! the result will be the number of frames the signal is on during the gait cycle | + | ! The result will be the number of frames the signal is ON during the gait cycle |
- | metric_sum | + | Metric_Sum |
- | /result_metric_folder=emg_count | + | /RESULT_METRIC_FOLDER=EMG_COUNT |
- | /result_metric_name= | + | /RESULT_METRIC_NAME= |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /signal_types=derived | + | /SIGNAL_TYPES=DERIVED |
- | /signal_folder=emg_count | + | /SIGNAL_FOLDER=EMG_COUNT |
- | /signal_names=emg2 | + | /SIGNAL_NAMES=EMG2 |
- | /component_sequence=all | + | /COMPONENT_SEQUENCE=ALL |
- | /event_sequence=rhs+rhs | + | /EVENT_SEQUENCE=RHS+RHS |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /sequence_percent_start= | + | /SEQUENCE_PERCENT_START= |
- | /sequence_percent_end= | + | /SEQUENCE_PERCENT_END= |
- | ! /generate_mean_and_stddev=true | + | ! /GENERATE_MEAN_AND_STDDEV=TRUE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
</ | </ | ||
- | ===== emg onset based on tkeo ===== | + | ==== EMG Onset based on TKEO ==== |
- | computing | + | Computing |
- | teager_kaiser.jpg | + | {{: |
- | ==== pipeline ==== | + | === Pipeline |
- | the following pipeline follows the same general format as above, yet at the beginning there is a highpass filter | + | The following pipeline follows the same general format as above, yet at the beginning there is a Highpass Filter |
< | < | ||
- | !apply a high pass and low pass filter assuming that the surface emg signal contains information | + | !Apply a high pass and low pass filter assuming that the surface emg signal contains information |
- | !from 20 to 500 hz | + | !from 20 to 500 Hz |
- | highpass_filter | + | Highpass_Filter |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg_c | + | /SIGNAL_NAMES=EMG_C |
- | ! /signal_folder=original | + | ! /SIGNAL_FOLDER=ORIGINAL |
- | ! /result_suffix= | + | ! /RESULT_SUFFIX= |
- | /result_folder=processed | + | /RESULT_FOLDER=PROCESSED |
- | ! /filter_class=butterworth | + | ! /FILTER_CLASS=BUTTERWORTH |
- | /frequency_cutoff=20 | + | /FREQUENCY_CUTOFF=20 |
- | /num_reflected=0 | + | /NUM_REFLECTED=0 |
- | /total_buffer_size=100 | + | /TOTAL_BUFFER_SIZE=100 |
- | ! /num_bidirectional_passes=1 | + | ! /NUM_BIDIRECTIONAL_PASSES=1 |
; | ; | ||
- | !apply the teager-kaiser operator | + | !Apply the Teager-Kaiser Operator |
- | teager_kaiser_energy | + | Teager_Kaiser_Energy |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg_c | + | /SIGNAL_NAMES=EMG_C |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | ! /signal_components= | + | ! /SIGNAL_COMPONENTS= |
- | ! /result_folder=processed | + | ! /RESULT_FOLDER=PROCESSED |
- | ! /event_sequence= | + | ! /EVENT_SEQUENCE= |
- | ! /exclude_events= | + | ! /EXCLUDE_EVENTS= |
; | ; | ||
- | !create | + | !Create |
- | event_explicit | + | Event_Explicit |
- | /event_name=rest1 | + | /EVENT_NAME=REST1 |
- | /frame=1 | + | /FRAME=1 |
- | ! /time= | + | ! /TIME= |
; | ; | ||
- | event_explicit | + | Event_Explicit |
- | /event_name=rest2 | + | /EVENT_NAME=REST2 |
- | /frame=150 | + | /FRAME=150 |
- | ! /time= | + | ! /TIME= |
; | ; | ||
- | !compute | + | !Compute |
- | metric_median | + | Metric_Median |
- | /result_metric_name=_med | + | /RESULT_METRIC_NAME=_MED |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg | + | /RESULT_METRIC_FOLDER=EMG |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg_c | + | /SIGNAL_NAMES=EMG_C |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=rest1+rest2 | + | /EVENT_SEQUENCE=REST1+REST2 |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
- | metric_stddev | + | Metric_StdDev |
- | /result_metric_name=_sd | + | /RESULT_METRIC_NAME=_SD |
- | /apply_as_suffix_to_signal_name=true | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_metric_folder=emg | + | /RESULT_METRIC_FOLDER=EMG |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg_c | + | /SIGNAL_NAMES=EMG_C |
- | /signal_folder=processed | + | /SIGNAL_FOLDER=PROCESSED |
- | ! /signal_components=all_components | + | ! /SIGNAL_COMPONENTS=ALL_COMPONENTS |
- | /event_sequence=rest1+rest2 | + | /EVENT_SEQUENCE=REST1+REST2 |
- | /exclude_events= | + | /EXCLUDE_EVENTS= |
- | /generate_mean_and_stddev=false | + | /GENERATE_MEAN_AND_STDDEV=FALSE |
- | ! /append_to_existing_values=false | + | ! /APPEND_TO_EXISTING_VALUES=FALSE |
; | ; | ||
- | !identify | + | !Identify |
!of the median + 3 * standard deviation | !of the median + 3 * standard deviation | ||
- | event_threshold | + | Event_Threshold |
- | /signal_types=analog | + | /SIGNAL_TYPES=ANALOG |
- | /signal_names=emg_c | + | /SIGNAL_NAMES=EMG_C |
- | /signal_folder=procesed | + | /SIGNAL_FOLDER=PROCESED |
- | /event_name=emg_c_on | + | /EVENT_NAME=EMG_C_ON |
- | /select_x=true | + | /SELECT_X=TRUE |
- | ! /select_y=false | + | ! /SELECT_Y=FALSE |
- | ! /select_z=false | + | ! /SELECT_Z=FALSE |
- | ! /select_residual=false | + | ! /SELECT_RESIDUAL=FALSE |
- | /threshold=metric::emg::emg2_med+3*metric::emg::emg2_sd | + | /THRESHOLD=METRIC::EMG::EMG2_MED+3*METRIC::EMG::EMG2_SD |
- | ! /frame_window=8 | + | ! /FRAME_WINDOW=8 |
- | ! /frame_offset=0 | + | ! /FRAME_OFFSET=0 |
- | /ascending=true | + | /ASCENDING=TRUE |
- | ! /descending=false | + | ! /DESCENDING=FALSE |
- | ! /ensure_range_frames_before_threshold_crossing=false | + | ! /ENSURE_RANGE_FRAMES_BEFORE_THRESHOLD_CROSSING=FALSE |
- | /ensure_range_frames_after_threshold_crossing=true | + | /ENSURE_RANGE_FRAMES_AFTER_THRESHOLD_CROSSING=TRUE |
- | ! /start_at_event= | + | ! /START_AT_EVENT= |
- | ! /end_at_event= | + | ! /END_AT_EVENT= |
- | /event_instance=1 | + | /EVENT_INSTANCE=1 |
; | ; | ||
</ | </ | ||
- | ===== emg onset based on automatic detection ===== | + | ==== EMG Onset based on Automatic Detection |
+ | |||
+ | The following meta-command may be used to process EMG analog signals to find " | ||
- | the following meta-command may be used to process emg analog signals to find " | + | **Meta-Command**: |
- | **meta-command**: | + | **Tutorial page**: [[Visual3D: |
- | **tutorial page**: [[visual3d: | ||
- | }}}} |
visual3d/documentation/emg/processing/total_emg_power.1718801267.txt.gz · Last modified: 2024/06/19 12:47 by sgranger