|
FilterGen
1.0.0
A library to design digital filters in embedded systems.
|
#include <dh/filter-types.h>
Public Attributes | |
| double | cutoff_frequency_low |
| double | cutoff_frequency_high |
| double | sampling_frequency |
| double | ripple |
| size_t | filter_order |
| DH_FILTER_TYPE | filter_type |
The structure defining the parameters for a filter that will be created with dh_create_filter().
| double dh_filter_parameters::cutoff_frequency_high |
The second cutoff frequency of the filter.
This value is used to configure the upper cutoff frequencies for bandpass and bandstop filters. The value represents the upper end (cutoff_frequency_low_hz<cutoff_frequency_high_hz must be true) of the band.
This parameter is used for the following filters:
Valid Range:
Unit:
| double dh_filter_parameters::cutoff_frequency_low |
The first cutoff frequency of the filter.
This value is used to configure the cutoff frequencies for lowpass and highpass filters. For bandpass and bandstop filters, the value represents the lower end (cutoff_frequency_low_hz<cutoff_frequency_high_hz must be true) of the band.
This parameter is used for the following filters:
Valid Range:
Unit:
| size_t dh_filter_parameters::filter_order |
The order of the filter.
This value determines the number of input and output coefficients in the recurrence relation of the filter.
This parameter is used by every filter except:
Valid Range:
Unit:
| DH_FILTER_TYPE dh_filter_parameters::filter_type |
What filter to generate. Valid values are defined in the enum DH_FILTER_TYPE.
| double dh_filter_parameters::ripple |
The ripple of chebyshev filters.
This value is used during configuration to shift the poles of the chebyshev filters.
This parameter is used for the following filters:
Valid Range:
Unit:
| double dh_filter_parameters::sampling_frequency |
The sampling rate for data supplied to the filter.
This value is used during configuration to scale the cutoff frequencies and then compute the values. The filter itself does not depend on timings, and e.g. a lowpass with 10Hz cutoff and 100Hz sampling rate will have the exact same parameters as one with 20kHz cutoff and 200kHz sampling rate.
This parameter is used for the following filters:
Valid Range:
Unit: