Commit Graph

20 Commits

Author SHA1 Message Date
Laurence Withers 911b3eab3d Add C++ wrapper library
This commit adds libiir++, a C++ wrapper library which provides a true
object-oriented interface. The library has two primary objects, Coeff
(coefficient set) and Filter (filter instance) which are implemented
internally using the C objects.

The C++ implementation does produce additional copies of various bits
of information at setup time in order to better support querying the
structure of the filter at runtime. This is intended to be useful for a
future Python extension that will provide a filter experimentation lab.
2014-07-07 14:56:25 +00:00
Laurence Withers ccc5bc6738 Escape IIR in Doxygen strings for upcoming C++ library 2014-07-07 14:56:25 +00:00
Laurence Withers b12a49542a Add interface to query coefficients from chain 2014-07-07 14:56:25 +00:00
Laurence Withers a08f846437 Split filtering/coefficient handling files
Splits the code for handling coefficient objects and handling filter objects
into separate files. This is just to aid documentation and comprehension.
2014-07-07 11:50:09 +00:00
Laurence Withers 1cf13be442 Update copyright dates 2014-07-07 11:10:28 +00:00
Laurence Withers 2ceb582a30 Move doxygen docs into subsection for partioning 2014-07-07 11:07:05 +00:00
Laurence Withers 8a763c4bf3 Bump C library minor soversion 2014-07-07 11:03:30 +00:00
Laurence Withers 197446db5f Add iir_coeff_copy() 2014-07-07 09:56:28 +00:00
Laurence Withers a57e239d10 Mark array parameters to iir_coeff_new() as const 2014-07-07 09:46:23 +00:00
Laurence Withers 628e1d55a2 Add coefficient query functions
Add some functions that allow the opaque struct iir_coeff_t to be queried
in order to retrieve the number and value of the filter coefficients.
2014-07-05 11:12:42 +00:00
Laurence Withers 77a526388d Add C++ include guards 2014-07-05 11:05:34 +00:00
Laurence Withers 26456a3080 Butterworth: use 2nd order components
When building a high-order Butterworth filter, split into 2nd-order
components, not 4th-order. Instability due to quantization effects has been
observed on real data even with double-precision floating point.
2012-03-16 10:55:21 +00:00
Laurence Withers e9f55c89ee Bump version 2011-04-15 19:12:32 +00:00
Laurence Withers 80f79655ca Copyright/editor line updates 2011-04-15 19:12:04 +00:00
Laurence Withers ca4b3beb5a Test program usability fixes 2011-04-15 19:10:21 +00:00
Laurence Withers e0046bfb84 Add ability to compute filter response
Adds functionality to compute the response of the filter's transfer function at
a given frequency. This uses the Z domain transform. A new test program
zplot_filter (which is compatible with the existing plot_filter) is provided.
2011-04-15 18:56:19 +00:00
Laurence Withers 4c0680fb02 iir_parse_n(): fix silly bug
Fixed a silly bug that caused iir_parse_n() to fail for n>1.
2011-04-15 18:05:37 +00:00
Laurence Withers bc383a92da iir_filter_copy(): don't copy uninitialised state
If iir_filter_copy() was called on a filter which had no state, it would copy
the uninitialised memory from that filter. Check for this.
2011-04-15 17:56:48 +00:00
Laurence Withers 9a87889dd3 Improve initial conditions
Compute the DC gain of the filter (assuming 0 if unstable) and use that to
set the initial conditions of a filter as follows:
  x(t<0)=x(0)
  y(t<0)=x(0) × dc_gain
2011-04-15 17:53:44 +00:00
Laurence Withers ce36ca9ef5 Import initial work 2010-11-08 15:18:07 +00:00