1次遅れと2次遅れ,ノッチフィルターを実装
Fork of Filter by
Diff: Filter.h
- Revision:
- 6:13ff4bea3c83
- Parent:
- 5:ab6351c18264
--- a/Filter.h Tue Jan 16 15:56:33 2018 +0000 +++ b/Filter.h Thu Mar 22 12:36:55 2018 +0000 @@ -7,11 +7,17 @@ double Om_n; double sq_dt; double sq_Om; - + + double omega; + double dzeta; Filter(double); void setLowPassPara(double T, double init_data); double LowPassFilter(double input); + + void setSecondOrderPara(double xOmega, double xDzeta, double init_data); + double SecondOrderLag(double input); + void setNotchPara(double Omega, double init_data); double NotchFilter(double input); @@ -20,6 +26,9 @@ double preOutput; bool set_t; + double prev_output1, prev_output2; + bool set_secorder; + double n_preOutput[2]; double n_preInput[2];