CHANGSTAR: Audiophile Headphone Reviews and Early 90s Style BBS

Lobby => Headphone Measurements => Topic started by: Joe Bloggs on September 10, 2012, 02:27:49 AM

Title: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on September 10, 2012, 02:27:49 AM
My first post here, hello purrin!

Considering that we would usually correct headphone FR with a minimum phase EQ and drivers' phase distortion are themselves near minimum phase, wouldn't it be more interesting to convolve the impulse response with its inverse minimum phase FIR filter before plotting the CSD?

Here was xnor's experiment with a pair of phones (I still don't know what phones they were...)
Before:
(http://cdn.head-fi.org/5/55/350x244px-LL-55ec22ee_csd_without_eq.png)
After:
(http://cdn.head-fi.org/2/28/350x233px-LL-283def8d_impinv.png)

This shows that 90% of the "ringing" to be simply a direct result of the phones' FR imperfections...
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: rhythmdevils on September 10, 2012, 02:44:26 AM
I'm a bit out of my depth here but the "after" plot looks a bit extreme to me, what about transient response?  Are we to believe that this method makes the driver so fast you can't even detect it anywhere?  The "after" plot here looks to me like there is no sound being produced at all.  Even the cleanest, flattest headphone is going to have a plateau at the very beginning right? 

I could be missing something, I have no idea what minimum phase FIR is.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 03:02:42 AM
I think the un-equalized FR and CSD plots are a bit more interesting as they offer a visualization of how the stock headphone behaves. Furthermore, if your subjective evaluation of the headphone matches to some extent with the measurements, the un-equalized measurements may actually help you to roughly equalize your headphones, or at least give you a starting point...

Also note that acoustic equalization can be achieved through headphone damping modifications which may offer some benefits over electronic equalization.

As far as minimum phase is concerned, I believe headphones are mostly minimum phase in the audio band, but may have non-minimum phase behavior at deep notch locations.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: wiinippongamer on September 10, 2012, 03:14:12 AM
I'm pretty sure there was no sound being produced/recorded from the headphones in the second graph. That said ringing/resonance does go hand in hand with FR peaks/dips.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 03:27:55 AM
I think xnor's plot is a bit idealized as there would be positional variations and distortion that would not result in such an ideal response. The purpose was to show that equalization can indeed make corrections to the CSD response.

Acoustic equalization through damping offers similar benefits (or if wrongly applied... issues):

TR50P

Paradox:
http://www.changstar.com/index.php/topic,41.0.html
http://www.changstar.com/index.php/topic,17.0.html

Koda:
http://www.changstar.com/index.php/topic,208.msg2304/topicseen.html#new

I couldn't find measurements of the stock YH-3s here at effin' ringin', but here are the results after some well thought modifications:
http://www.changstar.com/index.php/topic,388.msg6294.html#msg6294
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: maverickronin on September 10, 2012, 03:35:04 AM

This shows that 90% of the "ringing" to be simply a direct result of the phones' FR imperfections...

I'm pretty sure that's not how it works

That filter extends into the time domain and it's not just changing the FR.  It's adding extra content to the signal in order to cancel out things the driver will do, kind of like active noise cancellation.

AFIK that kind of thing can work very well when you just use a short test signal and then convolve the test signal to exactly counter the problems.  It doesn't work out when you try to derive a generally applicable FIR filter that will work with any input signal because the drivers aren't quite linear enough to match the mathematical models and being just a little bit off will make things sound worse.

To make that idea work you'd have to do something silly like record your headphones playing each individual track in order to get the FIR filter to fix it.  Only slightly more practical would be modding your headphones with a "feed forward" mic like the good ANC cans have and running it's output back to you PC where you could run some kind of DSP engine that could do all the math in real time.

Also, can you link to that post?  I'm not even sure if that second one was actually recorded or if the data from the first graph was just processed and then redisplayed.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 03:40:37 AM

This shows that 90% of the "ringing" to be simply a direct result of the phones' FR imperfections...

I'm pretty sure that's not how it works

That filter extends into the time domain and it's not just changing the FR.  It's adding extra content to the signal in order to cancel out things the driver will do, kind of like active noise cancellation.

AFIK that kind of thing can work very well when you just use a short test signal and then convolve the test signal to exactly counter the problems.  It doesn't work out when you try to derive a generally applicable FIR filter that will work with any input signal because the drivers aren't quite linear enough to match the mathematical models and being just a little bit off will make things sound worse.

To make that idea work you'd have to do something silly like record your headphones playing each individual track in order to get the FIR filter to fix it.  Only slightly more practical would be modding your headphones with a "feed forward" mic like the good ANC cans have and running it's output back to you PC where you could run some kind of DSP engine that could do all the math in real time.

I agree that it is more practical in the long run to mod the headphones. But I don't think that was an echo canceller or predictor structure. That more than likely was straight FIR convolution to the impulse response which did not took into consideration non-linear distortion and positional variations.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: maverickronin on September 10, 2012, 03:47:10 AM
I agree that it is more practical in the long run to mod the headphones. But I don't think that was an echo canceller or predictor structure. That more than likely was straight FIR convolution to the impulse response which did not took into consideration non-linear distortion and positional variations.

Oops.  I didn't mean to give the impression that I thought xnor did it that way.  It seemed pretty clear to me that it was a straight FIR convolution.

I was just throwing out an idea that worked on a similar principle.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Marvey on September 10, 2012, 03:52:55 AM
It's is very interesting though. I should apply corrective EQ with various filters and take measurements.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: khaos on September 10, 2012, 04:21:05 AM
It's is very interesting though. I should apply corrective EQ with various filters and take measurements.

You should start with an Ultrasone or the HD 700.  :)p17
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on September 10, 2012, 04:22:26 AM
To me, the most interesting part of xnor's experiment was to show that the headphone had pretty much minimum phase characteristics (because the equalizing filter based on the inverse of the
Magnitude response function was a minimum phase fir filter). This is something I had doubts about before considering the mix of direct / reverberant field in headphones.

I do agree that the reason why it looked so good is that this was purely  convolution of an impulse response with its minimum phase inverse (an ideal inverse of a minimum phase headphone would produce a perfect wall in the csd).

In that sense marv, you should get excellent results until you start messing with robustness (you know better than me what happens when you reseat the headphone). The art comes in to having a robust response to correct.

 This joins the discussion we had in the other thread about square wave response (http://www.changstar.com/index.php/topic,496.msg9399.html#msg9399 ). Actually, I could just replaced the DF / ID equlization targets with the inverse of the headphone response and could show the example result as I am using same process as xnor did to remove the influence of the measuring head on tyll's data.

Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 07:31:00 AM
I think that the headphone that xnor used was indeed minimum phase in most of the audio band. But I'm not certain all are.

Nevertheless, I have a feeling most headphones are "mostly" minimum phase by brief inspection of the impulse response... If you set t = 0 at the peak of the impulse response of most headphones, most of the energy lies at t > 0, i.e. energy is concentrated at the "front" of the impulse response. This means little group delay, which is an indication of minimum phase.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: PelPix on September 10, 2012, 08:24:02 AM
I think that the headphone that xnor used was indeed minimum phase in most of the audio band. But I'm not certain all are.

Nevertheless, I have a feeling most headphones are "mostly" minimum phase by brief inspection of the impulse response... If you set t = 0 at the peak of the impulse response of most headphones, most of the energy lies at t > 0, i.e. energy is concentrated at the "front" of the impulse response. This means little group delay, which is an indication of minimum phase.

Is it even possible for a sound emitter to be anything but minimum-phase?  If you hit a drum, it doesn't start out quiet, go to a peak, and then go back to being quiet (and it CERTAINLY doesn't start ringing before you hit it :)p13)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 08:29:00 AM
I think that the headphone that xnor used was indeed minimum phase in most of the audio band. But I'm not certain all are.

Nevertheless, I have a feeling most headphones are "mostly" minimum phase by brief inspection of the impulse response... If you set t = 0 at the peak of the impulse response of most headphones, most of the energy lies at t > 0, i.e. energy is concentrated at the "front" of the impulse response. This means little group delay, which is an indication of minimum phase.

Is it even possible for a sound emitter to be anything but minimum-phase?  If you hit a drum, it doesn't start out quiet, go to a peak, and then go back to being quiet (and it CERTAINLY doesn't start ringing before you hit it :)p13)

LOL! Check out the impulse response of the Ultrasone Edition 10 at IF... :)p5
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: PelPix on September 10, 2012, 08:36:43 AM
I think that the headphone that xnor used was indeed minimum phase in most of the audio band. But I'm not certain all are.

Nevertheless, I have a feeling most headphones are "mostly" minimum phase by brief inspection of the impulse response... If you set t = 0 at the peak of the impulse response of most headphones, most of the energy lies at t > 0, i.e. energy is concentrated at the "front" of the impulse response. This means little group delay, which is an indication of minimum phase.

Is it even possible for a sound emitter to be anything but minimum-phase?  If you hit a drum, it doesn't start out quiet, go to a peak, and then go back to being quiet (and it CERTAINLY doesn't start ringing before you hit it :)p13)

LOL! Check out the impulse response of the Ultrasone Edition 10 at IF... :)p5

Ultrasones don't count; they defy our pitiful laws time and space to be terrible in every possible reality that this universe contains.

The Nickelback of the headphone world...
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 09:09:03 AM
LOL! real world systems are causal but don't necessarily react immediately to an stimulus.

Bellow is a linear phase (non-minimum phase) impulse response, and it's minimum phase approximation (through rceps,) to give a feel as to what is meant by "energy in the front."

It is not a very good approximation BTW, if we go from 200 to 2000 samples, the approximation improves (I don't think the FR minimum phase equivalent of an arbitrary system is guaranteed to exist...)

Anyhow, the point is just to show how to roughly get a feel for what is minimum phase and what is not by looking at the impulse response, that's all...

Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: anetode on September 10, 2012, 09:46:22 AM
I've always wondered whether the pre-ringing as a result of a DAC filter has any audible effect at the transducer. I can see it getting... confused  :-S
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on September 10, 2012, 10:06:10 AM
Unfortunately, these concepts can get a little complicated. It turns out a typical room response is not actually minimum phase. See the introduction here for example (in particular the reference to the work from Lyon about room phase response) : http://www.acoust.rise.waseda.ac.jp/~takahashi/AES28-000046.pdf

Simply said: when you're close to the source, with mostly direct field / little room reflections, you essentially see the "propagating phase" component. Once the reverberant field blends in (you can view it as a bunch of reflections from the walls, it turns into sharp peaks and notches in the magnitude response, at each acoustic resonance / node). The resulting phase is a bit of a mess and does not typically have minimum phase characteristics. The intuitive notion is that not all the speaker energy arrives at the same time. It is causal but it isn't minimum phase.

Now comes headphones and my lack of feel for it: I am still suspecting we could find examples of non minimum phase headphones where the reflected field is in equal or similar proportion to the direct field. Ultrasone is a good design candidate with a baffle plate in front of the driver. From looking at the latest Denon marvel (D7100), it seems ot could be a candidate as well.


Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ujamerstand on September 10, 2012, 02:03:50 PM
STAX sr-sigma?
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on September 10, 2012, 04:42:49 PM
I'm pretty sure there was no sound being produced/recorded from the headphones in the second graph. That said ringing/resonance does go hand in hand with FR peaks/dips.

Just a note about this (and similar posts):  the waterfall plot in the second graph is essentially a vertical cliff from the first pixel.  You can see the red line near the top on the left, it merges with the top and "disappears" in the middle of the graph.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on September 10, 2012, 04:50:08 PM
I agree that it is more practical in the long run to mod the headphones. But I don't think that was an echo canceller or predictor structure. That more than likely was straight FIR convolution to the impulse response which did not took into consideration non-linear distortion and positional variations.

Oops.  I didn't mean to give the impression that I thought xnor did it that way.  It seemed pretty clear to me that it was a straight FIR convolution.

I was just throwing out an idea that worked on a similar principle.

It was also stated by xnor to be a minimum-phase only deconvolution, not a full deconvolution.

I think it's interesting as an indicator of how good the impulse response can theoretically get if you only use EQ. (rather than say stick a mic between the headphones and your ears and run DRC-FIR)

18 replies to my first post in this forum while I was away, cool :)p4
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on September 10, 2012, 06:34:57 PM
There is one headphone that comes across as almost linear phase (non-minimum phase) from IF impulse response inspection that I find interesting: The Shure SE535. I haven't heard it, and I have comfort issues with IEMs. However, some people think it's quite good, while others think it's kind of meh... Not a consensus fail as the Ultrasone and the Denon Buger King though...
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: maverickronin on September 11, 2012, 12:52:24 AM
There is one headphone that comes across as almost linear phase (non-minimum phase) from IF impulse response inspection that I find interesting: The Shure SE535. I haven't heard it, and I have comfort issues with IEMs. However, some people think it's quite good, while others think it's kind of meh... Not a consensus fail as the Ultrasone and the Denon Buger King though...

It's got 3 drivers and a 2 way crossover to introduce all kinds of phase oddities.  For example, here's (http://www.innerfidelity.com/images/CreativeAurvanaInEar3.pdf) a 2 driver two way that looks a bit linear phase

I do like the 530 and 535 quite a bit FWIW.

It was also stated by xnor to be a minimum-phase only deconvolution, not a full deconvolution.

I think it's interesting as an indicator of how good the impulse response can theoretically get if you only use EQ. (rather than say stick a mic between the headphones and your ears and run DRC-FIR)

Well the acid test would be wedging that filter somewhere in between the Arta's signal generator and the headphones.  Anyone know a way I could do that?
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ujamerstand on September 11, 2012, 01:18:45 AM
Does ARTA's built-in FR compensation use a fir filter? If it does, measure the phones, take the data and save that as .frd format, then use that as the FR compensation file. You'll need the full version to save though, and it might not work as intended.


(http://media.tumblr.com/tumblr_ma2gl4AtkT1r0p6gh.jpg)


I don't know. DRC the damn thing and use MATAA's CSD plotter?
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on September 11, 2012, 03:07:09 AM
I have some idea there, I might give it a shot  :)p1
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on October 11, 2012, 04:02:36 AM
Any progress arnaud?  :)p17
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: wiinippongamer on October 11, 2012, 04:19:10 AM
Looking foward to hearing more from this too.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 11, 2012, 06:37:37 PM
I am with Maverickronin on this one.
The way I see it (and was often told I was wrong) if a driver swings out, this could be compensated by applying the 'opposite signals' (motion feedback/noise cancelling principle but done differently)
This would have to be done at all the specific frequencies or in very narrow bands, when non-active feedback is used and that would amount to a lot of computive power to modify the incoming signal to the 'needed one'.
Also each headphone would have to be compensated individually (look at the DT1350 choclats), not to mention diafragms changing properties over time or temperature change would do to the original compensation.
Another thing..... will the headphone actually sound ideal as well with all these 'modifications' of the original signal ?
Test signals perhaps.. music unsure.

Strange plot it cannot be just FR compensation but time domain must be addressed as well (for the ringing) otherwise a simple EQ would have been enough and it isn't for the 'effen ringin' IMO.

If it were that simple to create the perfect headphone there would have been handy sellers that were already selling headphones with built-in active compensation for large sums of money as they would be very easy to make and sound 'perfect'.
No such thing yet.  :-X
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 12, 2012, 06:14:17 AM
If it were that simple to create the perfect headphone there would have been handy sellers that were already selling headphones with built-in active compensation for large sums of money as they would be very easy to make and sound 'perfect'.
No such thing yet.  :-X

Most HP manufacturers don't even damp the cups of their mega-buck products. Furthermore, active headphone compensation, with in the headphone, would require delivery of power to the headphone which in some portable applications may not be practical... That said, the outlook maybe changing, this looks promising if properly implemented: http://www.parrot.com/zik/usa/touch

Also note that Frequency Response (phase and amplitude) and Impulse Response are duals. For better or worse, if you mess around with one, you mess around with the other.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 12, 2012, 08:49:55 PM
Indeed.

Most HP manufacturers are their to make a buck.
Pull some dough out of our pockets with the highest possible revenues coming their way.

Some companies (HifiMan, Audeze e.t.c.) seem genuinly concerned about making good sounding headphones.
Yet I believe they too will never market a digitally compensated headphone.

If I had enough knowledge of digital filtering I would design something for it, I doubt however these headphones would sound flawless and ideal though.

Anway... I enjoy my music over my headphones already.. no harm in trying to improve fidelity though.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on October 13, 2012, 03:19:13 AM
I am with Maverickronin on this one.
The way I see it (and was often told I was wrong) if a driver swings out, this could be compensated by applying the 'opposite signals' (motion feedback/noise cancelling principle but done differently)
This would have to be done at all the specific frequencies or in very narrow bands, when non-active feedback is used and that would amount to a lot of computive power to modify the incoming signal to the 'needed one'.
Also each headphone would have to be compensated individually (look at the DT1350 choclats), not to mention diafragms changing properties over time or temperature change would do to the original compensation.
Another thing..... will the headphone actually sound ideal as well with all these 'modifications' of the original signal ?
Test signals perhaps.. music unsure.

Strange plot it cannot be just FR compensation but time domain must be addressed as well (for the ringing) otherwise a simple EQ would have been enough and it isn't for the 'effen ringin' IMO.

If it were that simple to create the perfect headphone there would have been handy sellers that were already selling headphones with built-in active compensation for large sums of money as they would be very easy to make and sound 'perfect'.
No such thing yet.  :-X

The compensation shown by xnor is in some sense highly idealized but in another sense quite simple.

It is simple in the sense that it is just a minimum phase filter as can commonly be found in EQs.  So the "time domain" was not "addressed"--not beyond the sense that unlike a linear phase EQ, a minimum phase EQ will alter phase response in a fixed relationship with the magnitude response alteration.

It is highly idealized in the sense that... I'll just quote xnor's message to me:
Quote (selected)
3. What did "It's not perfect but that's not surprising considering I used the raw data" mean?

3) It means that I didn't do any averages over positional changes. I didn't re-measure the headphones with the inverse filter applied (you could do this multiple times trying to improve the filter each time). Also there was no smoothing, so narrow 20 dB dips would be narrow 20 dB peaks in the inverse filter which could cause problems if you used that filter for listening.

Still, overall you can generate filters to flatten the FR which will also improve the impulse response, provided they're mostly min phase (so no crazy multi-way crossover stuff) . You can also do it by hand, but it's a lot more work if you have to do it for multiple headphones over and over again.

AFAIK it means that you can obtain the pictured corrected response if
1. You never take off or move your headphones on your head again after the measurement and correction (impossible)
2. You have enough amp power to compensate for the 10+dB loss of efficiency that results from the EQ (possible)
3. The drivers' non-linear distortion does not get worse because of your systemetically boosting its weak frequencies (impossible)
and finally
4. You measure the impulse response with the phones on your own ears.  Then you have to supply your own HRTF to compensate for the fact that flat response sounds close to perfect coming from speakers but perfectly awful coming from headphones because of HRTF effects. (not commercially possible)

AFAICT The first 3 points are technical difficulties that would make the compensation less perfect than it appears on xnor's graph whereas [4] is the real reason no digitally compensated headphones have come out: individual differences (plus individual preferences!) make a one-size-fits-all headphone FR such a crapshoot that you can basically throw out anything and (with the help of some marketing) *someone* out there is guaranteed to like what he hears from it.

[4] is commercially impossible but possible on an individual basis... in fact I have been doing this for all my headphones without even using any measurement equipment.  I tried to detail my method here but TBH it's not very well organized (understatement)
http://www.head-fi.org/t/615417/how-to-equalize-your-headphones-advanced-tutorial-in-progress

If anyone's interested but can't understand what I wrote do please leave a message here or in my pm (here or on head-fi) and I'll answer all your questions :D
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: rhythmdevils on October 13, 2012, 03:41:47 AM
I think xnor's plot is a bit idealized as there would be positional variations and distortion that would not result in such an ideal response. The purpose was to show that equalization can indeed make corrections to the CSD response.

Acoustic equalization through damping offers similar benefits (or if wrongly applied... issues):

TR50P

Paradox:
http://www.changstar.com/index.php/topic,41.0.html (http://www.changstar.com/index.php/topic,41.0.html)
http://www.changstar.com/index.php/topic,17.0.html (http://www.changstar.com/index.php/topic,17.0.html)

Koda:
http://www.changstar.com/index.php/topic,208.msg2304/topicseen.html#new (http://www.changstar.com/index.php/topic,208.msg2304/topicseen.html#new)

I couldn't find measurements of the stock YH-3s here at effin' ringin', but here are the results after some well thought modifications:
http://www.changstar.com/index.php/topic,388.msg6294.html#msg6294 (http://www.changstar.com/index.php/topic,388.msg6294.html#msg6294)
This is an old post but I just saw it...


Damping doesn't just change the FR though.  It changes how the driver operates because of putting different "pressures" on the movement of the diaphragm.  At least IMO/E.  And it definitely also actually eliminates resonance separate from FR.  You could have a lot of different sounding T50rp mods with wildly different FR but all very clean.  With the riht mods that is. 
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 13, 2012, 06:49:44 AM
I think xnor's plot is a bit idealized as there would be positional variations and distortion that would not result in such an ideal response. The purpose was to show that equalization can indeed make corrections to the CSD response.

Acoustic equalization through damping offers similar benefits (or if wrongly applied... issues):

TR50P

Paradox:
http://www.changstar.com/index.php/topic,41.0.html (http://www.changstar.com/index.php/topic,41.0.html)
http://www.changstar.com/index.php/topic,17.0.html (http://www.changstar.com/index.php/topic,17.0.html)

Koda:
http://www.changstar.com/index.php/topic,208.msg2304/topicseen.html#new (http://www.changstar.com/index.php/topic,208.msg2304/topicseen.html#new)

I couldn't find measurements of the stock YH-3s here at effin' ringin', but here are the results after some well thought modifications:
http://www.changstar.com/index.php/topic,388.msg6294.html#msg6294 (http://www.changstar.com/index.php/topic,388.msg6294.html#msg6294)
This is an old post but I just saw it...


Damping doesn't just change the FR though.  It changes how the driver operates because of putting different "pressures" on the movement of the diaphragm.  At least IMO/E.  And it definitely also actually eliminates resonance separate from FR.  You could have a lot of different sounding T50rp mods with wildly different FR but all very clean.  With the riht mods that is. 

Yes. FR amplitude is not everything. There is non-linear distortion (THD, IMD and all that deal) and FR phase. However, FR phase is IMO hard to read. See the attached plots of the AKG K701 FR amplitude and phase. I can sort of make sense of the FR amplitude, but I have a hard time with the phase.

The plots of the FR phase were derived from Innerfidelity's IR (which impose a limitation of 200Hz given the excessive resolution and lack of samples to cover the lower frequencies)

I feel CSD convey FR phase issues (some related to resonance) in a much more readable way.

On cup damping, removal or addition of cup reflections is equivalent to modifying digital filter taps. Consider a tone. Adding the same tone with a different amplitude and phase corresponds to a two tap FIR filter...

This is my understanding which may be flawed. I have been proven wrong many times :)p5
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 13, 2012, 07:27:41 AM
Well it is interesting subject, correction that is.
I have passively corrected quite a few headphones (with all the 'side effects' that come with it) and IF the headphone responds well you can get an overall improvement of SQ where the cure outways the sideeffects with a wide margin.
Too much EQ (compensating severy rolled off hedaphones) never gives the desired effect even when done with digital minimal phase filtering.
Even if you have very narrow band linear phase filters and get it 'flat' it will still 'ring' and distort.
Certainly when you need to compensate 20 dB or more non linearities will give audible distortion.
Ortho's (with magnets on both sides) may be excellent candidates though.

There are many headphones around that do not show very obvious FR problems (just a few dB) yet are ringing at that frequency.
So if you address that minimal amount of amplitude correction the ringing will not be affected much I reckon but could be mistaken of course, never having actually tried that.

This is what 'puzzles' me in the discussed plot.
The ringing appears to have been gone and the membrane seems to 'stop' instantly dead in the water.
It's not entirely impossible but when break-up is in play I cannot see how 'simple' FR compensation can prevent those artifacts.

You would have to have a good measurement with a 'flat' microphone to create the correction IMO.
You cannot use plots out there on the web (DT1350 choclats effect) so only a manufacturer or well equiped DIY'er can get the correct 'correction' which will also be hard to implement in portable gear (I mainly use HP's portable)

Did he mention (and what's your opinion) the headphone sounded a lot better also ?
I didn't read his original thread which I suppose should and will.  ::)

...Nice to see screenshots of Ubuntu window frames.  :)


Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 13, 2012, 08:49:35 AM
My understanding is that CSD ringing is not necessarily the exact same thing as IR (time domain) ringing. Also, AFAIK all bandlimited systems will have memory in the time domain, i.e. they will never "'stop' instantly dead in the water."

Something that will start and stop instantaneously would have a Dirac delta function for an impulse response (and infinite bandwidth.) Such systems are really mathematical constructs (they don't exist in real life.) 

But who cares, most of us can't hear past 20kHz (I can't past 15kHz I think.) All we need to do is remove issues in the audible range, and that does not require an infinitely fast membrane.

Also, I'm almost certain the AKG K701 is not minimum phase (did a zero plot of the IR and there seem to be quite a few zeros outside the unit circle - see figures.) That said, the rceps approximated minimum phase IR is very close to the measured one, and it may be possible to do a decent job at equalizing (also see figures.)

Regarding equalizers, I'm more familiar with convolution. A few thousand taps could possibly bring the IR back in line, but that may be difficult to do manually and by ear. Furthermore, it will not be a perfect solution given nulls, distortion, positional variations, etc... Just a potential improvement.

As far as Ubuntu... Got this Windoze 7 HP laptop with craptastic beatsaudio tatooed somewhere in the OS. So double booting to Ubuntu which has it's pluses (and minuses) :) Should have gotten a MAC :'(
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 13, 2012, 09:13:20 AM
Since I have never tinkered with headphones in this particular way I wonder how they sound after the 'near ideal'  response is created ?

I mean polishing a  poo will still be a polished  poo
Can you get a HD201 to sound like the SR009 or will it still sound like a HD201 but 'imporoved' ?

I have tried to 'speed up' severely rolled off HP's by EQ but do not get the desired results as the membrane simply cannot create the needed movement.
Similar to turning up the bottom end on a bass-shy HP, this too will never give a good bass reproduction.

Starting base would have to be a very good headphone that only needs a few nudges.
my personal FR is limited to about 16kHz, though the 16.265kHz I can still detect (but not as loud as when I was young)
Although some claim related harmonics above the audible range contribute to the overall SQ I feel that 20kHz (-0.1dB) is sufficient.

As long as I can get risetimes of the membrane fast enough to follow those that exist in music signals I can't complain.
Usually the fast moving amplitudes are very low in amplitude so very fast risetimes are not mandatory (for me)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 13, 2012, 07:45:53 PM
Since I have never tinkered with headphones in this particular way I wonder how they sound after the 'near ideal'  response is created ?

I mean polishing a  poo will still be a polished  poo
Can you get a HD201 to sound like the SR009 or will it still sound like a HD201 but 'imporoved' ?

I have tried to 'speed up' severely rolled off HP's by EQ but do not get the desired results as the membrane simply cannot create the needed movement.
Similar to turning up the bottom end on a bass-shy HP, this too will never give a good bass reproduction.

Starting base would have to be a very good headphone that only needs a few nudges.
my personal FR is limited to about 16kHz, though the 16.265kHz I can still detect (but not as loud as when I was young)
Although some claim related harmonics above the audible range contribute to the overall SQ I feel that 20kHz (-0.1dB) is sufficient.

As long as I can get risetimes of the membrane fast enough to follow those that exist in music signals I can't complain.
Usually the fast moving amplitudes are very low in amplitude so no full range squarewave response is needed (for me)

I agree. The first headphone I bought after much research (performance/price) was a pair of HD202s. I could have done better with a set of KSC-75s but I did the best I could at the time. I had time limitations to make my purchase: my son was born and I wanted to watch movies at night with my wife without waking him up.

The difference in sound quality between an HD202 and an HD558 is considerable. And the difference in sound quality between properly driven HD558 and SR009 is quite considerable too, specially when the SR009 is driven by a Cavalli LL.

I do not believe one can make an HD201/202 sound exactly like an SR009. What you can do is approximate the sound to within the physical limitations of the headphone. You will definitively make an improvement, but that's about it.

Also, a properly implemented and setup equalizer can potentially improve the sound quality of any can.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 12:01:02 AM
I have to get back to this and complete what I started with CSD post-processing...

One comment on the IR ringing being different of the CSD ringing: they're actually the same thing except that the IR is dominated by the largest amplitude resonance and / or longest decay resonance. Since for the same damping (or Q if you will), the higher the frequency, the shorter the decay (so called T60), you are likely to see only the "low" frequency ringing by looking at the IR. Or if you look at the SW response, the resonances most excited by the signal (e.g. SW fundamental and possibly some of the first order harmonics).

The thing is, nobody looks at CSD in engineering except speaker designers. For room acoustics and general vibro-acoustic in the mid-high frequency range, we looks at time decay (T60), which is nothing more than the envelope of the IR after it's been filtered in 1/3 Octave Bands. It is a "coarser" look at the damping of the system, with the T60 (or damping loss factor) of a given band corresponding to the average damping of all the resonant modes in that band. Basically, when you get to room acoustics for example, there are so many zillion modes it makes no sense to look for / attempt to extract the ringing of one more but rather look at 1/3OB decay of a group of modes.

In regards to the interpretation of the phase response, I have actually also looked into this as part of my previous investigation but decided not to post the results because it wasn't too clear. You have to "unwrap" the phase response of the headphone to check if it has minimum phase characteristics. You also obviously need to remove the "propagation delay" of the original headphone IR (e.g. shift the IR so the peak pulse occurs at the beginning of the time window) as this adds up to the unwrapped phase response. For instance, a pure dirac has no phase change while the unwrapped phase of a time delayed (t_0) pure dirac unwraps at the rate of exp(-i 2*pi*f*t_0) or some like that. Once you've removed the propagative phase component of the headphone response, you may be able to see how much the headphone deviates from minimum phase characteristics (the minimum phase version naturally has no "propagation phase" component, e.g. the peak occurs at t=0). I haven't bothered going there yet and probable the bode plot approach is much more convenient...

Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on October 14, 2012, 03:38:30 AM
In regards to the interpretation of the phase response, I have actually also looked into this as part of my previous investigation but decided not to post the results because it wasn't too clear. You have to "unwrap" the phase response of the headphone to check if it has minimum phase characteristics. You also obviously need to remove the "propagation delay" of the original headphone IR (e.g. shift the IR so the peak pulse occurs at the beginning of the time window) as this adds up to the unwrapped phase response. For instance, a pure dirac has no phase change while the unwrapped phase of a time delayed (t_0) pure dirac unwraps at the rate of exp(-i 2*pi*f*t_0) or some like that. Once you've removed the propagative phase component of the headphone response, you may be able to see how much the headphone deviates from minimum phase characteristics (the minimum phase version naturally has no "propagation phase" component, e.g. the peak occurs at t=0). I haven't bothered going there yet and probable the bode plot approach is much more convenient...

I googled "minimum phase room acoustics" and came across this
http://www.gearslutz.com/board/studio-building-acoustics/504980-minimum-phase-room-response.html

This article by JohnPM seems helpful
www.hometheatershack.com/roomeq/wizardhelpv5/help_en-GB/html/minimumphase.html

In particular, there are analysis plots called "excess phase" and "excess group delay" which appear to much more clearly demonstrate how a system deviates from minimum phase.  I still don't know exactly how to read this though and I'd take JohnPM's assertions with a grain of salt because he makes some outrageous sounding claims in the subsequent argument with SAC and appears to mix up "minimum phase" and "stable" criteria.  But then SAC doesn't seem to be the paragon of knowledge either as he seems to think not minimum phase = not invertible.  I guess he hasn't heard of DRC?

I still hope that an impulse response convolved with its minimum phase "inverse" would provide a meaningful visualization in CSD.  If you're afraid it'd show as a flat wall like xnor's plot you could try measuring phones with no cup damping (like the infamous Beyer T1?) or even multi-driver IEMs, which would introduce crossover phase distortions that should be easily visualized.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 04:06:02 AM
Joe, I haven't checked your links but there is some info in the litterature as a result of research work. For instance, there has been quite a bit of interest in the field of room acoustics to create artificial room response based on geometric characteristic and source/receiver distance. It goes beyond just room acoustics, I worked on virtualization of high frequency simulations (where phase/individual resonances cannot be tracked individually) and it isn't an easy thing to come with representative phase.

Anyhow, for the reference, please have a look to the intro here, in particular the mention of Lyon's work in 3rd paragraph: http://www.acoust.rise.waseda.ac.jp/~takahashi/AES28-000046.pdf . Lyon compared typical room response unwrapped phase minus the propagation phase (estimated from source / receiver distance) vs. minimum phase response. Result is that anechoic room has minimum phase characteristics while reverberant room has non-minimum random phase. Actual listening hall falls somewhere in between depending on how close you are to the source (and thus how much predominant the direct field is...)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 04:42:21 AM
Actually, I'd need to read the articles from Lyon as my mind is rusty (looked into this over 10years ago). Reading that 3rd paragraph again, I realize I may be confused about the non-minimum phase component of room response...
 
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 04:49:27 AM
Nm the rumbling, I am indeed saying the same thing as the article... Getting old and rusty though, no doubt ;)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 14, 2012, 05:02:22 AM
Karma points to you Arnauld! Thanks for bringing all this up! Indeed CSD plots are not typical in my field.

You are correct in regards to CSD and impulse response ringing. I actually visualized this in the past, but I guess I forgot. What threw me off was the visualization of a linear phase window filter which should have pristine FR and CSD in the passband, yet crazy ringing in the IR. However, this ringing will correspond to severe CSD ringing at the corner frequency which could be outside the audio band... Thank you very much for bringing this up.

I also understood your comment regarding IR ringing at lower and higher frequencies. Also, removing the propagation delay will definitively help in visualizing the effects of phase (removes crazy slopes.)

In regards to minimum phase, by definition if the poles and zeros of a system's transfer function lie inside the unit circle, by definition the system is minimum phase. In some cases, removing the propagation delay is sufficient to make a system minimum phase. Sometimes, this is not possible AFAIK.

Regarding minimum phase and stability. In the digital domain, one could use the pole and zero cancellation approach to invert a channel (headphone coloration.) However, if the headphone's zeros lie outside the unit circle (non-minimum phase) then an equalizer would have to have poles outside the unit circle as well to cancel the zeros. Systems with poles outside the unit circle are unstable by definition. That said, one could put together an all zeros (FIR) equalizer and do a very decent job... I've done this when reversing a communication channel.

As far as how good of a job one will do in equalizing a headphone, what one could do is to derive an equalizer to reverse a particular headphone measured IR. Then apply said equalizer to different measurements as a function of positional variation and such... I'll see what I can do as well.

BTW, as far as old goes, I remember dealing with minimum phase and rceps when dealing with a design 10 years ago  (playing with a channel model) :)p13
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 05:57:57 AM
Thanks in return for the brushup on the z-transform ultrabike! To be honest, I did a few courses on control theory but these zeroes outside the unit circle have always been a weird thing for me. When you say unstable inverse filter, does it mean the IR goes to the roof instead of decaying? Or that it is an acausal filter? I forgot about this stuff, hence I like the work from Lyon because you can physically relate to actual phenomenon (e.g propagating phase for the direct field and non-minimum phase when the reverberant field dominates).
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 14, 2012, 06:23:52 AM
If the poles lie outside the unit circle, the filter will go through the roof (oscillate) if excited at the pole frequency.

As far as causal filters, it just means that the impulse response has taps in t >= 0. Implementation-wize, such a filter requires a delay line, multipliers per delay element, and then adders to add all the scaled delay line elements (FIR case.) A non-causal filter cannot be implemented, because the filter buffer will no longer be just a delay line... It would have to have knowledge of samples in the future, and that is "non-realizable", just a fancy word for impossible.

What is done is to effectively delay the signal and move t = 0 to the past, and sort of cheat. This off course results in a non-minimum phase filter because what has been done introduces propagation delay...

EDIT: Dunno if this helps (regarding the notion of stability), but when we talk about poles we start getting away from FIR, and into the domain of IIR filters. Unlike FIR, IIR filters have feedback (and therefore poles.) This feedback yields the possibility of having an unstable system.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 09:02:46 AM
If the poles lie outside the unit circle, the filter will go through the roof (oscillate) if excited at the pole frequency.

As far as causal filters, it just means that the impulse response has taps in t >= 0. Implementation-wize, such a filter requires a delay line, multipliers per delay element, and then adders to add all the scaled delay line elements (FIR case.) A non-causal filter cannot be implemented, because the filter buffer will no longer be just a delay line... It would have to have knowledge of samples in the future, and that is "non-realizable", just a fancy word for impossible.

What is done is to effectively delay the signal and move t = 0 to the past, and sort of cheat. This off course results in a non-minimum phase filter because what has been done introduces propagation delay...

EDIT: Dunno if this helps (regarding the notion of stability), but when we talk about poles we start getting away from FIR, and into the domain of IIR filters. Unlike FIR, IIR filters have feedback (and therefore poles.) This feedback yields the possibility of having an unstable system.

Yep, actually I am all fine with the FIR taps / IIR feedback type and the causality requirement for a filter (one of the big hurdles in active feedforward filters, at least with the DSP horsepower I had available at the time I was working on this. Seems like even the on-board DSPs in ANC headphones can handle this nowadays, dixit discussion with Sony engineer behind the XBA active model  :-DD).

It's just this darn unit circle / pole zero 2D diagram which never ringed a bell in my ever so simple mind ;).
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 14, 2012, 09:31:23 AM
LOL! There are many ways to tackle a problem. z-transform is only one.

I visualize it this way: Suppose one could decompose an IIR filter into multiple single feedback cascaded mini IIR filters (by finding the roots of the TF denominator.) Each mini IIR filter would have a single pole. The magnitude of the pole represents the feedback gain, while the phase of the pole represents the frequency (0 degrees = DC / 180 degrees = fs/2.) If the gain is equal to one, the whole thing becomes marginally stable. If any of the gains is greater than one (pole outside the unit circle) the whole thing blows up if the pole frequency gets excited.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 14, 2012, 10:22:02 AM
Oh, I think I am getting it. That can't be possible, I never did before !
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 14, 2012, 06:58:25 PM
Way above my hat all this theoretical talk :-[

Can I ask a question about the IR plot post 34.
The only difference I can spot is a difference in delay, the signal itself only seems to arrive about 175micro seconds 'earlier' but the ringing is unchanged.

What is the goal of having the delay altered ?
In speakers where they are physically inline but not soundwavefront wise I can understand why a signal might have to come earlier.
In a headphone there is only one speaker and one origin (not for K340  ;)) what would altering a delay bring or am I misinterpreting the plot and missing something ?
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 15, 2012, 01:27:40 AM
Way above my hat all this theoretical talk :-[

Can I ask a question about the IR plot post 34.
The only difference I can spot is a difference in delay, the signal itself only seems to arrive about 175micro seconds 'earlier' but the ringing is unchanged.

What is the goal of having the delay altered ?
In speakers where they are physically inline but not soundwavefront wise I can understand why a signal might have to come earlier.
In a headphone there is only one speaker and one origin (not for K340  ;)) what would altering a delay bring or am I misinterpreting the plot and missing something ?

The plot shows a minimum phase approximation to the original AKG K701 IR. Like you said, it is very similar to the original AKG K701 IR minus the delay, which means one could potentially do a fairly good job at equalizing the HP. Minimum phase responses have least amount of latency from input to output, which is why the delay is gone. They are also "invertible."

EDIT: The delay may be a measurement artifact. However, the minimum phase IR is not just the result of removing the delay.  There are some subtle differences (see attached plot.)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 15, 2012, 04:59:38 AM
Subtle indeed  :D

At least not consistent with the waterfall plot as the ringing doesn't appear to have gone as in the plot, it seems to be just altered in a tiny way.
I assume the scale is linear in amplitude.
The waterfall plot still baffles me as it implied ringing is gone completely and complete FR is as flat as a pancake.
I would expect (but may assume falsly) that when one lowers the amplitude so it is flat say by 10dB or so the ringing would stop earlier but still be there.

Have to look which thread it came from and what the rest of the findings were. :)p8
Maybe there is a hint about how it sounded as well.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 15, 2012, 06:41:35 AM
LOL! I didn't show an equalized IR. I was just discussing some minimum phase stuff.

Here are some quick and dirty FIR convolution equalizer results (150 tap pseudo-optimized using LMS) just as a proof of concept.

1) I used Tyll's IR which lacks information < 200Hz so not ideal.
2) The filter is pure FIR. I could have done a pole cancellation deal (like xnor.) However, if zeros move a bit (as in positional variation) I have a feeling this may not work very well.
3) I didn't optimize this at all, I really just gave it a whirl.

Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 15, 2012, 11:10:41 AM
Ah... that's more like it.

It seems the 'sibilance' and 'over detailing' of the K701 should have been improved in more than a subtle way !
HOW did it sound ?
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 15, 2012, 04:35:59 PM
Thanks Solder. Unfortunately, I don't know how it would sound... yet. Would need a DSP in the chain (for the FIR) and the actual headphones (perhaps a measurement rig as well.) Maybe one day :)p5

Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on October 15, 2012, 05:26:24 PM
Ah... that's more like it.

It seems the 'sibilance' and 'over detailing' of the K701 should have been improved in more than a subtle way !
HOW did it sound ?

Prolly no good at all as flat FR sounds no good coming from headphones unless it's a binaural recording...  :)p2
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: ultrabike on October 15, 2012, 05:42:38 PM
No worries, one can equalize to whatever target (not just flat)...
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: arnaud on October 15, 2012, 08:44:38 PM
Yep .... Got to get my act together on this one, less talk more action ;)
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 16, 2012, 04:58:26 AM
Analog filters I can do, digital I have no idea how.
If PCB's need to be designed I can be of assistance.

For the practical side of things one would need a 'service' where to send the headphones to and have it measured and a 'counter' EQ made and poored into a DSP.
Also that DSP would have to have the possiblity to add a little bass and or tilt the response by the end user to match the individuals taste.
Or they would be selling 'corrected' headphones with said device.
Arduino boards may be suited.

A flat headphone sounds good to me at higher SPL, to be listening at say 70 to 80dB SPL a little lift in the lows is really appreciated.
Fletcher and Munson already determined that as well almost 100 years ago.
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Joe Bloggs on October 16, 2012, 08:50:04 AM
Flat headphone FR sounds bad because of the difference between loudspeaker and headphone HRTF, not because of Fletcher-Munson curves...
Title: Re: Convolve CSD plots with minimum phase FIR filter?
Post by: Solderdude on October 16, 2012, 07:33:08 PM
To my ears flat speakers and flat (measuring without any HRTF applied) headphones (equalized or not) sound very 'real' at higher SPL's.
At low SPL's both do sound 'boring' and un-engaging.
I guess the last part is what you mean with 'bad sounding'.
It just doesn't appear to me that way (as bad sounding)...
I even prefer it that way, though some nicely 'colored' headphones may sound more yummy on certain recordings.

HRTF is nothing more than a fixed amount of 'correction' used on the raw data (meaning the sounds the mic detected) and the result is supposed to be an 'approximation' of what many people would feel it would sound like.
HRTF is not an SPL related correction factor and therefore doesn't account for the perceived loss of bass at lower SPL, making them sound boring and lifeless on lower SPL.
FM curves do, that's why I mentioned them.
There are different HRTF and some HP sites use different HRTF because it 'fits' their ideologies better or more closely matches their 'ears/brain' and also for different 'fields' of correction.