Git Product home page Git Product logo

semg's Introduction

semg's People

Contributors

dymnz 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

Watchers

 avatar  avatar  avatar  avatar  avatar

semg's Issues

sEMG noise power spectrum

Using '1.lvm', find the power spectrum in the 'still' part at the beginning

Conclusion

It can be seen that 60 Hz PLI is the dominant noise

Application on Papers

    • Title: Continuous Motion Decoding from EMG Using Independent Component Analysis and Adaptive Model Training
    • 6-ch sEMG, ICA, PCA
    • Example: 3-DOF shoulder angle & 1-DOF elbow angle
    • Title: EMG-based simultaneous and proportional estimation of wrist/hand kinematics in uni-lateral trans-radial amputees
    • 7-ch sEMG, motion capture, TDAR feature set, Accuracy: 72+-8%
    • Example: 3-DOF wrist movement

ADC PCB

  • PCB layout
    • Verify inverting summing amp.
    • Change the resistor on the design manual to the value on current plug board
  • Test

Sampling rate testing using "function call" vs. "while loop"

samples/sec test SamplingRateTest1() vs. SamplingRateTest2()

Arduino M0 PRO

  • With ADC_CTRLB_PRESCALER_DIV512
    • Function call: 10031
    • While loop: 10166

=> Difference = (10166 - 10031) / 10166 % = 1.33%


  • WIth ADC_CTRLB_PRESCALER_DIV256
    • Function call: ~19500 (unstable)
    • While loop: ~19500 (unstable)

=> Difference = ?


  • WIth ADC_CTRLB_PRESCALER_DIV128
    • Function call: ~32800 (unstable)
    • While loop: ~33500 (unstable)

=> Difference = (33500 - 32800) / 33500 % = 2.08%


  • WIth ADC_CTRLB_PRESCALER_DIV64
    • Function call: 49450
    • While loop: 52480

=> Difference = (52480 - 49450) / 52480 % = 5.77%

Processing 3 Arduino DAQ

  • Simultaneous Force - sEMG recording
  • 1-ch sEMG + 1-ch Force w/ graph=
    • ~9.4k SPS @ 512 clock div.
    • 13k ~ 16k SPS @ 128 clock div.
  • 2-ch sEMG + 1-ch Force w/ graph
    • ~5.1k SPS @ 512 clock div.
  • 2-ch sEMG + 1-ch Force + 1-ch MPU (naive angle calc.) w/ graph
    • 1024 SPS, exactly. Probably due to MPU I2C polling.
  • 2-ch sEMG + 1-ch Force + 1-ch MPU (complex angle calc.) w/ graph
    • ~460 SPS @ 512 clock div.
    • ~580 SPS @ 128 clock div.
  • 2-ch sEMG + 1-ch MPU (complex angle calc.) w/ graph
    • ~525 SPS @ 128 clock div.
  • 4-ch sEMG + 1-ch MPU (complex angle calc.) + 1-ch pot. w/ graph
    • ~460 SPS @ 128 clock div.

Verify ADC sample interval

Sampling rate @10kHz. FFT are correct up to 5kHz, ADC sample interval seems to be fixed.


Waveform & FFT


0.5kHz

0.5k plot
0.5k fft

1kHz

1k plot
1k fft

3kHz

3k plot
3k fft

4kHz

4k plot
4k fft

5kHz

5k plot 1
5k plot 2
5k fft

Select Paper for Comparison

  • Similar parameter
  • Clear methodology
  • Classify paper for grouping
    • Action length
    • Action type
  • Electrode
    • Placement
    • # of electrode

See #40 for papers

sEMG Preprocessing/Feature

Preprocessing used in Wrist Angle Estimation Papers


From #40

May Be Relevant:

Misc

Github formating

Format source of #4

### Sampling rate @10kHz. FFT are correct up to 5kHz, ADC sample interval seems to be fixed.
---
#### 0.5kHz
![0.5k plot](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/0.5k_plot.png)
![0.5k fft](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/0.5k_fft.png)

#### 1kHz
![1k plot](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/1k_plot.png)
![1k fft](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/1k_fft.png)

#### 3kHz
![3k plot](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/3k_plot.png)
![3k fft](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/3k_fft.png)

#### 4kHz
![4k plot](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/4k_plot.png)
![4k fft](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/4k_fft.png)

#### 5kHz
![5k plot 1](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/5k_plot_1.png)
![5k plot 2](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/5k_plot_2.png)
![5k fft](https://raw.githubusercontent.com/dymnz/sEMG/master/ADC_Arduino/Testing/ADC_FFT_Result/5k_fft.png)

TDSEP

6+ Electrode Performance Test

Test the applicability with more electrodes

  • 6+
    • Check paper for suitable number
      • 6 should be enough, have enough component for 6
      • 6 AED made and tested, making pre-amp
    • Check electrode width for suitable number

FLX/EXT Ground Truth

  • Current: Pot. to avoid Acce. gravity issue
  • Question raised by teacher, as handmade == bad

  • Pot:
    • Accuracy
    • Consistency
    • Can I prove it is good?
      • Compare it with MPU on pitch
        • Can't test with SUP/PRO
        • Pot. angle magnitude significantly smaller than IMU due to rotating axis issue
          • See 'Meeting 2018/05/16 - GroundTruth/SigPro'
  • Is Magnetometer better?

Wrist Angle Paper Experiment Comparison

After #44, see table 'paper_sel.xlsx'

  • 4-ch sEMG w/ random placement. Try to achieve comparable performance.
  • Compare separate FLX/EXT w/ most paper
  • Compare separate PRO/SUP w/ paper 7 & 10 on table
    • 7: Bayesian Filtering of Surface EMG for Accurate Simultaneous and Proportional Prosthetic Control (2014)
    • 10: Continuous Estimation of Wrist Angles for Proportional Control Based on Surface Electromyography (2016)

Note

  • No need for Magn/Pot. angle groudtruth in this case, since FLX/EXT won't happen w/ PRO/SUP
  • Separating FLX/EXT and PRO/SUP means that 4-ch sEMG is redundant since 2-ch sEMG is enough to capture the muscle activity of PRO/SUP and FLX/EXT separately
    • What is the rationale behind using 4-ch sEMG v.s. 2-ch sEMG when measuring separate FLX/EXT and PRO/SUP?
      • Accuray
        • Why stop at 4-ch then?

TODO

  • Decide procedure

Research on sEMG signal

ADC reading interval swing

Interval between two consecutive ADC reading swing by 6 +- 1 microseconds, with 6 ~ 80% of the time.

  • Caused by micros() call?
    • Check the interval between consecutive micros() call, should swing or have random peak based on previous test
  • Effect of interval swing?
    • Ask teacher

Example

Relevant: LINPOYU/ultrasound#3

DC offset after Inverting amp.

DC offset after inverting amp. should be 0, yet there's DC offset present, which limits the signal amplitude(gain can't be too large or the signal will be cutoff).

  • Change the pot. for DC at Inv. Sum. to a larger value
  • Change the res. for DC at Inv. Sum. to a larger value

200Hz 10mV in

  • Signal measured in CH2, not quite accurate in a range of N mV
  • Best output DC: 2.3V / Vpp: 4V
  • After HPF: DC: 2mV / Vpp: 30mV
  • After Inv amp: DC: -14mV / Vpp: 76mV

0 input

  • Signal measured in CH2, not quite accurate in a range of N mV
  • Best output DC: 2.34V
  • After HPF: DC: 300uV
  • After Inv amp: DC: -14mV

Conclusion

Components for one circuit

  • INA128 x1 - Active electrode
  • OPA2604 x2 - LPF+HPF, N/I amp
  • LMC6482 x1 - LevelShifter
  1. Look for snap button (less than NT$50)
  2. 洞洞板 x1
  3. Resistors xN
  4. Capacitor xN
  5. Dupont wire head x4 (female)
  6. IC坐 x3

Semi-random Electrode Placement Test

To prove the effectiveness of signal processing under different placement condition

  • Multiple ring placement test. Equal distance placement with different starting point.
    • 90 degree done
  • Follow the same evaluation process as before
    • Run 10 test for 60 segments for each of the 4 gesture
    • Remove outlier for each of the test
    • Plot the box plot of the median error for each gesture
    • Compare the performance w/ and w/o the signal processing

Redesign active electrode PCB

The current PCB is too fragile in

  • Wire connection
    • Should have a dedicated connector
  • Board itself
    • Thicker board
  • Electrode connection
    • Through hole should be a lot bigger
  • PCB tested
  • Borrow 3D printer
  • Design a casing

Roadmap

  • RNN test
    • Vanilla
      • Convolution test
    • LSTM
      • Sensor fusion test
      • Cross-validation w/ patience
  • 4-channel power supply PCB
    • Design
    • Missed P+9V power line connection, to be fixed
      • Temp fixed, but still significant voltage drop w/ load. Use PSU instead.
    • Test
      • Voltage drop >10% w/ load, need more test. Use PSU now
  • Additional circuit PCB
    • Design
    • Test
  • Angle measurement:
    • Acce.
    • Pot. (Unusable, see #43)
    • Magn. (#45)
  • Grip force measurement:
    • Solder + test
    • Woodwork
    • Calibration
      • Calibration factor : -200000
      • Accuracy: to be calculated

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.