All Topics  
Digital filter

 

   Email Print
   Bookmark   Link






 

Digital filter



 
 
In electronics
Electronics

Electronics refers to the flow of charge through nonmetal electrical conductor , whereas electrical refers to the flow of charge through metal electrical conductor....
, computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 and mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a digital filter is a system that performs mathematical operations on a sampled
Sampling (signal processing)

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave to a sequence of sample ....
, discrete-time signal
Signal (electrical engineering)

In the fields of telecommunications, signal processing, and in electrical engineering more generally, a signal is any time-varying or spatial-varying quantity....
 to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of electronic filter
Electronic filter

Electronic filters are electronic circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal and/or to enhance wanted ones....
, the analog filter, which is an electronic circuit
Electronic circuit

An electronic circuit is a closed path formed by the interconnection of electronic components through which an electric current can flow. The electronic circuits may be physically constructed using any number of methods....
 operating on continuous-time analog signal
Analog signal

An analog or analogue signal is any continuous function Signal for which the time varying feature of the signal is a representation of some other time varying quantity, i.e analogous to another time varying signal....
s.






Discussion
Ask a question about 'Digital filter'
Start a new discussion about 'Digital filter'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Fir
In electronics
Electronics

Electronics refers to the flow of charge through nonmetal electrical conductor , whereas electrical refers to the flow of charge through metal electrical conductor....
, computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
 and mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a digital filter is a system that performs mathematical operations on a sampled
Sampling (signal processing)

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave to a sequence of sample ....
, discrete-time signal
Signal (electrical engineering)

In the fields of telecommunications, signal processing, and in electrical engineering more generally, a signal is any time-varying or spatial-varying quantity....
 to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of electronic filter
Electronic filter

Electronic filters are electronic circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal and/or to enhance wanted ones....
, the analog filter, which is an electronic circuit
Electronic circuit

An electronic circuit is a closed path formed by the interconnection of electronic components through which an electric current can flow. The electronic circuits may be physically constructed using any number of methods....
 operating on continuous-time analog signal
Analog signal

An analog or analogue signal is any continuous function Signal for which the time varying feature of the signal is a representation of some other time varying quantity, i.e analogous to another time varying signal....
s. An analog signal may be processed by a digital filter by first being digitized and represented as a sequence of numbers, then manipulated mathematically, and then reconstructed as a new analog signal (see digital signal processing
Digital signal processing

Digital signal processing is concerned with the representation of the signal s by a sequence of numbers or symbols and the processing of these signals....
). In an analog filter, the input signal is "directly" manipulated by the circuit.

A digital filter system usually consists of an analog-to-digital converter
Analog-to-digital converter

An analog-to-digital converter is a device which converts continuous signal to Discrete signal digital numbers. The reverse operation is performed by a digital-to-analog converter ....
 (to sample the input signal), a microprocessor (often a specialized digital signal processor
Digital signal processor

A digital signal processor is a specialized microprocessor designed specifically for digital signal processing, generally in real-time computing....
), and a digital-to-analog converter
Digital-to-analog converter

In electronics, a digital-to-analog converter is a device for converting a digital code to an analog signal .An analog-to-digital converter performs the reverse operation....
. Software running on the microprocessor can implement the digital filter by performing the necessary mathematical operations on the numbers received from the ADC. In some high performance applications, an FPGA or ASIC
ASIC

The acronym ASIC, depending on context, may stand for:* Application-specific integrated circuit, an integrated circuit customized for a particular use, rather than intended for general-purpose use...
 is used instead of a general purpose microprocessor.

Digital filters may be more expensive than an equivalent analog filter due to their increased complexity, but they make practical many designs that are impractical or impossible as analog filters. Since digital filters use a sampling process and discrete-time processing, they experience latency (the difference in time between the input and the response), which is almost irrelevant in analog filters.

Digital filters are commonplace and an essential element of everyday electronics such as radio
Radio

Radio is the transmission of signals, by modulation of electromagnetic radiation with frequency below those of visible light.Electromagnetic radiation radio propagation by means of oscillating electromagnetic fields that pass through the air and the vacuum of space....
s, cellphones, and stereo receivers
Stereophonic sound

Stereophonic sound, commonly called stereo, is the reproduction of sound, using two or more independent Sound recording and reproduction channels, through a symmetrical configuration of loudspeakers, in such a way as to create a pleasant and natural impression of sound heard from various directions, as in natural hearing....
.

Characterization of digital filters


A digital filter is characterized by its transfer function
Transfer function

A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a system analysis....
, or equivalently, its difference equation. Mathematical analysis of the transfer function can describe how it will respond to any input. As such, designing a filter consists of developing specifications appropriate to the problem (for example, a second-order lowpass filter with a specific cut-off frequency), and then producing a transfer function which meets the specifications.

The transfer function
Transfer function

A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a system analysis....
 for a linear, time-invariant, digital filter can be expressed as a transfer function in the Z-domain
Z-transform

In mathematics and signal processing, the Z-transform converts a discrete_mathematics time-domain signal, which is a sequence of real number or complex numbers, into a complex frequency-domain representation....
; if it is causal, then it has the form:

where the order of the filter is the greater of N or M. See Z-transform's LCCD equation
Z-transform

In mathematics and signal processing, the Z-transform converts a discrete_mathematics time-domain signal, which is a sequence of real number or complex numbers, into a complex frequency-domain representation....
 for further discussion of this transfer function
Transfer function

A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a system analysis....
.

This form is for a recursive filter
Recursive filter

In signal processing, a recursive filter is a type of Electronic filter which re-uses one or more of its outputs as an input. This feedback typically results in an unending impulse response , characterised by either exponential growth, exponential decay, or sinusoidal signal output components....
, which typically leads to infinite impulse response
Infinite impulse response

Infinite impulse response is a property of signal processing systems. Systems with that property are known as IIR systems or when dealing with electronic filter systems as IIR filters....
 behaviour, but if the denominator is unity
1 (number)

1 is a number, number names, and the name of the glyph representing that number.It represents a single entity, the unit of counting or measurement....
, then this is the form for a finite impulse response
Finite impulse response

A finite impulse response filter is a type of a digital filter. The impulse response, the filter's response to a Kronecker delta input, is 'finite' because it settles to zero in a finite number of sampling intervals....
 filter.

Analysis techniques


A variety of mathematical techniques may be employed to analyze the behaviour of a given digital filter. Many of these analysis techniques may also be employed in designs, and often form the basis of a filter specification.

Typically, one analyzes filters by calculating how the filter will respond to a simple input. One can then extend this information to visualize the filter's response to more complex signals.

Impulse response

The impulse response
Impulse response

The impulse response of a system is its output when presented with a very brief input signal, an impulse. Mathematically, an impulse can be modeled as a Dirac delta function for continuous-time systems, or as the Kronecker delta for discrete-time systems....
, often denoted or is a measurement of how a filter will respond to the Kronecker delta
Kronecker delta

In mathematics, the Kronecker delta or Kronecker's delta, named after Leopold Kronecker , is a Function of two variables, usually integers, which is 1 if they are equal, and 0 otherwise....
 function. For example, given a difference equation, one would set and for and evaluate. In the case of linear time-invariant FIR filters, the impulse response is exactly equal to the sequence of filter coefficients . In general, the impulse response is a characterization of the filter's behaviour.

A plot of the impulse response will help to reveal how a filter will respond to a sudden, momentary disturbance.

Filter design


The design of digital filters is a deceptively complex topic. Although filters are easily understood and calculated, the practical challenges of their design and implementation are significant and are the subject of much advanced research.

There are two categories of digital filter: the recursive filter
Recursive filter

In signal processing, a recursive filter is a type of Electronic filter which re-uses one or more of its outputs as an input. This feedback typically results in an unending impulse response , characterised by either exponential growth, exponential decay, or sinusoidal signal output components....
 and the nonrecursive filter. These are often referred to as infinite impulse response
Infinite impulse response

Infinite impulse response is a property of signal processing systems. Systems with that property are known as IIR systems or when dealing with electronic filter systems as IIR filters....
 (IIR) filters and finite impulse response
Finite impulse response

A finite impulse response filter is a type of a digital filter. The impulse response, the filter's response to a Kronecker delta input, is 'finite' because it settles to zero in a finite number of sampling intervals....
 (FIR) filters, respectively.

Filter realization


After a filter is designed, it must be realized by developing a signal flow diagram that describes the filter in terms of operations on sample sequences.

A given transfer function may be realized in many ways. Consider how a simple expression such as could be evaluated – one could also compute the equivalent . In the same way, all realizations may be seen as "factorizations" of the same transfer function, but different realizations will have different numerical properties. Specifically, some realizations are more efficient in terms of the number of operations or storage elements required for their implementation, and others provide advantages such as improved numerical stability and reduced round-off error. Some structures are more optimal for fixed-point arithmetic
Fixed-point arithmetic

In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point . Fixed-point number representation can be compared to the more complicated floating point number representation....
 and others may be more optimal for floating-point arithmetic.

Direct Form I

A straightforward approach for IIR filter realization is Direct Form I
Digital biquad filter

For the analog implementation of a biquad filter, check Biquad_filterIn signal processing, a digital biquad filter is a second-order recursive filter linear filter, containing two Pole-zero_diagram and two Pole-zero_diagram....
, where the difference equation is evaluated directly. This form is practical for small filters, but may be inefficient and impractical (numerically unstable) for complex designs. In general, this form requires 2N delay elements (for both input and output signals) for a filter of order N.
Direct Form II

The alternate Direct Form II
Digital biquad filter

For the analog implementation of a biquad filter, check Biquad_filterIn signal processing, a digital biquad filter is a second-order recursive filter linear filter, containing two Pole-zero_diagram and two Pole-zero_diagram....
 only needs N delay units, where N is the order of the filter – potentially half as much as Direct Form I. The disadvantage is that Direct Form II increases the possibility of arithmetic overflow for filters of high Q or resonance. It has been shown that as Q increases, the round-off noise of both direct form topologies increases without bounds. This is because, conceptually, the signal is first passed through an all-pole filter (which normally boosts gain at the resonant frequencies) before the result of that is saturated, then passed through an all-zero filter (which often attenuates much of what the all-pole half amplifies).
Cascaded second-order sections

A common strategy is to realize a higher-order (greater than 2) digital filter as a cascaded series of second-order "biquadratric" (or "biquad") sections (see digital biquad filter
Digital biquad filter

For the analog implementation of a biquad filter, check Biquad_filterIn signal processing, a digital biquad filter is a second-order recursive filter linear filter, containing two Pole-zero_diagram and two Pole-zero_diagram....
). Advantages of this strategy is that the coefficient range is limited. Cascading direct form II sections result in N delay elements for filter order of N. Cascading direct form I sections result in N+2 delay elements since the delay elements of the input of any section (except the first section) are a redundant with the delay elements of the output of the preceding section.

Difference equation

In discrete-time systems, the digital filter is often implemented by converting the transfer function
Transfer function

A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a system analysis....
 to a linear constant-coefficient difference equation
Z-transform

In mathematics and signal processing, the Z-transform converts a discrete_mathematics time-domain signal, which is a sequence of real number or complex numbers, into a complex frequency-domain representation....
 (LCCD) via the Z-transform
Z-transform

In mathematics and signal processing, the Z-transform converts a discrete_mathematics time-domain signal, which is a sequence of real number or complex numbers, into a complex frequency-domain representation....
. The discrete frequency-domain transfer function is written as the ratio of two polynomials. For example:

This is expanded:

and divided by the highest order of :

The coefficients of the denominator, , are the 'feed-backward' coefficients and the coefficients of the numerator are the 'feed-forward' coefficients, . The resultant linear difference equation is:

or, for the example:

This equation shows how to compute the next output sample, , in terms of the past outputs, , the present input, , and the past inputs, . In this form, the filter is amenable to numerical simulation via straightforward iteration
Iteration

Iteration means the act of repeating....
.

Other Forms

Other forms include:
  • Series/cascade
  • Parallel
  • Ladder form
  • Lattice form
  • Coupled normal form
  • Multifeedback
  • Analog-inspired forms such as Sallen-key and state variable filters
  • Systolic arrays


Comparison of analog and digital filters

Digital filters are not subject to the component non-linearities that greatly complicate the design of analog filters. Analog filters consist of imperfect electronic components, whose values are specified to a limit tolerance (e.g. resistor values often have a tolerance of +/- 5%) and which may also change with temperature and drift with time. As the order of an analog filter increases, and thus its component count, the effect of variable component errors is greatly magnified. In digital filters, the coefficient values are stored in computer memory, making them far more stable and predictable.

Because the coefficients of digital filters are definite, they can be used to achieve much more complex and selective designs – specifically with digital filters, one can achieve a lower passband ripple, faster transition, and higher stopband attenuation than is practical with analog filters. Even if the design could be achieved using analog filters, the engineering cost of designing an equivalent digital filter would likely be much lower. Furthermore, one can readily modify the coefficients of a digital filter to make an adaptive filter
Adaptive filter

An adaptive filter is a filter that self-adjusts its transfer function according to an optimizing algorithm. Because of the complexity of the optimizing algorithms, most adaptive filters are digital filters that perform digital signal processing and adapt their performance based on the input signal....
 or a user-controllable parametric filter. While these techniques are possible in an analog filter, they are again considerably more difficult.

Digital filters can be used in the design of finite impulse response filters. Analog filters do not have the same capability, because finite impulse response filters require delay elements.

Digital filters rely less on analog circuitry, potentially allowing for a better signal-to-noise ratio
Signal-to-noise ratio

Signal-to-noise ratio is an electrical engineering measurement, also used in other fields , defined as the ratio of a signal power to the noise power corrupting the signal....
. A digital filter will introduce noise to a signal during analog low pass filtering, analog to digital conversion, digital to analog conversion and may introduce digital noise due to quantization. With analog filters, every component is a source of thermal noise (such as Johnson noise), so as the filter complexity grows, so does the noise.

However, digital filters do introduce a higher fundamental latency to the system. In an analog filter, latency is often negligible; strictly speaking it is the time for an electrical signal to propagate through the filter circuit. In digital filters, latency is a function of the number of delay elements in the system.

Digital filters also tend to be more limited in bandwidth than analog filters. High bandwidth digital filters require expensive ADC/DACs and fast computer hardware for processing.

In very simple cases, it is more cost effective to use an analog filter. Introducing a digital filter requires considerable overhead circuitry, as previously discussed, including two low pass analog filters.

Types of digital filters


Many digital filters are based on the Fast Fourier transform
Fast Fourier transform

A fast Fourier transform is an efficient algorithm to compute the discrete Fourier transform and its inverse. There are many distinct FFT algorithms involving a wide range of mathematics, from simple complex number to group theory and number theory; this article gives an overview of the available techniques and some of their general propert...
, a mathematical algorithm that quickly extracts the frequency spectrum
Frequency spectrum

Familiar concepts associated with a frequency are colors, musical notes, radio/TV channels, and even the regular rotation of the earth. A source of light can have many colors mixed together and in different amounts ....
 of a signal, allowing the spectrum to be manipulated (such as to create band-pass filters) before converting the modified spectrum back into a time-series signal.

Another form of a digital filter is that of a state-space
State space (controls)

In control engineering, a state space representation is a mathematical model of a physical system as a set of input, output and state variables related by first-order differential equations....
 model. A well used state-space filter is the Kalman filter
Kalman filter

The Kalman filter is an efficient recursive filter that estimates the state of a Linear system from a series of noise measurements. It is used in a wide range of engineering applications from radar to computer vision, and is an important topic in control theory and control systems engineering....
 published by Rudolf Kalman
Rudolf Kalman

Rudolf Emil K?lm?n is a Hungary-United States mathematical system theorist and a Professor Emeritus at the Swiss Federal Institute of Technology, who is famous for his co-invention of the Kalman filter, a mathematical technique widely used in control systems and avionics....
 in 1960.

See also

  • Analog filter
  • Bessel filter
    Bessel filter

    In electronics and signal processing, a Bessel filter is a variety of linear filter with a maximally flat group delay . Bessel filters are often used in audio crossover systems....
  • Butterworth filter
    Butterworth filter

    The Butterworth filter is one type of electronic filter design. It is designed to have a frequency response which is as flat as mathematically possible in the passband....
  • Elliptical filter (Cauer filter)
  • Linkwitz-Riley filter
    Linkwitz-Riley filter

    File:Linkwitz vs Butterworth.pngA Linkwitz-Riley filter is an IIR filter used in Linkwitz-Riley audio crossovers, named after its inventors Siegfried Linkwitz and Russ Riley, which was originally described in Passive Crossover Networks for Noncoincident Drivers in .It is also known as a Butterworth squared filter....
  • Chebyshev filter
    Chebyshev filter

    Chebyshev filters are analog or digital electronic filter having a steeper roll-off and more passband ripple or stopband ripple than Butterworth filters....
  • Ladder filter
  • Digital signal processing
    Digital signal processing

    Digital signal processing is concerned with the representation of the signal s by a sequence of numbers or symbols and the processing of these signals....
  • Sample (signal)
  • Electronic filter
    Electronic filter

    Electronic filters are electronic circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal and/or to enhance wanted ones....
  • Filter design
    Filter design

    Filter design is the process of designing a filter , often a linear shift-invariant filter, which satisfies a set of requirements, some of which are contradictory....
  • Biquad filter
    Digital biquad filter

    For the analog implementation of a biquad filter, check Biquad_filterIn signal processing, a digital biquad filter is a second-order recursive filter linear filter, containing two Pole-zero_diagram and two Pole-zero_diagram....
  • High-pass filter
    High-pass filter

    A high-pass filter is a electronic filter that passes high frequency well, but attenuation frequencies lower than the cutoff frequency. The actual amount of attenuation for each frequency varies from filter to filter....
    , Low-pass filter
    Low-pass filter

    A low-pass filter is a electronic filter that passes low-frequency signal but attenuates signals with frequencies higher than the cutoff frequency....
  • Infinite impulse response
    Infinite impulse response

    Infinite impulse response is a property of signal processing systems. Systems with that property are known as IIR systems or when dealing with electronic filter systems as IIR filters....
    , Finite impulse response
    Finite impulse response

    A finite impulse response filter is a type of a digital filter. The impulse response, the filter's response to a Kronecker delta input, is 'finite' because it settles to zero in a finite number of sampling intervals....
  • Z-transform
    Z-transform

    In mathematics and signal processing, the Z-transform converts a discrete_mathematics time-domain signal, which is a sequence of real number or complex numbers, into a complex frequency-domain representation....
  • Bilinear transform
    Bilinear transform

    The bilinear transform is used in digital signal processing and discrete-time control theory to transform continuous-time system representations to discrete-time and vice versa....


External links

  • – Free filter design software
  • – Free customizable digital filter design software built with python and boost (WinXP/Ubuntu 6.10/RHEL-4). Also with interactive web interface.
  • – Free filter design software
  • – Filter design wizard (FIR, IIR)