📄 demse5.m
字号:
% DEMSE4 Bearing and Frequency Tracking Example%% This demonstrates the use of the Sigma-Point Particle Filter on the classic% HARD bearing and frequency tracking problem.%% This example is courtesy of Alain Bonnot.%% See also% GSSM_BOT DEMSE4 DEMSE5
% Copyright (c) Oregon Health & Science University (2006)
%
% This file is part of the ReBEL Toolkit. The ReBEL Toolkit is available free for
% academic use only (see included license file) and can be obtained from
% http://choosh.csee.ogi.edu/rebel/. Businesses wishing to obtain a copy of the
% software should contact rebel@csee.ogi.edu for commercial licensing information.
%% See LICENSE (which should be part of the main toolkit distribution) for more% detail.%=============================================================================================clc;clear;fprintf('\nDEMSE5 : Submarine bearing and frequency tracking \n\n');fprintf('Your submarine tries to determine the position, course, speed and emitted frequency \n');fprintf('of a target.\n');fprintf('At the beginning of the exercise, you know that :\n');fprintf(' - the speed of the target is between 8 and 16 m/s ;\n');fprintf(' - its range is between 1000 and 3000 m;\n');fprintf(' - its frequency tone is very stable between 295 and 305 Hz.\n\n');fprintf('You only observe the bearings of the target, and the doppler-shifted tone frequency.\n');fprintf('At mid-course, you perform a maneuver to improve observability.\n\n');fprintf('A random target trajectory is generated for each run, resulting in varying\n');fprintf('tracking performance depending on the observability.\n\n\n')%--- General setupaddrelpath('../gssm'); % add relative search path to example GSSM files to MATLABPATHaddrelpath('../data'); % add relative search path to example data files to MATLABPATH%--- Initialise GSSMmodel = gssm_bft('init');%--- Generate inference data structureArg.model = model; % embed GSSMArg.type = 'state'; % estimation typeArg.tag = 'State estimation for bearings and frequency tracking problem'; % info tag (not required)InfDS = geninfds(Arg); % call generate function%--- Generate estimation process and observation noise sourcesftype = input('Inference algorithm [ srcdkf / pf / sppf / gspf / gmsppf ] : ','s'); % set type of inference algorithm (estimator) to use :%--- Generate some data : Initial target state generated according to Gordon, Salmond & Ewing - 1995T = 100; % max. time k=1..TV = model.pNoise.sample( model.pNoise, T); % generate process noiseW = model.oNoise.sample( model.oNoise, T); % generate observation noise%Generate the observer (submarine) trajectory%Initial state of submarinesub=zeros(InfDS.statedim,T);sub(1,1)=0;sub(2,1)=10;sub(3,1)=0;sub(4,1)=0;sub(5,1)=350;for k=2:(T/2-1); sub(:,k)=model.ffun(model,sub(:,k-1),V(:,k-1),[]);end%At mid-course, the sub changes its course (90
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -