Select Git revision
obsFilt.m 6.13 KiB
%% Calculate optimal observation filters
% --------------------------------------------------
% Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com
%
% Date: 13/02/2024 (DD/MM/YYYY)
%
% Copyright: MIT
% --------------------------------------------------
% Functionality: Calculate the optimal, in the least squares sense,
% observation filters for the Remote Microphone Technique.
% --------------------------------------------------
% Input
%
% Pe [numeric]: The transfer function from sources to the virtual
% microphones. The dimensions of the matrix must be NxM,
% where N is the number of virtual microphones and M the
% number of sources.
%
% Pm [numeric]: The transfer function from sources to the monitoring
% microphones. The dimensions of the matrix must be KxM,
% where K is the number of monitoring microphones and M is
% the number of sources.
%
% srcCsd [numeric] (Optional): The source cross spectral density matrix.
% This must be a square (MxM) symmetric matrix
% with the cross power spectral density of the
% sources. [Default: eye(M)]
%
% regFacs [numeric] (Optional): The regularisation factors used for the
% inversion of the cross-spectra of the
% monitoring microphones. Can be a vector
% with number of elements equal to K (number
% of monitoring microphones) or a scalar
% which will result in the same
% regularisation factor for all microphones.
% [Default: 0]
%
% --------------------------------------------------
% Output
%
% oOpt [numeric]: The optimal observation filters for each virtual
% microphone position. The dimensions of the matrix are
% NxM, where N is the number of virtual positions and M the
% number of monitoring microphones.
%
% Sme[numeric]: The cross-spectra between monitoring and virtual
% microphones. The matrix has dimensions NxK where N is the
% number of virtual microphones and M the number of
% monitoring microphones.
%
% Smm[numeric]: The cross-spectra between monitoring microphones. The
% matrix has dimensions KxK, where K is the number of
% monitoring microphones.
%
% est [numeric]: The estimated complex pressure(s) at the virtual
% microphone position(s).
%
% err [numeric]: The error of the estimated complex pressure(s).
%
% errSqr [numeric]: The sum of the squared errors of the estimated
% complex pressure(s).
%
% normErrSqr [numeric]: The sum of the squared errors of the estimated
% complex pressure(s) normalised to the squared
% pressure(s) of the virtual microphones.
%
% See [numeric]: The normalisation factor (cross spectral density of the
% error microphones) for each virtual microphone position.
% "errSqr"./"See" gives "normErrSqr".