1次遅れと2次遅れ,ノッチフィルターを実装
Fork of Filter by
Filter.h@5:ab6351c18264, 2018-01-16 (annotated)
- Committer:
- uenono
- Date:
- Tue Jan 16 15:56:33 2018 +0000
- Revision:
- 5:ab6351c18264
- Parent:
- 4:fc9412c8334e
- Child:
- 6:13ff4bea3c83
????????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uenono | 0:17706252d1ed | 1 | #include "mbed.h" |
uenono | 0:17706252d1ed | 2 | |
uenono | 0:17706252d1ed | 3 | class Filter |
uenono | 0:17706252d1ed | 4 | { |
uenono | 0:17706252d1ed | 5 | public: |
uenono | 0:17706252d1ed | 6 | double T_LPF; |
uenono | 0:17706252d1ed | 7 | double Om_n; |
uenono | 0:17706252d1ed | 8 | double sq_dt; |
uenono | 0:17706252d1ed | 9 | double sq_Om; |
uenono | 1:637f9a61b133 | 10 | |
uenono | 0:17706252d1ed | 11 | |
uenono | 1:637f9a61b133 | 12 | Filter(double); |
uenono | 4:fc9412c8334e | 13 | void setLowPassPara(double T, double init_data); |
uenono | 0:17706252d1ed | 14 | double LowPassFilter(double input); |
uenono | 5:ab6351c18264 | 15 | void setNotchPara(double Omega, double init_data); |
uenono | 0:17706252d1ed | 16 | double NotchFilter(double input); |
uenono | 1:637f9a61b133 | 17 | |
uenono | 1:637f9a61b133 | 18 | private: |
uenono | 2:a842c1a33e4f | 19 | double int_time; |
uenono | 3:987d5d78f863 | 20 | double preOutput; |
uenono | 3:987d5d78f863 | 21 | bool set_t; |
uenono | 5:ab6351c18264 | 22 | |
uenono | 5:ab6351c18264 | 23 | double n_preOutput[2]; |
uenono | 5:ab6351c18264 | 24 | double n_preInput[2]; |
uenono | 0:17706252d1ed | 25 | |
uenono | 0:17706252d1ed | 26 | }; |