![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
things
Diff: filtervalues.h
- Revision:
- 0:b1ef0101f09c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/filtervalues.h Mon Oct 15 12:52:13 2018 +0000 @@ -0,0 +1,33 @@ +//////////////////////////////////////////////CONSTANTS +// FS 500 +///////////////////Biquad #1 // Highpass 20 Hz +const double gain_f1 = 1; +const double A_f1[] = { 1 , -1.64742277e+00 , 0.70085836}; +const double B_f1[] = { 0.83707028 , -1.67414057 , 0.83707028}; + +///////////////////Biquad #2 // Lowpass 5 Hz +const double gain_f2 = 1; +const double A_f2[] = { 1 , -1.91118480 , 0.91496354}; +const double B_f2[] = { 0.95653708 ,-1.91307417 , 0.95653708}; + +////////////////////////////////////////////ARRAYS TO VARIABLES +/////////////////Biquad #1 +const double a1_f1 = gain_f1*A_f1[1], + a2_f1 = gain_f1*A_f1[2], + b0_f1 = gain_f1*B_f1[0], + b1_f1 = gain_f1*B_f1[1], + b2_f1 = gain_f1*B_f1[2]; //filter coefficients filter 1 +double v1_f1_emg1=0 , + v2_f1_emg1=0 , + v1_f1_emg2=0 , + v2_f1_emg2=0;//storage variables filter 1 +/////////////////Biquad #2 +const double a1_f2 = gain_f2*A_f2[1], + a2_f2 = gain_f2*A_f2[2], + b0_f2 = gain_f2*B_f2[0], + b1_f2 = gain_f2*B_f2[1], + b2_f2 = gain_f2*B_f2[2]; //filter coefficients filter 2 +double v1_f2_emg1=0 , + v2_f2_emg1=0 , + v1_f2_emg2=0 , + v2_f2_emg2=0;//storage variables filter 2 \ No newline at end of file