09-11-2013 12:22 PM
In the function Bw_CascadeCoef, is the 'upper_cutoff_frequency' parameter ignored if the IIR Filter is set to a highpass filter?
09-12-2013 08:29 PM
The function is most likely set to zero in that situation since that is a not a parameter that is used by the mathmatical equations to create an IIR filter. Are you seeing any error or strange behavior?
-KP
09-13-2013 01:14 PM
Here is a sample of my code:
#define LOW_CUTOFF_5Hz_HP 5.0
#define HIGH_CUTOFF_5Hz_HP 100000.0
#define FILT_TYPE_5Hz_HP 1
#define FILT_ORDER_5Hz_HP 3
IIRFilterPtr filtStruct_5Hz_HP;
filtStruct_5Hz_HP = AllocIIRFilterPtr (FILT_TYPE_5Hz_HP, FILT_ORDER_5Hz_HP);
Bw_CascadeCoef (daqSampRate, LOW_CUTOFF_5Hz_HP, HIGH_CUTOFF_5Hz_HP, filtStruct_5Hz_HP);
I don't have an error, but just wanted to confirm with NI that the parameter for the High Frequency Cutoff is irrelevant when using a High Pass Butterworth filter.
09-16-2013 08:14 AM
Yes, that high frequency parameter is ignored. There is an example that you can try called IIfiltr.cws located in the directory:
C:\Users\Public\Documents\National Instruments\CVI2013\samples\analysis
When you change the high cutoff frequency parameter on the user interface, the filter does not change.
-KP