Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

time-domain FIR filter (Convolver)

Post any examples or modules that you want to share here

Re: time-domain FIR filter (Convolver)

Postby steph_tsf » Sun May 11, 2014 3:19 am

With lambda = 0.52 the filter got warped for Fc becoming 1 kHz instead of 3 kHz when not warped.
The blue curves are : lowpass, highpass, sum.

The lowpass magnitude looks good. One can say that the 3rd-order slope is still there, however the transition band looking a little bit soft. Remember, there are only 31-taps.
The highpass magnitude look perfect. The 3rd-order slope is perfectly there.
The sum magnitude looks perfect. All frequencies are there, at 0 dB.

The green curve is the impulse response of the selected output. This is where it gets tricky.

The lowpass impulse response looks encouraging. The impulse response shows almost no preshoot and no ringing.
Worth noting is the apparent group delay, about 1 millisecond.
Remember this is a lowpass filter. The high frequencies don't appear here.
warped_FIR3_lowpass (500).png
warped_FIR3_lowpass (500).png (62.53 KiB) Viewed 7996 times

Unfortunately, the highpass impulse response looks tortured. Clearly the highpass phase gets distorted.
The highest frequencies exhibit no group delay (they come first), while the lowest frequencies exhibit the 1 millisecond group delay seen in the lowpass. That's quite a smear in time domain. This is caused by the delay cells transforming into phase shifters when lambda not equal to zero.
warped_FIR3_highpass (500).png
warped_FIR3_highpass (500).png (66.25 KiB) Viewed 7996 times

Unfortunately, the sum impulse response looks tortured. Clearly the global phase gets distorted.
warped_FIR_sum (500).png
warped_FIR_sum (500).png (65.62 KiB) Viewed 7996 times

A plain conventional 4th-order Linkwitz-Riley built using IIR Biquad filters exhibits less phase distortion. Why is that so ? In the 32-tap warped-FIR filter, we have 32 phase shifters in place, causing a 32nd-order phase distortion. In the 4th-order Linkwitz-Riley, we have two IIR Biquads in place, causing a 4th-order phase distortion. Which is a lot less.

Thus, as soon as we apply a warp factor (lambda not equal to zero), we get a 32nd-order phase distortion. Now comes the question of adding a phase corrector. Say the phase corrector requires a 32nd-order IIR filter, built using a lattice or using Biquads. This would double or triple the total computing cost, just like we used a plain simple 64-tap or 96-tap FIR. Is it worth doing this? Probably not, as a 96-tap plain simple non-warped FIR programmed for Fc = 1 kHz provides an excellent 3rd-order lowpass, an excellent 3rd-order highpass, and a perfectly linear phase.

Now consider warping from Fc = 3 kHz to Fc = 300 Hz. This is a factor 10. Roughly, a non-warped FIR delivering the same precision (in frequency domain) as the warped-FIR, would now require 320 taps. On the other hand, the phase distortion could remain 32nd-order, isn't? If this is true, the same phase corrector as above could be tuned for restoring a good phase linearity. The total computing cost would thus remain approx same as a 64-tap or 96-tap FIR, this time emulating a 320-tap FIR. This is worth looking further, IMO.

But wait a moment. If we manage to correct a 32nd-order phase distortion, why not using the same expertise for correcting the 4nd-order phase distortion produced by the 4th-order Linkwitz-Riley? This is a strong argument, possibly final argument, against warped-FIR filters.
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Re: time-domain FIR filter (Convolver)

Postby steph_tsf » Sun May 11, 2014 9:09 am

martinvicanek wrote:If linear phase is your goal you might consider this bidirectional IIR filter design. Would make a nice Linkwitz-Riley crossover (one Butterworth filter in each direction), don't you think? ;)
You are right. Check it here http://www.dsprobotics.com/support/viewtopic.php?f=3&t=2235
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Previous

Return to User Examples

Who is online

Users browsing this forum: No registered users and 48 guests