A simple biquad filter

Dependents:   emgfilter includeair includeair Encodertest ... more

Committer:
Gerth
Date:
Fri Oct 09 12:37:38 2015 +0000
Revision:
0:ba910c57d594
Child:
1:11e0eb82cb18
now with documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Gerth 0:ba910c57d594 1 #ifndef _BIQUAD_H_
Gerth 0:ba910c57d594 2 #define _BIQUAD_H_
Gerth 0:ba910c57d594 3
Gerth 0:ba910c57d594 4 #include "mbed.h"
Gerth 0:ba910c57d594 5
Gerth 0:ba910c57d594 6 class Biquad
Gerth 0:ba910c57d594 7 {
Gerth 0:ba910c57d594 8 public:
Gerth 0:ba910c57d594 9 ///Instantiate the biquad filter
Gerth 0:ba910c57d594 10 Biquad(void);
Gerth 0:ba910c57d594 11
Gerth 0:ba910c57d594 12 /**Filters the given signal with the filter values
Gerth 0:ba910c57d594 13 * @param u : float signal to filter
Gerth 0:ba910c57d594 14 * @param &v1 : float variable to store previous values
Gerth 0:ba910c57d594 15 * @param &v2 : float variable to store previous values
Gerth 0:ba910c57d594 16 * @param a1 : float filter coefficient a1
Gerth 0:ba910c57d594 17 * @param a1 : float filter coefficient a2
Gerth 0:ba910c57d594 18 * @param a1 : float filter coefficient b0
Gerth 0:ba910c57d594 19 * @param a1 : float filter coefficient b1
Gerth 0:ba910c57d594 20 * @param a1 : float filter coefficient b2
Gerth 0:ba910c57d594 21 * @return v : float filtered signal
Gerth 0:ba910c57d594 22 */
Gerth 0:ba910c57d594 23 double filter( double u, double &v1, double &v2, const double a1, const double a2,
Gerth 0:ba910c57d594 24 const double b0, const double b1, const double b2 );
Gerth 0:ba910c57d594 25 };
Gerth 0:ba910c57d594 26 #endif