Welcome, Guest
Username: Password: Remember me
This is the optional Forum header for the Suggestion Box.
  • Page:
  • 1
  • 2

TOPIC: Re: Linear phase IIR filters?

Linear phase IIR filters? 8 years 7 months ago #4269

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
I found some interesting things about making linear phase IIR filters by "reverse" filtering. See for example this link or this.

Is this anything that may be possible to do with the miniDSP in the future? I think that phase linear filtering would be of great interest for many users. :)

If this can be made working on the miniDSP, it could perhaps be implemented in such that the user get to choose whether to apply each biquad on the "forward" signal or the "backward" signal. Both would give the same magnitude response, but the phase response would be inverted. In that case biquads could be used to correct for phase distortion in the speaker themselves (apart from the filters) and then yield a true linear phase system. This would be a really nice feature indeed!
Last Edit: 8 years 7 months ago by Crumboo.
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4278

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
No comments yet on this post - I hope that it doesn't mean that there is not interest in such feature?

For my system I want to use steep filters, but as you know this also results in severe phase distortion. By reverse filtering you could apply the filter on both the forward and the backward signal and get zero phase distortion from the filter! Also, by using all-pass filters on the reverse signal the speaker itself could be transformed to a zero-phase system which would result in a perfect transient response. I really hope that I'm not the only one interested in that! :)

So, is it possible to do reverse filtering on the current hardware? I am not very familiar with digital signal processing, but it doesn't seem to be very difficult by the information in the link i posted above.

By the way - happy new year to you all! :)
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4292

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Still no response - I guess there wasn't any interest then. :(

Maybe the newly announced hardware will have the features I need (crossovers with arbitrarily user defined, non-textbook, transfer functions and still have control over the phase characteristics)....
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4297

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 792
  • Thank you received: 181
  • Karma: 101
There is indeed some interest in linear phase filters, just give us some days reading the provided information ;)

I did some comparisons between minimal phase and linear phase EQ (using Klein&Hummel ProC28 FIR controller) and didn't notice a significant difference (this does not mean, there isn't any ;)). Furthermore since I am using my audio system also to watch TV I can't live with the quite long (depending on the speakers up to 100ms) latency inherent to linear phase filtering.

However the new openDRC platform as a powerful FIR convolution engine (according to the specs) will do the trick :) I would be very happy to see a 6 or 8 channel OpenDRC (posted it two times now, should be enough to be heard by DevTeam ;))
Last Edit: 8 years 7 months ago by curryman. Reason: spelling
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4298

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Thank you,

In my case, as I want steep filter curves, the phase turning makes it hard do get the drivers "in phase" with one another in the crossover regions.

What I really like with the biquad-approch in the miniDSP is the possibility to freely choose parameter values and cascade filters in order to create whatever transfer functions you like - not just text-book filters.

The ability to do "reverse filtering" as well would increase potential of the miniDSP alot I think. I really hope that DevTeam can give some information whether this would be possible to do on the miniDSP platform. I am very close to order a 8x8 card for my system, but i really need that last bit of information. ;)
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4376

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Sorry for repeating myself. I'm just eager to hear devTeam's opinion about reverse filtering. I still think it would be an absolute wonderful feature which would increase the potential of miniDsp substantially.
However, if it isn't technically possible, or if you aren't intrested - please let us know.

Best regards,
Crumboo
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 7 months ago #4380

  • Jakster
  • Jakster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 4
  • Karma: 3
@Crumboo
Interesting links!
Kjeldsen asked the same question here (though with a different link):
minidsp.com/forum/3-suggestion-box/338-m...r-filter-development
Like Curryman wrote I believe the solution is to buy the OpenDRC and use FIR filtering for this purpose. The filter you provide to the OpenDRC would be the mirrored impulse response of your phase response.

I´ll try to explain why I don´t think realtime reverse filtering will work on the miniDSP.

According to this link www.dspguide.com/ch19/4.htm the reverse filtering will look like this:

y[n]=a0x[n]+a1x[n+1]+a2x[n+2]+b1y[n+1]+b2y[n+2] (2. Order)

Here you can see that in order to calculate the output y[n] you need to know y[n+2] and to know y[n+2] you need to know y[n+4] and to know y[n+x] you need to know y[n+x+2] (and x[n+x+2]) which effectively requires the whole song. To circumvent this need, you need to know the length of the impulse response and do an overlap add between segments - from the link in Kjeldsens post:

“i presume you are looking into using real-time IIR filters in forward and reverse on segments to get the zero-phase (or more accurately, linear phase) response.........you time reverse a segment of audio, run it through (backwards) an IIR filter with initial states set to zero. by knowing the pole locations of the IIR filter, you can predict how long it will take the IIR to decay to "zero" (to within a given precision) after the finite audio segment has passed through. you then time reverse the result back and overlap-add the tails over succesive segments (this is easy if you choose the segment size to be exactly the same length as the length of the IIR impulse response).”

Long story short – I wouldn´t count on this feature on the minidsp.

Having said all this, my signal processing knowledge dates back 8 years so I may have missed and forgotten a few things.

If you are really interested in the effect of inverse filtering you could filter a few songs (wave files) with the desired inverse filter offline, burn them on to a CD (or use the computer) and play them on your stereo system (or to a desired speaker unit). Filtering can be done in Scilab

@Curryman
Maybe we should sneak in a “build a 3 or 4 way OpenDRC” into every topic :laugh: I´m also eagerly waiting for such a solution.

Hope it helps
The administrator has disabled public write access.
The following user(s) said Thank You: Crumboo

Re: Linear phase IIR filters? 8 years 7 months ago #4404

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Thank you for your long answer Jakster! Sorry to hear that you don't think that reverse filtering will be implemented in the miniDSP. Yes, FIR with OpenDRC could be an option for phase linearization of the complete system, but reverse filtering with IIR would be very good because it wouldn't require so much of the hardware in terms of processing power. I believe it would be much cheaper for processing 8 channels, which may be needed for crossover purposes.

The reason that I want to be able to have control over the phase is not primarily that I need a linear phase system (I don't think mild phase turning is very audible). Instead I want to implement steep non-textbook filters without introducing severe phase distortion that makes it very hard to keep the different drivers in phase with one-other throughout the crossover regions. I don't see how pre-processing with openDRC could help me with that.

Since the developers hasn't commented on this I believe, as you do, that we won't be seeing this feature for the miniDSP so I'm looking on PC-based solutions instead. The Phase Arbitrator/Frequency Allocator seems to be one candidate (which I believe actually is based on reverse IIR filtering!), another one is Ultimare Equalizer (which is based on FIR). I'm actually not very happy about having a PC in my stereo setup, but there seems to be little choice (DEQX is way too expensive).
Last Edit: 8 years 7 months ago by Crumboo.
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 6 months ago #4430

  • devteam
  • devteam's Avatar
  • Online
  • Administrator
  • Posts: 8750
  • Thank you received: 1125
  • Karma: 162
@ Crumboo,

I don't see how we could provide more details and information than what Jakster did above. Thanks Jakster for this! :-) His post is very comprehensive and very clear on the difference in the filter implementation. The basic miniDSP do have the "mini" word inside and do have some limitations. :-) Only standard IIR is available.

PC package can indeed do such thing since they already have the whole song on hand.
FIR multichannel is the way to go for steep slopes. OpenDRC will allow you to input any taps/FIR filter.

Hoping this info helps
Devteam
miniDSP, building a DSP community one board at a time.
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 6 months ago #4432

  • curryman
  • curryman's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 792
  • Thank you received: 181
  • Karma: 101
FIR multichannel is the way to go for steep slopes. OpenDRC will allow you to input any taps/FIR filter.
Can I (and Jakster and others ;) ) read this as: Multichannel OpenDRC will come soon :whistle:
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 6 months ago #4449

  • devteam
  • devteam's Avatar
  • Online
  • Administrator
  • Posts: 8750
  • Thank you received: 1125
  • Karma: 162
hhehehe.. only time will tell Daniel.. only time will tell.. :-)
miniDSP, building a DSP community one board at a time.
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 6 months ago #4452

  • Jakster
  • Jakster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 4
  • Karma: 3
Happy to help.

@Crumboo

you´re right. The amount of processing power for inverse IIR filtering is a lot less than using a FIR filter - especially if you´re trying to correct an IIR filter with a huge phase change (thereby long impulse response).

And you are correct that the MiniDSP has enough processing power to handle an Inverse "block filtered" IIR filter, but it would require major changes in the software. And even if they did this, the flexibility of the system would be compromised. A few things they would need to consider:

-What length should be used as block size - the block size depends on the impulse response of the reversed IIR filter and increases at the phase changes.

-How much processing power to std. IIR and how much to the reversed II (you would loose biquads in the forward direction)

-System delay would increase to more than the blocksize, which could be a problem for home theater users

-sales - will this product sell (is the demand high enough for the cost).


I looked at the thuneau site - looks very promising in regards to what you want to do, so maybe that is the way. I have the same reservations regarding the use of a PC for audio use (I wanted to use bruteFIR on a lot of channels).


I haven´t examined the site thourougly, but is it possible to use steep filters ("each DSP crossover leg adjustable from 6dB/oct to 42dB/oct on Low Pass and High Pass side." corresponding to 7. order filter)?? how high order do you need? and also - what happens at different sample rates (44.1, 48 and 96khz)

Can you explain a little about these "steep non-textbook filter" you want to use - maybe give an example??

I really like the interface of the program though. Very easy to setup and use, and I also like the phase inverter part and you are correct - they do inverse realtime IIR filtering, so it is indeed not an impossible solution :-) - I will say that a PC works on blocks of samples by default, so in that sense it makes sense to do it this way.

I´m not going to advocate what you should buy - each systems has their own faults and limitations. Personally I´d go for the miniDSP - mainly because I don´t like the idea of a PC hammering away to do a few instructions but also because of the amount of biquads availible on the miniDSP. I´d use a linkwitz transform on each speaker unit to fit the lower response of each unit to my desired response (Linkwitz riley or duelund). Using phase coherent crossovers will allow you to use one inverse IIR filter to correct the "coherent" phase change of all drivers. I would probably do this offline - preprocessing audio files in scilab with the inverse filter.
The administrator has disabled public write access.
The following user(s) said Thank You: Crumboo

Re: Linear phase IIR filters? 8 years 6 months ago #4453

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Hi, and thank you again Jakster for a very informative comment!

Yes, I believe miniDSP has the power indeed to do reverse filtering. Since I'm new to digital sound processing I cannot comment on the various issues about implementation, but regarding how the processing resources should be allocated between forward and reverse filtering one solution could be to let the user choose the filtering direction for each biquad.

Regarding thuneau: I had a closer look and as you say, the filter slopes are max 42 dB/oct which is probably not enough for what I want to do. The filters I would like to implement is described in this link, and was developed to achieve controlled beamwidth/polar shape for symmetrical systems. In my case (which is 3-way WMTMW), the response curves would look like this:



Probably FIR would be the best thing for this, and I am currently looking into using bruteFIR. Not that easy to set up I assume, but hopefully I'll figure it out. ;)

One more thing: I looked at using the miniDSP biquads to get the responses above and it is possible (that is for the amplitude, not phase) when using a combination of notches and regular (LR) filters. The phase distortion get bad however (as I mentioned previously).
Last Edit: 8 years 6 months ago by Crumboo.
The administrator has disabled public write access.
The following user(s) said Thank You: Jakster

Re: Linear phase IIR filters? 8 years 6 months ago #4456

  • Jakster
  • Jakster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 24
  • Thank you received: 4
  • Karma: 3
I just glanced at it - I´ll give it a more in depth read later. It looks very interesting.

Part 1 found here:
www.acourate.com/HorbachKeeleCrossover/A...arPhaseXOFilters.pdf

If you don´t know acourate its a program you can use to use calculate FIR filters to use in fx brutefir. It is supposed to be very good, but I can´t test it anymore because my trial period ended a looong time ago. But since the paper was found on his website - maybe acourate can calculate this filters for you. Also acourate can calculate filters for room correction.

They use FIR filters (see part 1) and I don´t think it is possible to use IIR for this. So it looks like you should proceed down the brutefir path. Or you could wait and see if the devteam releases a 4 way openDRC. In the paper (part 1) they write "Multirate techniques can be employed to minimize implementation cost." which is exactly what I (and Curryman) are looking for - so miniDSP get busy! :-)

A little extra information on polar plots and linear phase fir (here as a more traditional brick wall fir filter) vs. linkwitz riley (if you havent seen it):

www.dolby.com/uploadedFiles/zz-_Shared_A...soversWhitePaper.pdf

So you´re building a 4 way in a WMMTMMW with 7 units... nice!
The administrator has disabled public write access.

Re: Linear phase IIR filters? 8 years 6 months ago #4462

  • Crumboo
  • Crumboo's Avatar
  • Offline
  • Expert Boarder
  • Posts: 144
  • Thank you received: 14
  • Karma: 13
Hi again,

Yes I had a look on acourate and it seems to be able to do what I want. It's really to expensive however, so I'm looking for other ways to calculate the filter coefficients. I recently downloaded Scilab which I believe can be of use. Du you have any experience on calculating FIR coefficients for an arbitrary filter? Somehow I'd like to import my measured data as well as target function and then calculate the FIR that "transforms" the measured response into the desired target response. Any clues on how this could be done?

For bruteFIR I intend to use (that is if I choose to use bruteFIR and not wait for news on multichannel FIR from miniDSP ;) ) a very minimal setup consisting only of a motherboard (with integrated graphics), processor, memory, a good (low ripple) PSU and a multichannel soundcard. I found somewhere that Linux can be booted from a USB stick (which also contains bruteFIR) so a harddrive is not needed.

My speakers are 3-way WMTMW, and the Horbach-Keele crossover seems to work fine for this setup, and the vertical response looks really promising. I constructed the speakers some year ago (with passive crossovers) and I now want to experiment with digital crossovers. Here's a picture of the speakers:



Thank you for the link, I'll have a look on it! :)
Last Edit: 8 years 6 months ago by Crumboo.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: devteam