This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Wiki encyclopedia > DF


Digital filter is an algorithm or device composed of digital multiplier, adder and delay unit. The function of the digital filter is to process the digital code of the input discrete signal in order to achieve the purpose of changing the signal spectrum.



The digital filter's method of filtering the signal is: use a digital computer to process the digital signal, and the processing is to calculate according to the pre-programmed program. The principle of the digital filter is shown in the figure, and its core is the digital signal processor.

If you use a general-purpose computer, you can write a program at any time to perform signal processing, but the processing speed is slower. If a dedicated computer chip is used, it is an integrated circuit made according to an arithmetic method. The signal can be processed by connecting signals. The processing speed is fast, but the function is not easy to change. If a programmable computer chip is used, then what function the machine can have with whatever program is loaded. This kind of programmable chip has many advantages, it is the first choice of modern electronic products. If the analog signal is processed, an analog-to-digital converter and a digital-to-analog converter need to be added.

Refer to "Digital Signal Processing" by Yang Yiming, p.183-184, published by Machinery Industry Press in 2012.

The digital filter calculates the signal according to the program to achieve the purpose of filtering. By programming the memory of the digital filter, various filtering functions can be achieved. For digital filters, the added function is to increase the program, without adding components, without being affected by component errors, and without increasing the size of the chip for low-frequency signal processing. Using digital filtering method can get rid of the problem that analog filter is limited by components.

The term digital filter appeared in the mid-1960s. Due to the development of electronic computer technology and large-scale integrated circuits, digital filters have been implemented in computer software or real-time with large-scale integrated digital hardware.

The digital filter is a discrete-time system (according to a predetermined algorithm, which converts the input discrete-time signal (corresponding to the digital frequency) into the required specific function device that outputs the discrete-time signal). When using digital filters to process analog signals (corresponding to analog frequencies), the input analog signals must first be band-limited, sampled, and analog-to-digital converted. The digital frequency of the input signal of the digital filter (2π*f/fs, f is the frequency of the analog signal, fs is the sampling frequency, pay attention to the difference from the analog frequency), according to the Nyquist sampling theorem, the frequency spectrum of the sampled signal should not be generated The overlap should be less than the folding frequency (ws/2=π), and its frequency response has a period repeating characteristic at intervals of 2π, and is symmetrical at the folding frequency, ie, ω=π point. In order to obtain the analog signal, the output digital signal processed by the digital filter must be digital-analog converted and smoothed. Digital filters have the advantages of high precision, high reliability, programmable change characteristics or multiplexing, and easy integration. Digital filters have been widely used in speech signal processing, image signal processing, medical biological signal processing and other application fields.

Digital filters are of low-pass, high-pass, band-pass, band-stop, and all-pass types. It can be time-invariant or time-varying, causal or non-causal, linear or nonlinear. The most widely used are linear, time-invariant digital filters, and f.i.r filters.


The most common method of IIR digital filters is by means of analog filter design. Analog filter design already has quite mature technologies and methods, complete design formulas, and more complete charts can be queried, so designing digital filters can make full use of these rich resources.

The specific steps for the design of IIR digital filters are as follows:

(1) Convert the technical specifications of the given digital filter to the technical specifications of the analog low-pass filter according to certain rules.

(2) Design analog low-pass filter G(s) according to the converted technical indicators (G(s) is the transfer function of the low-pass filter).

(3) According to certain rules, G(s) is converted into H(z) (H(z) is the transfer function of the digital filter). If the designed digital filter is low-pass, the above process can be ended. If the designed high-pass, band-pass, or band-reject filter, then the following steps are required:

Convert the technical specifications of high-pass, band-pass, or band-stop digital filters to the technical specifications of low-pass analog filters, then design low-pass G(s), and then convert G(s) to H(z).

The system function of the IIR digital filter can be written as a closed function.

The IIR digital filter uses a recursive structure, that is, a feedback loop on the structure. The operation structure of the IIR filter is usually composed of basic operations such as delay, multiplication, and addition. It can be combined into four types: direct type, positive quasi type, cascade type, and parallel type, all with feedback loops. Due to the rounding process in the operation, the error is continuously accumulated, and sometimes a weak parasitic oscillation is generated.

The design of IIR digital filters can rely on the results of mature analog filters, such as Butterworth, Chebyshev, and elliptical filters. There are ready-made design data or charts to check, and the design workload is relatively small. The requirements of the tool are not high. When designing an IIR digital filter, we first write the formula of the analog filter according to the index, and then convert the formula of the analog filter into the formula of the digital filter through a certain transformation.

The phase characteristic of the IIR digital filter is not easy to control. When the phase requirements are high, a phase calibration network needs to be added.

When designing IIR filter under MATLAB, you can use Butterworth function to design Butterworth filter, Cheby1 function to design Chebyshev type I filter, Cheby2 to design Chebyshev type II filter, and ellipord function to design ellipse filter. The following mainly introduces the use of the first two functions.

Unlike the design of the FIR filter, the order of the IIR filter design is not specified by the designer, but is based on various filter parameters (cutoff frequency, passband filter, stopband attenuation, etc.) input by the designer, and is controlled by the software. Design the lowest filter order that satisfies these parameters. Different types of IIR filters designed under MATLAB have corresponding functions for order selection.

IIR unit response is infinite pulse sequence FIR unit response is finite

IIR amplitude-frequency characteristic has high precision, not linear phase, and can be applied to audio signals that are not sensitive to phase information;

The accuracy of the FIR amplitude-frequency characteristic is lower than that of iir, but the linear phase is the time difference between the signals of different frequency components after passing through the FIR filter. This is a very good nature.

In addition, the limited unit response is also conducive to the processing of digital signals, easy to program, and the delay for calculation is also small, which is very important for real-time signal processing.


Digital filters can be divided into one-dimensional, two-dimensional or multi-dimensional digital filters according to the dimension of the processed signal. The signal processed by the one-dimensional digital filter is a sequence of univariate functions, such as the sampling value of the time function. The signal processed by the two-dimensional or multi-dimensional digital filter is a sequence of two or more variable functions. For example, the discrete signal of a two-dimensional image is a sample value on plane coordinates.

One-dimensional filter

An algorithm or device for processing a one-dimensional digital signal sequence. The relationship between the output signal sequence y(n) and the input signal sequence x(n) of a linear, time-invariant one-dimensional digital filter is described by a linear, constant coefficient difference equation: (see Figure 1)

Corresponding Z-domain transfer function graph 2 where ar and bk are digital filter coefficients, Z[y(n)] and Z[x(n)]


Figure II

These are the Z transformation of the output and input signal sequences, respectively. The inverse Z transformation of the transfer function H(z) is called the unit impulse response of the one-dimensional digital filter, that is, h(n)=Z-1 [H(z)]. The output signal sequence can also be expressed as a discrete convolution of the input signal sequence x(n) and the digital filter unit impulse response h(n) (see Figure 3)

If the unit impulse response h(n) of the digital filter has only a finite number of non-zero values, it is called a finite impulse response digital filter. If the unit impulse response has infinite


image 3

Multiple non-zero values are called infinite impulse response digital filters.

Digital filters with finite impulse response generally adopt a non-recursive algorithm structure, so they are also called non-recursive digital filters. Infinite impulse response digital filter can only adopt recursive algorithm structure, so it is also called recursive digital filter.

Two-dimensional filter

Algorithms for processing two-dimensional digital signal sequences or


Figure 4

Device. The relationship between the output y(m,n) and the input x(m,n) of a linear, time-invariant two-dimensional digital filter is described by a two-variable linear constant coefficient difference equation: (see Figure 4)

The corresponding transfer function is shown in Figure 5, where a b is the filter coefficient, and Z[y(m,n)] and Z[x(m,n)] are the two-dimensional Z transforms of the output and input signal sequences, respectively.


Figure 5

The two-dimensional Z inverse transform of the transfer function H (z1, z2) h (m, n) = Z-1 [H (z1, z2], called the unit impulse response of the two-dimensional digital filter. Two-dimensional digital filter The output y(m,n) can also be expressed as a two-dimensional discrete convolution of the input signal sequence x(m,n) and the unit impulse response h(m,n) (Figure 6)

The two-dimensional digital filter's response to unit impulse is also divided into finite impulse response and infinite impulse response.


Figure 6

Two categories. The two-dimensional finite impulse response digital filter is a non-recursive algorithm structure, so it is also called two-dimensional non-recursive digital filter. The two-dimensional infinite impulse response digital filter is a recursive algorithm structure, so it is also called two-dimensional recursive digital filter.

Related literatures


  • XCS20XL-4CSG144C


    FPGA Spartan-XL Family 20K Gates 950 Cells 217MHz 3.3V 144-Pin CSBGA

  • XC3SD3400A-4FG676I


    FPGA Spartan-3A DSP Family 3.4M Gates 53712 Cells 667MHz 90nm Technology 1.2V 676-Pin FBGA

  • XC3SD3400A-5FG676C


    FPGA Spartan-3A DSP Family 3.4M Gates 53712 Cells 770MHz 90nm Technology 1.2V 676-Pin FBGA

  • XC2C512-7FTG256C


    CPLD CoolRunner -II Family 12K Gates 512 Macro Cells 179MHz 0.18um Technology 1.8V 256-Pin FTBGA

  • XC2C512-FGG324I


    Xilinx BGA

FPGA Tutorial Lattice FPGA
Need Help?


If you have any questions about the product and related issues, Please contact us.