Tools: Tune: Add option for delay-and-sum to beamformer design

The delay-and-sum beamformer has highest white noise gain (WNG)
performance. It's good id suppressing microphone self noise. The
beam is steered with pure delay adjust in the all-pass filter
bank. Default type is still super directive. Use DSB or SDB
as beamformer type to select.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2021-01-29 19:31:54 +02:00 committed by Liam Girdwood
parent deb7849f76
commit b9a14709bf
2 changed files with 28 additions and 13 deletions

View File

@ -1,6 +1,7 @@
function bf = bf_defaults()
% Recording array general setup
bf.type = 'SDB'; % SDB for superdirectivem, DSB for delay and sum
bf.fs = 16e3; % Design for 16 kHz sample rate
bf.c = 343; % Speed of sound in 20C
bf.steer_az = 0; % Azimuth 0 deg

View File

@ -152,19 +152,33 @@ for n=1:bf.num_filters
end
end
%% Superdirective
for iw = 1:N_half
% Equation 2.33
I = eye(bf.num_filters, bf.num_filters);
d_w = d(iw,:).';
Gamma_vv_w = squeeze(Gamma_vv(iw, :, :));
Gamma_vv_w_diagload = Gamma_vv_w + mu(iw)*I;
Gamma_vv_w_inv = inv(Gamma_vv_w_diagload);
num = Gamma_vv_w_inv * d_w;
denom1 = d_w' * Gamma_vv_w_inv;
denom2 = denom1 * d_w;
W_w = num / denom2;
W(iw, :) = W_w.';
switch lower(bf.type)
case 'sdb'
% Superdirective
for iw = 1:N_half
% Equation 2.33
I = eye(bf.num_filters, bf.num_filters);
d_w = d(iw,:).';
Gamma_vv_w = squeeze(Gamma_vv(iw, :, :));
Gamma_vv_w_diagload = Gamma_vv_w + mu(iw)*I;
Gamma_vv_w_inv = inv(Gamma_vv_w_diagload);
num = Gamma_vv_w_inv * d_w;
denom1 = d_w' * Gamma_vv_w_inv;
denom2 = denom1 * d_w;
W_w = num / denom2;
W(iw, :) = W_w.';
end
case 'dsb'
% Delay and sum
for iw = 1:N_half
% Equation 2.31
% W = 1/N*d
d_w = d(iw, :);
W_w = 1/bf.num_filters * d_w;
W(iw, :) = W_w.';
end
otherwise
error('Invalid type, use SDB or DSB');
end
%% Convert w to time domain