TI Hercules LaunchPad Tipo 2: Electromyography Signal DSP part 1
At this stage of the project, implemented by fourier analysis for muscle bioelectrical signal, its bandwidth is 1.5 kHz spectrum view, theoretically are 3300Hz but the value varies according to the person.
int Samples=1024;
for (ii = 0; ii < Samples; ii++) { |
//samples =2**N N128,256,1024,512 | |||||
capturaadc(); | ||||||
imaginaryNumbers[ii] = 0; | ||||||
realNumbers[ii] = adc_data[0].value - adc_data[2].value; // Corriente | ||||||
wait_secons(325.5208e-6); | // delay samples |
} |
gst_spectrum_fix_fft(realNumbers, imaginaryNumbers, 10, 0); | // voltaje |
for (ii = 0; ii < Samples / 2; ii++) { | ||||
float root = sqrt(realNumbers[ii] * realNumbers[ii]+ imaginaryNumbers[ii] * imaginaryNumbers[ii]); |
if (root > 182) | |||||
root = 182; | |||||
// | FFT_total[ii] = (int) root *40/ 182; | // Corriente para el mayor ancho de banda | |||
FFT_total[ii] = (int) root; | |||||
} |
for(ii=19;ii<=21;ii++) | ||||
FFT_total[ii]=0; |
Video:
Next Part |
---|
TI Hercules LaunchPad Tipo 2: Electromyography Signal DSP part 3 |