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() function bf = bf_defaults()
% Recording array general setup % 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.fs = 16e3; % Design for 16 kHz sample rate
bf.c = 343; % Speed of sound in 20C bf.c = 343; % Speed of sound in 20C
bf.steer_az = 0; % Azimuth 0 deg bf.steer_az = 0; % Azimuth 0 deg

View File

@ -152,19 +152,33 @@ for n=1:bf.num_filters
end end
end end
%% Superdirective switch lower(bf.type)
for iw = 1:N_half case 'sdb'
% Equation 2.33 % Superdirective
I = eye(bf.num_filters, bf.num_filters); for iw = 1:N_half
d_w = d(iw,:).'; % Equation 2.33
Gamma_vv_w = squeeze(Gamma_vv(iw, :, :)); I = eye(bf.num_filters, bf.num_filters);
Gamma_vv_w_diagload = Gamma_vv_w + mu(iw)*I; d_w = d(iw,:).';
Gamma_vv_w_inv = inv(Gamma_vv_w_diagload); Gamma_vv_w = squeeze(Gamma_vv(iw, :, :));
num = Gamma_vv_w_inv * d_w; Gamma_vv_w_diagload = Gamma_vv_w + mu(iw)*I;
denom1 = d_w' * Gamma_vv_w_inv; Gamma_vv_w_inv = inv(Gamma_vv_w_diagload);
denom2 = denom1 * d_w; num = Gamma_vv_w_inv * d_w;
W_w = num / denom2; denom1 = d_w' * Gamma_vv_w_inv;
W(iw, :) = W_w.'; 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 end
%% Convert w to time domain %% Convert w to time domain