Прошу помощи с radarSensor

Обсуждение вопросов, связанных с Partial Differential Equations Toolbox и Comsol MultiPhysics (Femlab)Анализ данных и статистика в MATLAB. Проектирование систем управления в MATLAB\Simulink

Модератор: Admin

Aleksey5963
Пользователь
Сообщения: 1
Зарегистрирован: Ср июл 03, 2019 5:50 pm

Прошу помощи с radarSensor

Сообщение Aleksey5963 » Ср июл 03, 2019 6:05 pm

Всем добрый день.
Использую стандартный пример из библиотеки Fusion (Simulating Passive Radar Sensors and Radar Interferences) вот ссылка :https://www.mathworks.com/help/fusion/examples/simulating-passive-radar-sensors-and-radar-inferences.html

Немного изменив код, заметил, что нет обнаружений датчика radarSensor от переотражений цели, если эта цель и приемник не попадают в один луч одновременно. Стоит изменить строку 24 на "offset = [35e3 -15e3 -ht];" , что бы цель и приемник попадали в один луч, так сразу появляются обнаружения. Не могу понять в чем дело !
Заранее спасибо !

Изображение

Код ниже :


Код: Выделить всё


scene = trackingScenario;
sceneDuration = 5; % с
scene.StopTime = sceneDuration;


ht = 3e3;                                % Altitude in meters
spd = 700*1e3/3600;                      % Speed in m/s
ang = -30;
rot = [cosd(ang) sind(ang) 0;-sind(ang) cosd(ang) 0; 0 0 1];
offset = [5e3 2e3 -ht];
start = offset - [spd*sceneDuration/2 0 0]*rot;
stop  = offset + [spd*sceneDuration/2 0 0]*rot;
traj  = waypointTrajectory('Waypoints',[start;stop],'TimeOfArrival',[0; sceneDuration]);
platform(scene,'Trajectory',traj);



ht = 3e3;                                % Altitude in meters
spd = 700*1e3/3600;                      % Speed in m/s
ang = 180;
rot = [cosd(ang) sind(ang) 0;-sind(ang) cosd(ang) 0; 0 0 1];
offset = [35e3 -5e3 -ht];
start = offset - [spd*sceneDuration/2 0 0]*rot;
stop  = offset + [spd*sceneDuration/2 0 0]*rot;
traj  = waypointTrajectory('Waypoints',[start;stop],'TimeOfArrival',[0; sceneDuration]);

platform(scene,'Trajectory',traj);



ht = 3e3;                                % Altitude in meters
spd = 700*1e3/3600;                      % Speed in m/s
ang = 20;
rot = [cosd(ang) sind(ang) 0;-sind(ang) cosd(ang) 0; 0 0 1];
offset = [22e3 -10e3 -ht];
start = offset - [spd*sceneDuration/2 0 0]*rot;
stop  = offset + [spd*sceneDuration/2 0 0]*rot;
traj  = waypointTrajectory('Waypoints',[start;stop],'TimeOfArrival',[0; sceneDuration]);
platform(scene,'Trajectory',traj);       % Default 10 dBsm RCS at all viewing angles


helperDisplay = helperRadarExampleDisplay(scene);
legend('Ground', 'Platforms');


%111111111111

esm = radarSensor(1, 'No scanning', ...
    'DetectionMode', 'ESM', ...
    'UpdateRate', 12.5, ...          % Hz
    'MountingAngles', [0 0 0], ...   % [Z Y X] deg
    'FieldOfView', [60 10], ...      % [az el] deg
    'CenterFrequency', 300e6, ...    % Hz
    'Bandwidth', 30e6, ...           % Hz
    'WaveformTypes', [0 1], ...      % Detect the interference waveform type
    'HasINS', true, ...                % ef
    'DetectionThreshold', 1e10, ...
    'Sensitivity', -1e10);

% Attach the ESM sensor to the first platform.
platESM = scene.Platforms{1};
platESM.Emitters = {}; % Remove the emitter.
platESM.Sensors = esm;


%22222222222

% Create the emitter for the monostatic radar.
radarTx = radarEmitter(2, 'Sector', ...
    'ScanMode' , 'Electronic', ...
    'UpdateRate', 12.5, ...          % Hz
    'MountingAngles', [0 0 0], ...   % [Z Y X] deg
    'FieldOfView', [20 10], ...       % [az el] deg
    'CenterFrequency', 300e6, ...    % Hz
    'Bandwidth', 3e6, ...            % Hz
    'ProcessingGain', 50, ...        % dB
    'WaveformType', 0, ...
    'EIRP', 100);                   % Use 1 to indicate this radar's waveform

radarRx = radarSensor(2, ...
    'DetectionMode', 'Monostatic', ...
    'EmitterIndex', radarTx.EmitterIndex, ...
    'HasINS', true);

% Attach to the radar emitter and sensor to the second platform.
platRadar = scene.Platforms{2};
platRadar.Emitters = radarTx;
platRadar.Sensors = radarRx;




% Show the configuration of sensors and platforms.
close(helperDisplay);
helperDisplay = helperRadarExampleDisplay(scene);
title('Passive detection of a monostatic radar');

% Take a snapshot 2 seconds into the scenario.
snapTime = 2; % s
helperDisplay.GrabFigureFcn = @(scene,fig)helperGrabFigureOnce(scene,fig,snapTime);



% Set the random seed for repeatable results.
rng(2018);

platforms = scene.Platforms;
numPlat = numel(platforms);

% Set update rate for the scenario to a common rate for the sensors and emitters.
rate = commonRate(platforms); % Hz
scene.UpdateRate = rate;

plotDets = {};
while advance(scene)

    % Get current simulation time.
    time = scene.SimulationTime;

    % Collect emitted signals.
    txEmiss = {};
    txConfigs = [];
    for iPlat = 1:numPlat
        thisPlatform = platforms{iPlat};

        % Generate signals for each emitter on this platform.
        [theseSigs, theseConfigs] = emit(thisPlatform, time);
        txEmiss = {txEmiss{:}, theseSigs{:}}; %#ok<CCAT>
        txConfigs = [txConfigs; theseConfigs]; %#ok<AGROW>
    end

    % Reflect signals off of platforms in the scenario.
    reflSigs = radarChannel(txEmiss, platforms);

    % Generate detections.
    bufferDets = {};
    rxConfigs = [];
    for iPlat = 1:numPlat
        thisPlatform = platforms{iPlat};

        % Generate detections for each detector on this platform.
        [theseDets, ~, theseConfigs] = detect(thisPlatform, reflSigs, txConfigs, time);

        bufferDets = [bufferDets; theseDets]; %#ok<AGROW>

        % Collect configurations for each detector.
        rxConfigs = [rxConfigs; theseConfigs]; %#ok<AGROW>

    end
   
 
   
    % Reset detections after every scan of radar sensor.
    if txConfigs(end).IsScanDone
        plotDets = bufferDets;
    else
        plotDets = [plotDets;bufferDets]; %#ok<AGROW>
       
    end

    % Update display with current beam position, and detections.
    helperDisplay(reflSigs,plotDets,rxConfigs);
end
title('Radar detected by an ESM sensor');












function rate = commonRate(platforms)
dt = [];
for iPlat = 1:numel(platforms)
    thisPlatform = platforms{iPlat};
    theseSensors = thisPlatform.Sensors;
    for iSensor = 1:numel(theseSensors)
        thisSensor = theseSensors{iSensor};
        tau = round(1e6/thisSensor.UpdateRate); % microseconds
        if isempty(dt)
            dt = tau;
        else
            dt = gcd(dt,tau);
        end
    end
end
rate = 1e6./dt; % Hz
end