Share on Facebook Share on Twitter Email
Answers.com

Digital filter

 
Sci-Tech Dictionary: digital filter
(′dij·əd·əl ′fil·tər)

(electronics) An electrical filter that responds to an input which has been quantified, usually as pulses.


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Sci-Tech Encyclopedia: Digital filter
Top

Any digital computing means that accepts as its input a set of one or more digital signals from which it generates as its output a second set of digital signals. While being strictly correct, this definition is too broad to be of any practical use, but it does demonstrate the possible extent of application of digital-filter concepts and terminology.

Capabilities

Digital filters can be used in any signal-manipulating application where analog or continuous filters can be used. Because of their utterly predictable performance, they can be used in exacting applications where analog filters fail because of time- or other parameter-dependent coefficient drift in continuous systems. Because of the ease and precision of setting the filter coefficients, adaptive and learning digital filters are comparatively simple and particularly effective to implement. As digital technology becomes more ubiquitous, digital filters are increasingly acknowledged as the most versatile and cost-effective solutions to filtering problems.

The number of functions that can be performed by a digital filter far exceeds that which can be performed by an analog, or continuous, filter. By controlling the accuracy of the calculations within the filter (that is, the arithmetic word length), it is possible to produce filters whose performance comes arbitrarily close to the performance expected of the perfect models. For example, theoretical designs that require perfect cancellation can be implemented with great fidelity by digital filters.

Linear difference equation

The digital filter accepts as its input signals numerical values called input samples and produces as its output signal numerical values called output samples. Each output sample at any particular sampling instant is a weighted sum of present and past input samples, and past output samples. If the sequence of input samples is xn, xn+1, xn+2, …, then the corresponding sequence of output samples would be yn, yn+1, yn+2, …. See also Difference equation.

From this simple time-domain expression, a considerable number of definitions can be constructed. If the filter coefficients (the a's and the b's) are independent of the x's and y's, this digital filter is a linear filter. If the a's and b's are fixed, this is a linear time-invariant (LTI) filter. The order of the filter is given by the largest of the subscripts among the a's and b's, that is, the larger of M and N. If the b's are all zero (that is, if the output is the weighted sum of present and past input samples only), the digital filter is referred to as a nonrecursive (having no feedback) or finite impulse response (FIR) filter because the response of the filter to an impulse (actually a unit pulse) input is simply the sequence of the “a” coefficients. If any value of b is nonzero, the filter is recursive (having feedback) and is generally an infinite impulse response (IIR) filter.

If the digital filter under consideration is not a linear, time-invariant filter, the transfer function cannot be used.

Transfer functions

Although the time-domain difference equation is a useful description of a filter, as in the continuous-domain filter case, a powerful alternative form is the transfer function. The information content of the transfer function is the same as that of the difference equation as long as a linear, time-invariant system is under consideration. A difference equation is converted to transfer-function form by use of the z transform. The z transform is simply the Laplace transform adapted for sampled systems with some shorthand notation introduced. See also Laplace transform; Z transform.

Adaptive filters

So far only LTI filters have been discussed. An important class of variable-parameter filter change their coefficients to minimize an error criterion. These filters are called adaptive because they adapt their parameters in response to changes in the operating environment. An example is an FIR digital filter whose coefficients are continually adjusted so that the output will track a reference signal with minimum error. The performance criterion will be the minimization of some function of the error. See also Electric filter.


Wikipedia: Digital filter
Top
A general finite impulse response filter with n stages, each with an independent delay, di, and amplification gain, ai.

In electronics, computer science and mathematics, a digital filter is a system that performs mathematical operations on a sampled, discrete-time signal to reduce or enhance certain aspects of that signal. This is in contrast to the other major type of electronic filter, the analog filter, which is an electronic circuit operating on continuous-time analog signals. 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). 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 (to sample the input signal), a microprocessor (often a specialized digital signal processor), and a digital-to-analog converter. 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 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 radios, cellphones, and stereo receivers.

Contents

Characterization of digital filters

A digital filter is characterized by its transfer function, 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 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{B(z)}{A(z)}  = \frac{{b_{0}+b_{1}z^{-1}+b_{2}z^{-2} + \cdots + b_{N}z^{-N}}}{{1+a_{1}z^{-1}+a_{2}z^{-2} + \cdots +a_{M}z^{-M}}}

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.

This form is for a recursive filter, which typically leads to infinite impulse response behaviour, but if the denominator is unity, then this is the form for a finite impulse response 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, often denoted H(z) or h(n) is a measurement of how a filter will respond to the Kronecker delta function. For example, given a difference equation, one would set x(0) = 1 and x(n) = 0 for n > 0 and evaluate. In the case of linear time-invariant FIR filters, the impulse response is exactly equal to the sequence of filter coefficients h(n) = bn. 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.

Difference equation

In discrete-time systems, the digital filter is often implemented by converting the transfer function 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{(z+1)^2} {(z-\frac{1}{2}) (z+\frac{3}{4})}

This is expanded:

H(z) = \frac{z^2+ 2z +1} {z^2 +\frac{1}{4} z - \frac{3}{8}}

and divided by the highest order of z:


H(z) = \frac{1 + 2z^{-1} +z^{-2}} {1 +\frac{1}{4} z^{-1} - \frac{3}{8} z^{-2}} = \frac{Y(z)}{X(z)}

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


y[n] = -\sum_{k=1}^{N} a_{k} y[n-k] + \sum_{k=0}^{M} b_{k} x[n-k]

or, for the example above:


\frac{Y(z)}{X(z)} = \frac{1 + 2z^{-1} +z^{-2}} {1 +\frac{1}{4} z^{-1} - \frac{3}{8} z^{-2}}

rearranging terms:


\Rightarrow (1 +\frac{1}{4} z^{-1} - \frac{3}{8} z^{-2}) Y(z) = (1 + 2z^{-1} +z^{-2}) X(z)

then by taking the inverse z-transform:


\Rightarrow y[n] + \frac{1}{4} y[n-1] - \frac{3}{8} y[n-2] = x[n] + 2x[n-1] + x[n-2]

and finally, by solving for y[n]:


y[n] = - \frac{1}{4} y[n-1] + \frac{3}{8} y[n-2] + x[n] + 2x[n-1] + x[n-2]

This equation shows how to compute the next output sample, y[n], in terms of the past outputs, y[np], the present input, x[n], and the past inputs, x[np]. Applying the filter to an input in this form is equivalent to a Direct Form I or II realization, depending on the exact order of evaluation.

Filter design

The design of digital filters is a deceptively complex topic.[1] 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[2].

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 more optimal for fixed-point arithmetic and others may be more optimal for floating-point arithmetic.

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[3]. In general, this form requires 2N delay elements (for both input and output signals) for a filter of order N.

Biquad direct form1.png

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 − 1) 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.[4] It has been shown that as Q increases, the round-off noise of both direct form topologies increases without bounds.[5] 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).

Biquad direct form2.png

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[6] (see digital biquad filter). 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.

Other Forms

Other forms include:

  • Direct Form I and II transpose
  • Series/cascade[7]
  • Parallel[7]
  • Ladder form[7]
  • Lattice form[7]
  • 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.[8]

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. 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. 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, a mathematical algorithm that quickly extracts the frequency spectrum 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 model. A well used state-space filter is the Kalman filter published by Rudolf Kalman in 1960.

References

General

Cited

  1. ^ M. E. Valdez, Digital Filters, 2001.
  2. ^ A. Antoniou, chapter 1
  3. ^ J. O. Smith III, Direct Form I
  4. ^ J. O. Smith III, Direct Form II
  5. ^ L. B. Jackson, "On the Interaction of Roundoff Noise and Dynamic Range in Digital Filters," Bell Sys. Tech. J., vol. 49 (1970 Feb.), reprinted in Digital Signal Process, L. R. Rabiner and C. M. Rader, Eds. (IEEE Press, New York, 1972).
  6. ^ J. O. Smith III, Series Second Order Sections
  7. ^ a b c d A. Antoniou
  8. ^ http://www.dspguide.com/ch21/1.htm

See also

External links


Shopping: Digital filter
Top
 
 

 

Copyrights:

Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved.  Read more
Sci-Tech Encyclopedia. McGraw-Hill Encyclopedia of Science and Technology. Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Digital filter" Read more