Why is the prewarping not working as it should?

Just playing around with the 'c2d' command from matlab and trying to convert a continuous 2nd - order lowpass Butterworth function to a digital one which has the specs of Fc = 20e3Hz and Fs = 44.410e3Hz.

When I apply the pre-warping frequency parameter of 20e3Hz, it doesn't close to mimicking the continuous function.

Is there a reason why this is occurring? Does the prewarping have a limitation of how much it can "pre-warp" or am I doing something wrong? Maybe that's the intended output?

Legends:

• LP = Continuous TF
• LP_D = Discrete TF

Code:

s = tf('s');

LP = 15587249629.803/(s^2+176556.77655678*s+15587249629.803);
LP_D = c2d(LP,1/44.410e3,['Method','tustin','prewarpFrequency',125663.706]);


UPDATE: With a higher FS = 96e3Hz from 44.410e3Hz with no pre warping:

UPDATE2: Comparing with and without prewarping on two different Fs (44.410kHz and 96kHz) using a 3rd order Butterworth filter lowpass

Cutoff frequencies:

With pre-warping:

Cutoff frequencies:

Without pre-warping:

UPDATE 3: Doing some research I might have an idea. Just a gut feeling.

I found 2 resources that converted an analog Butterworth into a discrete one using the Tustin method with prewarping and it worked for them.

I noticed they created the Butterworth filter completely different from the way I did it. I made mine based on the Sallen-Key configuration and just found the transfer function, could that be it? For some reason the Sallen-Key way doesn,'t like the prewarping?

Resources HERE and HERE

I also noticed when using a notch filter with the same sampling frequency (44.410kHz) and prewarping it works perfectly. Why when doing low pass filters it doesn't like it that much?

UPDATE 4: Could be the warping is just to nonlinear for it?

• Comments are not for extended discussion; this conversation has been moved to chat. Sep 23, 2020 at 21:40
• Update main post. Found new findings
– Leoc
Sep 23, 2020 at 22:36
• @Leoc If you read through the comments, you'd have seen that I said your corner frequency is too close to Nyquist. Same thing here. The prewarping implies a tan(), and that's the effect you're seeing here. Also, when replying to someone, use @<tab> to select the name, otherwise the other person might not get noticed. Sep 24, 2020 at 10:29
• "I am aware of the tagging" -- it never hurts to be cautious. And, yes, that's why it all happens. If you want a nice, clean waveform at the end, you need some 10x f0 compared to the highest fp. Same with frequency-domain. Never forget that bilinear transform implies a mapping of a linear domain, s, to a strongly nonlinear domain, z. Sep 24, 2020 at 19:23
• @Leoc I meant fp = passband (corner) frequency and f0 = sampling frequency. Sep 24, 2020 at 19:38