HOME

TheInfoList



OR:

In
signal processing Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, Scalar potential, potential fields, Seismic tomograph ...
, a digital filter is a system that performs mathematical operations on a sampled,
discrete-time signal In mathematical dynamics, discrete time and continuous time are two alternative frameworks within which variables that evolve over time are modeled. Discrete time Discrete time views values of variables as occurring at distinct, separate "poi ...
to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of
electronic filter Electronic filters are a type of signal processing filter in the form of electrical circuits. This article covers those filters consisting of lumped-element model, lumped electronic components, as opposed to distributed-element filters. That ...
, the
analog filter Analogue Filter (signal processing), filters are a basic building block of signal processing much used in electronics. Amongst their many applications are the separation of an audio signal before application to bass (music), bass, mid-range sp ...
, which is typically an
electronic circuit An electronic circuit is composed of individual electronic components, such as resistors, transistors, capacitors, inductors and diodes, connected by conductive wires or Conductive trace, traces through which electric current can flow. It is a t ...
operating on continuous-time
analog signal An analog signal (American English) or analogue signal (British and Commonwealth English) is any continuous-time signal representing some other quantity, i.e., ''analogous'' to another quantity. For example, in an analog audio signal, the ins ...
s. A digital filter system usually consists of an
analog-to-digital converter In electronics, an analog-to-digital converter (ADC, A/D, or A-to-D) is a system that converts an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a Digital signal (signal processing), digi ...
(ADC) to sample the input signal, followed by a microprocessor and some peripheral components such as memory to store data and filter coefficients etc. Program Instructions (software) running on the microprocessor 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 is used instead of a general purpose microprocessor, or a specialized digital signal processor (DSP) with specific paralleled architecture for expediting operations such as filtering. 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. Digital filters can often be made very high order, and are often finite impulse response filters, which allows for linear phase response. When used in the context of real-time analog systems, digital filters sometimes have problematic latency (the difference in time between the input and the response) due to the associated analog-to-digital and
digital-to-analog conversion In electronics, a digital-to-analog converter (DAC, D/A, D2A, or D-to-A) is a system that converts a digital signal into an analog signal. An analog-to-digital converter (ADC) performs the reverse function. DACs are commonly used in musi ...
s and anti-aliasing filters, or due to other delays in their implementation. Digital filters are commonplace and an essential element of everyday electronics such as
radio Radio is the technology of communicating using radio waves. Radio waves are electromagnetic waves of frequency between 3  hertz (Hz) and 300  gigahertz (GHz). They are generated by an electronic device called a transmitter connec ...
s, cellphones, and AV receivers.


Characterization

A digital filter is characterized by its
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
, or equivalently, its
difference equation In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
. 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 low-pass filter with a specific cut-off frequency), and then producing a transfer function that meets the specifications. The
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
for a linear, time-invariant, digital filter can be expressed as a transfer function in the ''Z''-domain; if it is causal, then it has the form: :H(z) = \frac = \frac where the order of the filter is the greater of ''N'' or ''M''. See ''Z''-transform's LCCD equation for further discussion of this
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
. This is the form for a recursive filter, which typically leads to an infinite impulse response (IIR) behaviour, but if the
denominator A fraction (from , "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, thre ...
is made equal to unity, i.e. no feedback, then this becomes a finite impulse response (FIR) filter.


Analysis techniques

A variety of mathematical techniques may be employed to analyze the behavior 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 characterizes filters by calculating how they will respond to a simple input such as an impulse. One can then extend this information to compute the filter's response to more complex signals.


Impulse response

The impulse response, often denoted h /math> or h_k, is a measurement of how a filter will respond to the
Kronecker delta In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise: \delta_ = \begin 0 &\text i \neq j, \\ 1 &\ ...
function. For example, given a difference equation, one would set x_0 = 1 and x_k = 0 for k \ne 0 and evaluate. The impulse response is a characterization of the filter's behavior. Digital filters are typically considered in two categories: infinite impulse response (IIR) and finite impulse response (FIR). In the case of linear time-invariant FIR filters, the impulse response is exactly equal to the sequence of filter coefficients, and thus: :\ y_n= \sum_^ b_ x_ =\sum_^ h_ x_ IIR filters on the other hand are recursive, with the output depending on both current and previous inputs as well as previous outputs. The general form of an IIR filter is thus: :\ \sum_^ a_y_ = \sum_^ b_ x_ Plotting the impulse response reveals how a filter responds to a sudden, momentary disturbance. An IIR filter is always recursive. While it is possible for a recursive filter to have a finite impulse response, a non-recursive filter always has a finite impulse response. An example is the moving average (MA) filter, which can be implemented both recursively and non recursively.


Difference equation

In discrete-time systems, the digital filter is often implemented by converting the
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
to a linear constant-coefficient difference equation (LCCD) via the Z-transform. The discrete frequency-domain transfer function is written as the ratio of two polynomials. For example: :H(z) = \frac This is expanded: :H(z) = \frac and to make the corresponding filter
causal Causality is an influence by which one Event (philosophy), event, process, state, or Object (philosophy), object (''a'' ''cause'') contributes to the production of another event, process, state, or object (an ''effect'') where the cause is at l ...
, the numerator and denominator are divided by the highest order of z: : H(z) = \frac = \frac The coefficients of the denominator, a_, are the 'feed-backward' coefficients and the coefficients of the numerator are the 'feed-forward' coefficients, b_. The resultant linear difference equation is: : y = -\sum_^ a_ y -k+ \sum_^ b_ x -k or, for the example above: : \frac = \frac rearranging terms: : \Rightarrow (1 +\frac z^ - \frac z^) Y(z) = (1 + 2z^ +z^) X(z) then by taking the inverse ''z''-transform: : \Rightarrow y + \frac y -1- \frac y -2= x + 2x -1+ x -2 and finally, by solving for y /math>: : y = - \frac y -1+ \frac y -2+ x + 2x -1+ x -2 This equation shows how to compute the next output sample, y /math>, in terms of the past outputs, y -p/math>, the present input, x /math>, and the past inputs, x -p/math>. Applying the filter to an input in this form is equivalent to a Direct Form I or II (see below) realization, depending on the exact order of evaluation. In plain terms, for example, as used by a computer programmer implementing the above equation in code, it can be described as follows: y = the output, or filtered value
x = the input, or incoming raw value
n = the sample number, iteration number, or time period number and therefore: y /math> = the current filtered (output) value
y -1/math> = the last filtered (output) value
y -2/math> = the 2nd-to-last filtered (output) value
x /math> = the current raw input value
x -1/math> = the last raw input value
x -2/math> = the 2nd-to-last raw input value


Filter design

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 and the nonrecursive filter. These are often referred to as infinite impulse response (IIR) filters and finite impulse response (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 ax + bx + c could be evaluated – one could also compute the equivalent x(a + b) + c. 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 better for
fixed-point arithmetic In computing, fixed-point is a method of representing fractional (non-integer) numbers by storing a fixed number of digits of their fractional part. Dollar amounts, for example, are often stored with exactly two fractional digits, represen ...
and others may be better for
floating-point arithmetic In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
.


Direct form I

A straightforward approach for IIR filter realization is direct form I, 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 only needs ''N'' delay units, where ''N'' is the order of the filter – potentially half as much as direct form I. This structure is obtained by reversing the order of the numerator and denominator sections of Direct Form I, since they are in fact two linear systems, and the commutativity property applies. Then, one will notice that there are two columns of delays (z^) that tap off the center net, and these can be combined since they are redundant, yielding the implementation as shown below. 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'') sectionsJ. O. Smith III
Series Second Order Sections
/ref> (see digital biquad filter). The advantage of this strategy is that the coefficient range is limited. Cascading direct form II sections results in ''N'' delay elements for filters of order ''N''. Cascading direct form I sections results in ''N'' + 2 delay elements, since the delay elements of the input of any section (except the first section) are redundant with the delay elements of the output of the preceding section.


Other forms

Other forms include: * Direct form I and II transpose * Series/cascade lower (typical second) order subsections * Parallel lower (typical second) order subsections ** Continued fraction expansion * Lattice and ladder ** One, two and three-multiply lattice forms ** Three and four-multiply normalized ladder forms ** ARMA structures * State-space structures: ** optimal (in the minimum noise sense): (N+1)^2 parameters ** block-optimal and section-optimal: 4N-1 parameters ** input balanced with Givens rotation: 4N-1 parameters * Coupled forms: Gold Rader (normal), State Variable (Chamberlin), Kingsbury, Modified State Variable, Zölzer, Modified Zölzer * Wave Digital Filters (WDF) * Agarwal–Burrus (1AB and 2AB) * Harris–Brooking * ND-TDL * 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 tolerances, temperature variations, and non-linearities that greatly complicate the design of analog filters. Analog filters consist of imperfect electronic components, whose values 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 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 which can achieve extremely steep rolloff slopes with no phase shift. Analog filters that perform the same function are often significantly more complicated, as they would require many delay elements. Digital filters rely less on analog circuitry, potentially allowing for a better
signal-to-noise ratio Signal-to-noise ratio (SNR or S/N) is a measure used in science and engineering that compares the level of a desired signal to the level of background noise. SNR is defined as the ratio of signal power to noise power, often expressed in deci ...
. 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 systems, latency is introduced not only by delay elements in the digital signal path, but also by analog-to-digital and
digital-to-analog converter In electronics, a digital-to-analog converter (DAC, D/A, D2A, or D-to-A) is a system that converts a digital signal into an analog signal. An analog-to-digital converter (ADC) performs the reverse function. DACs are commonly used in musi ...
s that are required for a system to process analog signals. Digital filters must also deal with quantization and rounding errors, and often have much less headroom than analog filters, since most DSP ICs operate on only 5V or 3.3V while operational amplifiers typically operate on 12 to 24V. Additionally, in very simple cases or in cases where frequencies and filter slopes are fixed, 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. Analog filters also require substantially less power than digital filters and are therefore the only solution when power requirements are tight. When making an electrical circuit on a PCB it is generally easier to use a digital solution, because the processing units are highly optimized over the years. Making the same circuit with analog components would take up a lot more space when using discrete components. Two alternatives are FPAAs and ASICs, but they are expensive for low quantities.


Types of digital filters

There are various ways to characterize filters; for example: * A ''linear'' filter is a
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
of input samples; other filters are '' nonlinear''. Linear filters satisfy the
superposition principle The superposition principle, also known as superposition property, states that, for all linear systems, the net response caused by two or more stimuli is the sum of the responses that would have been caused by each stimulus individually. So th ...
, i.e. if an input is a weighted linear combination of different signals, the output is a similarly weighted linear combination of the corresponding output signals. * A ''causal'' filter uses only previous samples of the input or output signals; while a ''non-causal'' filter uses future input samples. A non-causal filter can usually be changed into a causal filter by adding a delay to it. * A ''time-invariant'' filter has constant properties over time; other filters such as adaptive filters change in time. * A ''stable'' filter produces an output that converges to a constant value with time, or remains bounded within a finite interval. An ''unstable'' filter can produce an output that grows without bounds, with bounded or even zero input. * A finite impulse response (FIR) filter uses only the input signals, while an infinite impulse response (IIR) filter uses both the input signal and previous samples of the output signal. FIR filters are always stable, while IIR filters may be unstable. A filter can be represented by a block diagram, which can then be used to derive a sample processing
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
to implement the filter with hardware instructions. A filter may also be described as a
difference equation In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter ...
, a collection of zeros and poles or an impulse response or step response. Some digital filters are based on the
fast Fourier transform A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). A Fourier transform converts a signal from its original domain (often time or space) to a representation in ...
, a mathematical algorithm that quickly extracts the
frequency spectrum In signal processing, the power spectrum S_(f) of a continuous time signal x(t) describes the distribution of power into frequency components f composing that signal. According to Fourier analysis, any physical signal can be decomposed int ...
of a signal, allowing the spectrum to be manipulated (such as to create very high order band-pass filters) before converting the modified spectrum back into a time-series signal with an inverse FFT operation. These filters give O(n log n) computational costs whereas conventional digital filters tend to be O(n2). Another form of a digital filter is that of a state-space model. A well used state-space filter is the
Kalman filter In statistics and control theory, Kalman filtering (also known as linear quadratic estimation) is an algorithm that uses a series of measurements observed over time, including statistical noise and other inaccuracies, to produce estimates of unk ...
published by Rudolf Kálmán in 1960. Traditional linear filters are usually based on attenuation. Alternatively nonlinear filters can be designed, including energy transfer filters,Billings S.A. "Nonlinear System Identification: NARMAX Methods in the Time, Frequency, and Spatio-Temporal Domains". Wiley, 2013 which allow the user to move energy in a designed way so that unwanted noise or effects can be moved to new frequency bands either lower or higher in frequency, spread over a range of frequencies, split, or focused. Energy transfer filters complement traditional filter designs and introduce many more degrees of freedom in filter design. Digital energy transfer filters are relatively easy to design and to implement and exploit nonlinear dynamics.


See also

* Bessel filter *
Bilinear transform The bilinear transform (also known as Tustin's method, after Arnold Tustin) is used in digital signal processing and discrete-time control theory to transform continuous-time system representations to discrete-time and vice versa. The bilinear t ...
* Butterworth filter * Chebyshev filter *
Electronic filter Electronic filters are a type of signal processing filter in the form of electrical circuits. This article covers those filters consisting of lumped-element model, lumped electronic components, as opposed to distributed-element filters. That ...
* Elliptical filter (Cauer filter) * Filter design *
High-pass filter A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation for each frequency ...
,
Low-pass filter A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
* Infinite impulse response, Finite impulse response * Linkwitz–Riley filter * Matched filter * Sample (signal) * Savitzky–Golay filter * Two-dimensional filter


References


Further reading

*J. O. Smith III
Introduction to Digital Filters with Audio Applications
Center for Computer Research in Music and Acoustics (CCRMA), Stanford University, September 2007 Edition. * * * * * * * {{DEFAULTSORT:Digital Filter Digital signal processing Synthesiser modules *