# Tag Info

## Hot answers tagged linear-phase

10

If linear phase is a requirement, that will probably steer you toward an FIR implementation. It is possible to build IIR filters that have approximate linear phase, but it is easy to design a linear-phase FIR. If you're concerned about latency, forward-backward filtering as in filtfilt isn't really a good option. In general, it's really meant to be used an ...

10

Actually, I think I see why. $$X(j\Omega) = |X(j\Omega)|e^{-j\theta(\Omega)}$$ $|X(j\Omega)|$ is purely real, and therefore if we take the IFT it is even and symmetric. $\theta(\Omega)= a\Omega$ since the phase is linear, so $e^{-ja\Omega}$ merely shifts the corresponding even and symmetric magnitude in the time domain, so the resulting impulse response ...

9

For digital filters, linear phase places the following requirement on the transfer function: $$H(z) = H(z^{-1}).$$ That restriction implies a linear phase IIR filter would need to have poles both inside and outside the unit circle, making it unstable. Similar arguments apply for analog filters. That being said, there are any number of approximations ...

7

The impulse response of a linear phase filter must be symmetric. If the impulse response is infinitely long, then the center of the impulse is an infinite distance away from the beginning, giving the symmetric IIR filter infinite delay.

5

Such phase response is called Generalized linear phase, where you are allowed the $\pm \pi/2$ constant phase, and zero crossings (which add $\pi$ jumps in phase at one or more frequencies). Filters with an antisymmetric impulse response do in fact have the $\pm \pi/2$ constant phase. Simplest case: $h[n] = \delta[n] - \delta[n-1]$, with frequency response $... 5 To be precise the group delay of a linear phase FIR filter is$(N-1)/2$samples, where$N$is the filter length (i.e. the number of taps). The group delay is constant for all frequencies, because the filter has a linear phase, i.e. its impulse response is symmetrical (or asymmetric). A linear phase means that all frequency components of the input signal ... 5 Note that a constant group delay is not sufficient for a band-limited signal to exhibit no dispersion. It is the phase delay that needs to be constant. If the phase is affine, i.e., if we have $$\phi(\omega)=a+b\omega,\qquad \omega>0\tag{1}$$ the group delay is constant $$\tau_g(\omega)=-\frac{d\phi(\omega)}{d\omega}=-b\tag{2}$$ but the phase delay is ... 5 It must have to do with the initial conditions used by the function filtfilt.m. The idea is to match initial conditions in a way such that startup and end transients are minimized. This, however, doesn't always seem to work, and it appears that for your filter specifications it actually does more harm than good. As far as I know there is no way to tell ... 4 The phase is in fact linear, apart from jumps of$\pi$at the zeros of the magnitude. There are two reasons why you don't see it: the phase you compute is the principal value, which is in$(-\pi,\pi]$. Note that you can always add or subtract a multiple of$2\pi$to the phase without changing anything. Removing these artificial jumps due to the principal ... 4 Least square errors works well with FIR filters. General IIR filters are more difficult and typically require an iterative search algorithm. One specific type of IIR, named warped FIR filters, can also match arbitrary amplitude and phase response with a least square errors approach. 4 Converting an arbitrary FIR filter into a linear-phase FIR with the same magnitude response is generally impossible. As mentioned in msm's answer, this conversion must be done with an allpass filter, which must be an IIR filter, and only in those rare cases where you get appropriate pole-zero cancellations will the total filter be FIR. In general you'll end ... 4 Because linear phase of a filter results in constant group delay according to the relation between group delay$\tau$and phase response$\phi(\omega)$of the filter: $$\tau = - \frac{ d\phi(\omega) }{ d\omega}$$ But then you will ask: why then constant group delay? And the short answer will be that constant group delay will preserve the relative ... 4 Decimating a signal (selecting every Dth sample and discarding the rest) does not distort the signal within the passband in any way other than to cause aliases from higher frequencies to fold into the signal bandwidth. Depending on how we model the system the phase may be effected since$z^{-n}$is replaced with$z^{-n/D}$, but the phase will still be ... 3 Why do we not seem to care about the nonlinear phase response in certain applications? Very likely because these certain applications don't care about phase! Is it possible to correct the phase distortion if we are filtering offline (i.e. not in realtime)? With another filter that, combined with the distorting filter, has the desired phase properties, ... 3 It can be shown that in order for an FIR filter to have linear phase, its impulse response must be symmetric or anti-symmetric. The impulse response length$L$can be either odd or even. Those two variables lead to 4 combinations, hence the 4 types of linear-phase filters. 3 It is generally impossible to transform a given minimum-phase FIR system into a linear phase FIR system with the same magnitude response. There is one special case for which this is possible, and that is if the zeros of the minimum phase system inside the unit circle haven even multiplicity. Because in that case you can, for each zero location, mirror half ... 3 In response to "1) What is the filter order of the simple delay system?" The order of a filter is the power of the highest nonzero coefficient of the Z-transform. For the simple delay system given, the Z-transform is given as$H(z) = z^{-n_0}$so it has order$n_0$. In response to "2) Does it have symmetric filter coefficients?" The coefficients are not ... 3 This is a homework type question, so I will only give hints and no solutions. You should know that the group delay is the negative derivative of the phase (with respect to frequency), so if the phase is a linear function of frequency, the group delay must be a constant. This should answer your first question. Concerning your second question, why don't you ... 3 Your confusion is understandable. If you consider the definition of linear phase FIR filter and the associated symmetry conditions on their impulse responses, then you can arrive the conclusion that the first two cases $$h_1[n] = [0,0,0,1,0]$$ and $$h_2[n] = [0,0,0,0,1,0,0,0,0,0,1]$$ are non-symmetric. However, as you use zeros and ones in those ... 2 Yes. The time delay of real-coefficient linear-phase N-point FIR filter is (N-1)/2 samples. The time delay of complex-coefficient generalized-linear-phase N-point FIR filter is also (N-1)/2 samples. You can prove this to yourself. Design a narrowband linear-phase lowpass FIR filter, and plot its group delay. Then multiply that filter's coefficients by a ... 2 Clements and Pease have shown that causal infinite-duration impulse responses can also have Fourier transforms with generalized linear phase. The corresponding system functions, however, are not rational, and thus, the systems cannot be implemented with difference equations. 2 If the magnitude spectrum is symmetric $$M(\omega)=M(-\omega)\tag{1}$$ (as I assume), then your system is real-valued. The phase response of a real-valued system is asymmetric: $$\phi(\omega)=-\phi(-\omega)\quad(\mod 2\pi)\tag{2}$$ This means that there can be two cases: The phase goes through zero at$\omega=0$, i.e. the phase is given by$\phi(\omega)=...

2

The procedure you're looking for is called lifting and, as far as I know, it was first introduced by Hermann and Schuessler: O. Herrmann and H. W. Schuessler, Design of nonrecursive filters with minimum phase, Electron. Lett., 6(11): 329–330, 28th May 1970 The procedure is very well explained in this presentation by Ivan Selesnick. I'll briefly summarize ...

2

Note that with the definition of generalized linear phase $\phi(\omega)$ according to $$H(e^{j\omega})=|H(e^{j\omega})|e^{j\phi(\omega)}\tag{1}$$ and $$\phi(\omega)=\alpha\omega+\beta\tag{2}$$ the restriction that the impulse response $h[n]=\text{IDTFT}\{H(e^{j\omega})\}$ be real-valued only allows two possible values for $\beta$: $$\beta\in\{0,\pi\}\... 2 The three options you mention all result in the same magnitude response. The ones with zeros before (to the left) of the actual impulse response will just add delay (as many samples as there are zeros). The last option has exactly the same frequency response as the original filter, without any extra delay. I think it's pointless to add extra delay by ... 2 Looking at the script filtfilt.m, there are two things that differ from the straightforward implementation you did in one single line. First of all, there is what Matt stated in his answer. The function filtfilt uses initial conditions when it calls the function filter (you can see Mathworks' documentation). The other difference is that when filtfilt calls ... 2 I'm sorry to say that but this is total nonsense. The paper you cite is bad, the authors don't know what they're talking about. All 3 methods discussed in the paper design linear phase filters by the very formulation of the problem. So the phase responses all three filters are perfectly linear, apart from phase jumps at the zeros of the transfer function (... 2 Assuming you are refering to LTI (linear time-invariant) systems to implement the filter. The impulse response h[n] of the ideal brickwall bandpass filter :$$H(\omega) = \begin{cases} 1 ~~~,~~~ |\omega-\omega_c|<W \\ 0 ~~~,~~~\text{o.w.}\\ \end{cases}$$is$$ h[n] = 2 \cos(\omega_c n) \frac{ \sin(W n) }{ \pi n }  which is real and even symetric ...

2

For linear phase FIR filters, each zero at z = z0 will have a matching reciprocal zero at z = 1/zo. And for real-valued coefficients each zero at z = zo will have a matching conjugate zero at z = *zo. Thus for linear phase real-valued coefficients, when you place one zero on the z-plane you determine the location of the other three zeros.

1

The answer by @Jason R is short and perfect. Just adding a pictorial version, from Openstax: Four types of linear-phase FIR filters: For more text, I suggest the short text Linear-Phase FIR Filters, by Ivan Selesnick.

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