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

📄 moderr.m

📁 雷达信号处理、或阵列信号处理中能够用上的重要的matlab工具箱——阵列信号处理工具箱
💻 M
字号:
function res = moderr(simParam, srcParams, sigSrcs)%MODERR: Monte-Carlo Simulation for several model errors.%%--------%Description:%%Output and Input:%%--------%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:%%Known Bugs:%%References:%  [1]: Proceeding of ISSPA 99, 22-24 August 1999, Brisbane, Australia.%  [2]: Bj鰎klund S. Rejdemyhr D.: "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        : 990915 David Rejdemyhr (davrej).%  Latest change: $Date: 2000/10/16 15:39:20 $ $Author: svabj $.%  $Revision: 1.3 $% *****************************************************************************global resrandn('seed',sum(100*clock));rand('seed',sum(100*clock));%-------------------------------------------------------------------------%----                      Extract Input Parameters                   ----%-------------------------------------------------------------------------%----------------   Simulation Parameters   -----------------eType = simParam.eType;                   % Type of ErroreInit = simParam.errLevelInit;            % Initial Error Level to SimulateeFin  = simParam.errLevelFinal;           % Final Error Level to SimulateeCnt  = simParam.errLevelCount;           % Number of Errors to SimulateerrM = eInit:(eFin-eInit)/(eCnt-1):eFin;  % Error vector (length(errM)=eCnt)if strcmp(eType, 'tgtCntError')   errM = round(errM);                    % Only integers are valid.end %ifnoSmpl = simParam.noSmpl;        % Number of time samples to simulatesmplPoints = simParam.smplPts;   % Sampling Points in space for use in 'MUSIC'noMCRuns = simParam.noMCRuns;    % Number of Monte-Carlo Simulations   %noSmpl = 111;                    % Number of samples.   %smplPoints = d2r([-3:0.03:3]);   % Sampling in space for use in 'MUSIC'spectT1 = simParam.spectrType1;spectT2 = simParam.spectrType2;%------------------   Target Parameters   -------------------tgtCnt    = length(sigSrcs.Targets.Powers);  % Number of targets in simulationinNoTgt = tgtCnt;angCnt    = srcParams.diffAngleCnt;           % Number of angles to simulateinitAng   = srcParams.initDiffAngle;          % Initial angle between targetsfinAng    = srcParams.finalDiffAngle;         % Final angle between targetscenterAng = srcParams.centerAngle;            % All targets symetrically                                             % Placed around this directionangInc = (finAng - initAng)/(angCnt-1);      % Angle stepsize in simulationsangDiff = (initAng:angInc:finAng);           % Vector of increasing angles   % DOA specified in targets definitions will be ignored. Might be due to a   % modification oin some future version of this file.%-------------------------------------------------------------------------%----                      Definition of antenna                      ----%-------------------------------------------------------------------------aimtAntOK = defant('aimtEx'); % Only antenna so far is the aimtEx antenna.aimtAntBAD = aimtAntOK;       % Default bad antenna is really OK...noChan = 25;                  % Number of channels in aimtEx antennawaveLength = 0.1;             % Wavelength according to aimt definition is 1 [dm]noRanBins =15;                % 15 Range Binspri = 1e-3;                   % Pulse repetition intervall set to 1 [ms]pulseLength = 1e-6;pMod = getmod('barker','13');waveform=defwave(waveLength, noRanBins, noSmpl, pMod, pulseLength, 1);%-------------------------------------------------------------------------%----                       Simulation Routine                        ----%-------------------------------------------------------------------------resProb1M = zeros(eCnt,angCnt);resProb2M = zeros(eCnt,angCnt);%dbtinfo offfor errIdx = 1:eCnt   for angIdx = 1:angCnt      OKResults1 = 0;      OKResults2 = 0;      for tgtIdx = 1:tgtCnt         sigSrcs.Targets.DOAs(1,tgtIdx) = centerAng + angDiff(angIdx)* ...                                          (tgtIdx-(tgtCnt+1)/2);      end %for      for iter = 1:noMCRuns         if strcmp(eType, 'positionError')            posError = randn([1 51]) * errM(errIdx);            % Calculate faulty antenna            aimtAntBAD = defaimtexant2(posError, centerAng, waveLength);         end %if         % Use bad antenna in simulations         radarSig = simradarsig(aimtAntBAD, sigSrcs, waveform, pri, ...                                 [], {centerAng, inf});         % Add number of targets error         if strcmp(eType, 'tgtCntError')            inNoTgt = errM(errIdx);         end %if         % Add Channel Phase Errors         if strcmp(eType, 'chPhError') % Phase errors are in degrees            chPhErrM = exp(j * randn([1 1 noChan]) * d2r(errM(errIdx)));            chPhErrM = repmat(chPhErrM,[noSmpl noRanBins 1]);            radarSig.signals = radarSig.signals .* chPhErrM;         end %if         % Add Channel Amplitude Errors         if strcmp(eType, 'chAmpError')   % Amplitude errors are in %            chAmpErrM = 1 + randn([1 1 noChan]) * errM(errIdx)/100;            chAmpErrM = repmat(chAmpErrM,[noSmpl noRanBins 1]);            radarSig.signals = radarSig.signals .* chAmpErrM;         end %if         % Pulsecompress the simulated signal.         radarSig = pulscomp(radarSig,pMod);         % Use good antenna in post-processing         radarSig.antenna = aimtAntOK;         spect1 = sdoaspc(spectT1, radarSig, smplPoints);         spect2 = sdoaspc(spectT2, radarSig, smplPoints);%         spect1 = doaspc1('cbf', radarSig, [], smplPoints);%         spect2 = sdoaspc('music', radarSig, smplPoints, inNoTgt);         [eDoas,NoOfTargets1] = doapeak(spect1, 'amirbin', inNoTgt);         [eDoas,NoOfTargets2] = doapeak(spect2, 'amirbin', inNoTgt);         if (NoOfTargets1 == tgtCnt)            OKResults1 = OKResults1 + 1;         end %if         if (NoOfTargets2 == tgtCnt)            OKResults2 = OKResults2 + 1;         end %if      end%for iter      resProb1M(errIdx,angIdx) = OKResults1/noMCRuns;      resProb2M(errIdx,angIdx) = OKResults2/noMCRuns;   end%for angIdxend%for errIdx%dbtinfo onres.tgtAngles = angDiff;res.errList = errM;res.resProb1 = resProb1M;res.resProb2 = resProb2M;% End Of File

⌨️ 快捷键说明

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