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

📄 pulscomp.m

📁 阵列信号处理的工具箱
💻 M
字号:
function [sigOut] = pulscomp(sigIn, pulsecode)% *****************************************************************************%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  function [sigOut] = pulscomp(sigIn, pulsecode)%%  Performs pulse compression.%%  After the execution of this function, targets in range bin 1 is located%  in element number (length of pulse code) in the output signal matrix.%%  sigOut (RxRadarSigT): Output (pulse compressed) radar signal.%  sigIn (RxRadarSigT): Input radar signal.%  pulsecode (CxVectorT): Pulse code to use, e.g. Barker 13old =%    [1 -1 1 -1 1 1 -1 -1 1 1 1 1 1].'%%Known Bugs:%  pulscomp does not save information about the performed filtering, which%  is necessary to make high resolution range estimation.%%  Start        : 961120 Fredrik Athley (freath).%  Latest change: $Date: 2000/10/16 15:21:26 $ $Author: svabj $.%  $Revision: 1.23 $% *****************************************************************************%Possible changes of the code:%  Remove "if (size(x,2) > 1)" and use getm3 instead of getm.%  Move "conj(fliplr" outside the loop.%ant = sigIn.antenna;XX =  sigIn.signals;s = sizem(XX);if nargin<2  disp(' ')  disp('No pulse code specified.')  disp('Using default pulse code: Barker 13')  disp(' ')  pulsecode = [1 -1 1 -1 1 1 -1 -1 1 1 1 1 1].'; % Barker 13 pulsecodeendif (size(pulsecode,2) > 1)  disp('Warning: In pulscomp, "pulsecode" is transposed. The filtering will not give right result.')end;noPulses    = s(1);noRangeBins = s(2);noBeams     = s(3);noNotUsed   = s(4);noCPIs      = s(5);noTrials    = s(6);if noRangeBins<length(pulsecode)  fprintf('\nWarning: Cannot perform pulse compression. Number of range bins is less than the length of the pulsecode. Returning the signal unprocessed.\n\n')  sigOut =sigIn;else  % N = min(2*15+3,NO_OF_RANGEBINS);  %y = zeros(1,noRangeBins);	% What for is this call to "zeros" ?  YY = zerosm(s);  filterCoeffs = conj(fliplr(pulsecode.'));  %filterCoeffs = filterCoeffs ./ norm(filterCoeffs);  for trialLoop = 1:noTrials  for cpiLoop = 1:noCPIs  for notUsedLoop = 1:noNotUsed  for beam = 1:noBeams    for pulse=1:noPulses      %fprintf('beam=%d (%d), pulse=%d\n',beam,noBeams,pulse)      %x = getm(XX,pulse,':',beam,notUsedLoop,cpiLoop,trialLoop);      %x2 = getm3(XX,2,[],pulse,':',beam,notUsedLoop,cpiLoop,trialLoop);      x = XX(pulse,':',beam,notUsedLoop,cpiLoop,trialLoop).';      %x4 = getm4(XX,pulse,':',beam,notUsedLoop,cpiLoop,trialLoop);if(0)      difference = sum(sum(abs(x - x3)));      %limit = 0.5*size(x,1)*size(x,2)*eps;      limit = 0;      if (difference > limit)        difference        error('Difference to large.')      else        %disp('  Test Ok.')      end%ifend%if(0)      if (size(x,2) > 1)        error('DBT-Error: In pulscomp, "x" is transposed.')        %disp('Warning: In pulscomp, "x" is transposed. The filtering will not give right result.')      end%if      y = filter(filterCoeffs,1,x.');      %YY = setm(YY,y,pulse,':',beam,notUsedLoop,cpiLoop,trialLoop);      YY(pulse,':',beam,notUsedLoop,cpiLoop,trialLoop) = y;	% setm    end%for pulse    infoStr = sprintf('pulscomp: cpi = %d(%d), beam = %d(%d)\r',cpiLoop, ...      noCPIs, beam,noBeams);    dbtinfo(infoStr,1);  end%for beam  end%for notUsedLoop  end%for cpiLoop  dbtinfo('');	%New line.  end%for trialLoop  %sigOut.dataType = 'RxRadarSigT';  %sigOut.antenna = ant;  sigOut = sigIn;  sigOut.signals = YY;end%if

⌨️ 快捷键说明

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