1

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.

DSP novice
  • 527
  • 2
  • 10
  • 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. – TimWescott Oct 14 '22 at 14:32
  • You made a math error. $H(\pi) = e^{j \pi} = -1 = e^{-j\pi} = H(-\pi)$. – TimWescott Oct 14 '22 at 14:32
  • @TimWescott Sorry my bad, fixed. And is it due to the fact that an ideal Hilbert transformer is infinite long? – DSP novice Oct 15 '22 at 07:31
  • Or the fact that the Hilbert transformer is infinitely long is because filter length must go up as the sharpness of the transitions do. – TimWescott Oct 15 '22 at 16:07
  • @TimWescott Thanks. So although Hilbert transformer is an all-pass filter, the sharp transition of the phase response requires an infinite length. – DSP novice Oct 17 '22 at 02:17
  • If it's to be exact, yes. Which means that if you see someone talking about a practical application that uses a Hilbert transformer, it'll be bandlimited, with a response that does not extend down to zero frequency. – TimWescott Oct 17 '22 at 02:51

1 Answers1

5

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

$$H(\omega)=\cos(\theta)-j\,\textrm{sgn}(\omega)\sin(\theta)\tag{1}$$

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

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

$$H(0)=\cos(\theta)\tag{2}$$

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.

Matt L.
  • 89,963
  • 9
  • 79
  • 179