The question is to design a Low Pass Butterworth IIR Digital filter. The following code below has the specifications with $A_p$ being the passband attenuation, $A_s$ the stop band attenuation, $f_{pb}$ is the passband frequency and $f_{sb}$ is the stop band frequency. $f_s$ is the sampling frequency all in Hz.
I do not understand what formulas are used to calculate the cutoff frequency. I normalised the frequencies using:
$$\omega_{pb} = \frac{f_{pb}}{f_s/2}$$ $$\omega_{sb} = \frac{f_{sb}}{f_s/2}$$
I could successfully calculate order using:
$$N = \frac{\log_{10}\left(\frac{10^{0.1\cdot A_p}-1}{10^{0.1\cdot As}-1}\right)}{2\log_{10}(f_p/f_s)}$$
but when I calculated cutoff frequency using :
$$\omega_c = \frac{\omega_{pb}}{\left(10^{0.1\cdot Ap}-1\right)^{1/(2N)}}$$
I am getting the result as $\omega_c = 0.21916$
**MATLAB CODE:**
Ap=1.25; As=15; fpb=200; fsb=300; fs=2000;
[N,fc]=buttord(200/(fs/2),300/(fs/2),Ap,As)
[b,a]=butter(N ,fc) % fc = 0.2329, N = 6
So how are the frequency calculations done ?
EDIT: FOUND THE SOLUTION
I looked into buttord.m in MATLAB and found out that it converts the normalised frequencies given to it by pre-warping those frequencies and converts it into analog domain. It finds the normalised Low pass filter design with the required cut off. So all the intermediate calculation is done in the analog domain frequency and for the resultant cutoff it shows, it again warps the frequency in order to obtain the digital frequency.
Also the bi-linear transform is used to obtain the transfer function of the digital filter.