mirror of https://github.com/thesofproject/sof.git
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:
parent
deb7849f76
commit
b9a14709bf
|
@ -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
|
||||
|
|
|
@ -152,7 +152,9 @@ for n=1:bf.num_filters
|
|||
end
|
||||
end
|
||||
|
||||
%% Superdirective
|
||||
switch lower(bf.type)
|
||||
case 'sdb'
|
||||
% Superdirective
|
||||
for iw = 1:N_half
|
||||
% Equation 2.33
|
||||
I = eye(bf.num_filters, bf.num_filters);
|
||||
|
@ -166,6 +168,18 @@ for iw = 1:N_half
|
|||
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
|
||||
W_full = zeros(N, bf.num_filters);
|
||||
|
|
Loading…
Reference in New Issue