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
Finite impulse response
(section)
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!
==Moving average example== {{multiple image | direction = vertical | width = 300 | footer = | image1 = FIR Filter (Moving Average).svg | alt1 = Block diagram of a simple FIR filter (second-order/3-tap filter in this case, implementing a moving average smoothing filter) | caption1 = Block diagram of a simple FIR filter (second-order/3-tap filter in this case, implementing a moving average smoothing filter) | image2 = MA2PoleZero C.svg | alt2 = Pole–zero diagram | caption2 = [[Pole–zero diagram]] of the example second-order FIR smoothing filter | image3 = Frequency_response_of_3-term_boxcar_filter.svg | alt3 = Magnitude and phase responses of the example second-order FIR smoothing filter | caption3 = Magnitude and phase responses of the example second-order FIR smoothing filter | image4 = Amplitude & phase vs frequency for 3-term boxcar filter.svg | alt4 = Amplitude and phase responses of the example second-order FIR smoothing filter | caption4 = Amplitude and phase responses of the example second-order FIR smoothing filter }} A [[moving average]] filter is a very simple FIR filter. It is sometimes called a [[Boxcar function|boxcar]] filter, especially when followed by [[Decimation (signal processing)|decimation]], or a [[Sinc filter#Frequency-domain sinc|sinc-in-frequency]]. The filter coefficients, <math display="inline"> b_0, \ldots, b_N</math>, are found via the following equation: :<math>b_i=\frac{1}{N+1}</math> To provide a more specific example, we select the filter order: :<math>N = 2</math> The impulse response of the resulting filter is''':''' :<math>h[n] = \frac{1}{3}\delta[n] + \frac{1}{3}\delta[n-1] + \frac{1}{3}\delta[n-2]</math> The block diagram on the right shows the second-order moving-average filter discussed below. The transfer function is''':''' :<math>H(z) = \frac{1}{3} + \frac{1}{3}z^{-1} + \frac{1}{3}z^{-2} = \frac{1}{3}\frac{z^{2} + z + 1}{z^{2}}.</math> The next figure shows the corresponding [[pole–zero diagram]]. Zero frequency (DC) corresponds to (1, 0), positive frequencies advancing counterclockwise around the circle to the Nyquist frequency at (−1, 0). Two poles are located at the origin, and two zeros are located at <math display="inline"> z_1 = -\frac{1}{2} + j\frac{\sqrt{3}}{2}</math>, <math display="inline"> z_2 = -\frac{1}{2} - j \frac{\sqrt{3}}{2}</math>. The frequency response, in terms of [[Normalized frequency (digital signal processing)|normalized frequency]] ''ω'', is''':''' :<math> \begin{align} H\left(e^{j\omega}\right) &= \frac{1}{3} + \frac{1}{3}e^{-j\omega} + \frac{1}{3}e^{-j2\omega}\\ &= \frac{1}{3}e^{-j\omega}\left(1+2\cos(\omega)\right). \end{align} </math> The magnitude and phase components of <math display="inline"> H\left(e^{j\omega}\right)</math> are plotted in the figure. But plots like these can also be generated by doing a [[discrete Fourier transform]] (DFT) of the impulse response.{{ efn-ua|See {{slink|Discrete-time Fourier transform|Sampling the DTFT|nopage=y}}. }} And because of symmetry, filter design or viewing software often displays only the [0, π] region. The magnitude plot indicates that the moving-average filter passes low frequencies with a gain near 1 and attenuates high frequencies, and is thus a crude [[low-pass filter]]. The phase plot is linear except for discontinuities at the two frequencies where the magnitude goes to zero. The size of the discontinuities is π, representing a sign reversal. They do not affect the property of linear phase, as illustrated in the final figure.
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)