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

📄 dbf.m

📁 阵列信号处理的工具箱
💻 M
字号:
function sigOut = dbf(sig, beamPos, theta0, taperType, taperParam)% *****************************************************************************%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  function sigOut = dbf(sig, beamPos, theta0, taperType, taperParam)%%  Digital beamformer. Calculates the signals in beams specified by beamPos.%%  sigOut (RxRadarSigT):%  sig (RxRadarSigT):%  beamPos (Vector of DoaT)(= RealMatrixT 2 x M) : Directions of the%    beams to calculate%  theta0 (RealScalarT): Subarray pointing direction.%  taperType [D], taperParam [D]: Defines the tapering to use. See the function%    "gettap1" for more information.%%Known Bugs:%  dbf does not add a new level of the antenna definition with a new%  beamSpaceTrans field. This means that no DOA estimation is possible%  after execution of dbf.%%  It is unclear if the tapering works correctly.%  Start        : 961120 Fredrik Athley (freath).%  Latest change: $Date: 2000/10/16 15:20:20 $ $Author: svabj $.%  $Revision: 1.25 $% *****************************************************************************ant = sig.antenna;%lambda  = ant.lambda;waveform = sig.waveform;lambda   = waveform.wavelength;noWavelengths = length(lambda);noElem = ant.noElem;XX =  sig.signals;s = sizem(XX);noPulses    = s(1);noRangeBins = s(2);noChannels  = s(3);noNotUsed   = s(4);noCPIs      = s(5);noTrials    = s(6);if size(beamPos,1)==1  beamPosAz = beamPos;else  beamPosAz = beamPos(1,:);  beamPosEl = beamPos(2,:);endnoBeams = length(beamPosAz);YY = zerosm([s(1:2) noBeams s(4:6)]);if nargin<3  theta0 = (beamPosAz(1) + beamPosAz(noBeams))/2;end% ----------------------------------------------------------------------- %% Tapering.%% ----------------------------------------------------------------------- %if nargin<4  %taperType='taylor';  taperType='uniform';endif nargin<5  taperParam = 40;endif (0)  % The code in this alternative should be removed.if (strcmp(taperType,'notaper'))  taper = ones(noElem,1);elseif (strcmp(taperType,'taylor'))  SLL = taperParam;  nbar = 12;  taper = tayltap(SLL,nbar,noElem)';    % Should it not be .' instead of ' ?else  error('DBT-Error: Desired taper type not implemented.')endelse  %taperType  %taperParam  taper = gettap1(ant,taperType,taperParam);end%if (0)taperMatrix = sparse(diag(taper));if (noWavelengths == 1)  W = spastemat(ant,beamPosAz,lambda,Inf,theta0);  W = full(taperMatrix*W);end%iffor trialLoop = 1:noTrialsfor cpi=1:noCPIs  if (noWavelengths > 1)    W = spastemat(ant,beamPosAz,lambda(cpi),Inf,theta0);    W = full(taperMatrix*W);  end%if  for notUsedLoop = 1:noNotUsed  for range=1:noRangeBins    %fprintf('range = %d, cpi = %d\n',range, cpi)    X = getm(XX,':',range,':',notUsedLoop,cpi,trialLoop);    [r,c] = size(X);    if r~=noChannels      X = X.';    end    %Y = W.'*X;    Y = W'*X;    %YY = setm(YY,Y.',':',range,':',notUsedLoop,cpi,trialLoop);    YY(':',range,':',notUsedLoop,cpi,trialLoop) = Y.';	% setm      % Test of change to Matlab 5 indexing instead of setm:      %  >> all(all(all((sig2.signals == sig20.signals),1),2),3)      %   ans =      %         1  end%for range  end%for notUsedLoop  infoStr = sprintf('dbf: cpi = %d(%d), range = %d(%d)\r',cpi, noCPIs, ...    range,noRangeBins);  dbtinfo(infoStr,1);end%for cpidbtinfo('');	%New line.end%for trialLoop%sigOut.dataType = 'RxRadarSigT';sigOut = sig;sigOut.antenna = ant;sigOut.signals = YY;

⌨️ 快捷键说明

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