34

Let me add the following graphic to the great answers already given, with the intention of a specific and clear answer to the question posed. The other answers detail what linear phase is, this details why it is important in one graphic: When a filter has linear phase, then all the frequencies within that signal will be delayed the same amount in time (as ...


30

Citing Bellanger's classic Digital Processing of Signals – Theory and Practice, the point is not where your cut-off frequency is, but how much attenuation you need, how much ripple in the signal you want to preserve you can tolerate and, most importantly, how narrow your transition from pass- to stopband (transition width) needs to be. I assume you want a ...


28

We know that in general transfer function of a filter is given by: $$H(z)=\dfrac{\sum_{k=0}^{M}b_kz^{-k}}{\sum_{k=0}^{N}a_kz^{-k}} $$ Now substitute $z=e^{j\omega}$ to evaluate the transfer function on the unit circle: $$H(e^{j\omega})=\dfrac{\sum_{k=0}^{M}b_ke^{-j\omega k}}{\sum_{k=0}^{N}a_ke^{-j\omega k}} $$ Thus this becomes only a problem of ...


25

A linear phase filter will preserve the waveshape of the signal or component of the input signal (to the extent that's possible, given that some frequencies will be changed in amplitude by the action of the filter). This could be important in several domains: coherent signal processing and demodulation, where the waveshape is important because a ...


20

If $N$ is the length of the moving average, then an approximate cut-off frequency $F_{co}$ (valid for $N >= 2$) in normalized frequency $F=f/fs$ is: $F_{co} = \frac {0.442947} {\sqrt{N^2-1}}$ The inverse of this is $N = \frac {\sqrt{0.196202 + F_{co}^2}}{F_{co}}$ This formula is asymptotically correct for large N, and has about 2% error for N=2, and ...


19

There are a lot of books out there, but if you are interested in Control and Signal Processing, I strongly suggest you take a look a Stephen Boyd Lectures from standford: http://www.youtube.com/watch?v=bf1264iFr-w There's the first one, the entire course is really valuable and he is a great Teacher. Appart from That here's a good list of my preferred ...


19

Just to add to what's already been said, you can see this intuitively by looking at the following sinusoid with monotonically increasing frequency. Shifting this signal to the right or left will change its phase. But note also that the phase change will be larger for higher frequencies, and smaller for lower frequencies. Or in other words, the phase ...


19

My favorite "Rule of thumb" for the order of a low-pass FIR filter is the "fred harris rule of thumb": $$ N=\frac{f_s}{\Delta f}\cdot\frac{\rm atten_{dB}}{22} $$ where $\Delta f$ is the transition band, in same units of $f_s$ $f_s$ is the sample rate of the filter $\rm atten_{dB}$ is the target rejection in dB For example if you have a ...


19

You could use a 2nd order IIR notch filter as I describe in this post Transfer function of second order notch filter - That post demonstrates a 50 Hz IIR notch with 1 KHz sampling. [Update: As @user47050 astutely points out in the comments, the IIR notch would also have minimal delay regardless of notch bandwidth, since the dominat delay in the IIR notch ...


17

I agree that the windowing filter design method is not one of the most important design methods anymore, and it might indeed be the case that it is overrepresented in traditional textbooks, probably due to historical reasons. However, I think that its use can be justified in certain situations. I do not agree that computational complexity is no issue ...


15

this is just an addendum to jojek's answer which is more general and perfectly good when double-precision math is used. when there is less precision, there is a "cosine problem" that crops up when either the frequency in the frequency response is very low (much lower than Nyquist) and also when the resonant frequencies of the filter are very low. when you ...


15

The essence and importance of linear phase property lies in the definition and the effect of group delay $$\tau(\omega) = - \frac {d\phi(\omega)}{d\omega}$$ on the applied signal $x[n]$, where $\phi(\omega)$ is the phase response of the filter; (phase of its frequency response). Assume that a filter, with a fixed group delay of $n_0$ samples, is applied a ...


15

The given single-pole IIR filter is also called exponentially weighted moving average (EWMA) filter, and it is defined by the following difference equation: $$y[n]=\alpha x[n]+(1-\alpha)y[n-1],\qquad 0<\alpha<1\tag{1}$$ Its transfer function is $$H(z)=\frac{\alpha}{1-(1-\alpha)z^{-1}}\tag{2}$$ The exact formula for the required value of $\alpha$ ...


14

For a quick and very practical estimate, I like fred harris' rule-of-thumb: $$ N_{taps} = \frac{Atten}{22*B_T}$$ where: Atten is the desired attenuation in dB, $B_T$ is the normalized transition band $B_T=\frac{F_{stop}- F_{pass}}{F_s}$, $F_{stop}$ and $F_{pass}$ are the stop band and pass band frequencies in Hz and $F_s$ is the sampling frequency in ...


13

The answer to this question is already been explained clearly in the previous replies. Yet I wish to give it a try to present a mathematical interpretation of the same Consider a linear time invariant System whose frequency response is governed by $H(w)$. i.e if the input to this system is $e^{jw_{0}t}$ the output will be $H(w_{0})e^{jw_{0}t}$ Here $H(w_{...


12

Consider a zero-phase moving average of length $N$: $$\text{y}[n] = \begin{cases} \displaystyle\frac{\text{x}[n] + \displaystyle\sum_{k=1}^{\frac{N-1}{2}}\left(\text{x}[n+k] + \text{x}[n-k]\right)}{N},&n\in\mathbb{Z}&\text{for }N\text{ odd}\\ \displaystyle\frac{\displaystyle\sum_{k=1}^{\frac{N}{2}}\left(\text{x}[n+(k-\frac{1}{2})] + \text{x}[n-(k-\...


12

In reviewing Fred Harris Figures of Merit for various windows (Table 1 in this link) the Hamming is compared to the Hanning (Hann) at various values of $\alpha$ and from that it is clear that the Hann would provide greater stopband rejection (The classic Hann is with $\alpha =2$ and from the table the side-lobe fall-off is -18 dB per octave). I provided the ...


12

If you remove (for the time being) that leading factor $A$ as a constant gain factor: $$H(s)=\frac{s^2+\left(\frac{\sqrt{A}}{Q}\right)s + A}{As^2 + \left(\frac{\sqrt{A}}{Q}\right)s + 1}$$ what you get then is a symmetric, but otherwise general shelf that could be equally described as "LowShelf" or "HighShelf". In dB, the gain at the low ...


11

All digital filter frequency parameters (passband begin frequency, passband end frequency, and stopband begin frequency) are stated in terms of an input signal sequence's Fs sampling frequency. For a lowpass filter example, if I said a lowpass filter's passband width (it's "cutoff" frequency) is 0.2, I'm saying that the cutoff frequency is 0.2 times Fs. So ...


11

Note that for stable IIR filters, the impulse response does approach zero as $n$ goes to infinity. It just never becomes exactly zero. However, the sum of the absolute values is finite. Just as an example, take the exponential impulse response $$h[n]=a^nu[n],\qquad |a|<1\tag{1}$$ where $u[n]$ is the unit step function. The sum $$\sum_{n=-\infty}^{\...


11

You can apply a so-called all-pass transformation to a discrete-time low-pass prototype filter in order to convert it to other standard filters (such as high-pass, band-pass, and band-stop). This is accomplished by transforming the complex variable $z$ in the transfer function of the prototype filter by a function $G(z)$ which satisfies $|G(e^{j\omega})|=1$, ...


10

The result will indeed be a high pass filter. From your difference equation, the transfer function of the low pass filter is $$H_l(z)=\frac{\beta}{1-(1-\beta)z^{-1}}\tag{1}$$ with $\beta=1/\alpha$. Note that this is actually a leaky integrator, not a classic low pass filter, because its frequency response does not have a zero at Nyquist. The high pass ...


10

Yes, it is called acoustic communications. Iterative Carrier Frequency Offset and Channel Estimation for Underwater Acoustic OFDM Systems is an example of a paper that uses orthogonal frequency division multiplexing (OFDM) in an underwater acoustic channel. EDIT: Note that you wouldn't call it a SONAR any more because SONAR stands for SOund Navigation And ...


9

In general you can't simply subtract a low-pass filtered version of a signal from the original one to obtain a high-pass filtered signal. The reason is as follows. What you're actually doing is implement a system with frequency response $$H(\omega)=1-H_{LP}(\omega)\tag{1}$$ where $H_{LP}(\omega)$ is the frequency response of the low-pass filter. Note that $...


9

To get started: Complex numbers The frequency response of a filter is easier to understand complex-valued, describing both the magnitude frequency response and the phase frequency response. You will be able to understand poles and zeros, which can be complex. Complex numbers enable you to have negative frequencies, which will make math simpler. ...


9

No. The impulse response and frequency response of an LTI system are related by the Fourier transform, which is one-to-one.


9

The frequency response of a real-valued discrete-time system with linear phase has the form $$H(e^{j\omega})=A(\omega)e^{-j\omega\tau},\qquad\omega\in [-\pi,\pi]\tag{1}$$ where $A(\omega)$ is either a real-valued even function or a purely imaginary odd function, and $\tau$ is some real-valued parameter (the delay). If $A(\omega)$ is purely imaginary, then ...


8

Windowing reduces spectral leakage. Say you start out with a $\sin(y) = \cos(\omega_0 t)$. The period is obviously $2 \pi/ \omega_0$. But if nobody told you that the period is $2 \pi/ \omega$ and you blindly choose the range $[0, 1.8 \pi/\omega_0]$ and take FFT of this truncated waveform, you will observe frequency components in other frequencies ...


8

As you have already pointed out in your question, it is not possible (without using optimization methods) to compute an exact L2 solution for the frequency domain design problem of IIR filters due to the non-linear relationship between the filter coefficients and the error function. There is, however, a method which can come close and which transforms the ...


Only top voted, non community-wiki answers of a minimum length are eligible