How to determine muscle activation timing of an emg signal?

15 visualizaciones (últimos 30 días)
Enrica Brunetti
Enrica Brunetti el 10 de Sept. de 2020
Respondida: MarKf el 27 de Nov. de 2022
Are there any matlab toolboxes to determine onset and offset of an emg signal in order to evaluate muscle activation timing?
  1 comentario
H W
H W el 26 de Nov. de 2022
Biceps = [10 : 35];
Triceps = [100 : 200];
figure;
polarplot(Biceps*pi/180, 0.7*ones(size(Biceps)), 'y', 'LineWidth',1.5);
hold on;
polarplot(Triceps*pi/180, 0.5*ones(size(Triceps)), 'g', 'LineWidth',1.5);
hold off;
set(gca,'ThetaZeroLocation','bottom', 'RLim',[0 1]);
legend('Biceps', 'Triceps', 'Location','NorthEastOutside');

Iniciar sesión para comentar.

Respuestas (1)

MarKf
MarKf el 27 de Nov. de 2022
You can use Fieldtrip or something like below (code needs testing/cleaning)
% emg = timeseries;
% Fs = sampling frequency
% Fn = Nyquist frequency, Fs/2;
% filter, hilbert and boxcar
[B, A] = butter(6, 10/Fn, 'high'); % 6th order butterw 10hz highpassfilter
emgflt = filtfilt(B, A, emg); % twopass
emghlb = abs(hilbert(emgflt)); % hilbert transform
emgcnv = conv2([1], ones(1,Fs), emghlb, 'same'); % smooth using convolution
emgstd = (emgcnv - repmat(mean(emgcnv), 1, length(emgcnv))) ./ ...
repmat(std(emgcnv), 1, length(emgcnv)); % z-transform
emgtrl = emgstd>0; % detect the muscle activity
emgtrl = diff(emgtrl, [], 2);
emgon = find(emgtrl(:)== 1);
emgoff = find(emgtrl(:)==-1);

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by