afflatus_999 发表于 2011-2-14 22:07

求教:EMG信号滤波后,开端和末端部分的值异常

本帖最后由 afflatus_999 于 2011-2-14 22:41 编辑

EMG信号滤波(50HZ notch 和10-200HZ bandpass)后,开端和末端部分的值异常,怎么解决?如图
程序如下(采样率512hz):
%% to read EMG data
rawemg=corr(1:end,1);
subplot(2,4,1)
plot(rawemg)
title('RawEMG')
xlabel('Point')
ylabel('Magnitude')
% to time-domain
leng=size(rawemg,1);
fs=512;
t=1/512:1/fs:leng/fs;
emgts=timeseries(rawemg,t);
subplot(2,4,2)
plot(emgts)
title('time-domain EMG')
xlabel('time (s)')
ylabel('magnitude')
%%notch filter
interval1=;
emgtsfilt=idealfilter(emgts,interval1,'notch');
subplot(2,4,3)
plot(emgtsfilt)
title('notch-filtered EMG')
xlabel('time (s)')
ylabel('magnitude')
%%bandpass filter
interval2=;
emgtsfiltfilt=idealfilter(emgtsfilt,interval2,'pass');
subplot(2,4,4)
plot(emgtsfiltfilt)
title('bandpassed EMG')
xlabel('time (s)')
ylabel('magnitude')
%% filtered and rectfied EMG
filteredemg=squeeze(emgtsfiltfilt.data)';
s=abs(filteredemg);
subplot(2,4,5)
plot(s)
title('filtered and rectified EMG')
xlabel('Point')
ylabel('Magnitude')
%% to rectfy and smooth EMG
%moving average window with 500ms constant
rectemg=abs(filteredemg);
lengrect=length(rectemg);
for i=1:lengrect-256
    smoothemg(i)=sum(rectemg(i:i+255))/256;
end
subplot(2,4,6)
plot(smoothemg)
title('smoothed EMG (average)')
xlabel('Point')
ylabel('Magnitude')
%moving average winodw with 2000ms constant using RMS
for i=1:lengrect-2048
    smoothrmsemg(i)=sqrt(sum(rectemg(i:i+2047).*rectemg(i:i+2047))/2048);
end
subplot(2,4,7)
plot(smoothrmsemg)
title('smoothed EMG (RMS)')
xlabel('Point')
ylabel('Magnitude')

wzx13wzx 发表于 2011-2-15 20:03

没听懂,帮不上你没听懂,帮不上你

afflatus_999 发表于 2011-2-15 21:55

wzx13wzx 发表于 2011-2-15 20:03 static/image/common/back.gif
没听懂,帮不上你没听懂,帮不上你

顶帖就是最大的帮助,谢谢。
或者叫甩头现象?不知道专业上怎么描述。
页: [1]
查看完整版本: 求教:EMG信号滤波后,开端和末端部分的值异常