0
$\begingroup$

The normalized frequency response of a N points bandpass digital filter is:

$\frac{sin(\omega_{c2}(n-M))}{\pi(n-M)}-\frac{sin(\omega_{c1}(n-M))}{\pi(n-M)}$ where $\omega_{c1}$ is the normalized lower cutoff angular frequency , where $\omega_{c2}$ is the normalized upper cutoff angular frequency and $M = floor(N/2)$.

However the normalized frequency response of a N points bandstop digital filter is:

$\frac{sin(\omega_{c1}(n-M))}{\pi(n-M)}-\frac{sin(\omega_{c2}(n-M))}{\pi(n-M)}$ where $\omega_{c1}$ is the normalized lower cutoff angular frequency and where $\omega_{c2}$ is the normalized upper cutoff angular frequency .

But obviously $H_{bp}(e^{j\omega}) =-H_{bs}(e^{j\omega})$ Does this mean that a band pass filter has the same frequency response to a band stop filter if you switch the angular cutoff frequencies?

And what implications does this have in digital filter design?

$\endgroup$
3
  • $\begingroup$ Please fix your formulas (the '=' signs between the sincs don't make sense). Second, where did you get that impulse response for the bandstop filter? It's clearly wrong, because inverting a bandpass filter won't result in a bandstop filter. $\endgroup$
    – Matt L.
    Feb 5 at 17:22
  • $\begingroup$ @MattL. from my university notes. $\endgroup$
    – Volpina
    Feb 5 at 17:28
  • $\begingroup$ If that's the case then the notes are wrong. $\endgroup$
    – Matt L.
    Feb 5 at 17:29

2 Answers 2

1
$\begingroup$

The impulse response of the ideal bandstop filter given in your question isn't correct. Think about it: inverting the sign of the impulse response of a bandpass filter is just another bandpass filter with an extra phase shift of $\pi$.

In the frequency domain it's easy to see that the ideal response of a (zero phase) bandstop filter is just $1$ minus the ideal response of a (zero phase) bandpass filter (assuming unity gain of both filters in their passbands):

$$H_{BS}(e^{j\omega})=1-H_{BP}(e^{j\omega})$$

In the time domain this is equivalent to

$$h_{BS}[n]=\delta[n]-h_{BP}[n]$$

The impulse at the origin makes an important difference: it switches passbands and stopbands, which is exactly what we need when transforming a bandpass filter to a bandstop filter.

Note that all these filters are zero phase filters. You can simply shift them by an integer $M$ (as in the formulas in your question), but don't forget to also shift the impulse.

$\endgroup$
3
  • $\begingroup$ That "zero phase" constraint is pretty important, and fixing $H_{bs} = 1 - H_{bp}$ in your mind is a dangerous thing to do without remembering the zero phase constraint. $\left | H_{bs} \right | = 1 - \left | H_{bp} \right |$ is probably much more routinely useful. $\endgroup$
    – TimWescott
    Feb 5 at 17:42
  • $\begingroup$ @TimWescott: Not necessarily. Note that the (non-zero phase) second order transfer functions also satisfy that equation (without the magnitudes). $\endgroup$
    – Matt L.
    Feb 5 at 17:47
  • $\begingroup$ It holds for 2nd-order IIR filters, yes. But not, in general, for higher-order IIR filters. $\endgroup$
    – TimWescott
    Feb 5 at 20:50
0
$\begingroup$

But obviously $H_{bp}(e^{j\omega}) =-H_{bs}(e^{j\omega})$.

Nope. What gives a bandpass or bandstop filter its name is the amplitude response. Changing the phase by 180$^\circ$ doesn't change the amplitude response by one whit.

You need to look at some transfer functions of bandpass and bandstop filters. They're quite different from each other. Using the $z$ domain really obfuscates this, so I'm going to demonstrate this in the Laplace domain. Consider two filters, of the same bandwidth:

$$\begin{align} H_{bp}(s) &= \frac{\frac{\omega_0}{Q}s}{s^2 + \frac{\omega_0}{Q}s + \omega_0^2} \\ H_{bs}(s) &= \frac{s^2 + \omega_0^2}{s^2 + \frac{\omega_0}{Q}s + \omega_0^2} \end{align}$$

$H_{bs} \ne -H_{bp}$ here, and that is never the case. Bandpass and bandstop filters are different, but related beasts.

It happens in this case that $H_{bs} = 1 - H_{bp}$ -- that's not the case in general, but it's far more evocative of the fundamental relationship between the two. $\left | H_{bs} \right | = 1 - \left | H_{bp} \right |$ is, possibly, a more useful generalization to think about bandpass and bandstop filters, but won't help you much in constructing them.

$\endgroup$

Your Answer

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

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