1次遅れと2次遅れ,ノッチフィルターを実装
Fork of Filter by
Filter.h
- Committer:
- uenono
- Date:
- 2018-03-22
- Revision:
- 6:13ff4bea3c83
- Parent:
- 5:ab6351c18264
File content as of revision 6:13ff4bea3c83:
#include "mbed.h" class Filter { public: double T_LPF; 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); private: double int_time; double preOutput; bool set_t; double prev_output1, prev_output2; bool set_secorder; double n_preOutput[2]; double n_preInput[2]; };