Highpass en Notch filter voor EMG verwerking
Dependencies: HIDScope mbed-dsp mbed
Fork of EMG_HIDScope by
Revision 22:6b4ea19efad1, committed 2014-10-14
- Comitter:
- jessekaiser
- Date:
- Tue Oct 14 13:32:59 2014 +0000
- Parent:
- 21:133e9390a42a
- Commit message:
- Werkt (maar waarom? Nobody knows)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 133e9390a42a -r 6b4ea19efad1 main.cpp --- a/main.cpp Wed Oct 01 12:25:06 2014 +0000 +++ b/main.cpp Tue Oct 14 13:32:59 2014 +0000 @@ -1,6 +1,5 @@ #include "mbed.h" #include "HIDScope.h" - #include "arm_math.h" //Define objects @@ -9,12 +8,12 @@ arm_biquad_casd_df1_inst_f32 lowpass; //constants for 5Hz lowpass -float lowpass_const[] = {0.02008337 , 0.04016673 , 0.02008337 , 1.56101808 , -0.64135154}; +float lowpass_const[] = {0.5857841106784856, -1.3007020142696517e-16, 0.5857841106784856, -1.3007020142696517e-16, 0.17156822135697122}; //state values float lowpass_states[4]; arm_biquad_casd_df1_inst_f32 highpass; //constants for 0.5Hz highpass -float highpass_const[] = {0.97803048, -1.95606096, 0.97803048, 1.95557824 , -0.95654368}; +float highpass_const[] = {0.8948577513857248, -1.7897155027714495, 0.8948577513857248, 0.8008009266036016}; //state values float highpass_states[4]; @@ -55,7 +54,8 @@ } int main() -{ +{ + Ticker log_timer; //set up filters. Use external array for constants arm_biquad_cascade_df1_init_f32(&lowpass,1 , lowpass_const, lowpass_states);