Hobbies And Interests
Home  >> Science & Nature >> Science

How to Increase the Order of a Filter in MatLab

There are two basic types of electrical signal: direct current (DC) and alternating current (AC). DC electrical signals operate at a constant bias voltage and have no variation in time. AC signals have a voltage that oscillates with time at a given frequency. It is not uncommon for AC signals to have a mixture of frequencies, and this can hinder applications. When this occurs, digital filters can be applied to the signal so that frequencies within only a certain range are allowed to pass through.

Instructions

    • 1

      Choose a cutoff frequency for the filter. There are many different types of filters in Matlab. In this example a Butterworth low-pass filter will be used (it allows frequencies below the cut-off frequency through the filter). In the Matlab command window type:
      "fc=*"

      The * symbol should be replaced with the chosen cutoff frequency.

    • 2

      Choose a sampling rate. This is the rate at which the input signal is sampled. The higher the sampling rate, the more accurate the representation of the input signal. In the Matlab command window type:
      "fs=*"

      The * symbol should be replaced with the chosen sampling rate.

    • 3

      Choose the order of the Butterworth filter. The higher the order, the steeper the transition from pass-band (frequencies allowed past) to blocked band (frequencies not allow past). In the Matlab command window type:
      "order=*"

      The * symbol should be replaced with the chosen order (1-6).

    • 4

      Run the Butterworth signal by typing:

      "[b14 a14]=butter(order,(w/fn),'low');"

      The variable b14 and a14 will be populated with the filter response characteristics.


https://www.htfbw.com © Hobbies And Interests