1次遅れと2次遅れ,ノッチフィルターを実装

Fork of Filter by Yuki Ueno

Filter.h

Committer:
uenono
Date:
2018-01-16
Revision:
5:ab6351c18264
Parent:
4:fc9412c8334e
Child:
6:13ff4bea3c83

File content as of revision 5:ab6351c18264:

#include "mbed.h"

class Filter
{
public:
    double T_LPF;
    double Om_n;
    double sq_dt;
    double sq_Om;


    Filter(double);
    void setLowPassPara(double T, double init_data);
    double LowPassFilter(double input);
    void setNotchPara(double Omega, double init_data);
    double NotchFilter(double input);
    
private:
    double int_time;
    double preOutput;
    bool set_t;
    
    double n_preOutput[2];
    double n_preInput[2];

};