# Low-pass Filter with constant phase response

I would like to design (e.g. in GNU-radio) a low-pass filter where up to the cut-off frequency the phase-response is constant (I do not mean a "linear-phase response"). The rationale is to allow the signal to "pass" without being modified in any (significant) way and removing every unwanted frequency (which only has noise).

The filter only needs constant phase response in the desired band, above the cut-off frequency its irrelevant.

The answer in Filter Design for Phase Response addresses this issue for an all-pass filter, not a low-pass. And to be honest, I did not quite understand the answer with the Hilbert transform.

For example, if we have a 1Msample/s and want a low-pass filter at 1KHz, how would one proceed?

• Welcome to SE.SP! Note that the linked-to question's answer is for an ideal all-pass filter. Such a thing is not realizable because it will have an anti-causal component (a component that "sees the future" i.e. reacts before the incoming signal starts). That is usually why many real-world filters have a linear phase response: this is an additional delay to make "most" of the interesting part of the filter causal, and so realizable (able to be made in real-life).
– Peter K.
Jul 10 at 15:19
• Are you aware of the fact that a linear phase response doesn't alter the signal at all, apart from delaying it? And this is important for a causal approximation of a desired magnitude response. Jul 10 at 16:54
• @PeterK. Thanks, now I got it (the "all-pass" part). As a first approximation the filter could be non-causal. Jul 10 at 20:55
• Can you elaborate on why you don't want the phase to change? A phase change from only a delay is not distorting the signal at all.
– Peter K.
Jul 10 at 22:10
• @mabeco: You got that wrong, a linear phase does not change the shape of the signal, it just delays it. The fact that the phase is different for each frequency component is necessary for the shape to remain unchanged. On the other hand, a constant phase shift (other than zero phase) will distort the signal (example: Hilbert transformer). Jul 11 at 7:21

Let's assume, without losing generality, that your bandlimited signal is described by

$$x[n] = \sum_k A_k \cos(\omega_k n). \tag{1}$$

From your post, you also have noise term $$v[n]$$ added:

$$s[n] = x[n] + v[n]. \tag{2}$$

$$v[n]$$ is out of your signal's band, so that, a basic frequency selective LTI filter can remove $$v[n]$$ from $$s[n]$$ to yield $$x[n]$$ at its output, possibly only delayed and scaled, but left intact otherwise.

Now, if $$x[n]$$ is to be kept intact (i.e., delayed by only a constant amount d and scaled by constant M) then the output is $$y[n] = M x[n-d]$$, and it has the following consequence on the sinusoidal components:

\begin{align} M x[n-d] &= M \sum_k A_k \cos(\omega_k (n-d) ) \\ &= M \sum_k A_k \cos(\omega_k n - \omega_k d ) \\ &= M \sum_k A_k \cos(\omega_k n - \phi_k ) \tag{3} \end{align}

where each $$\phi_k = \omega_k d$$ is a frequency dependent linear-phase term, whose group delay on the output is d.

Therefore we conclude that the frequency dependent linear phase shift on the input signal's sinusoidal components is a necessary condition for signal being intact (i.e. it's necessary for $$y[n] = M x[n-d]$$ to hold true).

(Note that being linear-phase is a necessary but not sufficient condition for keeping $$x[n]$$ intact at the output, because that also depends on the scale factor M being constant, independent of frequency, accross the range of input's bandwidth. Hence there are two necessary conditions to keep input signal intact at the output, one is the constant scale factor, and the other is the linear-phase shift)

Now, on the other hand, assume that you impose a constant phase shift $$\phi$$ on the components of your input $$x[n]$$, then :

$$\sum_k A_k \cos(\omega_k n - \phi ) = \sum_k A_k \cos( \omega_k (n - \frac{\phi}{\omega_k} ) ) \tag{4}$$

Eq.4 shows that each input sinusoidal term is delayed by a frequency-dependent amount $$d_k = \frac{\phi}{\omega_k}$$, which is not a constant group delay for the overal input $$x[n]$$ so that $$y[n] \neq M x[n-d]$$ for any constant group-delay d.

Which means that the input $$x[n]$$ cannot be kept intact at the output if a constant phase shift is imposed by the filter. But that's auto-deduced from the fact that when a necessary condition (that being linear-phase) for being intact at the output, does not hold, then the primary assumption (input intact at output) will of course not hold true as well.

The Fourier Transform of a time delay is a "linear phase" in frequency. We see this from the Fourier Time Shift Property:

Given the Fourier Transform of an arbitrary waveform $$x(t)$$ as: $$\mathscr{F}\{x(t)\} \leftrightarrow X(\omega)$$

Where $$x(t)$$ is an arbitrary time domain function that could be real or complex, and $$X(\omega)$$ is the Fourier Transform of $$x(t)$$ that will always be complex if $$x(t)$$ is causal.

If we delay $$x(t)$$ in time the resulting transform is:

$$\mathscr{F}\{x(t-t_o)\} \leftrightarrow e^{-j\omega t_o}X(\omega) \tag{1} \label{1}$$

The function $$e^{j\theta}$$ has a magnitude of $$1$$ and angle $$\theta$$ (written geometrically as $$1\angle{\theta}$$), thus $$e^{-j\omega t_o}$$ has a phase linearly proportional to frequency as $$\omega t_o$$. $$X(\omega)$$ itself is complex with magnitude and phase, as:

$$X(\omega) = A(\omega)e^{j\phi(\omega)}$$

Where:

$$A(\omega)$$ is the real magnitude vs frequency for complex $$X(\omega)$$
$$\phi(\omega)$$ is the real phase vs frequency for complex $$X(\omega)$$

Using this, we can write the resulting transform given above in Equation \ref{1} as:

$$e^{-j\omega t_o}X(\omega) = e^{-j\omega t_o}A(\omega)e^{j\phi(\omega)} = A(\omega)e^{j(\phi(\omega)-\omega t_o)}$$

So the delay only modifies the phase of any arbitrary waveform, and we see that the phase grows negatively and linearly with frequency $$\omega$$ (linear phase!).

In our causal world there will always be delay, and that delay if pure (linear phase) does not distort the waveform given all frequency components will align perfectly between the input and output of the delay. Why this is the case is already detailed in this other post Why Is Linear Phase Important.

Here I showed one practical example, and I will add here an additional practical example that may provide further intuition: Suppose we measured a transmission line coaxial cable with a network analyzer (which sweeps the frequency from a low frequency to a high frequency, and for each frequency it compares the phase and magnitude between the input and output), and we got the following result as I plotted below: Since the phase has gone 90° from DC to 6 GHz (and let's assume the cable was lossless, so the magnitude was one for all frequencies), converting to radians, this is a negative slope of $$-\pi/2$$ radians over 6 GHz. The exponent of $$e^{-j\omega t_o}$$ not including the $$j$$ is this phase. Thus:

$$\theta = -\omega t_o = -2 \pi f t_o = \frac{-\pi}{12E9}f$$

And solving for the delay of the cable $$t_o$$ we get:

$$t_o = \frac{\pi f}{12E9 (2\pi f)} = \frac{1}{24E9} \approx 41.7 \text{ ps}$$

So we see, the negative slope of the phase vs frequency is directly proportional to time delay; specifically the negative derivative of phase with respect to frequency as $$t_o = \frac{-d\phi}{dt}/(2\pi)$$ with phase in radians and resulting time delay in seconds. The longer the delay, the steeper the phase. If we desired a filter with "zero phase" or flat phase, it would be non-causal so not implementable (but can be simulated with post processing such as done with the filtfilt command in Matlab/Octave and Python scipy.signal).

• thank you for you answer. Even though I believe your answer is 100% correct, I choose another answer because I think its easier to understand. Sorry. Jul 14 at 14:31