⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spastemat.m

📁 阵列信号处理的工具箱
💻 M
📖 第 1 页 / 共 2 页
字号:
function A = spastemat(antenna, doas, lambda, focusDist, pointSubDoa, steVecFlag)%SPASTEMAT Calculation of spatial steering matrix.%%--------%Synopsis:%  A = spastemat(antenna, doas, lambda, focusDist, pointSubDoa)%%Description:%  Calculates the spatial steering matrix for specified angles for a particular%  focus distance. This function is normally not called by the end user but%  by the extension programmer that extends the toolbox DBT with new signal%  processing methods etc.%%  Possible antenna types are currently Isotropical ULA ('isotropULA'),%  AIMT Application Example ('aimtEx'), AIMT Experimental Antenna ('expAnt'),%  Uniform Linear Array ('ULA'), Non-Uniform Linear Array ('LA') and%  Antenna elements (one channel antennas) with isotropical or arbitrary%  antenna patterns. See the function "defant" for more information.%%Output and Input:%  A (CxMatrix): The calculated spatial steering matrix. Size (noChan, noDoa),%    where noChan is the number of antenna 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 [m].%  focusDist [D](RealVectorT): Focusing distance [m].%  pointSubDoa [D](DoaT): Pointing direction of subarrays. The same direction%    is used for all subarrays.%  steVecFlag [D](StringT): Whether steering vectors (default) or beamforming %    weights are to be calculated. There is a difference only when correcting %    for calibration on the steering vectors and beamforming weights. See []%    p. 15-18 for more information.%%--------%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.)%  The 'expAnt' antenna type was used in the work done by A. Heydarkhan [5].%%%Known Bugs:%  Only one angle of the DOA:s (theta) can be used.%  Focusing distance by the input parameter "focusDist" does not work. The%  distance is allways infinity.%%References:%  [1]: Bj鰎klund S.: "DBT, A MATLAB Toolbox for Radar Signal Processing.%    Reference Guide", FOA-D--9x-00xxx-408--SE, To be published.%  [2]: Athley F.:"Till鋗pningsexempel f鰎 studie av modellbaserad%    lobformning", Ericsson Microwave Systems 1996, No FY/XU-96:299.%  [3]: Pettersson L., Danestig M., Sj鰏tr鰉 U.: "An Experimental S-Band%    Digital Beamforming Antenna", IEEE AES Systems Magazine, November 1997,%    p.19-26.%  [4]: Bj鰎klund S.:"A MATLAB Toolbox for Radar Signal Processing",%    Proceedings of Nordic MATLAB Conference `97,Stockholm 27-28 October 1997.%  [5]: Heydarkhan A.: "Model Based Direction of Arrival Estimation Methods%    Applied to Experimental Antenna Data", Master's Thesis, Chalmers%    University of Technology 1997. FOA-R--97-00631-408--SE,FOA November 1997.%  [6]: Stutzman W.L., Thiele G.A.: "Antenna Theory and Design", Wiley 1981,%    ISBN 0-471-04458-X.%  [7]: Pettersson L.: "講ersiktlig beskrivning av m鋞dataanalysprogram f鰎 %    digital gruppantenn", FOA februari 1996, FOA-D--96-00226-3.2--SE.%  []: Danestig M., Pettersson L., Sj鰏tr鰉 U.: "An Experimental S-Band%    Digital Beamforming Antenna", IEEE International Symposium on Phased%    Array Antennas, Boston, 15-18 October 1996.%%See Also:%  dspastemat, The code of: doaspc1, doapar1, compsim2, pantpat3%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  Start        : 961120 Svante Bjvrklund (svabj).%  Latest change: $Date: 2000/10/21 14:06:14 $ (17:08) $Author: svabj $.%  $Revision: 1.12 $% *****************************************************************************if (0)  global thSign  % Defines the reference direction for the theta angle in DOA:s.  % Defined in "defant".else  thSign = 1;end%if% ----------------------------------------------------------------------- %% Handle input parameters.% ----------------------------------------------------------------------- %% ****************** Add missing input parameters ******************% Here should be some code also.% ****************** Default values ******************doas1 = zeros(2,size(doas,2)); 	% If phi is missing, extend "doas" with				% a zero rowdoas1(1:size(doas,1),:) = doas;doas = doas1;if (nargin < 4)  focusDist = [];endif (nargin < 5)  pointSubDoa = [];endif (isempty(focusDist))  focusDist = Inf;  %focusDist = Inf*ones(1,size(doas,2));    % If there can be different focusing distances to the    % different sources.else  focusDist = Inf;    % Only if the focusing distance always is the same to all sources.end%ifif (isempty(pointSubDoa))  pointSubDoa = [0;0];end%if% ****************** Error check input parameters ******************if (any(focusDist ~= Inf))  error('DBT-Error: Only focus on infinity is implemented.')end% ----------------------------------------------------------------------- %% Cell array of antenna definitions.% ----------------------------------------------------------------------- %if iscell(antenna)  % In this code the input parameter "antenna" is a cell array with  % antenna definitions. spastemat is called for each of the antennas.  % The result is stacked in A with new rows for each new antenna.  nDoas = size(doas,2);		% Number of DOA:s.  nAnt=length(antenna);		% Number of antennas.  nChan = 0;			% Total number of channels in all antennas.  ixChanEnd = zeros(nAnt,1);	% End channel index in A for all antennas.  for n = 1:nAnt    nChan = nChan + antenna{n}.noElem;    ixChanEnd(n) = nChan;  end%for n  A = zeros(nChan,nDoas);if (0)	% If different pointing directions for different subarrays.  if (size(pointSubDoa,2) > 1)	% If not the same definition of all elements.    %Do nothing.  else 	% Identical elements.    pointSubDoa = repmat(pointSubDoa,1,nAnt);  end%ifend%if (0)  ixChanStart = 1;  for n = 1:nAnt    A(ixChanStart:ixChanEnd(n),:) = spastemat(antenna{n}, doas, lambda, ...      focusDist, pointSubDoa);    %A(ixChanStart:ixChanEnd(n),:) = spastemat(antenna{n}, doas, lambda, ...    %  focusDist, pointSubDoa(n));      % If different pointing directions for different subarrays.    ixChanStart = ixChanEnd(n) + 1;    %A = [A; spastemat(antenna{n}, doas, lambda, focusDist, pointSubDoa)]  end%forelse % Not iscell(antenna)% ----------------------------------------------------------------------- %% Code common to all antenna types.% ----------------------------------------------------------------------- %  % ****************** Pick out fields from input parameters. ******************  antennaType = antenna.antennaType;% ----------------------------------------------------------------------- %% Antenna types.% ----------------------------------------------------------------------- %% ----------------------------------------------------------------------- %% Short cuts for special antenna types.% ----------------------------------------------------------------------- %  % --------------------------------------------------------------------- %  % Isotropical ULA.  %  % Start: 980107 Svante Bj鰎klund (svabj).  % --------------------------------------------------------------------- %  if (strcmp(antenna.name,'isotropULA'))    % Not implemented yet.  % --------------------------------------------------------------------- %  % AIMT Application Example.  %  % Start: 9xxxxx Fredrik Athley (freath).  % --------------------------------------------------------------------- %  elseif (strcmp(antenna.name,'aimtEx'))    if (nargin < 5)       pointSubDoa = [];    end    if (isempty(pointSubDoa))      pointSubDoa = 0;    else      pointSubDoa = pointSubDoa(1,:);    end%if    poserr = 0;    %lambda = antenna.lambda;    d = antenna.distElem;    K = antenna.noElem;    k = 0:K-1;    dmek = k*d + poserr;    theta = doas(1,:);    elementFactor = subpat(antenna,theta,pointSubDoa,poserr,[0.5 1 0.5],lambda);    % The position errors in "poserr" will be the same for all subarrays.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -