Test of pmic GPA with filter
Dependencies: mbed
Fork of nucf446-cuboid-balance1_strong by
Diff: IIR_filter.h
- Revision:
- 0:15be70d21d7c
- Child:
- 5:d6c7ccbbce78
diff -r 000000000000 -r 15be70d21d7c IIR_filter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IIR_filter.h Wed Jan 10 16:08:07 2018 +0000 @@ -0,0 +1,22 @@ +class IIR_filter{ + public: + IIR_filter(unsigned int nb,unsigned int na); + IIR_filter(float b,float a); + IIR_filter(float tau,float Ts,float dc); + IIR_filter(float tau); + float operator()(float u){ + return filter(u); + } + virtual ~IIR_filter(); + void reset(float); + float filter(float); + + private: + unsigned int nb; + unsigned int na; + float *b; + float *a; + float *uk; + float *yk; + float dc; +}; \ No newline at end of file