2
$\begingroup$

I am using the 6th order high pass filter in the C code. And the cut-off frequency selected for it is 150 Hz and the sampling frequency being used is 32000Hz. Now, I want to calculate the 3 dB frequency for this implementation (theoretically). I have read that the 3 dB frequency is the frequency at which the filter magnitude response is $1 / \sqrt{2}$ of the peak amplitude response. But I am not sure about how to calculate it? And also, I want to know how to calculate 3 dB frequency for an nth order low pass filter.

Note:

I am using the Chebyshev type II design in my code to implement a 6th order high pass filter.

$\endgroup$
6
  • $\begingroup$ "6th order": what kind of filter is that? There's very many different filter types, and there's no general formula for the cut-off frequency. For some, there is. (also, whenever I read "sixth-order filter", I think of things like Butterworths, and there's usually very little reason to use a high-order Butterworth filter in digital domain, so context would allow us to help you better!) $\endgroup$ Jun 19, 2020 at 13:51
  • $\begingroup$ @ Marcus Miller Hi, I am using Chebyshev type II design in my code to implement a 6th order high pass filter. $\endgroup$
    – rkc
    Jun 19, 2020 at 13:55
  • $\begingroup$ cool, can you please edit your question to include that info? And also: why do you use a filter type that's mainly arising from trying to implement things in analog ways? Your digitized (I assume bilinear transform?) 6th order Chebychev filter certainly has a lot of coefficients, and with the same filtering effort, you could have designed a digital filter that fits your use case better, probably! (But I don't know your use case, so that might not be true. But I must admit, from the top of my head, wouldn't know an application where Chebychev type II is the preferrable solution :). ) $\endgroup$ Jun 19, 2020 at 13:59
  • 1
    $\begingroup$ @MarcusMüller I should think audio applications, where flatness in passband is required, with a steep(er) rolloff, or narrow(er) transition width for a given attenuation. I think that there is a 7th order inverse Chebyshev filter used in class-D audio analyzers. $\endgroup$ Jun 20, 2020 at 9:26
  • $\begingroup$ @aconcernedcitizen that would be an interesting usage, indeed. However, I'd chalk usage of that type of filter in a out-of-band-emission tester (where passband ripple sounds uncritical) up to accident or standards, not to design decision, to be honest. (and these PCBs look analog! Emulating these digitally would be worthwhile, but an implementation of "digitization of an analog filter approach") $\endgroup$ Jun 20, 2020 at 9:28

2 Answers 2

5
$\begingroup$

In general there is no straightforward analytical solution. As you know, you need to solve

$$\left|H(e^{j\omega_c})\right|=\frac{1}{\sqrt{2}}\tag{1}$$

for $\omega_c$, where it is assumed that the maximum filter gain equals $1$.

For Butterworth filters, the specified cut-off frequency always equals the $3\textrm{ dB}$ frequency. This is not the case for other filter types.

In general, you have to either estimate $\omega_{c}$ from the magnitude plot, or you solve $(1)$ numerically.


EDIT: For Chebyshev filters it's relatively straightforward to compute an analytical expression for the $3\textrm{ dB}$ cut-off frequency.

As an example I'll use a Chebyshev II highpass filter, as mentioned in the question. The magnitude of the normalized frequency response of the analog prototype filter is given by

$$\left|H(\Omega)\right|=\frac{1}{\sqrt{1+\frac{1}{\epsilon^2T_n^2(\Omega)}}}\tag{2}$$

where $T_n(\Omega)$ is the $n^{th}$-order Chebyshev polynomial, and $\epsilon$ is a parameter determining the ripple size in the stop band. The normalized $3\textrm{ dB}$ cut-off frequency $\Omega_c$ can be determined from the equation $\left|H(\Omega_c)\right|=1/\sqrt{2}$, which is equivalent to

$$T_n(\Omega_c)=\frac{1}{\epsilon}\tag{3}$$

From the trigonometric definition of the Chebyshev polynomials

$$T_n(\Omega)=\cosh\big[n\; \textrm{arcosh}(\Omega)\big],\qquad\Omega>1\tag{4}$$

we can solve $(3)$ for $\Omega_c$:

$$\Omega_c=\cosh\left[\frac{1}{n}\; \textrm{arcosh}\left(\frac{1}{\epsilon}\right)\right]\tag{5}$$

Now we just need to transform $\Omega_c$ to the discrete-time domain according to the warping introduced by the bilinear transform:

$$\omega_{c}=2\arctan\left[\Omega_c\tan\left(\frac{\omega_s}{2}\right)\right]\tag{6}$$

where $\omega_s$ is the specified stop band edge of the discrete-time Chebyshev II high pass filter.

Note that we can also rewrite $(6)$ to determine the required value of $\omega_s$ given a specified $3\textrm{ dB}$ cut-off frequency $\omega_c$:

$$\omega_s=2\arctan\left[\frac{1}{\Omega_c}\tan\left(\frac{\omega_c}{2}\right)\right]\tag{7}$$

The following Matlab/Octave script illustrates the procedure of computing the $3\textrm{ dB}$ cut-off frequency of a Chebyshev II high pass filter:

% example filter specs of Chebyshev II high pass filter
n = 6;          % filter order
Rs = 60;        % stop band ripple in dB
ws = .5 * pi;   % stop band edge of Chebyshev II filter

% Cheby II: stopband ripple = ep / sqrt( 1 + ep^2 )
ep = 1 ./ sqrt( 10^( .1 * Rs ) - 1 );

% compute normalized 3dB cut-off frequency of analog prototype
Wc = cosh( acosh( 1 / ep ) / n );

% transform 3dB cut-off frequency to discrete-time domain
wc = 2 * atan( tan( .5 * ws ) * Wc );       % bilinear transform

I designed a discrete-time $6^{th}$-order Chebyshev II high pass filter according to above specifications. The resulting $3\textrm{ dB}$ cut-off frequency obtained from above script is $\omega_{c}=0.69\pi$. This is the correct value as shown in the plot below:

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ @rkc: I've added the computation of the 3dB cut-off frequency for the special case of Chebyshev filters. $\endgroup$
    – Matt L.
    Jun 20, 2020 at 13:14
2
$\begingroup$

I've used this method in Octave:

function [c] = Hz_at_3dB(b, a, fs, samples)
     [H,W] = freqz(b,a,samples);
      magresp = 20*log10(abs(H));
      maxresp = max(magresp);
      [I,~] = find(magresp < maxresp-3.0103,3,'first');
      c=(fs/2 * W(I(1)))/pi;

EDIT: SECTION 8.4: STANDARD RESPONSES - https://www.analog.com/media/en/training-seminars/design-handbooks/Basic-Linear-Design/Chapter8.pdf

$\endgroup$
1
  • $\begingroup$ Hi Juha, thanks for the answer. But, I want to know how to calculate the 3 dB frequency theoretically. $\endgroup$
    – rkc
    Jun 19, 2020 at 13:48

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.