# How do you interpret the sign (positive, negative or zero) of the phase spectrum?

How do you interpret the sign (positive, negative or zero) of the phase spectrum of:

1)a digital filter (the phase spectrum of its frequency response aka phase response of the filter).

2)a signal in output from a digital filter (computing the Fourier transform directly on this signal)

From what I understood if the filter is causal, then it will only introduce delay in the output signal with respect to the input signal. Is it correct?

And above all, is this phase delay visible both in the phase response of the filter and in the phase spectrum of the output signal? And what about the sign of these phases?

• The phase is not simply +, - or, 0. It's the phase of a complex number which is continuous and typically in the range of $[0, 2\pi]$ or $[-\pi,+\pi]$. The delay is related to the phase shift. Commented May 8 at 13:18

The best way to view the phase of a digital filter that operates in real-time is, first represent a polarity inversion, that is that the linear gain at (or very close to) DC is negative, as a phase offset of $$-\pi$$ at very small positive frequencies and $$+\pi$$ at very small negative frequencies. If there is no polarity inversion, the phase at DC is 0.

Then add the phase increment for each frequency increment, which will be negative for increasing positive frequencies and positive for increasing negative frequencies, at least at first for a causal real-time filter.

So here are the definitions:

\begin{align} H(e^{j\omega}) &= \Re e\Big\{H(e^{j\omega})\Big\} + j \, \Im m\Big\{H(e^{j\omega})\Big\} \\ \\ &= \Big| H(e^{j\omega}) \Big| e^{j \arg\{H(e^{j\omega})\}} \\ \\ &= \Big| H(e^{j\omega}) \Big| e^{j \phi(\omega)} \\ \end{align}

Where

$$\phi(\omega)\triangleq \arg\Big\{ H(e^{j\omega}) \Big\}$$

and

\begin{align} \arg\Big\{H(e^{j\omega})\Big\} &= \operatorname{atan2}(\Im m\Big\{H(e^{j\omega})\Big\},\, \Re e\Big\{H(e^{j\omega})\Big\}) \\ \\ &=\begin{cases} \arctan\left(\frac{\Im m\{H(e^{j\omega})\}}{\Re e\{H(e^{j\omega})\}}\right) &\text{if } \Re e\Big\{H(e^{j\omega})\Big\} > 0 \\ \\ \frac{\pi}{2} - \arctan\left(\frac{\Re e\{H(e^{j\omega})\}}{\Im m\{H(e^{j\omega})\}}\right) &\text{if } \Im m\Big\{H(e^{j\omega})\Big\} > 0 \\ \\ -\frac{\pi}{2} - \arctan\left(\frac{\Re e\{H(e^{j\omega})\}}{\Im m\{H(e^{j\omega})\}}\right) &\text{if } \Im m\Big\{H(e^{j\omega})\Big\} < 0 \\ \\ \arctan\left(\frac{\Im m\{H(e^{j\omega})\}}{\Re e\{H(e^{j\omega})\}}\right) \pm \pi &\text{if } \Re e\Big\{H(e^{j\omega})\Big\} < 0 \\ \\ \text{undefined} &\text{if } H(e^{j\omega}) = 0 \end{cases} \end{align}

$$\phi(0) = \begin{cases} 0 \qquad & H(e^{j0}) > 0 \\ \\ \pm \pi \qquad & H(e^{j0}) < 0 \\ \end{cases}$$

$$\phi(\omega + \Delta\omega) = \phi(\omega) + \arg \left\{ \frac{H(e^{j(\omega + \Delta\omega)})}{H(e^{j \omega})} \right\}$$
As for the sign of the phases, the phase is typically wrapped $$[-\pi,\pi)$$, so the sign represents relative phase lag/lead.