Loudspeaker Matching with FIR FiltersHow to use FIR filters to match phase & magnitude response of different loudspeakers

This tutorial explains how to use FIR Designer software to create filters for matching the magnitude and phase response across different loudspeakers.

Why Match?

Loudspeakers of different makes and/or models are often used in install systems to cover the same or adjacent audience areas. Response differences between the loudspeakers can cause unevenness in the combined frequency response across wide areas of the audience, not just where the coverage of the loudspeakers touch or overlap. The unevenness is caused by constructive and destructive interference at different frequencies.

The factory crossover and tuning for a loudspeaker is usually optimized for that specific loudspeaker. As a result, different makes and/or models can have quite different characteristics, particular in their phase responses. The magnitude response of a loudspeaker can easily be EQ’d to match another, however matching phase is more difficult.

FIR filters enable independent magnitude & phase control and generally have more detailed response shaping abilities (than IIR filters). They provide a solution for matching both the magnitude and phase response when different types of loudspeakers are used in a single installation.

Learn more about the fundamental concepts of IIR and FIR filtering in the FIR Filter Guide.

Time Alignment

One of the first steps in system tuning is time alignment. This tutorial assumes time alignment has been completed (or will be done later), so we’re primarily considering the response differences between the inherent character (that is, the original factory tuning) of the loudspeakers.

Measurements

We’ll use two loudspeaker measurements – Speaker A and Speaker B – which will be imported into FIR Designer (see a list of Supported Measurement File Formats & import instructions).

Speaker A.trf

Speaker B.trf

Exactly where and how to take measurements is not covered in this tutorial. For best practices in system tuning, take a look at publications, videos and training courses from folks like Bob McCarthy, Merlijn van Veen and Jamie Anderson.

Here we are assuming the measurements are representative of the loudspeakers in audience locations that we wish to match; for example, an audience position where the coverage of both loudspeakers just barely overlaps.

The aim of this tutorial is to show how to create a FIR filter for Speaker B (the ‘subject’) that changes its response to match Speaker A (the ‘target’).

In this tutorial we’ll match the loudspeakers from approximately 70 Hz to 19 kHz. In practice, the matching frequency range may depend on the speakers used and their coverage patterns. For example, with systems that have HF horns with fairly well controlled dispersion, it may be useful only to match up to a few kHz, since above this frequency their coverage patterns might just barely overlap.

FIR Designer

Although we’re using FIR Designer, the same approach works with FIR Designer M, FIR Creator EX and FIR Creator.

Step 1: Set a Target

On the “Target” tab, select “Curve” and uncheck “Use.” This disables the segmented gain slope component of the targeting.

Matching Tutorial - Figure 1

On the “Target” tab, select “File” then press “Load” and select Speaker A.

Speaker A’s transfer function (magnitude and phase response) and coherence (if present in the file) appears.

Matching Tutorial - Figure 2

Uncheck “Magnitude only” since we will be matching to both the magnitude and phase of this loudspeaker.

Since the measurement’s transfer function is a little messy due to room effects, set “Oct smoothing” to “1/1” and “Magnitude:” smoothing to “Power.”

Check “Use Coherence” in the smoothing. This gives more importance to frequencies with higher coherence.

Set the “Magnitude offset (dB)” to approximate -3 dB to move the magnitude response to approximately 0 dB on the plot.

Matching Tutorial - Figure 3

Select “IR Samples” to see the impulse response.

Matching Tutorial - Figure 4

Now the measurement microphone used for this measurement happens to be inverting, so we can correct this and apply a minor time delay adjustment to bring the HF phase closer to 0 deg.

Check “Flip polarity” and press “Find Peak.”

Matching Tutorial - Figure 5

Returning to the transfer function (Mag & Phase view), we have:

Matching Tutorial - Figure 6

Step 2: Load Subject Response (Loudspeaker ‘B’)

On the “Import” tab, press “Load” and select Speaker B.

Speaker B’s transfer function (magnitude and phase response) and coherence (if present in the file) appears.

Matching Tutorial - Figure 7

Again, because the measurement microphone is inverting, check “Flip polarity” and press “Find Peak.”

Matching Tutorial - Figure 8

Since the measurement’s transfer function is a little messy due to room effects, set “Oct smoothing” to “1/1” and “Magnitude:” smoothing to “Power.”

Check “Use Coherence” in the smoothing. This gives more importance to frequencies with higher coherence.

Set the “Magnitude offset (dB)” to approximate -4 dB to move the magnitude response to approximately 0 dB on the plot.

Matching Tutorial - Figure 9

Step 3: Building the FIR Filter – Adjusting Magnitude (Manually)

Select the “FIR : Magnitude Adjust” tab.

The blue line in the upper plot shows the magnitude difference between the target (Speaker A) and the subject loudspeaker response (Speaker B). The aim here is to add filters that match the magnitude difference line, and therefore bring the subject magnitude response close to the target response.

Matching Tutorial - Figure 10

Later we will use the “FIR : Auto Mag” tab for automatic magnitude matching. However the “Auto Mag” process works best when starting and ending near 0 dB. On this tab we can use a manual filter prototype to bring the filtered subject response close to 0 dB at one or both ends of the “Auto Mag” region (set later).

Turn on the first “Parametric” filter, set the Frequency to 70 Hz, the BW to 1.0 and the Gain to 5 dB.

Step 4: Building the FIR Filter – Adjusting Phase (Manually)

Select the “FIR : Phase Adjust” tab.

The red line in the upper plot shows the phase difference between the target (Speaker A) and the subject (Speaker B). The aim here is to add filters that match the phase difference line, and therefore bring the subject phase response close to the target response.

Later we will use the “FIR : Auto Phase” tab for automatic phase matching. However the “Auto Phase” process works best when starting and ending near 0 degrees. On this tab we can use a manual phase filter prototype to bring the filtered phase response close to 0 deg at one or both ends of the Auto Phase region (set later).

Enable the first three filters.

Set the first two filters to 2nd order with frequencies of 58 Hz and 1350 Hz, and a BW of 1.0.

Set the third filter to a 4th order parametric phase filter at 18000 Hz, with a BW of 0.7 and a phase change of 60 degrees.

Matching Tutorial - Figure 13

Step 5: Building the FIR Filter – Auto Magnitude

Select the “FIR : Auto Mag” tab.

Matching Tutorial - Figure 14

Here we can specify a region for automatic matching of the loudspeaker magnitude to the target.

Turn on the first region in the table, set the “Min Freq” to 70 Hz, the “Max Freq” to 21000 Hz, the “Oct Smooth” to 1/3 octave.

For “Smoothing:” select “Mag.”

Check “Use Coherence” to weight the smoothing process towards frequencies that have higher coherence.

Set “Phase:” to “Linear.”

Matching Tutorial - Figure 15

Step 6: Building the FIR Filter – Auto Phase

Select the “FIR : Auto Phase” tab.

Matching Tutorial - Figure 16

Here we can specify a region for automatic matching of the loudspeaker phase to the target.

Turn on the first region in the table, set the “Min Freq” to 60 Hz, the “Max Freq” to 19000 Hz and the “Oct Smooth” to 1/3 octave.

Check “Use Coherence” to weight the smoothing process towards frequencies that have higher coherence.

Matching Tutorial - Figure 17

All the filter responses from the previous tabs – both manual and automatic – are now combined into one “ideal” FIR filter.

Step 7: FIR Filter Windowing & Export

Select the “Export” tab.

The “ideal” filter has already been truncated and windowed to the “Filter length.” The default “Filter length” is 400 samples or taps, and from the middle plot in the screenshot below, we can see that the response of the 400 sample length filter – the dark blue and dark red lines – doesn’t match the ideal filter – the light blue and light red; primarily at low frequency.

Matching Tutorial - Figure 18

Since longer FIR filters can EQ lower in frequency, increase the filter length to 1024 samples and set the filter delay to 200 samples.

Change the “Total Error” “Range” to 70 Hz to 20000 Hz.

Matching Tutorial - Figure 19

With the FIR filter now at length 1024, its response is quite close to the ideal response – see the middle plot in the screenshot above.

The “Total Error,” introduced by the truncating the ideal filter impulse response down to 1024 taps, is less than +/- 1.0 dB and +/- 10 degrees.

Check “Show FIR filtered loudspeaker” to see the FIR filter applied to Speaker B.

Matching Tutorial - Figure 20

Compare this to the Target response below. They are very similar above approximately 50 Hz!

Matching Tutorial - Figure 21

To use the FIR filter, on the “Export” tab choose the appropriate file format for your processor and press “Save.”

Matching Tutorial - Figure 22

Matching Tutorial - Figure 23

Not sure what format to use for export? See a list of amplifiers & processors with user-accessible FIR settings, including their supported file formats & loading instructions.

Confirming Time Alignment

The effective delay of the FIR filter is the “Filter delay” setting; here 200 samples @ 48 kHz or 4.17ms.

With the FIR filter applied to Speaker B, Speaker A will need to be delayed by approximately 200 samples. The exact delay needs to be confirmed with more measurements because both loudspeaker measurements, used here, were slightly time delay adjusted (on the “Target” and “Import” tabs) prior to the FIR filter design process.