Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Digital filter

From Wikipedia, the free encyclopedia
Device for suppressing part of a discretely-sampled signal
This article focuses only onone specialized aspect of the subject. Please helpimprove this article by adding general information and discuss at thetalk page.(April 2018)

A generalfinite impulse response filter withn stages, each with an independent delay,di, and amplification gain,ai.

Insignal processing, adigital filter is a system that performs mathematical operations on asampled,discrete-time signal to reduce or enhance certain aspects of that signal. This is in contrast to the other major type ofelectronic filter, theanalog filter, which is typically anelectronic circuit operating on continuous-timeanalog signals.

A digital filter system usually consists of ananalog-to-digital converter (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, anFPGA orASIC is used instead of a general purpose microprocessor, or a specializeddigital signal processor (DSP) with specific paralleled architecture for expediting operations such as filtering.[1][2]

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 forlinear 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 associatedanalog-to-digital anddigital-to-analog conversions andanti-aliasing filters, or due to other delays in their implementation.

Digital filters are commonplace and an essential element of everyday electronics such asradios,cellphones, andAV receivers.

Characterization

[edit]

A digital filter is characterized by itstransfer function, or equivalently, itsdifference 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 low-pass filter with a specific cut-off frequency), and then producing a transfer function that meets the specifications.

Thetransfer function for a linear, time-invariant, digital filter can be expressed as a transfer function in theZ-domain; if it is causal, then it has the form:[3]

H(z)=B(z)A(z)=b0+b1z1+b2z2++bNzN1+a1z1+a2z2++aMzM{\displaystyle 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 ofN orM.SeeZ-transform's LCCD equation for further discussion of thistransfer function.

This is the form for arecursive filter, which typically leads to aninfinite impulse response (IIR) behaviour, but if thedenominator is made equal tounity, i.e. no feedback, then this becomes afinite impulse response (FIR) filter.

Analysis techniques

[edit]

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

[edit]

Theimpulse response, often denotedh[k]{\displaystyle h[k]} orhk{\displaystyle h_{k}}, is a measurement of how a filter will respond to theKronecker delta function.[4] For example, given a difference equation, one would setx0=1{\displaystyle x_{0}=1} andxk=0{\displaystyle x_{k}=0} fork0{\displaystyle k\neq 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) andfinite 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:

 yn=k=0Nbkxnk=k=0Nhkxnk{\displaystyle \ y_{n}=\sum _{k=0}^{N}b_{k}x_{n-k}=\sum _{k=0}^{N}h_{k}x_{n-k}}

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:

 m=0Mamynm=k=0Nbkxnk{\displaystyle \ \sum _{m=0}^{M}a_{m}y_{n-m}=\sum _{k=0}^{N}b_{k}x_{n-k}}

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[citation needed] and non recursively.

Difference equation

[edit]

Indiscrete-time systems, the digital filter is often implemented by converting thetransfer function to alinear constant-coefficient difference equation (LCCD) via theZ-transform. The discretefrequency-domain transfer function is written as the ratio of two polynomials. For example:

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

This is expanded:

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

and to make the corresponding filtercausal, the numerator and denominator are divided by the highest order ofz{\displaystyle z}:

H(z)=1+2z1+z21+14z138z2=Y(z)X(z){\displaystyle 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{\displaystyle a_{k}}, are the 'feed-backward' coefficients and the coefficients of the numerator are the 'feed-forward' coefficients,bk{\displaystyle b_{k}}. The resultantlinear difference equation is:

y[n]=k=1Maky[nk]+k=0Nbkx[nk]{\displaystyle y[n]=-\sum _{k=1}^{M}a_{k}y[n-k]+\sum _{k=0}^{N}b_{k}x[n-k]}

or, for the example above:

Y(z)X(z)=1+2z1+z21+14z138z2{\displaystyle {\frac {Y(z)}{X(z)}}={\frac {1+2z^{-1}+z^{-2}}{1+{\frac {1}{4}}z^{-1}-{\frac {3}{8}}z^{-2}}}}

rearranging terms:

(1+14z138z2)Y(z)=(1+2z1+z2)X(z){\displaystyle \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 inversez-transform:

y[n]+14y[n1]38y[n2]=x[n]+2x[n1]+x[n2]{\displaystyle \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 fory[n]{\displaystyle y[n]}:

y[n]=14y[n1]+38y[n2]+x[n]+2x[n1]+x[n2]{\displaystyle 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]{\displaystyle y[n]}, in terms of the past outputs,y[np]{\displaystyle y[n-p]}, the present input,x[n]{\displaystyle x[n]}, and the past inputs,x[np]{\displaystyle x[n-p]}. 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{\displaystyle y} = the output, or filtered value
x{\displaystyle x} = the input, or incoming raw value
n{\displaystyle n} = the sample number, iteration number, or time period number

and therefore:

y[n]{\displaystyle y[n]} = the current filtered (output) value
y[n1]{\displaystyle y[n-1]} = the last filtered (output) value
y[n2]{\displaystyle y[n-2]} = the 2nd-to-last filtered (output) value
x[n]{\displaystyle x[n]} = the current raw input value
x[n1]{\displaystyle x[n-1]} = the last raw input value
x[n2]{\displaystyle x[n-2]} = the 2nd-to-last raw input value

Filter design

[edit]
Main article: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: therecursive filter and thenonrecursive filter. These are often referred to asinfinite impulse response (IIR) filters andfinite impulse response (FIR) filters, respectively.[5]

Filter realization

[edit]

After a filter is designed, it must berealized 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 asax+bx+c{\displaystyle ax+bx+c} could be evaluated – one could also compute the equivalentx(a+b)+c{\displaystyle x(a+b)+c}. In the same way, all realizations may be seen asfactorizations 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 forfixed-point arithmetic and others may be better forfloating-point arithmetic.

Direct form I

[edit]

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

Direct form II

[edit]

The alternatedirect form II only needsN delay units, whereN 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 (z1{\displaystyle 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 highQ or resonance.[7] It has been shown that asQ increases, the round-off noise of both direct form topologies increases without bounds.[8] 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

[edit]

A common strategy is to realize a higher-order (greater than 2) digital filter as a cascaded series of second-orderbiquadratric (orbiquad) sections[9] (seedigital biquad filter). The advantage of this strategy is that the coefficient range is limited. Cascading direct form II sections results inN delay elements for filters of orderN. Cascading direct form I sections results inN + 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

[edit]
[icon]
This sectionneeds expansion. You can help byadding to it.(July 2012)

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:
  • Coupled forms: Gold Rader (normal), State Variable (Chamberlin), Kingsbury, Modified State Variable, Zölzer, Modified Zölzer
  • Wave Digital Filters (WDF)[11]
  • 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

[edit]

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.[12]

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 anadaptive 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 bettersignal-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 asJohnson 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 byanalog-to-digital anddigital-to-analog converters 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 aPCB 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 usingdiscrete components. Two alternatives areFPAAs[13] andASICs, but they are expensive for low quantities.

Types of digital filters

[edit]

There are various ways to characterize filters; for example:

  • Alinear filter is alinear transformation of input samples; other filters arenonlinear. Linear filters satisfy thesuperposition principle, 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.
  • Acausal filter uses only previous samples of the input or output signals; while anon-causal filter uses future input samples. A non-causal filter can usually be changed into a causal filter by adding a delay to it.
  • Atime-invariant filter has constant properties over time; other filters such asadaptive filters change in time.
  • Astable filter produces an output that converges to a constant value with time, or remains bounded within a finite interval. Anunstable filter can produce an output that grows without bounds, with bounded or even zero input.
  • Afinite impulse response (FIR) filter uses only the input signals, while aninfinite 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 ablock diagram, which can then be used to derive a sample processingalgorithm to implement the filter with hardware instructions. A filter may also be described as adifference equation, a collection ofzeros and poles or animpulse response orstep response.

Some digital filters are based on thefast Fourier transform, a mathematical algorithm that quickly extracts thefrequency spectrum 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 astate-space model. A well used state-space filter is theKalman filter published byRudolf Kálmán in 1960.

Traditional linear filters are usually based on attenuation. Alternatively nonlinear filters can be designed, including energy transfer filters,[14] 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

[edit]

References

[edit]
  1. ^Lyakhov, Pavel; Valueva, Maria; Valuev, Georgii; Nagornov, Nikolai (2020)."High-Performance Digital Filtering on Truncated Multiply-Accumulate Units in the Residue Number System".IEEE Access.8:209181–209190.Bibcode:2020IEEEA...8t9181L.doi:10.1109/ACCESS.2020.3038496.ISSN 2169-3536.
  2. ^Priya, P; Ashok, S (April 2018)."IIR Digital Filter Design Using Xilinx System Generator for FPGA Implementation".2018 International Conference on Communication and Signal Processing (ICCSP). pp. 0054–0057.doi:10.1109/ICCSP.2018.8524520.ISBN 978-1-5386-3521-6.S2CID 53284942.
  3. ^Smith, Julius O."Introduction to digital filters".DSPRelated.com. The Related Media Group. Retrieved13 July 2020.
  4. ^"Lab.4&5. Introduction to FIR Filters"(PDF). Jordan University of Science and Technology-Faculty of Engineering.Archived(PDF) from the original on 2022-10-09. Retrieved13 July 2020.
  5. ^A. Antoniou,Digital Filters: Analysis, Design, and Applications, New York, NY: McGraw-Hill, 1993., chapter 1
  6. ^J. O. Smith III,Direct Form I
  7. ^J. O. Smith III,Direct Form II
  8. ^L. B. Jackson, "On the Interaction of Roundoff Noise and Dynamic Range in Digital Filters,"Bell Sys. Tech. J., vol. 49 (1970 Feb.), reprinted inDigital Signal Process, L. R. Rabiner and C. M. Rader, Eds. (IEEE Press, New York, 1972).
  9. ^J. O. Smith III,Series Second Order Sections
  10. ^Li, Gang; Limin Meng; Zhijiang Xu; Jingyu Hua (July 2010). "A novel digital filter structure with minimum roundoff noise".Digital Signal Processing.20 (4):1000–1009.Bibcode:2010DSP....20.1000L.doi:10.1016/j.dsp.2009.10.018.
  11. ^Fettweis, Alfred (Feb 1986). "Wave digital filters: Theory and practice".Proceedings of the IEEE.74 (2):270–327.doi:10.1109/proc.1986.13458.S2CID 46094699.
  12. ^"Match #1: Analog vs. Digital Filters".
  13. ^Bains, Sunny (July 2008)."Analog's answer to FPGA opens field to masses".EETimes.
  14. ^Billings S.A. "Nonlinear System Identification: NARMAX Methods in the Time, Frequency, and Spatio-Temporal Domains". Wiley, 2013

Further reading

[edit]
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=Digital_filter&oldid=1272876247"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp