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

📄 estnoisepower.m

📁 阵列信号处理的工具箱
💻 M
字号:
function noisePowerOut = estnoisepower(sigIn, dispOpt, noSrc)%ESTNOISEPOWER Estimate noise power of a radar signal.%%--------%Synopsis:%  noisePowerOut = estnoisepower(sigIn)%  noisePowerOut = estnoisepower(sigIn, dispOpt)%  noisePowerOut = estnoisepower(sigIn, dispOpt, noSrc)%%Description:%  Estimate noise power of a radar signal. As the estimed power, the mean%  value of the smallest eigenvalues of the spatial correlation matrix %  for the first range bin, first CPI and first trial is taken.%%Output and Input:%  noisePowerOut (RealScalarT): Estimated noise power.%  sigIn (RxRadarSigT or RxCorrMatT): Input radar signal or correlation matrix.%  dispOpt [D](StringT): Display options.%    = 'n': Don't print on screen.%    = 'p': Print on screen.%  noSrc [D](IntScalarT): Number of signal sources. This means that there%    are ((number-of-channels) - noSrc) noise eigenvalues. If this value%    is too low, the estimated noise power will be somewhat too low. If%    this value is too high, the estimated noise power will be too high%    (maybe much too high). Default value is = 1, which means that only the%    smallest eigenvalue is used.%%--------%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.%%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:%  % *****************************************************************************%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  Start        : 990504 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2000/10/16 15:20:53 $ $Author: svabj $.%  $Revision: 1.4 $% *****************************************************************************% ----------------------------------------------------------------------- %% Handle input parameters% ----------------------------------------------------------------------- %arginNo=1;if (nargin < arginNo)  error('DBT-Error: To few input parameters.')endarginNo = arginNo +1;% ****************** Add missing input parameters ******************if (nargin < arginNo)  dispOpt = [];endarginNo = arginNo +1;if (nargin < arginNo)  noSrc = [];endarginNo = arginNo +1;% ****************** Default values ******************if isempty(dispOpt)  dispOpt = '-';end%ifif isempty(noSrc)  noSrc = [];end%if% ****************** Error check input parameters ******************chkdtype(sigIn, 'RxRadarSigT','RxCorrMatT')% ----------------------------------------------------------------------- %% Do the work.% ----------------------------------------------------------------------- %if (strcmp(sigIn.dataType,'RxCompSigT') | ...    strcmp(sigIn.dataType,'RxRadarSigT'))  sizeSpec = sizem(sigIn.signals);  noPulses = sizeSpec(1);	  noRanges = sizeSpec(2);  noChannels = sizeSpec(3);  noExtras = sizeSpec(4);  noCPIs   = sizeSpec(5);  noTrials = sizeSpec(6);  trialLoop = 1;  cpiLoop = 1;  extraLoop = 1;  rangeLoop = 1;  sigMat = getm3(sigIn.signals, 3, [], ':',rangeLoop, ':', ...    extraLoop, cpiLoop, trialLoop);  corrMatMx = (1/noPulses) * sigMat*sigMat';    % Estimate spatial correlation matrix. Use all pulses as samples.elseif (strcmp(sigIn.dataType,'RxCorrMatT'))  sizeSpec = sizem(sigIn.corrMat);  noChannels = sizeSpec(1);  %noPulses = 1;	    % Can only store correlation matrix for a single pulse in RxCorrMatT data     % type.  %noRanges = sizeSpec(3);  %noExtras = sizeSpec(4);  %noCPIs   = sizeSpec(5);  %noTrials = 1;    % Can only store correlation matrix for a single trial in RxCorrMatT data     % type.  %trialLoop = 1;  cpiLoop = 1;  extraLoop = 1;  rangeLoop = 1;  corrMatMx = sigIn.corrMat(:,:,rangeLoop, extraLoop, cpiLoop);else  error('DBT-Error: Illegal datatype of input parameter "inData".')end%ifif isempty(noSrc)  noSrc = noChannels-1;    % Default value: use only the smallest eigenvalue.end%if%eigVals = (flipud(sort(abs(eig(corrMatMx)))));[U,S,V] = svd(corrMatMx);eigVals = diag(S);  % Calculate eigenvalues of the spatial correlation matrix.noisePower = mean(eigVals(noSrc+1:noChannels));  % Choose the smallest eigenvalue as an estimate of the noise power.% ----------------------------------------------------------------------- %% Output.% ----------------------------------------------------------------------- %% ****************** Output on screen ******************if ((((nargout > 0) & (dispOpt == 'p')))| ((nargout == 0) & (dispOpt ~= 'n')))  fprintf('Estimated noise power in radar signal = %g dB\n',10*log10(noisePower))end%if% ****************** Output parameters ******************if (nargout > 0)    noisePowerOut = noisePower;end

⌨️ 快捷键说明

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