Package de.gsi.math.filter.iir
Class Butterworth
- java.lang.Object
-
- de.gsi.math.filter.iir.Cascade
-
- de.gsi.math.filter.iir.Butterworth
-
public class Butterworth extends Cascade
User facing class which contains all the methods the user uses to create Butterworth filters. This done in this way: Butterworth butterworth = new Butterworth(); Then call one of the methods below to create low-,high-,band-, or stopband filters. For example: butterworth.bandPass(2,250,50,5);
-
-
Constructor Summary
Constructors Constructor Description Butterworth()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbandPass(int order, double sampleRate, double centerFrequency, double widthFrequency)Band-pass filter with default topologyvoidbandPass(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)Band-pass filter with custom topologyvoidbandStop(int order, double sampleRate, double centerFrequency, double widthFrequency)Band-stop filter with default topologyvoidbandStop(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)Band-stop filter with custom topologyvoidhighPass(int order, double sampleRate, double cutoffFrequency)High-pass filter with default filter topologyvoidhighPass(int order, double sampleRate, double cutoffFrequency, int directFormType)High-pass filter with custom topologyvoidlowPass(int order, double sampleRate, double cutoffFrequency)Butterworth Low-pass filter with default topologyvoidlowPass(int order, double sampleRate, double cutoffFrequency, int directFormType)Butterworth Low-pass filter with custom topology-
Methods inherited from class de.gsi.math.filter.iir.Cascade
applyScale, filter, getBiquad, getNumBiquads, reset, response, setLayout
-
-
-
-
Method Detail
-
bandPass
public void bandPass(int order, double sampleRate, double centerFrequency, double widthFrequency)Band-pass filter with default topology- Parameters:
order- filter order (actual order is twice)sampleRate- sampling rate of the systemcenterFrequency- centre frequencywidthFrequency- width of the notch
-
bandPass
public void bandPass(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)Band-pass filter with custom topology- Parameters:
order- filter order (actual order is twice)sampleRate- sampling rate of the systemcenterFrequency- centre frequencywidthFrequency- width of the notchdirectFormType- filter topology
-
bandStop
public void bandStop(int order, double sampleRate, double centerFrequency, double widthFrequency)Band-stop filter with default topology- Parameters:
order- filter order (actual order is twice)sampleRate- sampling rate of the systemcenterFrequency- centre frequencywidthFrequency- width of the notch
-
bandStop
public void bandStop(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)Band-stop filter with custom topology- Parameters:
order- filter order (actual order is twice)sampleRate- sampling rate of the systemcenterFrequency- centre frequencywidthFrequency- width of the notchdirectFormType- filter topology
-
highPass
public void highPass(int order, double sampleRate, double cutoffFrequency)High-pass filter with default filter topology- Parameters:
order- filter order (ideally only even orders)sampleRate- sampling rate of the systemcutoffFrequency- cutoff of the system
-
highPass
public void highPass(int order, double sampleRate, double cutoffFrequency, int directFormType)High-pass filter with custom topology- Parameters:
order- filter order (ideally only even orders)sampleRate- sSampling rate of the systemcutoffFrequency- cutoff of the systemdirectFormType- filter topology. See DirectFormAbstract.
-
lowPass
public void lowPass(int order, double sampleRate, double cutoffFrequency)Butterworth Low-pass filter with default topology- Parameters:
order- the order of the filtersampleRate- sampling rate of the systemcutoffFrequency- cutoff frequency
-
lowPass
public void lowPass(int order, double sampleRate, double cutoffFrequency, int directFormType)Butterworth Low-pass filter with custom topology- Parameters:
order- the order of the filtersampleRate- sampling rate of the systemcutoffFrequency- cutoff frequencydirectFormType- filter topology. This is either DirectFormAbstract.DIRECT_FORM_I or DIRECT_FORM_II
-
-