MATLAB: How to calculate prewardped frequency in analog domain

MATLABmatlab function

How to approach the problem of calculating prewarped frequency in analog domain if I have to use bilinear z-transform? Sampling frequency of 20kHz and band edges of IIR BPF digital filter as 4 and 7khz.
How to do this in matlab?

Best Answer

The prewarping frequency in the analog domain is whatever you want it to be. I usually choose the corner frequency of a highpass or lowpass filter, or the centre frequency of the bandpass or stopband in those filters. For a filter with multiple passbands and stopbands (rare), I choose the frequency that is half the Nyquist frequency. That also works if you simply can’t decide.
Essentially, it needs to be whatever will produce the best filter in the discrete domain after the transformation. As with everything else in signal processing, this usually requires some experimentation to get the result you want. Always use the freqz function to see what your filter is doing before you actually filter with it. And always use the filtfilt function to do the actual filtering.