In Matt L's answer he states that an ideal phase shifter with a phase shift $\theta$ has a frequency response

$$ H(\omega)= \begin{cases} e^{-j\theta},&\omega>0 \\ e^{j\theta},&\omega<0 \end{cases} $$

But what about DC and Nyquist? If I want to shift the phase of a real-valued signal $x[n]$, I suppose to get another real-valued signal $y[n]$ rather than a complex-valued signal. So $H(\omega)$ should be real at DC and Nyquist (actually in discrete world, $H[k]$) as well as $X(\omega)$ and $Y(\omega)$.

If we just let the frequency responses at these two frequencies equal to $1$, I can simply come up with an anti example that $\theta=\pi$, in which case $y[n] = -x[n]$, $Y(\omega) = -X(\omega)$ and thus $H(\omega) = -1$ for all frequencies.

Can anyone point my mistake out, thanks.

  • $\begingroup$ Note that if you actually try to build such a phase shifter you'll find that the better you try to make it work at DC, the longer it needs to be. $\endgroup$
    – TimWescott
    Oct 14, 2022 at 14:32
  • $\begingroup$ You made a math error. $H(\pi) = e^{j \pi} = -1 = e^{-j\pi} = H(-\pi)$. $\endgroup$
    – TimWescott
    Oct 14, 2022 at 14:32
  • $\begingroup$ @TimWescott Sorry my bad, fixed. And is it due to the fact that an ideal Hilbert transformer is infinite long? $\endgroup$
    – DSP novice
    Oct 15, 2022 at 7:31
  • $\begingroup$ Or the fact that the Hilbert transformer is infinitely long is because filter length must go up as the sharpness of the transitions do. $\endgroup$
    – TimWescott
    Oct 15, 2022 at 16:07
  • $\begingroup$ @TimWescott Thanks. So although Hilbert transformer is an all-pass filter, the sharp transition of the phase response requires an infinite length. $\endgroup$
    – DSP novice
    Oct 17, 2022 at 2:17

1 Answer 1


The frequency response of the ideal phase shifter can be written as


where $\textrm{sgn}(\omega)$ is the signum function.

Since $\textrm{sgn}(0)=0$, we have


which is purely real.

Note that for a Hilbert transformer we have $\theta=\pi/2$, and, according to $(2)$, $H(0)=0$.

In discrete time, the same is true at Nyquist.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.