本文主要展示常见的肌电信号预处理的实现,开发环境为matlab。
目录
1 肌电信号低通,高通,带通滤波
2 去除DC 0阶偏置,1阶偏置
3 全波整流
4 信号降采样
5 linear envolope / butterworth 低通滤波器
1 肌电信号低通,高通,带通滤波
fs=2000;
[b,a]=butter(6,[10,500]*2/fs);
signal_filter=filtfilt(b,a,data1);
2 去除DC 0阶偏置,1阶偏置
signal_dc_rv=detrend(signal_filter,0);
signal_dc_rv=detrend(signal_filter,1);
3 全波整流
%% full-wave rectificartion of EMG
signal_fwr=abs(signal_dc_rv);
4 信号降采样
%% downsampling the signal
signal_downsample=downsample(signal_fwr,20);
fs=100;
5 linear envolope / butterworth 低通滤波器
%% butterworth low-pass filter
[b,a]=butter(5,2*2/fs);
signal_lowpass=filtfilt(b,a,signal_downsample);