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,7 +152,9 @@ for n=1:bf.num_filters
end end
end end
%% Superdirective switch lower(bf.type)
case 'sdb'
% Superdirective
for iw = 1:N_half for iw = 1:N_half
% Equation 2.33 % Equation 2.33
I = eye(bf.num_filters, bf.num_filters); I = eye(bf.num_filters, bf.num_filters);
@ -166,6 +168,18 @@ for iw = 1:N_half
W_w = num / denom2; W_w = num / denom2;
W(iw, :) = W_w.'; W(iw, :) = W_w.';
end 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 %% Convert w to time domain
W_full = zeros(N, bf.num_filters); W_full = zeros(N, bf.num_filters);