Git Product home page Git Product logo

jingweitoo / emg-feature-extraction-toolbox Goto Github PK

View Code? Open in Web Editor NEW
78.0 3.0 20.0 132 KB

This toolbox offers 40 feature extraction methods (EMAV, EWL, MAV, WL, SSC, ZC, and etc.) for Electromyography (EMG) signals applications.

License: BSD 3-Clause "New" or "Revised" License

MATLAB 100.00%
feature-extraction electromyography electromyogram emg classification machine-learning signal-processing

emg-feature-extraction-toolbox's Introduction

Jx-EMGT : Electromyography ( EMG ) Feature Extraction Toolbox

View EMG Feature Extraction Toolbox on File Exchange License GitHub release


"Toward Talent Scientist: Sharing and Learning Together" --- Jingwei Too


Wheel

Introduction

  • This toolbox offers 40 types of EMG features
  • The A_Main file demos how the feature extraction methods can be applied using generated sample signal.

Input

  • X : signal ( 1 x samples )
  • opts : parameter settings ( some methods have parameters: refer here )

Output

  • feat : feature vector ( you may use other name like f1 or etc. )

Usage

The main function jfemg is adopted to perform feature extraction. You may switch the method by changing the 'mav' to other abbreviations

  • If you wish to extract mean absolute value ( MAV ) then you may write
feat = jfemg('mav', X);
  • If you want to extract enhanced wavelenght ( EWL ) then you may write
feat = jfemg('ewl', X);

Example 1 : Extract 5 normal features ( without parameter )

% Generate a sample random signal X
fs = 1000;            % Sampling frequency 
Ts = 1 / fs;          % Period
t  = 0 : Ts : 0.25; 
X  = 0.01 * (cos(2 * pi * fs * t) + randn(1, length(t)));

% Plot sample signal
plot(t,X);  grid on
xlabel('Number of samples');
ylabel('Amplitude');

% Enhanced Mean Absolute Value
f1 = jfemg('emav', X); 
% Average Amplitude Change
f2 = jfemg('aac', X); 
% Waveform Length
f3 = jfemg('wl', X); 
% Maximum Fractal Length 
f4 = jfemg('mfl', X); 
% Root Mean Square
f5 = jfemg('rms', X); 

% Feature vector
feat = [f1, f2, f3, f4, f5];

% Display features
disp(feat)

Example 2 : Extract 3 features with parameter

% Generate a sample random signal X
fs = 1000;            % Sampling frequency 
Ts = 1 / fs;          % Period
t  = 0 : Ts : 0.25; 
X  = 0.01 * (cos(2 * pi * fs * t) + randn(1, length(t)));

% Zeros Crossing
opts.thres = 0.01;
f1 = jfemg('zc', X, opts); 
% Slope Sign Change
opts.thres = 0.01;
f2 = jfemg('ssc', X, opts);
% Temporal Moment
opts.order = 3;
f3 = jfemg('tm', X, opts);

% Feature vector
feat = [f1, f2, f3];

% Display features
disp(feat)

List of available feature extraction methods

  • Some methods contain parameter to be adjusted. If you do not set the parameter then the feature will be extracted using default setting
  • For convenience, you may extract the feature with parameter using default setting as following. That is, you don't have to set the opts
feat = jfemg('zc', X);
  • You can use opts to set the parameter
    • thres : threshold
    • order : the number of orders
No. Abbreviation Name Parameter ( default )
40 'emav' Enhanced Mean absolute value -
39 'ewl' Enhanced Wavelength -
38 'fzc' New Zero Crossing -
37 'asm' Absolute Value of Summation of exp root -
36 'ass' Absolute Value of Summation of Square Root -
35 'msr' Mean Value of Square Root -
34 'ltkeo' Log Teager Kaiser Energy Operator -
33 'lcov' Log Coefficient of Variation -
32 'card' Cardinality opts.thres = 0.01
31 'ldasdv' Log Difference Absolute Standard Deviation -
30 'ldamv' Log Difference Absolute Mean Value -
29 'dvarv' Difference Variance Value -
28 'vo' V-Order opts.order = 2
27 'tm' Temporal Moment opts.order = 3
26 'damv' Difference Absolute Mean Value -
25 'ar' Auto-Regressive Model opts.order = 4
24 'mad' Mean Absolute Deviation -
23 'iqr' Interquartile Range -
22 'skew' Skewness -
21 'kurt' Kurtosis -
20 'cov' Coefficient of Variation -
19 'sd' Standard Deviation -
18 'var' Variance -
17 'ae' Average Energy -
16 'iemg' Integrated EMG -
15 'mav' Mean Absolute Value -
14 'ssc' Slope Sign Change opts.thres = 0.01
13 'zc' Zero Crossing opts.thres = 0.01
12 'wl' Waveform Length -
11 'rms' Root Mean Square -
10 'aac' Average Amplitude Change -
09 'dasdv' Difference Absolute Standard Deviation Value -
08 'ld' Log Detector -
07 'mmav' Modified Mean Absolute Value -
06 'mmav2' Modified Mean Absolute Value 2 -
05 'myop' Myopulse Percentage Rate opts.thres = 0.016
04 'ssi' Simple Square Integral -
03 'vare' Variance of EMG -
02 'wa' Willison Amplitude opts.thres = 0.01
01 'mfl' Maximum Fractal Length -

Cite As

@article{too2019classification,
  title={Classification of hand movements based on discrete wavelet transform and enhanced feature extraction},
  author={Too, Jingwei and Abdullah, Abdul Rahim and Saad, Norhashimah Mohd},
  journal={International Journal of Advanced Computer Science and Applications},
  volume={10},
  number={6},
  pages={83--89},
  year={2019}
}


@article{too2019emg,
  title={EMG feature selection and classification using a Pbest-guide binary particle swarm optimization},
  author={Too, Jingwei and Abdullah, Abdul Rahim and Mohd Saad, Norhashimah and Tee, Weihown},
  journal={Computation},
  volume={7},
  number={1},
  pages={12},
  year={2019},
  publisher={Multidisciplinary Digital Publishing Institute}
}

emg-feature-extraction-toolbox's People

Contributors

jingweitoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

emg-feature-extraction-toolbox's Issues

Decomposition of mouse single-channel intra-muscular EMG signal

Hi, very fortunate to meet your package! I recently worked on decomposition of intra-muscular EMG from single-channel paired-wire recording on either biceps or triceps in mouse. I find that your package is basically generated on human forelimb surface EMG signal (as mentioned in the method part of your article published in 2019). I wonder if this algorithm can work effectively for my recent recordings from mouse? Thanks for a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.