ELECTROMYOGRAM (EMG) ONSET SCRIPT


One of the most important goals in performing this EMG analysis on the False Platform Experiment is to be able to determine the onset of the eight muscles groups. However, the procedure in determining the onset of EMG has not been standardized yet. Generally speaking, the EMG onsets can be determined qualitatively by simply examining the EMG plots visually, or quantitatively by a computer code. In this particular analysis, a MATLAB code, written primarily based on Richard P. DiFabio's 1987 journal article Reliability of Computerized Surface Electromyography for Determining the Onset of Muscle Activity, is used for the onset determination.

To determine the onset of EMG quantitatively by computer, one should first find a segment of the data set which is the quietest. According to DiFabio, this segment is called "baseline reference", and it is usually a 50-msec period before the onset of any perturbation. In the False Platform Experiment, the first 100 msec of data of the EMG data set is taken for baseline reference, and its noise level is further confirmed by visual inspection of the EMG plots. Secondly, one should set up a threshold which is usually 2 or 3 standard deviation above the "baseline reference". In the False Platform Experiment, a 3 standard deviation is used. Lastly, the identification of an onset point is based on two conditions: the point must be above the threshold level and stay above the threshold level for a certain amount of time. According to DiFabio, this duration is usually 25 consecutive data points for a given sampling rate, in this case, it is 25 msec since the sampling rate is 1000 Hz. The following is the MATLAB code used for the onset determination of the right quadricep during a platform jump trial:


The Fllowing MATLAB Script is Written by Rex H. Wu, Comments are Welcome!

Explanation:
%rquad is the EMG data vector for right quadricep
%n is the number of points (or msec) for baseline reference
%DURATION is the time that onset has to stay above the threshold
%num_std is the number of standard deviation(std) for onset threshold
%P is the vector from the first n points of the rquad vector
%threshold is the point beyond 3 std above the mean baseline reference
%plot the entire vector first in yellow, then hold it
%if a point in the data set is greater than the threshold and stay above the threshold for 10 ms,
%then plot this point and the following 10 ms of data in a different color from the original plot.
 
Matlab Script:
n=100;
DURATION = 10;
num_std = 3;
P = rquad_p(1:n);
threshold = mean(P) + std(P)*num_std;
plot (ti, rquad, 'y'); hold on;
for i = 1:length(rquad_pall)-DURATION
if abs(rquad_pall(i, P_TRL)) & abs(rquad_pall(i:i+DURATION, P_TRL)) > threshold
plot(ti(i:i+DURATION),rquad_pall(i:i+DURATION,P_TRL),'c');
end
end


© 1998 Professor Dava Newman. All rights reserved.