ProSoundWeb Community

Please login or register.

Login with username, password and session length
Advanced search  

Pages: 1 [2] 3   Go Down

Author Topic: A look at optimum smoothing in speaker EQ  (Read 11274 times)

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1318
  • Palo Alto, CA USA
Re: A look at optimum smoothing in speaker EQ
« Reply #10 on: July 08, 2020, 07:10:19 PM »

I'm just a mis-user of software so i've got no idea what the statement below means ;-)

Hey Timo, thanks for even looking at it. Here are a few pictures from the clustering experiments that I hope will explain what I'm doing. It's pretty simple. By way of background, I generate time-frequency-energy (TFE) plots as follows. This gets essentially the same result as the method of Gunness, it's just a little different computationally. I refer to it as the short-frequency Fourier transform (SFFT), in contrast to the short-time Fourier transform that is typically used to generate spectrograms.

*Window the impulse response to obtain a pseudo-anechoic measurement. (I've been using a 75% rectangular, 25% half-raised-cosine window. It's not critical.)

*Take the discrete Fourier transform (DFT) of the windowed impulse response to obtain the frequency response.

*Multiply the complex frequency response by a Gaussian window for each frequency band of interest. The windows are of constant octave width so must be calculated for each band.

*For each band set the response for negative frequencies to zero so that the inverse transform represents an estimate of the analytic time function that we might think of as the "envelope" of the band-limited impulse response.

*For each band take the inverse DFT to obtain the analytic impulse response.

*Plot the log magnitude of each inverse DFT.

The first plot shows the log-magnitudes of the frequency responses overlaid with the log-magnitudes of the Gaussian windows.

Once I have a collection of these impulse response envelopes for each band and measurement I let kmeans() do its magic and cluster them into a certain number of clusters, 3 in this example. kmeans() uses the sum of squared differences as its distance measure.

The second plot shows the impulse response envelops for each band color coded for the cluster kmeans() has assigned them to.

The third plot shows a grid for each band and cluster that represents the horizontal and vertical index of each measurement. Onax is in the lower left corner (0, 0) and there are 3 vertical and 6 horizontal indices for a total of 18 measurement's at ~5 deg increments. Green represents the measurement's membership in that cluster.

That's it, for what it's worth. I'm not expecting this to be of any great value but it was something I wanted try. I keep hoping that this blind squirrel might still stumble across nut. I do enjoy generating cool looking graphs. Ideas welcome, as always.

--Frank

https://www.dropbox.com/sh/zsgta3fw3juwuv2/AAAQfKwvyjNa8ue_e-t5xNrWa/Audio?dl=0&preview=GaussWindows.jpg&subfolder_nav_tracking=1
https://www.dropbox.com/sh/zsgta3fw3juwuv2/AAAQfKwvyjNa8ue_e-t5xNrWa/Audio?dl=0&preview=SFFTclusters.jpg&subfolder_nav_tracking=1
https://www.dropbox.com/sh/zsgta3fw3juwuv2/AAAQfKwvyjNa8ue_e-t5xNrWa/Audio?dl=0&preview=HVclusters.jpg&subfolder_nav_tracking=1
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

Timo Beckman

  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Rational Acoustics/Isemcon/Fulcrum Acoustic NL
    • Timo Beckman Geluid
Re: A look at optimum smoothing in speaker EQ
« Reply #11 on: July 10, 2020, 03:26:33 AM »


*For each band set the response for negative frequencies to zero so that the inverse transform represents an estimate of the analytic time function that we might think of as the "envelope" of the band-limited impulse response.

I do not get the "the negative frequencies" bit...For the rest of it: It sort of makes a little sense to me (did not expect it to make sense since i'm not a math/physics person but a "mis-user" of very sophisticated softwares like smaart and fir-designer ;-) as stated before)

Correct me if i'm wrong: the last screen shot represents parts of the IR but represented as a wavelet (can't remember if it's the correct word for it but i'm on a old MBP. I'll check what it's called when i'm working on the mac pro again sometime today).
Logged

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1104
Re: A look at optimum smoothing in speaker EQ
« Reply #12 on: July 10, 2020, 10:15:42 AM »

Hi Frank, like Timo, I'm a misuser of Smaart and FirD (i like that Timo :)
So all i really do is twist knobs so to speak, and take measurements....

And I must say, i can't really follow very deeply what you're doing...
Here's some thoughts about what I think you're doing...please redirect and correct...

Appears you are applying  impulse inverse as correction filters, across the entire speaker (or at least from 1kHz up)
(I'm thinking this is with existing speaker processing and xovers in place....? Or are you redoing from scratch?)

That a polar set of impulse inverses is what you are doing the averaging and statistical work on...?
An average based of the envelope of that set looks like what is being used to test how much smoothing works best?

Am i in the ballpark so far?

If so, does the statistical work you are doing compare each of the individual polar inverses, to the 'envelope generated average'?
By looking at how various frequency bands hold up statistically?

Or do you retake polar measurements with the 'envelope generated average' as the correction filter, and look at those statistically?

If I can catch up with what you're doing, I'll try to explain the process I've come up with for deciding how much correction to apply, or probably more to the point ..when and where does correction work. 
I feel like my method and results are steadily improving, but my method is alot of work.  Gathering what you're doing might help lessen the work....
Because so fa,  i just try to understand how to best use Smaart and FirD ,..... twist knobs and measure.. re-twist and re-measure...and on.....
 


Logged

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1104
Re: A look at optimum smoothing in speaker EQ
« Reply #13 on: July 10, 2020, 04:52:15 PM »

Hi again Frank, sorry to have asked so many damn, probably muddled, questions.

So, if i may, here's what i've been working on...

Driver-by-driver, before any xover summation.....
I've been measuring their raw polars in whatever box I'm building. 
Then, kinda eyeballing/guessing how much correction may hold up both on and off axis, I build a FIR file to correct on-axis.
And measure how well it holds up off-axis.

Then I sum the drivers and go thru the same on and off axis measurement discovery.

What I've come to conclude is the only valid corrections for both on and off axis, are minimum phase corrections at the individual driver level.

Once two or more drivers are summed, i think i can almost throw corrections out the window.....because they become point-in-space, geometric-like, corrections only.

My understanding is summation leaves the realm of minimum phase, where when we fix mag we fix phase.
So it seems to me, any frequency response range that is the result of driver summation is no longer a candidate for impulse inversion correction, either on or off axis.

That thought train has been working pretty well for me...tune individual drivers, and don't try to go past that....
And then I go thru the same questions on individual drivers,  that your thread poses...

Logged

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1318
  • Palo Alto, CA USA
Re: A look at optimum smoothing in speaker EQ
« Reply #14 on: July 11, 2020, 03:48:36 PM »

Hi Mark,

I think we're on convergent paths on much of this. As for whole-system correction with crossovers I've been working almost entirely with smaller coaxials and coaxial-like speakers such as the SH-46, which do better in terms of whole-system polar uniformity. In the case of the SH-46 I'm applying the FIR correction over the MF and HF, including the passive crossover, treating them as a single passband. Certainly trying to correct over a range of angles with non-coincident drivers is a can of worms that folks have been struggling with forever. Maybe coaxes are cheating  ;)

The statistical fiddle-farting is all part of what I would call analysis or "pre-processing" and not directly part of the filter synthesis. I'm just trying to get a handle on what's correctable and what measurements or combination of measurements to use -- trying to get a feel for the data. The frequency ranges in the examples do not represent actual corrections.

I'll make a side trip into how I'm currently synthesizing the filters -- sort of my version of FIR Designer. The starting point is a log-magnitude (LM) response and, optionally, an excess group-delay (EGD) response.  These two frequency domain representations taken together are "complete" in the sense that an impulse response (IR) can be reconstructed from them. They appear to embody two relatively distinct aspects of a speaker's behavior and are invariant with respect to random time offsets between multiple measurements.

The LM, which determines the minimum-phase, contains all the fine detail and pretty much all the variation from one measurement to the next on every speaker I've encountered. The LMs from multiple measurements can be combined, as by averaging, and the minimum-phase recovered by the discrete Hilbert transform. The phase so determined is invariant with respect to time differences between the measurements, which is a huge advantage as it gets us out of having to align the multiple IRs.
 
The EGD, or equivalently the excess phase, tends to be very smooth and varies little with angle. Each EGD has an offset that depends on the alignment of the IR from which it was determined but these time offsets only affect the offset of the average and so, too, become irrelevant.  Normalizing the average EGD by subtracting its mean over the whole frequency range causes the phase to be zero at fs / 2, which I've found to be a satisfactory condition for synthesizing the filter.

In both the LM and EGD responses I extrapolate the response outside a frequency range of interest. This is the "don't care" part. The lower bound is determined either by the speaker's lower cutoff (or crossover) frequency or a limitation on the number of FIR coefficients. The upper bound usually is determined by the point where I consider fixing the speaker's response to be hopeless either because it falls off a cliff or is too chaotic. I try to choose the bounds at a point where the LM or EGD have zero slope so as to make a smooth transition to the extrapolated part. This is prior to final smoothing which serves further to smooth the transition.

So, to summarize, here's the step-by-step process starting with the combined LM and EGD:

*Extrapolate the LM above and below some range such that LM(0 to fmin) = LM(fmin) and LM(fmax to fs/2) = LM(fmax).

*Apply frequency-proportional (constant octave-bandwidth) Gaussian smoothing.

*Normalize the LM over some range to set the overall filter gain.

*Obtain the minimum-phase by the discrete Hilbert transform.

*Generate a protype filter with magnitude = -exp(LM) and phase = -minimum-phase. This is the inverse minimum-phase filter.

*Take the inverse discrete Fourier transform of the prototype filter to get the unwindowed filter coefficients.

*Extrapolate the EGD above and below some range such that EGD(0 to fmin) = EGD(fmin) and EGD(fmax to fs/2) = EGD(fmax).

*Optionally apply smoothing. Generally not required.

*Normalize the EGD such that mean(EGD) = 0.

*Generate a protype filter with magnitude = 1 and phase  = integral of EGD. This is the inverse EGD all-pass filter.

*Take the inverse discrete Fourier transform of the prototype filter to get the unwindowed filter coefficients.

*Convolve the unwindowed filters together and with any other filters such as a crossover filter. This is the total unwindowed filter.

*Multiply the filter by a window. I've been using an 80% rectangle with 10% half raised cosines at each end for non-causal filters and a 90% rectangle with a 10% half raised cosine at one end for causal (minimum-phase only) filters. Optimize the timing of the widow to minimize the error between the windowed and unwindowed LM. This is important.

*Write the coefficients to a file in the format required by the DSP.

So back to the overall process. Like you, I've been applying this to the individual passbands without crossover, usually just the HF. For what I've been doing I find the LF can be handled pretty well with IIR biquads which, so far, I've been fitting the old way by eye. (I've spent a bunch of time trying to write an automated fitter using R's built in optimization functions and while it works some of the time it gets tripped up and makes bad decisions too often to be useful.)

For developing crossovers I take a set of measurements where, obviously, the mic can't move for each HF/LF pair. I align the HF impulse responses by their peaks maintaining the time relation of each HF/LF pair (after much fooling I find this still to be the most reliable, and sufficient) and smooth the complex frequency response prior to averaging the magnitude and phase directly. Since with a crossover I'm only concerned with a narrower range of frequencies this is satisfactory. I can apply the individual band correction settings from above to the crossover model so that I don't need to remeasure. A final check using the filters in-line is a good idea, but the fidelity of inserting the filters into the model has been good.

With a passive crossover (I've got a pretty nice optimizer for element values) I remeasure the whole system with the crossover as there are too many errors that can creep into the data and model and the FIR correction does a good job of fixing any little problems around the crossover frequency. I just went through this with the B&C 8CXN51 and got a pretty satisfactory result. I think it's a really nice driver, by the way. A good passive crossover didn't require any heroics.

I'm sorry if I haven't answered your questions directly. This writing thing is hard. But we can keep batting it around.

--Frank
« Last Edit: July 11, 2020, 03:56:02 PM by Frank Koenig »
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1104
Re: A look at optimum smoothing in speaker EQ
« Reply #15 on: July 12, 2020, 12:44:56 PM »



Thank you Frank, that was so well written I feel i understand most everything you said.   :)
And yep, writing is such damn hard work.... very hard for me too.

The LM part, the minimum phase part, has been where most of my work goes.....finding corrections that hold up on and off axis..
I think this is probably because i let smaart automatically handle the EDG part, by finding the delay that equates to flat phase and mag in the middle of the passband. (Always with no low-pass in place for determinging timing)
As you say EGD tends to be smooth and vary little with angle.  When EDG does vary some by angle, I find tuning gets really challenging.

I try to extend a driver's flat mag and phase found in the middle of the band, with out-of-band flattening.
I'll use what would almost appear to be nuts amounts of flattening, certainly dangerous amounts, if not for the very steep xovers I lay on top after the flattening.
So if I use 2, 3, or even 4 orders of out-of-band flattening, after I lay 8 to 16 orders of xover on top, I'm left left with an electrical crossover that nets the two, and still is safely steep. 
And most importantly holds flat mag phase through xover summation regions.

Then adding complementary linear phase xovers makes tuning no more than setting delays and levels. 
No xover work to do at all, other than see how polars look....whether xover needs to bump up or down.

I guess we all end up with IIR down low. 
But otherwise,  I limit latency to 15ms  for live.
For playback, I use all the FIR I have that's easily deployed, 4096 taps @48 kHz.
This let's me typically use LR 12th order at 100Hz for sub xover, and imbed a BW3 high pass.


Logged

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1104
Re: A look at optimum smoothing in speaker EQ
« Reply #16 on: July 15, 2020, 03:42:07 PM »

Hi Mark,

I think we're on convergent paths on much of this. As for whole-system correction with crossovers I've been working almost entirely with smaller coaxials and coaxial-like speakers such as the SH-46, which do better in terms of whole-system polar uniformity. In the case of the SH-46 I'm applying the FIR correction over the MF and HF, including the passive crossover, treating them as a single passband. Certainly trying to correct over a range of angles with non-coincident drivers is a can of worms that folks have been struggling with forever. Maybe coaxes are cheating  ;)



Hey Frank,  was thinking about your work with the SH-46.....
How have the polars looked 'as is' with the passive xovers?  Do they generally all more or less fall as angle increases, or do some areas of response increase, even above onax response?

I ask because I've been working on DIY synergies for about a year now.  A 60x60, a 60x40, and now a 90x60.
Both with and without secondary flares, etc.
All of them have patterning 'flip flop' to some degree, especially when originally tuned to on-axis.
If i tune to about 15 deg off axis, that tends to minimize the maximum flip-flop, by having it move in a different direction towards onax than towards further offax past the 15 deg 'centering'.
Hope that made sense...
An example of 'flip-flop' is below.....current 90x60 synergy project...48"x 29" with secondary flares.
Blue is spot-on tuning at 15 deg, green is 0 deg (onax), and red is 30 deg. 1/3 oct for ease of depicting.
Notice how green and red move away from each other around 0dB.

Like said, every synergy tried so far, with straight sided conical walls, does this to one degree or another. I've seen it with just a coax CD mounted to the throat, before any mid/bass ports are added. 
I know the secondary flare is supposed to counter waistbanding, and I've seen it does. But nothing I've done yet, eliminates it.
Smooth polars have been much easier to obtain with commercial waveguides like Peter uses in his PM90 & 60. And other ones I've experimented with.

So I'm really curious how much there is to learn, still on the table, if a box like the SH-46 has generally smoothly falling polars...?????

If not so smooth out of the box, did your FIR overlays help? 

Always the questions....sorry... and Thanks  :)
Logged

Mark Wilkinson

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1104
Re: A look at optimum smoothing in speaker EQ
« Reply #17 on: August 13, 2020, 10:52:45 AM »

I guess it probably isn't fair to ask such questions about a specific box like that, sorry.
(I've never been known for being politically astute lol)

Anyway, in the continued pursuit of trying to determine how to best optimize speaker EQ, here's some recent work on the latest synergy project.
FirD was used with 1/6 oct auto mag and phase smoothing on all three driver sections, along with linear phase xovers.
Tuning was made for chosen reference axis (which was about 5 deg ofax), then simply measured on-axis to see how well it held up.
Attempts to smooth beyond 1/6th oct didn't seem to make any appreciable difference to polars, other than of course the reference tuning axis.
 
Horizontal polars are in 10 deg increments.  Green 0, orange 10, purple 20, light blue 30, pink-red 40, off-green 50, rust 60.
There is an intentional 6dB downward slope, end to end, built in to the tuning.
(haven't figured out an easy way to make vertical polars yet)

The synergy is a 90x60,  and seems to maintain horizontal pattern well through 30-40 degrees.
I forgot to get a 45 deg reading, but the falloff between 40 and 50 deg seems about right for the 90 degree coverage goal.

The secondary flares are not straight, they have a quasi tractrix curvature in an attempt to improve polars.
Made out of 2" XPS foamboard wrapped with glass cloth and epoxy. Removable, 2-3 min on/off task, with a weight of 2lbs!
The whole speaker with secondary flares, two faital 10PR300 10" mid drivers, attached stand with a built in adjustable-tilt pole cup....
....weighs 52lbs with a bms 4594HE coax compression driver, or 54lbs with a b&c dcx464 !
Have to admit i'm kinda proud about the weight... for a speaker that's 48Wx28Hx25D. 
Only thing i like better than the weight, is the sound  :)


Logged

Art Welter

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2199
  • Santa Fe, New Mexico
Re: A look at optimum smoothing in speaker EQ
« Reply #18 on: August 14, 2020, 03:53:04 PM »


The synergy is a 90x60,  and seems to maintain horizontal pattern well through 30-40 degrees.
I forgot to get a 45 deg reading, but the falloff between 40 and 50 deg seems about right for the 90 degree coverage goal.
....weighs 52lbs with a bms 4594HE coax compression driver, or 54lbs with a b&c dcx464 !
Have to admit i'm kinda proud about the weight... for a speaker that's 48Wx28Hx25D. 
Only thing i like better than the weight, is the sound  :)
For comparison, the SynTripP uses two B&C 10CL51 10" with a Celestion CDX14-3050 three inch diaphragm 1.4" exit high frequency (HF) driver come in at just under 34 pounds (15.5 kilos) for the 26.5" wide x 11.25" tall, 15" deep (67.3 x 6.075 x 38.1 centimeters) main cabinet. The secondary horn is 41" wide x 25.5" tall x 7.5" deep (104.1 x 64.8 x 19 centimeters), weighing about 5 pounds (2 kilos). The horns nest like Dixie cups, attached by a ratchet strap and bridle assembly to the main enclosure in about the time it takes to tie a pair of shoes. Nominal 90 x 40 degree dispersion.

Used a DBX DriverackPA for the polars below, not enough filters to take care of everything, and some "conical blues".
Seems the ported (81Hz Fb) SynTripP has more consistent (no reversals) below about 600Hz, while your 90x60 is better behaved above.

Anyway, better hit post before another lightning outage, just found my "uninterruptible power supply" is not.

Art
Logged

Frank Koenig

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1318
  • Palo Alto, CA USA
Re: A look at optimum smoothing in speaker EQ
« Reply #19 on: August 15, 2020, 11:59:22 AM »

Mark, Art, sorry not to have responded sooner. In my scanning of the forum I missed your new posts and I tend to work on this stuff in fits and starts. Let me digest this all a bit. I'll be back. --Frank
Logged
"Nature abhors a vacuum tube." -- John Pierce, Bell Labs

ProSoundWeb Community

Re: A look at optimum smoothing in speaker EQ
« Reply #19 on: August 15, 2020, 11:59:22 AM »


Pages: 1 [2] 3   Go Up
 



Site Hosted By Ashdown Technologies, Inc.

Page created in 0.031 seconds with 24 queries.