Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Linear filter
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Filter that has a linear response}} {{More footnotes|date=March 2011}} '''Linear filters''' process time-varying input signals to produce output signals, subject to the constraint of [[linearity]]. In most cases these linear filters are also [[time invariant]] (or [[shift invariance|shift invariant]]) in which case they can be analyzed exactly using [[LTI system theory|LTI ("linear time-invariant") system theory]] revealing their [[transfer function#Linear time-invariant systems|transfer function]]s in the frequency domain and their [[impulse response]]s in the time domain. Real-time implementations of such linear [[signal processing filter]]s in the time domain are inevitably [[causal]], an additional constraint on their transfer functions. An analog electronic circuit consisting only of linear components (resistors, capacitors, inductors, and linear amplifiers) will necessarily fall in this category, as will comparable mechanical systems or [[digital signal processing]] systems containing only linear elements. Since linear time-invariant filters can be completely characterized by their response to [[sinusoid]]s of different frequencies (their [[frequency response]]), they are sometimes known as frequency filters. Non real-time implementations of linear time-invariant filters need not be causal. Filters of more than one dimension are also used such as in [[image processing]]. The general concept of linear filtering also extends into other fields and technologies such as [[statistics]], [[data analysis]], and [[mechanical engineering]]. == Impulse response and transfer function == A [[LTI system theory|linear time-invariant]] (LTI) filter can be uniquely specified by its [[impulse response]] ''h'', and the output of any filter is mathematically expressed as the [[convolution]] of the input with that impulse response. The [[frequency response]], given by the filter's [[transfer function]] <math>H(\omega)</math>, is an alternative characterization of the filter. Typical filter design goals are to realize a particular frequency response, that is, the magnitude of the transfer function <math>|H(\omega)|</math>; the importance of the [[Phase (waves)|phase]] of the transfer function varies according to the application, inasmuch as the shape of a waveform can be distorted to a greater or lesser extent in the process of achieving a desired (amplitude) response in the frequency domain. The frequency response may be tailored to, for instance, eliminate unwanted frequency components from an input [[Signal (information theory)|signal]], or to limit an amplifier to signals within a particular band of frequencies. The [[impulse response]] ''h'' of a linear time-invariant causal filter specifies the output that the filter would produce if it were to receive an input consisting of a single impulse at time 0. An "impulse" in a continuous time filter means a [[Dirac delta function]]; in a [[discrete time]] filter the [[Kronecker delta function]] would apply. The impulse response completely characterizes the response of any such filter, inasmuch as any possible input signal can be expressed as a (possibly infinite) combination of weighted delta functions. Multiplying the impulse response shifted in time according to the arrival of each of these delta functions by the amplitude of each delta function, and summing these responses together (according to the [[superposition principle]], applicable to all linear systems) yields the output waveform. Mathematically this is described as the [[convolution]] of a time-varying input signal ''x(t)'' with the filter's [[impulse response]] ''h'', defined as: :<math>y(t) = \int_{0}^{T} x(t-\tau)\, h(\tau)\, d\tau</math> or :<math>y_k = \sum_{i=0}^{N} x_{k-i}\, h_i </math>. The first form is the continuous-time form, which describes mechanical and analog electronic systems, for instance. The second equation is a discrete-time version used, for example, by digital filters implemented in software, so-called ''[[digital signal processing]]''. The impulse response ''h'' completely characterizes any linear time-invariant (or shift-invariant in the discrete-time case) filter. The input ''x'' is said to be "[[convolved]]" with the impulse response ''h'' having a (possibly infinite) duration of time ''T'' (or of ''N'' [[sampling period]]s). Filter design consists of finding a possible transfer function that can be implemented within certain practical constraints dictated by the technology or desired complexity of the system, followed by a practical design that realizes that transfer function using the chosen technology. The complexity of a filter may be specified according to the [[degree of a polynomial|order]] of the filter. Among the time-domain filters we here consider, there are two general classes of filter transfer functions that can approximate a desired frequency response. Very different mathematical treatments apply to the design of filters termed [[infinite impulse response]] (IIR) filters, characteristic of mechanical and analog electronics systems, and [[finite impulse response]] (FIR) filters, which can be implemented by [[discrete time]] systems such as computers (then termed ''[[digital signal processing]]''). === Implementation issues === Classical analog filters are IIR filters, and classical filter theory centers on the determination of transfer functions given by low order [[rational functions]], which can be synthesized using the same small number of reactive components.<ref>However, there are a few cases in which FIR filters directly process analog signals, involving non-feedback topologies and analog delay elements. An example is the discrete-time ''[[analog sampled filter]]'', implemented using a so-called [[bucket-brigade device]] clocked at a certain sampling rate, outputting copies of the input signal at different delays that can be combined with some weighting to realize an FIR filter. Electromechanical filters such as [[Electronic filter#SAW filters|SAW filters]] can likewise implement FIR filter responses; these operate in continuous time and can thus be designed for higher frequencies.</ref> Using digital computers, on the other hand, both FIR and IIR filters are straightforward to implement in software. A digital IIR filter can generally approximate a desired filter response using less computing power than a FIR filter, however this advantage is more often unneeded given the increasing power of digital processors. The ease of designing and characterizing FIR filters makes them preferable to the filter designer (programmer) when ample computing power is available. Another advantage of FIR filters is that their impulse response can be made symmetric, which implies a response in the frequency domain that has [[linear phase|zero phase at all frequencies]] (not considering a finite delay), which is absolutely impossible with any IIR filter.<ref>Outside of trivial cases, stable IIR filters with zero phase response are possible if they are not causal (and thus are unusable in real-time applications) or implementing transfer functions classified as unstable or "marginally stable" such as a [[double integrator]].</ref> == Frequency response == The frequency response or [[transfer function]] <math>|H(\omega)|</math> of a filter can be obtained if the impulse response is known, or directly through analysis using [[Laplace transform]]s, or in discrete-time systems the [[Z-transform]]. The frequency response also includes the phase as a function of frequency, however in many cases the phase response is of little or no interest. FIR filters can be made to have zero phase, but with IIR filters that is generally impossible. With most IIR transfer functions there are related transfer functions having a frequency response with the same magnitude but a different phase; in most cases the so-called [[minimum phase]] transfer function is preferred. Filters in the time domain are most often requested to follow a specified frequency response. Then, a mathematical procedure finds a filter transfer function that can be realized (within some constraints), and approximates the desired response to within some criterion. Common filter response specifications are described as follows: *A [[low-pass filter]] passes low frequencies while blocking higher frequencies. *A [[high-pass filter]] passes high frequencies. *A [[band-pass filter]] passes a band (range) of frequencies. *A [[band-stop filter]] passes high and low frequencies outside of a specified band. *A [[notch filter]] has a null response at a particular frequency. This function may be combined with one of the above responses. *An [[all-pass filter]] passes all frequencies equally well, but alters the [[Group delay and phase delay|group delay]] and phase relationship among them. *An equalization filter is not designed to fully pass or block any frequency, but instead to gradually vary the amplitude response as a function of frequency: filters used as [[pre-emphasis]] filters, [[Equalization (audio)|equalizer]]s, or [[tone control]]s are good examples. ===FIR transfer functions=== Meeting a frequency response requirement with an FIR filter uses relatively straightforward procedures. In the most basic form, the desired frequency response itself can be sampled with a resolution of <math>\Delta f</math> and Fourier transformed to the time domain. This obtains the filter coefficients ''h<sub>i</sub>'', which implements a zero phase FIR filter that matches the frequency response at the sampled frequencies used. To better match a desired response, <math>\Delta f</math> must be reduced. However the duration of the filter's impulse response, and the number of terms that must be summed for each output value (according to the above discrete time convolution) is given by <math>N=1/(\Delta f \, T)</math> where ''T'' is the [[sampling period]] of the discrete time system (N-1 is also termed the ''order'' of an FIR filter). Thus the complexity of a digital filter and the computing time involved, grows inversely with <math>\Delta f</math>, placing a higher cost on filter functions that better approximate the desired behavior. For the same reason, filter functions whose critical response is at lower frequencies (compared to the [[sampling frequency]] ''1/T'') require a higher order, more computationally intensive FIR filter. An IIR filter can thus be much more efficient in such cases. Elsewhere the reader may find further discussion of design methods for [[FIR filter#Filter design|practical FIR filter design]]. ===IIR transfer functions=== Since classical analog filters are IIR filters, there has been a long history of studying the range of possible transfer functions implementing various of the above desired filter responses in continuous time systems. Using [[Bilinear transform|transform]]s it is possible to convert these continuous time frequency responses to ones that are implemented in discrete time, for use in digital IIR filters. The complexity of any such filter is given by the ''order'' N, which describes the order of the [[rational function]] describing the frequency response. The order N is of particular importance in analog filters, because an N<sup>th</sup> order electronic filter requires N reactive elements (capacitors and/or inductors) to implement. If a filter is implemented using, for instance, [[biquad]] stages using [[op-amp]]s, N/2 stages are needed. In a digital implementation, the number of computations performed per sample is proportional to N. Thus the mathematical problem is to obtain the best approximation (in some sense) to the desired response using a smaller N, as we shall now illustrate. Below are the frequency responses of several standard filter functions that approximate a desired response, optimized according to some criterion. These are all fifth-order low-pass filters, designed for a cutoff frequency of .5 in normalized units. Frequency responses are shown for the [[Butterworth filter|Butterworth]], [[Chebyshev filter|Chebyshev]], [[chebyshev filter#Type II Chebyshev filters|inverse Chebyshev]], and [[elliptic filter]]s. [[Image:Filters order5.svg|500px|center]] As is clear from the image, the elliptic filter is sharper than the others, but at the expense of [[ripple (filters)|ripples]] in both its passband and stopband. The Butterworth filter has the poorest transition but has a more even response, avoiding ripples in either the passband or stopband. A [[Bessel filter]] (not shown) has an even poorer transition in the frequency domain, but maintains the best phase fidelity of a waveform. Different applications emphasize different design requirements, leading to different choices among these (and other) optimizations, or requiring a filter of a higher order. [[Image:Sallen-Key Lowpass General.svg|thumb|300px|right|Low-pass filter implemented with a Sallen–Key topology]] ==Example implementations== A popular circuit implementing a second order active R-C filter is the [[Sallen Key filter|Sallen-Key]] design, whose schematic diagram is shown here. This topology can be adapted to produce low-pass, band-pass, and high pass filters. [[File:FIR Filter.svg|thumb|300px|right|A discrete-time FIR filter of order ''N''. The top part is an ''N''-sample delay line; each delay step is denoted ''z''<sup>β1</sup>.]] An N<sup>th</sup> order FIR filter can be implemented in a discrete time system using a computer program or specialized hardware in which the input signal is subject to N delay stages. The output of the filter is formed as the weighted sum of those delayed signals, as is depicted in the accompanying signal flow diagram. The response of the filter depends on the weighting coefficients denoted ''b<sub>0</sub>'', ''b<sub>1</sub>'', .... ''b<sub>N</sub>''. For instance, if all of the coefficients were equal to unity, a so-called [[boxcar function]], then it would implement a low-pass filter with a low frequency gain of N+1 and a frequency response given by the [[sinc function]]. Superior shapes for the frequency response can be obtained using coefficients derived from a more sophisticated design procedure. == Mathematics of filter design == {{Linear analog electronic filter}} {{see also|Network synthesis}} [[LTI system theory]] describes linear ''[[time-invariant]]'' (LTI) filters of all types. LTI filters can be completely described by their [[frequency response]] and [[phase response]], the specification of which uniquely defines their [[impulse response]], and ''vice versa''. From a mathematical viewpoint, continuous-time IIR LTI filters may be described in terms of linear [[differential equation]]s, and their impulse responses considered as [[Green's function]]s of the equation. Continuous-time LTI filters may also be described in terms of the [[Laplace transform]] of their impulse response, which allows all of the characteristics of the filter to be analyzed by considering the pattern of [[zeros and poles]] of their Laplace transform in the [[complex plane]]. Similarly, discrete-time LTI filters may be analyzed via the [[Z-transform]] of their impulse response. Before the advent of computer filter synthesis tools, graphical tools such as [[Bode plot]]s and [[Nyquist plot]]s were extensively used as design tools. Even today, they are invaluable tools to understanding filter behavior. Reference books<ref>A. Zverev, ''Handbook of Filter Synthesis'', John Wiley and Sons, 1967, {{ISBN|0-471-98680-1}}</ref> had extensive plots of frequency response, phase response, group delay, and impulse response for various types of filters, of various orders. They also contained tables of values showing how to implement such filters as RLC ladders - very useful when amplifying elements were expensive compared to passive components. Such a ladder can also be designed to have minimal sensitivity to component variation a property hard to evaluate without computer tools. Many different analog filter designs have been developed, each trying to optimise some feature of the system response. For practical filters, a custom design is sometimes desirable, that can offer the best tradeoff between different design criteria, which may include component count and cost, as well as filter response characteristics. These descriptions refer to the ''mathematical'' properties of the filter (that is, the frequency and phase response). These can be ''implemented'' as analog circuits (for instance, using a [[Sallen Key filter]] topology, a type of [[active filter]]), or as algorithms in [[digital signal processing]] systems. Digital filters are much more flexible to synthesize and use than analog filters, where the constraints of the design permits their use. Notably, there is no need to consider component tolerances, and very high Q levels may be obtained. FIR digital filters may be implemented by the direct [[convolution]] of the desired impulse response with the input signal. They can easily be designed to give a [[matched filter]] for any arbitrary pulse shape. IIR digital filters are often more difficult to design, due to problems including dynamic range issues, [[quantization noise]] and instability. Typically digital IIR filters are designed as a series of [[digital biquad filter]]s. All low-pass second-order continuous-time filters have a [[transfer function]] given by : <math>H(s)=\frac{K \omega^{2}_{0}}{s^{2}+\frac{\omega_{0}}{Q}s+\omega^{2}_{0}}.</math> All band-pass second-order continuous-time filters have a transfer function given by : <math>H(s)=\frac{K \frac{\omega_{0}}{Q}s}{s^{2}+\frac{\omega_{0}}{Q}s+\omega^{2}_{0}}.</math> where * ''K'' is the gain (low-pass DC gain, or band-pass mid-band gain) (''K'' is 1 for passive filters) * ''Q'' is the [[Q factor]] * <math>\omega_{0}</math> is the center frequency * <math>s=\sigma+j\omega</math> is the complex frequency ==See also== * [[Filter design]] * [[Laplace transform]] * [[Green's function]] * [[Prototype filter]] * [[Z-transform]] * [[System theory]] ** [[LTI system theory]] * [[Nonlinear filter]] * [[Wiener filter]] * [[Gabor filter]] * [[Leapfrog filter]] ==Notes and references== {{reflist}} ==Further reading== {{refbegin}} * {{cite book|author1=Williams, Arthur B|author2=Taylor, Fred J|name-list-style=amp|title=Electronic Filter Design Handbook|publisher=McGraw-Hill|year=1995|isbn=0-07-070441-4|url-access=registration|url=https://archive.org/details/electronicfilter00will_0}} * [https://web.archive.org/web/20080511220632/http://www.national.com/an/AN/AN-779.pdf National Semiconductor AN-779] application note describing analog filter theory * [https://web.archive.org/web/20110713191012/http://www.latticesemi.com/lit/docs/appnotes/pac/an6017.pdf Lattice AN6017] application note comparing and contrasting filters (in order of damping coefficient, from lower to higher values): Gaussian, Bessel, linear phase, Butterworth, Chebyshev, Legendre, elliptic. (with graphs). *[https://web.archive.org/web/20110517084024/http://www.analog.com/Wizard/filter/detail_filter_help.pdf USING THE ANALOG DEVICES ACTIVE FILTER DESIGN TOOL]: a similar application note from [[Analog Devices]] with extensive graphs, active RC filter topologies, and tables for practical design. * [https://books.google.com/books?id=l7oC-LJwyegC&dq=%22legendre+filter%22&pg=PA238 "Design and Analysis of Analog Filters: A Signal Processing Perspective"] by L. D. Paarmann {{refend}} [[Category:Linear filters|*]] [[Category:Filter theory]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:ISBN
(
edit
)
Template:Linear analog electronic filter
(
edit
)
Template:More footnotes
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)