What is a digital filter? Difference between FIR filter and IIR filter



Digital signal processing

Release date:2024/3/17         

 ・In Japanese
Prerequisite knowledge
 ・Differential equation
 ・Laplace transform
 ・Moving average processing
 ・Backward difference
 ・Bilinear transformation


■What is a digital filter?

Digital filters are used in discrete time systems. When implementing a filter in an embedded system that requires time to be treated as a discrete system, the continuous time system should be discretized. For example, the difference between continuous-time and discrete-time low-pass filters is as follows.


■Discretization method

In continuous time, the physical model is expressed as a differential equation, which is transformed into a Laplace transform and replaced with an s-function. In discrete time, it is necessary to express the differential equation using a backward difference method, etc., and then convert it to Z and replace it with a z function. There is also a method of approximating the s-function to the z-function using bilinear transformation.


■Types of digital filters

Digital filters include FIR (Finite Impulse Response) filters and IIR (Infinite Impulse Response) filters. The difference is that FIR filters process using only input values, while IIR filters process using not only input values but also output values. FIR, which uses only input values, can be said to have a finite response because if the input becomes 0, the output will eventually become 0. On the other hand, IIR that also uses output values is called an infinite response because the result does not necessarily become 0 even if the input becomes 0.

<FIR filter>
A specific example of an FIR filter is a simple moving average. For example, the following calculation uses the past three input values.



The properties of the FIR filter include the following.

・It is necessary to remember a lot of past input information, which requires memory capacity. The calculation formula also becomes longer.

・The output results are always stable.


<IIR filter>
A specific example of an IIR filter is a weighted moving average of input information and output results. For example below.


The properties of the IIR filter include the following.

・A lot of past input information is not required, and it can be expressed with a simple formula.

・It becomes unstable depending on the form of the equation and how the gain is set.


■Digital filter operation check

Explained here.









List of related articles



Digital signal processing