Radar Tracking: MATLAB Kalman Filter-Based Multi-Target Tracking with Dual Radars and Distributed Fusion (Code Download Link Included)

Radar Tracking: MATLAB Kalman Filter-Based Multi-Target Tracking with Dual Radars and Distributed Fusion (Code Download Link Included)

This article presents a MATLAB code framework for distributed fusion tracking of four targets using a dual radar system based on the Kalman filter, incorporating TDOA/FDOA observation models and distributed fusion logic. The code references methods for multi-target tracking, distributed MIMO radar optimization, and Kalman filter implementation.

Code Description

Below is an introduction to the main functions and structure of the code:

Code Background

– Function:

Simulate a multi-target tracking system with dual radars, using the Kalman filter for independent tracking of targets and improving tracking accuracy through distributed fusion.

– Number of Targets: Default is set to 5 targets.

– Number of Radars: Default is set to 2 radars, located at different positions in the coordinate system.

The number can be modified as needed.

Features:

– Random Initialization of Target States: The initial position and velocity of each target are randomly generated.

– Noise Modeling: Range noise (Gaussian distribution) and angle noise are modeled separately to simulate the errors in actual radar observation data.

– Distributed Fusion: Combines the observation results from multiple radars, enhancing tracking accuracy through weighted average fusion of target states.

Code Structure:

Sampling Period and Count: Defines the sampling frequency (`T`) and total duration (`N`).

Target and Radar Setup:

  • Randomly generate the initial states of targets (including position and velocity).

  • Radar positions are fixed at `[0, 0]` and `[500, 0]`, located on either side of the coordinate system.

Model Parameters:

  • State transition matrix (`F`) and process noise (`Q`).

  • Observation noise covariance (`R_radar`).

Filtering Main Loop:

  • Iterate according to time steps to complete target trajectory generation, radar observation simulation, Kalman filter updates, and distributed fusion.

– **True Trajectory Generation**: Use the state transition equations to generate the true trajectory of the targets, adding process noise.

– **Radar Observation Simulation**: Based on the true positions of the targets, calculate distance and azimuth, adding measurement noise.

Kalman Filtering:

  • Prediction Step: Use the state transition matrix to predict the next state and covariance of the target.

  • Update Step: Use radar observations and the observation model (Jacobian matrix) to correct the target state.

  • Distributed Fusion: Use a weighted average method to combine the independent estimates from the two radars into the final target state.

Results

Radar Tracking: MATLAB Kalman Filter-Based Multi-Target Tracking with Dual Radars and Distributed Fusion (Code Download Link Included)

MATLAB Code

Part of the code is as follows:

% MATLAB Kalman Filter-Based Radar Multi-Target Tracking (Dual Radars, Multi-Target Distributed Fusion)% Author: matlabfilter% 2025-04-07/Ver1clear; clc; close all;rng(0); % Fix random seed%% Simulation Parameter InitializationT = 1;          % Sampling period (s)N = 200;        % Total number of samplesnum_targets = 5;% Number of targetsnum_radars = 2; % Number of radarsigma_R = 10;   % Range noise standard deviation (m)sigma_A = 0.5;  % Angle noise standard deviation (deg)%% Initial States of Targets (Position and Velocity)targets = struct();for q = 1:num_targets    targets(q).x = [randi([100,500]); randi([-10,10]); randi([100,500]); randi([-10,10])]; % [x, vx, y, vy]    targets(q).P = diag([50, 5, 50, 5]); % Initial covarianceend% Radar Positions (Assuming dual radars are distributed on either side of the coordinate system)radar_pos = [0, 0; 500, 0]; % Positions of Radar 1 and Radar 2% Kalman Filter Parameters

Complete code download link:https://mbd.pub/o/bread/aJeUkplp

Or click on the “Read Original” at the end of the article to navigate.

If you need assistance or have custom code requirements related to navigation and positioning filtering, please contact the author via WeChat below:

Radar Tracking: MATLAB Kalman Filter-Based Multi-Target Tracking with Dual Radars and Distributed Fusion (Code Download Link Included)

Leave a Comment