• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Importing biquad EQs into REW, need help

johny_2000

Addicted to Fun and Learning
Joined
Feb 24, 2024
Messages
621
Likes
499
Location
Suburb of Seattle
Hi everyone,

I'm looking for a way to import the biquad coefficient files into the REW EQ Filter section. They were generated by REW as output for the MiniDSP 2x4HD PEQs. Then, some time later, I wanted to go back to them for some additional tuning, but they are nowhere to be found in the REW saved measurements .mdat files. The speaker frequency responses before and after the EQs are there, but no EQ filters. So I manually extracted all the biquad coefficients from the MiniDSP console of the actual 2x4HD memory and saved them in text format. Unfortunately, I don't see a way to import them back into the REW EQ Filters.

The extracted biquad coefficients are as follows:
biquad1,
b0=1.000212200282704,
b1=-1.9987991688657452,
b2=0.9986720843607434,
a1=1.9987991688657452,
a2=-0.9988842846434476

biquad2,
b0=0.9976545854465115,
b1=-1.99104107840919,
b2=0.9935324541819901,
a1=1.99104107840919,
a2=-0.9911870396285015

biquad3,
b0=1.0013875438353783,
b1=-1.9827976115112353,
b2=0.9816073824771857,
a1=1.9828231331704074,
a2=-0.9829694046533927

biquad4,
b0=1.0013593910693956,
b1=-1.994638117647003,
b2=0.9936867098592183,
a1=1.994638117647003,
a2=-0.995046100928614
.....
 
If you are handy with Python, you can plot the frequency response of each biquad using the following code (below example used the coefficients from biquad1):
Python:
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt

fs = 48000.0

b0 = 1.000212200282704
b1 = -1.9987991688657452
b2 = 0.9986720843607434
a1 = 1.9987991688657452
a2 = -0.9988842846434476

dpeq = signal.dlti([b0, b1, b2], [1.0, -a1, -a2], dt=1/fs)
freqs = np.logspace(np.log10(10), np.log10(20000), 200)
w, h = signal.dfreqresp(dpeq, 2*np.pi*freqs/fs)    # `dfreqresp` frequencies are normalized to fs = 2*pi

fig, ax = plt.subplots(figsize=(7, 4))
ax.semilogx(freqs, 20*np.log10(np.abs(h) + 5*np.finfo(float).eps))
ax.grid(True, which='both', axis='both')
fig.tight_layout()
plt.show()

Its frequency response is (horizontal axis is frequency in Hz; vertical axis is FR magnitude in dB):
biquad_response.png

You can then estimate the PEQ parameters using your favorite filter designer. If you don't have one, you can use the spreadsheet provided by miniDSP in their Advanced Biquad Filter Programming page (scroll down to the last section of the page "Where to start?" and you'll see a link to the 'Biquad filter spreadsheet').

Since I am anal :p, I used numerical optimization and calculated the PEQ parameters to be: Fc = 70.5 Hz, Q = 7.04, Gain = 2.8 dB
 
I found that some time ago John Mulcahy(REW) said: "No, REW cannot import biquads. Note that biquad coefficients are only valid for the sample rate at which they were generated."
 
Last edited:
Thanks @NTK for such a detailed explanation of biquad filters.

I ended up repeating the raw measurements of my speakers and subwoofer and equalizing them using the REW EQ Filter tool from scratch. It generated new sets of biquad coefficients for me to load into the MiniDSP console. All is well now.
 
Back
Top Bottom