-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathsphLCMV.m
37 lines (33 loc) · 1.22 KB
/
sphLCMV.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function w_lcmv = sphLCMV(sphCOV, constraint_dirs, constraints)
%SPHLCMV Get beamforming weights for a LCMV beamformer in the SHD
%
% Computes the beamweights for a linearly constrained minimum variance
% (LCMV) beamformer using SH signals.
%
% Inputs:
% sphCOV: (order+1)^2x(order+1)^2 covariance/correlation matrix
% of SH signals
% constraint_dirs: Kx2 [azi elev] directions that the beamformer
% should achieve the user-specified constraints
% constraints: Kx1 constraint values
%
% Outputs:
% w_lcmv: (order+1)^2x1 vector of beamforming weights
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SPHLCMV.M - 5/10/2016
% Archontis Politis, [email protected]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nSH = size(sphCOV,1);
order = sqrt(nSH)-1;
% steering vectors for distortionless constraints
constraint_dirs2 = [constraint_dirs(:,1) pi/2-constraint_dirs(:,2)]; % from azi-elevation to azi-inclination
Y_lcmv = getSH(order, constraint_dirs2, 'real');
% LCMV weights vector
stVecMtx = Y_lcmv.';
invA_B = sphCOV\stVecMtx;
B_invA_B = stVecMtx' * invA_B;
w_lcmv = (invA_B / B_invA_B) * constraints;
end