?? simnoise.m
字號(hào):
function noise3D = simnoise(noiseSources, noPulses, noRangeBins, noChannels);%SIMNOISE is the core simulating engine for simulating noise sources.%%Synopsis:% noise3D = simnoise(noiseSources, noPulses, noRangeBins, noChannels);%%Description:% Simulates radarsignals and stores the data in a 3D matrix% ( Number Pulses x Number Of RangeBins x Number Of Channels )% The simulator assumes that the noise is borne in the antenna channels,% in contrast to in the antenna elements or outside of the antenna. This% implies that the noise signals does not pass through the analog% beamformer modelled by the steering matrix, e.g. the steering matrix is% not needed in calculations.% The noise that is simulated is a complex gaussian noise with mean 0 and% variance equal to the wanted power. The power of the noise is the same% in all channels. Since the noise is deployed directly in the antenna% channels, the signal-to-noise-ratio is ambiguous and dependent of the% steering matrix. If the steering matrix has components whos absolute% values is different from "1", then the target's power will vary from% antenna channel to antenna channel and thus will SNR vary equally much.%% This function is called upon by the function "simradarsig" and is% normally not used by the end user.%%Input:% noiseSources (NoiseDefT) : Cellarray of the noise sources that will be% simulated.% noPulses (IntScalarT) : Number of pulses in simulation.% noRangeBins (IntScalarT) : Number of rangebins in simulation.% noChannels (IntScalarT) : Number of channels of the antenna.%%OutPut:% noise3D (CxMatrixT) : 3D matrix with the simulated data.% pulses x rangebins x channels.%%--------%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".%%Examples:%%Software Quality:%%Known Bugs:%%References:% [1]: Bj鰎klund S., Rejdemyhr D. Athley F.: "DBT, A MATLAB Toolbox% for Radar Signal Processing. Reference Guide",% FOA-D--9x-00xxx-408--SE, To be published.%% [2]: Kingsley S., Quegan S.: "Understanding Radar Systems",% McGraw-Hill 1992.%% [3]: Horner R.A., Johnson, C.R.: "Topics in matrix Analysis",% Cambridge University Press 1991.%%See also:% defnoise, simradarsig, simtarget, simclutter, simjammer.% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Initiation : 980511 David Rejdemyhr (davrej).% Latest change : $Date: 2000/10/16 15:21:54 $ $Author: svabj $.% $Revision : 1.0 $%*************************************************************************%-------------------------------------------------------------------------%---- Initialize variables. ----%-------------------------------------------------------------------------noise3D = 0;%-------------------------------------------------------------------------%---- Initialize random generator. ----%-------------------------------------------------------------------------randn('seed',sum(100*clock));rand('seed',sum(100*clock));%-------------------------------------------------------------------------%---- Simulate noise signals. ----%-------------------------------------------------------------------------for noiseIdx = 1:length(noiseSources.Types) if (noiseSources.Types{noiseIdx} == 'Gaussian') if (1) noise3Dpre = sqrt(noiseSources.Powers{noiseIdx}/2) * ... (randn(noPulses, noRangeBins, noChannels) + ... j*randn(noPulses, noRangeBins, noChannels)); else % This branch is used to test the execution time. noise3Dpre = randn(noPulses, noRangeBins, noChannels); noise3Dpre = noise3Dpre + j*randn(noPulses, noRangeBins, noChannels); noise3Dpre = noise3Dpre * sqrt(noiseSources.Powers{noiseIdx}/2); end%if% elseif else dbtwarning('Desired noise type was unknown to simulator, proceeding with no noise.'); noise3D = 0; end %if if ~isempty(noiseSources.CorrMxs{noiseIdx}) % Compute the square root of the source covariance matrix with SVD % and color the random variables with the square root of the % noise covariance matrix. [U,SIG,V] = svd(noiseSources.CorrMxs{noiseIdx}); usqrtsig = U*sqrt(SIG); for rangeIdx = 1:noRangeBins noise3Dpre(:,rangeIdx,:) = (usqrtsig* ... squeeze(noise3Dpre(:,rangeIdx,:)).').'; end %for end %if noise3D = noise3D + noise3Dpre;end %for%End Of File -------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -