Home > On-Demand Archives > Talks >

Introduction to Warped FIR Filters

Hilmar Lehnert - Watch Now - DSP Online Conference 2023 - Duration: 23:39

Introduction to Warped FIR Filters
Hilmar Lehnert

Warped FIR (WFIR) filters are a hybrid between FIR and IIR filters combining some of the advantages of both. Design methods are similar to FIR filters including arbitrary magnitude and phase response but in contrast to FIR filters, they offer good resolution at low frequencies at very low orders and they can be implemented efficiently. They are a particularly good fit for loudspeaker arrays as deployed in soundbars and Atmos speakers.

The talk will cover:

  1. mathematical fundamentals, 
  2. design process, 
  3. a few examples, 
  4. common real-world issues, 
  5. discussion pros and cons.
M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

Michael_W
Score: 0 | 2 months ago | no reply

Thank you.

Leopoldo
Score: 0 | 11 months ago | 1 reply

Hi,
could you provide us with a simple code example, either in matlab/octave or any other programming language?
I got the theory but I'm missing something in the implementation, that is preventing me from getting the desired result.

Otherwise, could anyone point me in the right direction as to why this code I wrote is not behaving like I'd hope?

close all;
clear all;
clc;

Ts_s = 0.01;            % Sampling time [s]
sample_count = 1000;    % sample amount (fft)
w = 0.5;               % warping amount

t_vect = (0:1:sample_count - 1).*Ts_s;

% Prepare variables
A_m3 = 0;
A_m2 = 0;
A_m1 = 0;
x_m1 = 0;
output_signal = zeros(sample_count, 1);

for ind = 1:length(t_vect)
  % generate impulse stimulus signal
  input_signal(ind) = 1.0*(ind == 1);
  x = input_signal(ind);

% ======== 4 taps MA WFIR filter ========
  A_m3 = (w + A_m2) / (1 + w*A_m2);
  A_m2 = (w + A_m1) / (1 + w*A_m1);
  A_m1 = (w + x_m1) / (1 + w*x_m1);
  y = (x + A_m1 + A_m2 + A_m3) / 4.0;

  x_m1 = x;
% =======================================

  % save impulse response for later
  output_signal(ind) = y;
endfor

figure();
stairs(t_vect, input_signal, 'k');
hold on;
stairs(t_vect, output_signal, 'm');
title('Impulse and response');
xlabel('Time [s]');
ylabel('Amplitude');

% Obtain Bode plot by performing FFT on the impulse response
fft_source = output_signal;

L = length(fft_source);
Y = fft(fft_source);

f = (0:(L/2)) * 1./(Ts_s*L);
f = f(2:end - 1);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
P1 = P1./P1(2);
mag_dB = 20*log10(P1);
mag_dB = mag_dB(2:end - 1);

figure();
semilogx(f, mag_dB, '-or');
title("Single-Sided Amplitude Spectrum");

Thank you!

HilmarSpeaker
Score: 1 | 11 months ago | 1 reply
Leopoldo
Score: 0 | 11 months ago | no reply

Wonderful! Thank you very much!

christophe.blouet
Score: 0 | 1 year ago | 1 reply

Thank you, very interesting, any tool/function you recommend to use those filters ?

HilmarSpeaker
Score: 0 | 1 year ago | no reply

Sorry, I'm not aware of any commercial or open-source "toolbox" or "module" for Warped FIR filters. If you Google it you can find a few bits and pieces but I didn't see any comprehensive solutions

JohnP
Score: 0 | 1 year ago | 1 reply

Very interesting practical applications for warped FIRs. Yes, complexity somewhere between a FIR and a IIR revealing those artifacts which are hidden by either approach. Now I feel more confident in their use. Many thanks.

HilmarSpeaker
Score: 0 | 1 year ago | no reply

Thanks! Gald you liked it!

DanBoschen
Score: 1 | 1 year ago | 1 reply

"I hope you found this useful and another tool in my chest for filter design and implementation." ABSOLUTELY!! That was the best 24 minutes of my day, thank you Hilmar! Really well done and extremely useful. Replacing unit delays with all-pass, brilliant. Could you use this to correct for the frequency warping from a Bilinear Transform? Also is there a similar warping process that could be applied in the s domain (not necessarily to build analog filters but to prewarp prior to using mapping techniques from s to z)?

HilmarSpeaker
Score: 1 | 1 year ago | no reply

You can't use this to get around the bilinear warping, it just implements the same phenomon differently. If you warp, say, 3rd order butterworth at pi/2 to higher frequencies, you'll see the same effect. The root cause is fundamental: all the frequencies between the cutoff and infinity in the s-plane need to be mapped to the space between the cutoff and pi in the z-plane.
Warping in the s-plane is a very interesting idea. I have not tried that, so I don't know what could be done but the same geometric mapping principles apply.

OUR PARTNERS