📄 simradarsig.m
字号:
function radarSigS = simradarsig(recAnt, sources, waveform, pri, propSpeed, modelParam, pulIx, ranIx, spaIx, extraIx, cpiIx, trialIx)%SIMRADARSIG simulates radar signals from targets, noise and clutter.%%Synopsis:% radarSigS = simradarsig(recAnt, sources, waveform, pri, propSpeed,% {subArrPoint, focusDist})%%Description:% Simulates radarsignals and stores the data in a 3D matrix% ( Number Pulses x Number Of RangeBins x Number Of Channels)% Radarsignal simulation is devided into (so far) three different parts,% noise simulation, target simulation and clutter simulation. The tasks% to simulated these contributions are performed in separate functions% such as "simnoise.m", "simtarget.m" and "simclutter.m". These functions% are called one time for each coherent pulse interval (CPI). Alternation% of wavelengths between cpi:s are supported, see function "defwave.m"% for more information. The simulated data is then arranged in a% structure variable of the type "RxRadarSigT". All targets are seen as% stationary in that respect that they does not move from rangebin to% rangebin nor move in direction between CPIs. The velocity of the% targets are used to determine the phaseshifts between pulses and% subpulses (rangebins).%% For the noise simulation, the antenna definition "recAnt" is not used.% See help text of function "simnoise" for more information on the noise% simulation.%%Input:% recAnt (AntDefT) : Definition of the receiving antenna.% sources (SourceDefT) : Structure variable with the signal sources% to be simulated, i.e. targets, noise or clutter (so far).% waveform (WaveformT) : Waveform of the transmitted radarsignal.% pri (RealScalarT) : Pulse repetition Intervall. [s] This quantity% is used when calculating phase shift (or doppler frequency) due to% radial velocity. The field "noRangeBins" in the input parameter% "waveform" determines the number of range bins to simulate.% propSpeed [D](RealScalarT):Propagation speed of the radar wave [m/s].% Default is speed of light in empty space.% subArrPoint [D](DoaT) : Pointing direction of subarrays.% focusDist [D](RealVectorT):Focusing distance of the antenna [m].% pulIx [D](IndexT): Pulse or doppler channel numbers to simulate.% Not implemented.% ranIx [D](IndexT): Range bins (numbers) to simulate.% Not implemented.% spaIx [D](IndexT): Spatial channel numbers to simulate.% Not implemented.%%OutPut:% radarSigS (RxRadarSigT) : Struct with the simulated radarsignal.% 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:% trg1 = deftarget('swerling0', 1.2, 6000, [d2r(25); 0], 2);% trg2 = deftarget('swerling0', 0.6, 1000, [d2r(18); 0], -2);% trg3 = deftarget('swerling0', 0.8, 730000, [d2r(-3); 0], 0);%% noiseSrc1 = defnoise('Gaussian', 0.3, eye(noChannels));%% clSrc1 = defclutter('MIT-LCE', {6000 4 50}, 1, d2r(-30):0.01:d2r(30));%% sources = defsources({trg1 trg2 trg3 noiseSrc1 clutterSrc1}, eye(3));%% pMod = getmod('barker','13');% waveform = defwave(wavelength, noRangeBins, noPulses, pMod, sampleTime)%% radarSig = simradarsig(recAnt, sources, waveform, pri);%% First there is some definitions of sources, three targets one noise% and one clutter source. Then these sources are combined together in% a new structure variable that arranges data in such a way that% simulation is less time consuming. A waveform is defined and finally% radar data is simulated, using the function "simradarsig".%%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]: Nordling C., Osterman J., Physics Handbook for Science and% Engineering, Studentlitteratur 91-44-16575-7.%%See also:% deftarget, defnoise, defclutter, defjammer, simtarget, simnoise,% simclutter, simjammer, defwave, getmod, dbtex20% * 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:55 $ $Author: svabj $.% $Revision : 1.0 $%************************************************************************* if (nargin < 4) error('DBT-Error: To few input parameters.') end% -----------------------------------------------------------------------%---- Add missing input parameters ----% ----------------------------------------------------------------------- arginNo=5; if (nargin < arginNo) propSpeed = []; end arginNo = arginNo +1; if (nargin < arginNo) modelParam = []; end arginNo = arginNo +1; if (nargin < arginNo) pulIx = []; end arginNo = arginNo +1; if (nargin < arginNo) ranIx = []; end arginNo = arginNo +1; if (nargin < arginNo) spaIx = []; end arginNo = arginNo +1;%-------------------------------------------------------------------------%---- Handle default values. ----%------------------------------------------------------------------------- if (isempty(propSpeed)) %propSpeed = 299792458; propSpeed = speedoflight; end%if if isempty(modelParam) modelParam = {[] []}; end%if subArrPoint = modelParam{1}; focusDist = modelParam{2}; if isempty(subArrPoint) subArrPoint = [0 0].'; end%if if isempty(pulIx) pulIx = []; end%if if isempty(ranIx) ranIx = []; end%if if isempty(spaIx) spaIx = []; end%if%-------------------------------------------------------------------------%---- Pick out fields from input parameters. ----%------------------------------------------------------------------------- noCPI = waveform.noCPI; wavelength = waveform.wavelength; noRangeBins = waveform.noRangeBins; noPulses = waveform.noPulses; pMod = waveform.pModulation; sampleTime = waveform.sampleTime;%-------------------------------------------------------------------------%---- Simulate radarsignal. ----%------------------------------------------------------------------------- noChannels = recAnt.noElem; radarSig = zeros(noPulses, noRangeBins, noChannels,1, noCPI); for cpiIdx = 1:noCPI infoStr = sprintf('Cpi=%d: ',cpiIdx); dbtinfo(infoStr, 1); %---- Alternating wavelengths between cpi:s ---- if length(wavelength) > 1, lambda = wavelength(cpiIdx); else lambda = wavelength; end%if %--------------------------------------------------------------------- %---- Simulation of Targets ---- %--------------------------------------------------------------------- if isfield(sources,'Targets') targetPowers = sources.Targets.Powers; targetSpeeds = sources.Targets.Velocities; targetTypes = sources.Targets.Types; targetRanges = sources.Targets.Ranges; targetDOAs = sources.Targets.DOAs(1,:); % Only theta angles so far targetStartPhases = rem(targetRanges,lambda)/lambda*2*pi; if isfield(sources.Targets,'CorrMx') targCorrMx = sources.Targets.CorrMx; else targCorrMx = []; end %if tic steeringMatrixTarg = spastemat(recAnt, targetDOAs(1,:), lambda, ... focusDist, subArrPoint); infoStr = sprintf('simradarsig: Simulating targets...'); dbtinfo(infoStr, 1); radarSig3DTarg = simtarget(steeringMatrixTarg, pri, lambda, pMod,... sampleTime, targetPowers, targetSpeeds, ... targetRanges, targetTypes, ... targetStartPhases, noPulses, ... noRangeBins, targCorrMx, propSpeed); timeItTook = toc; infoStr = sprintf(' done (%2.1f secs).', timeItTook); dbtinfo(infoStr,[],1); else% dbtinfo('simradarsig: No targets present'); radarSig3DTarg = 0; end %if %--------------------------------------------------------------------- %---- Simulation of Noise ---- %--------------------------------------------------------------------- if isfield(sources,'NoiseSources') dbtinfo('simradarsig: Simulating noise...', 1); tic radarSig3DNoise = simnoise(sources.NoiseSources, noPulses, ... noRangeBins, noChannels); timeItTook = toc; infoStr = sprintf(' done (%2.1f secs).', timeItTook); dbtinfo(infoStr,[],1); else% dbtinfo('simradarsig: No noise present'); radarSig3DNoise = 0; end %if %--------------------------------------------------------------------- %---- Simulation of Clutter ---- %--------------------------------------------------------------------- if isfield(sources,'Clutter') tic dbtinfo('simradarsig: Simulating clutter...', 1); if strcmp(sources.Clutter.TransAnt, 'recAnt') sources.Clutter.TransAnt = recAnt; end%if platHeight = sources.Clutter.PlatHeight; platVel = sources.Clutter.PlatVelocity; spec = pantpat3(sources.Clutter.TransAnt, [], [], [], [], [], [],... sources.Clutter.DOAs, lambda, [], [], [], [], [],... 'noplot'); %Main Direction of Transmitting antenna is theta = 0; transmitGain = spec.specSmpl; steeringMatrixClutter = spastemat(recAnt, sources.Clutter.DOAs,lambda,... focusDist, subArrPoint); %Receiving antenna radarSig3DClutter = simclutter(sources.Clutter, transmitGain, ... steeringMatrixClutter, lambda, ... sampleTime, noPulses, noRangeBins,... propSpeed, pri, platHeight, platVel); timeItTook = toc; infoStr = sprintf(' done (%2.1f secs).', timeItTook); dbtinfo(infoStr,[],1); else% dbtinfo('simradarsig: No clutter present'); radarSig3DClutter = 0; end %if %--------------------------------------------------------------------- %---- Combine all simulated signals into a complete radar signal. ---- %--------------------------------------------------------------------- radarSig3D = radarSig3DTarg + radarSig3DNoise + radarSig3DClutter; radarSig(:,:,:,1,cpiIdx) = radarSig3D; end %for%-------------------------------------------------------------------------%---- Complete the struct & deliver the result. ----%------------------------------------------------------------------------- radarSigS = RxRadarSigT(radarSig, {recAnt, waveform}); % Store also "pulIx", "ranIx", "spaIx"?!%End Of File -------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -