Skip to content

manqingzhou/emg-signal-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

emg-signal-analysis

Predict loads in potential patient's hand

Copyright 2020 Manqing Zhou

Table of Contents

Preprocessing

In order to remove any of low frequency noises from out EMG signal data. Done by a high pass filter to remove any of the non-zero dc levels from the signal data filtered signal

Smoothing

Apply a digital smoothing algorithm that outlines the mean trend of the signal develoment

Feature extraction

Extract the average value of 100 samples to reduce the input data of our classification. Here, I used RMS

---
def rms(data):
    df = pd.DataFrame(data)
    df2 = np.array(df).ravel()
    # change it into 1D array to do window sliding
    # np.sqrt(sum([a[window_size-i-1:len(a)-i]**2 for i in range(window_size-1)])/window_size)
    df3 = np.sqrt(sum([df2[100 - i - 1:len(df2) - i] ** 2 for i in range(99)]) / 100)
    #max_rms = 1.0608
    #normalized = np.divide(df3, max_rms)
    return df3

def rms(data):
    df=np.array(data).ravel()
    df2=np.sqrt(sum([df[100 - i - 1:len(df) - i] ** 2 for i in range(99)]) / 100)
    return df2
---

Normalization

Use the sub maximal normalization. The main idea is to divide the data by max rms. The graph below is one subject. subject2_2

Multi-Classification model

Prediction Part

The final code file is in /emg/final_code.py

About

Predict loads in potential patient's hand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors