Updated 06 Apr 2018
Matlab Toolbox for unsupervised classification of MUAPs and action potentials in EMG
A complete Graphical interface, plug and play tool for 'single' channel EMG processing and unsupervised MUAP identification and Action Potential classification. Just run LEMG_Analyzer.m and the GUI will be assisting you for the further processing steps. The toolbox is able to read files with '.mat','.wav' and '.txt'. The exported files from several EMG machines such as Nihon Kohden and Synergy are supported as well.
The scripts in this toolbox are based on the following paper:
%% Algorithm is based on the following paper :
H. Sedghamiz and D. Santonocito,''Unsupervised Detection and Classification of Motor Unit Action Potentials in Intramuscular Electromyography Signals'', The 5th IEEE International Conference on E-Health and Bioengineering - EHB 2015, At Iasi-Romania.
Please cite the paper in case you might find this toolbox helpful.
1. Run LEMG_Analyzer.m, in order to invoke the interface;
2. From the top left Corner of the software, click on the 'Folder' sign in order to select a file (Note, If you open a file with more than one channel only the first channel will be analyzed. '.mat','.wav', and '.txt' are supported).
3. After loading your dataset, click on 'Optimize TH' in order to let the software estimate the appropriate analysis value for you signal automatically. Alternatively, you can use the scroll-bars in order to set the values manually, the first scroll is the detection sensitivity and the second is the template matching threshold. You can improve the results by tuning these values.
4. After you are done with the tuning of the parameters, click on 'Start Clustering' and the software automatically identifies the unique MUAP templates in your signal. The templates appear in the lower left corner of the software. You can either select all the templates to be highlighted in your EMG plot or just select the one you are interested in.The window on the lower right corner is the zoomed version of the signal. You can move along the signal from the top panel.
5. In order to save the analysis, simply click on the 'save' sign on the top left corner of the software. You can also zoom in to a part of your signal and repeat the analysis.
Here is a Youtube link of the software as well;
Hooman Sedghamiz (2020). Toolbox for unsupervised classification of MUAPs and action potentials in EMG (https://www.github.com/hooman650/EMG_Analyzer), GitHub. Retrieved .
After loading the data file, the buttons in the lower section remain greyed out and there is no zoomed view. Matlab 2014a gives the following error messages:
User selected: C:\Users\Geoff\Documents\MATLAB\LEMG_Analyzer_V8\unHealthy.mat
Attempt to reference field of non-structure array.
Error in prepare_first_p (line 32)
Error in LEMG_Analyzer>uipushtool3_ClickedCallback (line 334)
Error in gui_mainfcn (line 95)
Error in LEMG_Analyzer (line 31)
Error in @(hObject,eventdata)LEMG_Analyzer('uipushtool3_ClickedCallback',hObject,eventdata,guidata(hObject))
Error while evaluating uipushtool ClickedCallback
Hello, I thought there are some bug in your code. When I run the GUI and click the start Clustering button, the ERROR will happen:
Error using findpeaks
Too many output arguments.
Error in resolve_peaks (line 20)
[~,TE] = findpeaks(tmp,'MinPeakDistance',min_pd);
I have checked the findpeak.m. There is only one output argument. And I try to delete the first argument and save the function like TE = findpeaks(tmp,'MinPeakDistance',min_pd);.
But there will be several other errors.
More description about the use of the software and add a Youtube link.
Inspired: EMG processing and Action Potential Detection with Multi resolution Teager Operator, BioSigKit a toolkit for Bio-Signal analysis, Complete Pan Tompkins Implementation ECG QRS detector, Psuedo Correlation for Template Matching