Fertig

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Committer:
Kiwicjam
Date:
Mon May 07 09:06:54 2018 +0000
Revision:
13:724759951a6f
Parent:
8:8ed679044a72
fertig komentiert

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb 8:8ed679044a72 1 #ifndef IIR_FILTER_H_
altb 8:8ed679044a72 2 #define IIR_FILTER_H_
altb 8:8ed679044a72 3
altb 0:78ca29b4c49e 4 class IIR_filter{
altb 0:78ca29b4c49e 5 public:
altb 0:78ca29b4c49e 6
altb 3:769ce5f06d3e 7 IIR_filter(float T, float Ts);
altb 3:769ce5f06d3e 8 IIR_filter(float T, float Ts, float K);
altb 3:769ce5f06d3e 9 IIR_filter(float w0, float D, float Ts, float K);
altb 3:769ce5f06d3e 10 IIR_filter(float *b, float *a, int nb_, int na_);
altb 0:78ca29b4c49e 11
altb 0:78ca29b4c49e 12 float operator()(float u){
altb 3:769ce5f06d3e 13 return filter((double)u);
altb 0:78ca29b4c49e 14 }
altb 0:78ca29b4c49e 15 virtual ~IIR_filter();
altb 0:78ca29b4c49e 16 void reset(float);
altb 3:769ce5f06d3e 17 float filter(double);
altb 0:78ca29b4c49e 18
altb 0:78ca29b4c49e 19 private:
altb 0:78ca29b4c49e 20
altb 0:78ca29b4c49e 21 unsigned int nb;
altb 0:78ca29b4c49e 22 unsigned int na;
altb 3:769ce5f06d3e 23 double *B;
altb 3:769ce5f06d3e 24 double *A;
altb 3:769ce5f06d3e 25 double *uk;
altb 3:769ce5f06d3e 26 double *yk;
altb 3:769ce5f06d3e 27 double K;
altb 8:8ed679044a72 28 };
altb 8:8ed679044a72 29
altb 8:8ed679044a72 30 #endif /* IIR_FILTER_H_ */