1
$\begingroup$

What is the proper formula for converting ordinary frequency to normalized edge frequency in matlab for use in filter design commands like cheby2 etc The wikipedia page shows three different formulas for normalized frequency,i higlighted all those in attached snapshot And Matlab magnitude plot has written (x pi rad/sample) below plot,and i highlighted that also.

So which one of three formulas of wikipedia ,should we use in Matlab?

enter image description here

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

This is from the mathworks documentation on cheby2

For digital filters, the stopband edge frequencies must lie between 0 and 1, where 1 corresponds to the Nyquist rate—half the sample rate or $\pi$ rad/sample.

For discrete-time signals, we use the normalized frequency $\omega$ in radians (per sample), defined as

$$\omega=\frac{2\pi f}{f_s}\tag{1}$$

where $f$ is the actual frequency in Hertz, and $f_s$ is the sampling frequency.

Matlab uses $(1)$ normalized by $\pi$, i.e., edge frequencies etc. are defined by W$=2f/f_s$. The value W$=1$ corresponds to $f=f_s/2$, which is the Nyquist frequency.

Example: The cut-off frequency is $f_c=500$ Hz and the sampling frequency is $f_s=2000$ Hz (samples/second). According to $(1)$, the corresponding normalized frequency in radians (per sample) is

$$\omega_c=\frac{2\pi f_c}{f_s}=\frac{\pi}{2}\tag{2}$$

Consequently, when calling a Matlab routine you would use Wc$=\omega_c/\pi=\frac12$.

$\endgroup$
2
  • $\begingroup$ In last line of your answer, Wc(upper case W) and wc(lower case w) are not exactly equal?why this difference? $\endgroup$
    – DSP_CS
    Commented Jul 13, 2020 at 7:30
  • $\begingroup$ @engr: You're right, Wc and $\omega_c$ are different by a factor of $\pi$. That's just the way Matlab uses normalized frequency. $\endgroup$
    – Matt L.
    Commented Jul 13, 2020 at 7:43

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.