Class 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
      void bandPass​(int order, double sampleRate, double centerFrequency, double widthFrequency)
      Band-pass filter with default topology
      void bandPass​(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)
      Band-pass filter with custom topology
      void bandStop​(int order, double sampleRate, double centerFrequency, double widthFrequency)
      Band-stop filter with default topology
      void bandStop​(int order, double sampleRate, double centerFrequency, double widthFrequency, int directFormType)
      Band-stop filter with custom topology
      void highPass​(int order, double sampleRate, double cutoffFrequency)
      High-pass filter with default filter topology
      void highPass​(int order, double sampleRate, double cutoffFrequency, int directFormType)
      High-pass filter with custom topology
      void lowPass​(int order, double sampleRate, double cutoffFrequency)
      Butterworth Low-pass filter with default topology
      void lowPass​(int order, double sampleRate, double cutoffFrequency, int directFormType)
      Butterworth Low-pass filter with custom topology
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Butterworth

        public Butterworth()
    • 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 system
        centerFrequency - centre frequency
        widthFrequency - 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 system
        centerFrequency - centre frequency
        widthFrequency - width of the notch
        directFormType - 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 system
        centerFrequency - centre frequency
        widthFrequency - 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 system
        centerFrequency - centre frequency
        widthFrequency - width of the notch
        directFormType - 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 system
        cutoffFrequency - 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 system
        cutoffFrequency - cutoff of the system
        directFormType - 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 filter
        sampleRate - sampling rate of the system
        cutoffFrequency - 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 filter
        sampleRate - sampling rate of the system
        cutoffFrequency - cutoff frequency
        directFormType - filter topology. This is either DirectFormAbstract.DIRECT_FORM_I or DIRECT_FORM_II