Equalisation/Crossover - Best way to fit a curve?

If I understand correctly, that "Invfreqs" tries to find a pole zero pattern that is close to the specified response but with a stable inverse
I misunderstood a little, "Invfreqs" tries to find a pole zero pattern that is close to the specified response but is stable itself.
But the conclusion still seems to be correct: that there is a direct calculation of the pole zero pattern, and the iterative additional calculation is just to approximate a more practical solution if the mathematically correct one is unrealisable.
Actually it calculates the numerator and denominator polynomial coefficients rather than the poles and zeros, but the raw coefficients are not very intuitive to me, so I write in terms of poles and zeros.
The example in the doco is an eye opener, there's no very obvious symmetry or transformation to connect the unstable solution and the approximation.
Which makes sense, if there was a simple transformation then we wouldn't need a iterative approximation solver.

David
 
Last edited:
Nevertheless, Mr. Berchin's z-plane method's still there. The MATLAB code is also quite old anyway, having been written in '86, with revisions in '88 and '92.

To be clear, the original code was written in Fortran, back around 1985. That was translated to Matlab in 2006, and to C in 2008. In all cases, it was written in a very "explicit" fashion, to serve as a teaching tool. So there are no mathematical shortcuts, no fancy "modern programming" constructs, no optimizations.
 
  • Like
Reactions: Dave Zan
Last edited:
  • Like
Reactions: Dave Zan
I agree: the mathematical technique is impressive. Using it produced an equalization curve that followed the peaks and dips of room reflections in the low end. Its's great that it could follow them but is filling in those nulls something we would want to do?
 
Perhaps I missed a mention earlier in the thread, but if a best-ft approximation is the aim it may be easier to go from the frequency response to its corresponding impulse response and use a Padé approximant to produce a rational function approximation. Dževad Belkić has published a number of papers and a book on related methods for analysing NMR data, REW uses that for extracting modal resonances. There is a summary of the method here.
 
Perhaps I missed a mention earlier in the thread, but if a best-ft approximation is the aim it may be easier to go from the frequency response to its corresponding impulse response and use a Padé approximant to produce a rational function approximation.

In my experience, "go(ing) from the frequency response to its corresponding impulse response" is the hard part of that solution. If all that you have is a bunch of frequency response measurements, then how do you do that? In the continuous domain, if you have (or can find) the Laplace-domain transfer function corresponding to the measured frequency response, then the problem is already solved and there is no need for the Padé approximant. In the discrete domain, in order to compute the inverse Discrete Fourier (or similar) Transform you need frequency response measurements from DC to half the sampling frequency, equally-spaced at frequency steps sufficiently small (corresponding to a sufficiently long time record) to guarantee that there is no temporal aliasing. In practice, there is no guarantee that all of those criteria will be met.
 
If there is only a frequency response, i.e. a measurement obtained from some system that doesn't derive it from the impulse response, VituixCAD can generate an impulse response from it.
From that page: "Frequency response is extrapolated to cover band from 0 Hz to Sample rate / 2 (Nyquist frequency) before inverse Fast Fourier Transform."

Exactly as I stated above. So they extrapolate to DC and half the sampling frequency, undoubtedly use interpolation to create the equal frequency response steps, and compute the inverse transform. That's a lot of approximation and assumption.
 
  • Like
Reactions: newvirus2008
So they extrapolate to DC and half the sampling frequency, undoubtedly use interpolation to create the equal frequency response steps, and compute the inverse transform. That's a lot of approximation and assumption.
Compared to what? The result will have the same frequency response as the original within the range of the original, isn't that the point? It's just a different representation of the same data.