- Home
- Loudspeakers
- Multi-Way
- Equalisation/Crossover - Best way to fit a curve?

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Dave Zan
- Start date

I expect the information content is the same between "lots" of PEQs each with essentially 2 parameters (Frequency and Q) and one FIR filter with lots of coefficients for lots of taps. So I am not convinced by your earlier post that the PEQ solution can't be solved directly while the FIR solution can.What I...mean... in that earlier post was that, rather than....lots of IIR filters...you can instead use a[n]....FIR filter that contains the complete amplitude and phase response of the EQ curve, and that only some finite number of filter taps would be required to do that to within a very small tolerance.

I have read a bit more, apparently Norbert Wiener did the foundational work on deconvolution (and if I understand correctly, FIR equalisation) and actually transformed into the frequency domain to handle noise more conveniently.

Which is what I had in mind, I think...

Best wishes

David

You think this is the best way to open a discussion, likely to have you taken seriously?Hey David - you sure sent this whole forum down a dead end with that talk about least squares fit.

No, that's not the core question I am interested in, in this thread.The core question is....

The core question is exactly what I have already stated, how to best fit a curve, or, equivalently, find the poles and zeros.

I mentioned equalisation as an

David

I understand numerical solution of non linear equations when there is an explicit function.Theoretically, you could simply equate the response and its reciprocal (separately) to zero and obtain all the zeroes and poles (respectively)

I don't see how it applies when we have a collection of data points that we need to fit.

Can you explain or expand on your proposal?

Best wishes

David

Thx for the reply,......,sounds like some interesting experimentation you had going on !I have no experience with any of it except curiosity (#). Some 27 years ago I had the wild idea that one could make a current output amplifier that would determine the pole locations of a loudspeaker from its impedance and automatically equalize it, either to have the exact same small-signal response as under voltage drive or an improved response (sort of automatic Linkwitz transform). I never designed or built it, though.

<snip>

Regarding your question, it would seem logical to measure the response under current drive if you want to correct the response under current drive, but as said I have no experience with it.

(#): Actually, some 22 years ago, I did experiment with a current-driven loudspeaker with motional feedback using a second voice coil, but I just manually fitted a lumped model to the measurements.

Thx for the heads up. Those trace arithmetic enhancements appear like they will really help to make REW's impulse inversion process quite useful for generating FIR filters....and certainly much safer.A pre release version of REW has some interesting new features in the trace arithmetic section that make it more suitable to produce practical inversion filters on it's own, including target matching and dip limiting.

https://www.avnirvana.com/threads/v5-20-10-early-access.10787/

Dave Gunnes is famous for having an EQ procedure called Temporal EQ or Gunness Focusing that can correct many acoustic anomalies with loudspeakers that must be at least semi automated. Its applied through an FIR filter but the procedure for generating the filter seems quite secret.

Ok, here's an example where I would love to know how the match works, albeit it's for FIR filter math.....

Temporal EQ makes it appear there is a "preconditioning filter" that addresses horn discontinuity reflections that go backwards into the throat/CD phase plug, and then to bounce back out thru the horn and become part of the overall response. So an EQ in time....

These horn discontinuity reflections will of course arrive at listener/mic later than the direct response, and can be seen as "tails" or wiggles in the impulse response right after the direct primary response peak.

So here is my math question:

let's say i isolate/gate the tail's impulse response (the horn discontinuity reflections) from the overall impulse response, and invert that isolated tail impulse.

To be used as a 'preconditioning filter'.

With that filter in place and properly time aligned, take a new impulse that hopefully has removed the horn reflections, and use that new impulse for direct primary response inversion/correction.

Convolve the two impulse inversions for a final single filter.

Iow, a two stage approach to isolate the factors in time, and invert each individually .....the direct primary response and subsequent reflections.

(Perhaps the order of the two stages doesn't matter.)

????? Does the two stage process produce any mathematical difference, compared to a simple one stage process of inverting the entire impulse response, containing both the direct response and subsequent reflections tail ????

My gut says both techniques should give the same result....but my gut lies alot, and numbers don't, lol...

Hope that was clear... thx...

What I meant is:I don't see how it applies when we have a collection of data points that we need to fit.

If you have a

Thus, if you can somehow "fit a function" to match a measured response, I could easily show you the poles and zeroes on your screen.

For the time being, let's just assume that you've somehow managed to find (or fit) a function that tracks the measured response. And, just as sweeping across the frequency range would give its Bode plot, sweeping across the "complex frequency range" would give clear visual indications for all its poles and zeroes.Can you explain or expand on your proposal?

For example, if F(s) = (s+1000) / (s+2000), please see attached picture.

Yes, but how to "fit a function to the said response" is exactly the problem!What I meant is:

....you would have to fit a function to the said response and then analyse that function for poles and zeroes

Once I have fitted a rational polynomial then the poles and zeroes can easily be determined.

Thank you very much, that looks like it may be what I wanted, based on my first quick look,If all that you need is transfer function, which can be converted to poles and zeroes...in the z domain instead of the Laplace domain, then this often works: Precise Filter Design.

I will read it more carefully, in the meantime, how did you come up with this?

Best wishes

David

Last edited:

.....

Isnt this possible for just one single impulse - I mean, when you have music, how can you identify an onset from an instrument apart from a played long tone with the same frequency? Temporal... whats the reference for timing?Temporal EQ makes it appear there is a "preconditioning filter" that addresses horn discontinuity reflections that go backwards into the throat/CD phase plug, and then to bounce back out thru the horn and become part of the overall response. So an EQ in time....

These horn discontinuity reflections will of course arrive at listener/mic later than the direct response, and can be seen as "tails" or wiggles in the impulse response right after the direct primary response peak.

So here is my math question:

let's say i isolate/gate the tail's impulse response (the horn discontinuity reflections) from the overall impulse response, and invert that isolated tail impulse.

To be used as a 'preconditioning filter'.

.....

To me, its sounds impossible to do...

//

I suggest to all to give a listen to Presonus Sceptre 8 which use the horn/filter M.Gunness developed. I bet they manage same sound quality in their PA range.

Thank you very much, that looks like it may be what I wanted, based on my first quick look,

I will read it more carefully, in the meantime, how did you come up with this?

If you mean "How did I know about the existence of the document?"; I wrote it.

If you mean "How did I come up with the idea in the first place?"; I just put together bits of knowledge from here and there.

If I may jump in, it's not impossible if the system is linear and doesn't vary over time., so called Linear Time Invariant (LTI).Isnt this possible for just one...impulse -.. Temporal... whats the reference for timing?

To me, its sounds impossible to do...

Then each impulse response train overlaps the next impulse response train but because the system is linear and doesn't vary they can all be mathematically separated.

It's called deconvolution, there's a wiki entry as a place to start.

Best wishes

David

I first asked "how did you find this", until I realised you wrote it and then edited to "how did you come up with" it, so I meant it in the second sense.If you mean "How did I know about the existence of the document?"; I wrote it.

If you mean "How did I come up with the idea in the first place?"; I just put together bits of knowledge from here and there.

Nice work, I had in mind to stay in the Laplace domain, so your chapter is not quite exactly what I need, but you have provided sufficient information for me to work out the details.

Do you still have a copy of your thesis and the conference papers? I'd very much like to read them.

Best wishes and thanks

David

Nice work, I had in mind to stay in the Laplace domain, so your chapter is not quite exactly what I need, but you have provided sufficient information for me to work out the details.

Do you still have a copy of your thesis and the conference papers? I'd very much like to read them.

Thank you.

There is a Laplace version of the algorithm called "TF", by H. McCue at Lawrence Livermore National Labs. Last time I searched for it on the Internet, I found virtually nothing. I have a brief description of it in my thesis; that may be the only remaining reference for it. It doesn't work nearly as well as the z-domain version.

Both versions fall completely apart if there is excessive phase delay in the measurements.

I have my thesis and conference papers in PDF ... somewhere. Send a message to gjberchin (at) charter (dot) net, and I'll get them to you if I can find them. Just remember that they were written more than thirty years ago. I can also send Matlab code that implements the algorithm, if you wish.

Same goes for anyone else who is interested.

Last edited:

It was for that purpose that I first suggested iterative PEQs, but now I think you can try the z-domain method written by gberchin.Yes, but how to "fit a function to the said response" is exactly the problem!

Once I have fitted a rational polynomial then the poles and zeroes can easily be determined.

That would work as long as the source code for the invfreqs() function is freely available for people to use. I do not know about Octave (as I'm Windows) but in most cases, the choice of MATLAB (or therabouts) is limited to the easy initial learning of a method, only to implement it using a language of your choice, say C++ a little later. But I must say that I wasn't aware of this function, thanks anyway.How about curve fitting the measured response in Octave (Matlab) using the "invfreqs" ....?

The MATLAB documentation for "invfreqs" has a short explanation of the algorithm and a couple of citations:

https://in.mathworks.com/help/signal/ref/invfreqs.html

Last edited:

- Home
- Loudspeakers
- Multi-Way
- Equalisation/Crossover - Best way to fit a curve?