📄 dspastemat.m
字号:
function A = dspastemat(antenna, doas, lambda, ranges)%DSPASTEMAT Calculation of the derivative of the spatial steering matrix.%%--------%Synopsis:% a = dspastemat(antenna, doas, lambda, ranges)%%Description:% Calculates the derivative of the ideal spatial steering matrix with% respect to the DOA:s for specified DOA:s for a particular distance.%% For the antenna type 'aimtEx', there is an implementation of a special% analytic solution of the derivative, which is evaluated at the desired% DOA:s.% For all other antenna antenna types the derivative is calculated with% numerical methods using the function "spastemat". This should work for% all present and future antenna types if "spastemat" can handle these antenna% types as long as one angle only of the DOA:s (theta) is used.%% Note! That the numerical methods are not as robust as analytical ones.%%Output and Input:% A (CxMatrix): The calculated derivative of the spatial steering matrix.% Size (noCh x noDoa),% where noCh is the number of channels and noDoa is the number of% directions.% antenna (AntDefT): The definition of the receiving antenna to use.% doas (Vector of DoaT): Directions to calculate the steering vectors at.% lambda (RealScalarT): Wavelength of the carrier.% ranges [D](RealVectorT): Focus distance [m].%%%--------%AIMT Application Example ('aimtEx').%Synopsis:%%Description:% For a description, see reference [].%%Output and Input:%%Algoritm:%%--------%Notations:% Data type names are shown in parentheses and they start with a capital% letter and end with a capital T. Data type definitions can be found in [1]% or by "help dbtdata".% [D] = This parameter can be omitted and then a default value is used.% When the [D]-input parameter is not the last used in the call, it must be% given the value [], i.e. an empty matrix.% ... = There can be more parameters. They are explained under respective% metod or choice.%%Examples:%%Software Quality:% (About what is done to ascertain software quality. What tests are done.)%%Known Bugs:% Not all possible input parameters of the function "spastemat" is used;% pointing directions of subarray and antenna errors are not specified.% Only one angle of the DOA:s (theta) can be used.%%References:% [1]: Bj鰎klund S.: "DBT, A MATLAB Toolbox for Radar Signal Processing.% Reference Guide", FOA-D--9x-00xxx-408--SE, To be published.%%See Also:% spastemat% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 961120 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:20:48 $ $Author: svabj $.% $Revision: 1.4 $% *****************************************************************************global thSign % Defines the reference direction for the theta angle in DOA:s. % Defined in "defant".% ----------------------------------------------------------------------- %% Handle input parameters.% ----------------------------------------------------------------------- %antennaType = antenna.antennaType;if ~(strcmp(antennaType,'isotropULA') | strcmp(antennaType,'ULA')... | strcmp(antennaType,'LA')) error('DBT-Error: Not implemented for the desired antenna type.')endif (nargin < 4) ranges = Inf*ones(size(doas,1));endif (any(ranges ~= Inf)) error('DBT-Error: Only focus on infinity is implemented.')end% ----------------------------------------------------------------------- %% Antenna types.% ----------------------------------------------------------------------- %if isfield(antenna,'name')% ----------------------------------------------------------------------- %% Short cuts for special antenna types.% ----------------------------------------------------------------------- % % --------------------------------------------------------------------- % % AIMT Application Example. % % Start: 9xxxxx David Rejdemyhr (davrej). % --------------------------------------------------------------------- % if (strcmp(antenna.name,'aimtEx')) dElem = 0.05; % Distance between elements in a % subarray dSubArray = 0.1; % Distance between subarray centers K1 = 3; % No of elements in an SubArray K2 = 25; % No of Subarray in an antenna k1 = (0:K1-1)'; % Vector of elements in one subarray k2 = (0:K2-1)'; % Vector of subarrays in one antenna% l1 = -j*2*pi/lambda*dElem; % Temp variable% l2 = -j*2*pi/lambda*dSubArray; % Temp variable l1 = thSign*j*2*pi/lambda*dElem; % Temp variable l2 = thSign*j*2*pi/lambda*dSubArray; % Temp variable w = antenna.element.beamSpaceTrans; % Tapering weights vector theta = doas(1,:)'; % Vector of target angles aSub = exp(l1*k1*sin(theta')); % Steering vector for the subarrays aAnt = exp(l2*k2*sin(theta')); % Steering vector for the main array aSubDer = l1*k1*cos(theta').*exp(l1*k1*sin(theta')); % Diff of the above aAnt aAntDer = l2*k2*cos(theta').*exp(l2*k2*sin(theta')); % Diff of the above aSub A = (aAntDer*diag(w'*aSub)+aAnt*diag(w'*aSubDer))* ... diag(sqrt(cos(theta)))+aAnt*diag(w'*aSub)* ... diag(((-sin(theta))./(2*sqrt(cos(theta)))));% ----------------------------------------------------------------------- %% General antenna types.% ----------------------------------------------------------------------- % elseif (strcmp(antennaType,'ULA') | strcmp(antennaType,'LA')) element = antenna.element; eType = element.antennaType; if (strcmp(eType,'elem')) pType = element.patternType; if (strcmp(pType,'isotrop')) noSrc = size(doas,2); noElem = antenna.noElem; A = zeros(noElem, noSrc); for m=1:noSrc A(:,m) = dspastevec(antenna, doas(:,m), lambda, ranges); end%for m end%if else % Generalized ULA delta_theta = 1E-7; th1 = doas(1,:) - delta_theta; th2 = doas(1,:) + delta_theta; A = (spastemat(antenna,th2,lambda,ranges) - ... spastemat(antenna,th1,lambda,ranges))./(2*delta_theta); end%if else error('DBT-Error: Not implemented for desired antenna type.') end%ifelse error('DBT-Error: Antenna definition too old. Contact programmers.')end%if exist name
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -