# Linear Phase in equiripple filters

How come equiripple filters are symmetric/anti-symmetric in time, but do not posses linear phase, but only piecewise-linearity?

Do not all FIR+symmetric/anti-symmetric have Generalized linear phase?

• You should spell out the abbreviations you use. Everybody is familiar with FIR, but not everybody may know what you mean by GLP and RCSR. Especially the latter is not commonly known. Apr 3 at 10:45
• @MattL. Thank you. edited Apr 3 at 11:12
• FIR filters with either even symmetry or odd symmetry (I think that's what you mean by "anti-symmetric" are all linear phase. You need to understand the notion of phase wrapping. Apr 3 at 17:54
• @robertbristow-johnson: These phase jumps wouldn't be removed by phase unwrapping. The phase doesn't jump by $2\pi$ but only by $\pi$, which is caused by the zeros of the frequency response, not by the modulo-$2\pi$ ambiguity of the phase. Apr 3 at 19:05
• Well, yeah they would, if you include the sign-change that you do in your answer. Apr 3 at 19:34

Your filter is a linear-phase filter. There are two ways you can define the phase:

\begin{align*} H(e^{j\omega}) &= \big|H(e^{j\omega})\big|e^{j\phi_a(\omega)} \\ H(e^{j\omega}) &= A(\omega)e^{j\phi_b(\omega)} \end{align*}

where $$A(\omega)$$ is a real-valued (or purely imaginary for odd symmetry) but possibly bipolar function. The phase $$\phi_a(\omega)$$ has phase jumps of $$\pi$$ at the zeros of $$\big|H(e^{j\omega})\big|$$, and that's what you see in your figure. The phase $$\phi_b(\omega)$$ doesn't jump at the zeros because that's where $$A(\omega)$$ changes its sign.

As a very simple example take

$$h[n]=\delta[n]+\delta[n-1]+\delta[n-2]$$

The bipolar amplitude function and the corresponding phase $$\phi_b(\omega)$$ are given by

\begin{align*} A(\omega) &= 1+2\cos\omega\\ \phi_b(\omega) &= -\omega \end{align*}

The top plot in the figure below shows the magnitude $$|H(e^{j\omega})|$$ and the amplitude function $$A(\omega)$$. The bottom plot shows the two phase functions. Note the jump of $$\phi_a(\omega)$$ at the zero of the magnitude.

• How can you create an A(w), phi_b functions from a complex number vector? Apr 3 at 14:16
• @Processor48: For a linear phase filter you can always do that. From the filter length $N$ you know the phase: $\phi(\omega)=-(N-1)\omega/2$ and you know that the frequency response has the form $H(e^{j\omega})=A(\omega)e^{j\phi(\omega)}$. Apr 3 at 16:12

but do not posses linear phase

Incorrect: they do posses linear phase.

The problem is most likely with your plotting/visualization code. In order to get a good graph, you often need to zero-pad and unwrap the phase properly. In addition for, say, a low pass filter, the magnitude in the stop band has zeros and at this point the phase is undefined which can create numerical issues.

Many tools handle this differently and the quality of the visual result depends on the details.