Simple biquad filter

Dependents:   EMG_Filter frdm_Motor_V2_2 frdm_Motor_V2_2 frdm_Motor_V2_3 ... more

Files at this revision

API Documentation at this revision

Comitter:
tomlankhorst
Date:
Sun Oct 02 21:27:00 2016 +0000
Parent:
6:54dc8fd46e26
Commit message:
Update

Changed in this revision

BiQuad.h Show annotated file Show diff for this revision Revisions of this file
diff -r 54dc8fd46e26 -r 26861979d305 BiQuad.h
--- a/BiQuad.h	Sun Oct 02 20:47:42 2016 +0000
+++ b/BiQuad.h	Sun Oct 02 21:27:00 2016 +0000
@@ -5,6 +5,7 @@
 #include <complex>
 
 /** BiQuad class implements a single filter
+ *
  * author: T.J.W. Lankhorst <t.j.w.lankhorst@student.utwente.nl>
  *
  * Filters that - in the z domain - are the ratio of two quadratic functions. The general form is:
@@ -15,23 +16,21 @@
  *
  * Which is often normalized by dividing all coefficients by a0.
  *
- * Source: https://github.com/tomlankhorst/biquad 
- *
  * Example:
  * @code
  * #include "mbed.h"
  * #include <complex>
- * #include "BiQuad.h"
+ * 
+ * // Example: 4th order Butterworth LP (w_c = 0.1*f_nyquist)
+ * BiQuad bq1( 4.16599e-04, 8.33198e-04, 4.16599e-04, -1.47967e+00, 5.55822e-01 );
+ * BiQuad bq2( 1.00000e+00, 2.00000e+00, 1.00000e+00, -1.70096e+00, 7.88500e-01 );
  *
  * BiQuadChain bqc;
- * BiQuad pidf;
  *
  * int main() {
- *     // Create a biquad filter based on PIDF parameters
- *    pidf.PIDF(1,1,1,1,1);
  *
  *    // Add the biquads to the chain
- *    bqc.add( &pidf );
+ *    bqc.add( &bq1 ).add( &bq2 );
  *
  *    // Find the poles of the filter
  *    std::cout << "Filter poles" << std::endl;
@@ -54,6 +53,9 @@
  *      std::cout << "\t" << bqc.step( 1.0 ) << std::endl;
  * }
  * @endcode
+ *
+ * https://github.com/tomlankhorst/biquad 
+ *
  */
 class BiQuad {