├── README.md ├── detection ├── cfar │ ├── cacfar.m │ ├── cacfar_curve.m │ ├── cacfar_sample2.m │ ├── cacfar_sample3.m │ ├── cacfar_sample4.m │ ├── cfar.m │ ├── cfar_sample5_curve1.m │ ├── cfar_sample5_curve_PD.m │ ├── cfar_sample5_curve_Pfa.m │ ├── cfar_sample5_sample.m │ ├── generateDataGaussianWhite.m │ ├── gocacfar.m │ ├── noise_power_inflence.m │ ├── oscfar.m │ ├── socacfar.m │ └── test.m └── threshold_detection │ ├── main.m │ ├── monte_carlo_swerling0.m │ ├── monte_carlo_swerling1.m │ ├── swerling0.m │ ├── swerling0_false_alarm_N=1.fig │ ├── swerling0_false_alarm_N=5.fig │ ├── swerling0_only_target_N=1.fig │ ├── swerling0_only_target_N=5.fig │ ├── swerling1.m │ ├── swerling2.m │ ├── swerling3.m │ ├── swerling4.m │ ├── test.m │ └── 不同模型检测概率_N=5.fig └── tracking ├── Kalman ├── data.mat ├── data_cv.mat ├── data_cv2.mat ├── generate_data.m ├── generate_data_cv.m ├── kalman.m ├── main_nca.m └── main_ncv.m ├── Measurement2Track ├── NN_main.m ├── NN_main2.m ├── data.mat ├── data2.mat ├── generate_data.m ├── generate_data2.m ├── init_P.m ├── init_X.m ├── main.m ├── main2.m ├── monte_carlo.m ├── monte_carlo1.m ├── 单目标跟踪失败记录.xlsx └── 多目标记录成功与失败次数.xlsx └── TrajectoryFormation ├── data_150.mat ├── data_50.mat ├── direct_method.m ├── gate.m ├── generate_data.m ├── get_R.m ├── init_P.m ├── init_Q.m ├── init_X.m └── logical_method.m /README.md: -------------------------------------------------------------------------------- 1 | # Radar Detection And Tracking 2 | 3 | Simulation of some detection algorithms & tracking algorithms. 4 | 5 | Language: Matlab 6 | 7 | Version: R2018a 8 | 9 | ## Detection algorithm: 10 | 11 | * Threshold detection 12 | * Constant False Alarm Rate(**CFAR**): 13 | * Cell Average CFAR(**CA CFAR**) 14 | * Smallest-of CA CFAR(**SOCA CFAR**) 15 | * Greatest-of CA CFAR(**GOCA CFAR**) 16 | * Ordered Statistics(**OS CFAR**) 17 | 18 | ## Tracking algorithm: 19 | 20 | * Kalman Filter(**KF**): 21 | * Linear Kalman Filter 22 | * Trajectory formation: 23 | * Direct method 24 | * Logical method 25 | * Hough transform method 26 | * Measurement-to-Track: 27 | * Nearest Neighbor(**NN**) 28 | * Probability Data Association(**PDA**) -------------------------------------------------------------------------------- /detection/cfar/cacfar.m: -------------------------------------------------------------------------------- 1 | function [position, threshold, start_cell, stop_cell] = cacfar(signal, Pfa, ref_num, guard_num) 2 | % ======>INPUT: 3 | % signal: Data of signal(include signal and noise).[DATATYPE: row vector] 4 | % Pfa: Probability of false alarm.[DATATYPE: scalar] 5 | % ref_num: Number of reference cell.[DATATYPE: scalar] 6 | % guard_num: Number of guard cell.[DATATYPE: scalar] 7 | % ======>OUTPUT: 8 | % position: positions of target.[DATATYPE: row vector] 9 | % threshold: CFAR threshold of input signal.[DATATYPE: row vector] 10 | position = []; 11 | left_num = guard_num + ref_num; 12 | start_cell = left_num + 1; 13 | stop_cell = length(signal) - left_num; 14 | N = 2*ref_num; 15 | alpha = N * (Pfa ^ (-1/N) - 1); 16 | 17 | threshold = zeros(1, stop_cell - start_cell + 1); 18 | for ii = start_cell : stop_cell 19 | tmp_data = [signal(ii-left_num : ii-guard_num-1), ... 20 | signal(ii+guard_num+1 : ii+left_num)]; 21 | tmp = mean(tmp_data) * alpha; 22 | % threshold(ii - left_num) 23 | % tmp 24 | threshold(ii - left_num) = tmp; 25 | if tmp < signal(ii) 26 | position = [position, ii]; 27 | end 28 | end 29 | return -------------------------------------------------------------------------------- /detection/cfar/cacfar_curve.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cacfar_curve.m -------------------------------------------------------------------------------- /detection/cfar/cacfar_sample2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cacfar_sample2.m -------------------------------------------------------------------------------- /detection/cfar/cacfar_sample3.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cacfar_sample3.m -------------------------------------------------------------------------------- /detection/cfar/cacfar_sample4.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cacfar_sample4.m -------------------------------------------------------------------------------- /detection/cfar/cfar.m: -------------------------------------------------------------------------------- 1 | % Simulationg for several types of cfar algorithms. 2 | 3 | clear; close all; clc 4 | 5 | % ======Generate data1===================================================== 6 | % data1: 7 | % # of units: 200; noise power: 20 dB 8 | % target position: [50]; echo wave power: [35]dB 9 | % probability of false alarm: 1e-3 10 | num_unit = 200; 11 | pos_target = 50; 12 | echo_power_dB = 35; 13 | noise_power_dB = 20; 14 | Pfa = 1e-3; 15 | signal = generateDataGaussianWhite(num_unit, pos_target, ... 16 | echo_power_dB, noise_power_dB); 17 | signal_dB = 10 .* log10(signal); 18 | 19 | % data2: 20 | % # of units: 200; noise power: 20 dB 21 | % target position: [50, 58]; echo wave power: [35, 40]dB 22 | % probability of false alarm: 1e-3 23 | num_unit2 = 200; 24 | pos_target2 = [50; 58]; 25 | echo_power_dB2 = [35; 40]; 26 | noise_power_dB2 = 20; 27 | Pfa2 = 1e-3; 28 | signal2 = generateDataGaussianWhite(num_unit2, pos_target2, ... 29 | echo_power_dB2, noise_power_dB2); 30 | signal2_dB = 10 .* log10(signal2); 31 | 32 | % data3: 33 | % # of units: 200; noise power: 20 dB 34 | % target position: [50, 51, 52]; echo wave power: [35, 35, 35]dB 35 | % probability of false alarm: 1e-3 36 | num_unit3 = 200; 37 | pos_target3 = [50; 51; 52]; 38 | echo_power_dB3 = [35; 35; 35]; 39 | noise_power_dB3 = 20; 40 | Pfa3 = 1e-3; 41 | signal3 = generateDataGaussianWhite(num_unit3, pos_target3, ... 42 | echo_power_dB3, noise_power_dB3); 43 | signal3_dB = 10 .* log10(signal3); 44 | 45 | % data4: 46 | % # of units: 200; noise power1: 20 dB; noise power2: 30 dB 47 | % target position: [50]; echo wave power: [35]dB 48 | % probability of false alarm: 1e-3 49 | num_unit4_1 = 100; 50 | num_unit4_2 = 100; 51 | num_unit4 = num_unit4_1 + num_unit4_2; 52 | pos_target4_1 = 50; 53 | pos_target4_2 = []; 54 | echo_power_dB4_1 = 35; 55 | echo_power_dB4_2 = []; 56 | noise_power_dB4_1 = 20; 57 | noise_power_dB4_2 = 30; 58 | Pfa4 = 1e-3; 59 | signal4_1 = generateDataGaussianWhite(num_unit4_1, pos_target4_1, ... 60 | echo_power_dB4_1, noise_power_dB4_1); 61 | signal4_2 = generateDataGaussianWhite(num_unit4_2, pos_target4_2, ... 62 | echo_power_dB4_2, noise_power_dB4_2); 63 | signal4 = [signal4_1; signal4_2]; 64 | signal4_dB = 10 .* log10(signal4); 65 | 66 | % data5: 67 | % # of units: 200; noise power1: 20 dB; noise power2: 30 dB 68 | % target position: [95]; echo wave power: [35]dB 69 | % probability of false alarm: 1e-3 70 | num_unit5_1 = 100; 71 | num_unit5_2 = 100; 72 | num_unit5 = num_unit5_1 + num_unit5_2; 73 | pos_target5_1 = 95; 74 | pos_target5_2 = []; 75 | echo_power_dB5_1 = 35; 76 | echo_power_dB5_2 = []; 77 | noise_power_dB5_1 = 20; 78 | noise_power_dB5_2 = 30; 79 | Pfa5 = 1e-3; 80 | signal5_1 = generateDataGaussianWhite(num_unit5_1, pos_target5_1, ... 81 | echo_power_dB5_1, noise_power_dB5_1); 82 | signal5_2 = generateDataGaussianWhite(num_unit5_2, pos_target5_2, ... 83 | echo_power_dB5_2, noise_power_dB5_2); 84 | signal5 = [signal5_1; signal5_2]; 85 | signal5_dB = 10 .* log10(signal5); 86 | 87 | % data6: 88 | % # of units: 200; noise power1: 20 dB; noise power2: 30 dB 89 | % target position: [50, 58]; echo wave power: [35, 40]dB 90 | % probability of false alarm: 1e-3 91 | num_unit6_1 = 100; 92 | num_unit6_2 = 100; 93 | num_unit6 = num_unit6_1 + num_unit6_2; 94 | pos_target6_1 = [50; 58]; 95 | pos_target6_2 = []; 96 | echo_power_dB6_1 = [35; 40]; 97 | echo_power_dB6_2 = []; 98 | noise_power_dB6_1 = 20; 99 | noise_power_dB6_2 = 30; 100 | Pfa6 = 1e-3; 101 | signal6_1 = generateDataGaussianWhite(num_unit6_1, pos_target6_1, ... 102 | echo_power_dB6_1, noise_power_dB6_1); 103 | signal6_2 = generateDataGaussianWhite(num_unit6_2, pos_target6_2, ... 104 | echo_power_dB6_2, noise_power_dB6_2); 105 | signal6 = [signal6_1; signal6_2]; 106 | signal6_dB = 10 .* log10(signal6); 107 | 108 | % ======Processes of data1================================================= 109 | % ======CA-CFAR(10, 3)===================================================== 110 | fprintf("===> CA-CFAR(10, 3) for data1\n"); 111 | [pos_detect, threshold] = cacfar(signal, Pfa, 10, 3); 112 | threshold_dB = pow2db(threshold); 113 | 114 | figure; 115 | title('CFAR for data1'); 116 | hold on; 117 | grid on; 118 | plot(1:num_unit, signal_dB, 'k', 'LineWidth', 1); 119 | plot(14 : num_unit-13, threshold_dB, 'b', 'LineWidth', 0.5); 120 | 121 | fprintf("===> target position\n"); 122 | display(pos_detect'); 123 | pause; 124 | 125 | % ======Processes of data2================================================= 126 | % ======CA-CFAR(10, 3)===================================================== 127 | fprintf("===> CA-CFAR(10, 3) for data2\n"); 128 | [pos_detect2, threshold2] = cacfar(signal2, Pfa2, 10, 3); 129 | threshold2_dB = pow2db(threshold2); 130 | 131 | figure; 132 | title('CFAR for data2'); 133 | hold on; 134 | grid on; 135 | plot(1:num_unit2, signal2_dB, 'k', 'LineWidth', 1); 136 | plot(14 : num_unit2-13, threshold2_dB, 'b', 'LineWidth', 0.5); 137 | 138 | fprintf("===> target position\n"); 139 | display(pos_detect2'); 140 | pause; 141 | 142 | % ======Processes of data3================================================= 143 | % ======CA-CFAR(10, 0)===================================================== 144 | fprintf("===> CA-CFAR(10, 0) for data3\n"); 145 | [pos_detect3, threshold3] = cacfar(signal3, Pfa3, 10, 0); 146 | threshold3_dB = pow2db(threshold3); 147 | 148 | figure; 149 | title('CFAR for data3'); 150 | hold on; 151 | grid on; 152 | plot(1:num_unit3, signal3_dB, 'k', 'LineWidth', 1); 153 | plot(11 : num_unit3-10, threshold3_dB, 'b', 'LineWidth', 0.5); 154 | 155 | fprintf("===> target position\n"); 156 | display(pos_detect3'); 157 | % pause; 158 | 159 | % ======CA-CFAR(10, 3)===================================================== 160 | fprintf("===> CA-CFAR(10, 3) for data3\n"); 161 | [pos_detect3_2, threshold3_2] = cacfar(signal3, Pfa3, 10, 3); 162 | threshold3_dB_2 = pow2db(threshold3_2); 163 | 164 | plot(14 : num_unit3-13, threshold3_dB_2, 'r', 'LineWidth', 0.5); 165 | 166 | fprintf("===> target position\n"); 167 | display(pos_detect3_2'); 168 | pause; 169 | 170 | % ======Processes of data4================================================= 171 | % ======CA-CFAR(10, 3)===================================================== 172 | fprintf("===> CA-CFAR(10, 3) for data4\n"); 173 | [pos_detect4, threshold4] = cacfar(signal4, Pfa4, 10, 3); 174 | threshold4_dB = pow2db(threshold4); 175 | 176 | figure; 177 | title('CFAR for data4'); 178 | hold on; 179 | grid on; 180 | plot(1:num_unit4, signal4_dB, 'k', 'LineWidth', 1); 181 | plot(14 : num_unit4-13, threshold4_dB, 'b', 'LineWidth', 0.5); 182 | 183 | fprintf("===> target position\n"); 184 | display(pos_detect4'); 185 | pause; 186 | 187 | % ======Processes of data5================================================= 188 | % ======CA-CFAR(10, 3)===================================================== 189 | fprintf("===> CA-CFAR(10, 3) for data5\n"); 190 | [pos_detect5, threshold5] = cacfar(signal5, Pfa5, 10, 3); 191 | threshold5_dB = pow2db(threshold5); 192 | 193 | figure; 194 | title('CFAR for data5'); 195 | hold on; 196 | grid on; 197 | plot(1:num_unit5, signal5_dB, 'k', 'LineWidth', 1); 198 | plot(14 : num_unit5-13, threshold5_dB, 'b', 'LineWidth', 0.5); 199 | 200 | fprintf("===> target position\n"); 201 | display(pos_detect5'); 202 | pause; 203 | 204 | % ======Processes of data6================================================= 205 | % ======CA-CFAR(10, 3)===================================================== 206 | fprintf("===> CA-CFAR(10, 3) for data6\n"); 207 | [pos_detect6, threshold6] = cacfar(signal6, Pfa6, 10, 3); 208 | threshold6_dB = pow2db(threshold6); 209 | 210 | figure; 211 | title('CFAR for data6'); 212 | hold on; 213 | grid on; 214 | plot(1:num_unit6, signal6_dB, 'k', 'LineWidth', 1); 215 | plot(14 : num_unit6-13, threshold6_dB, 'b', 'LineWidth', 0.5); 216 | 217 | fprintf("===> target position\n"); 218 | display(pos_detect6'); 219 | % pause; 220 | 221 | % ======SOCA-CFAR(10, 3)=================================================== 222 | fprintf("===> SOCA-CFAR(10, 3) for data6\n"); 223 | [pos_detect6_1, threshold6_1] = socacfar(signal6, Pfa6, 10, 3); 224 | threshold6_dB_1 = pow2db(threshold6_1); 225 | 226 | plot(14 : num_unit6-13, threshold6_dB_1, 'r', 'LineWidth', 0.5); 227 | 228 | fprintf("===> target position\n"); 229 | display(pos_detect6_1'); 230 | % pause; 231 | 232 | % ======GOCA-CFAR(10, 3)=================================================== 233 | fprintf("===> GOCA-CFAR(10, 3) for data6\n"); 234 | [pos_detect6_2, threshold6_2] = gocacfar(signal6, Pfa6, 10, 3); 235 | threshold6_dB_2 = pow2db(threshold6_2); 236 | 237 | plot(14 : num_unit6-13, threshold6_dB_2, 'g', 'LineWidth', 0.5); 238 | 239 | fprintf("===> target position\n"); 240 | display(pos_detect6_2'); 241 | % pause; 242 | 243 | % ======OS-CFAR(10, 3)=================================================== 244 | fprintf("===> OS-CFAR(10, 3) for data6\n"); 245 | [pos_detect6_3, threshold6_3] = oscfar(signal6, Pfa6, 10, 3, 10); 246 | threshold6_dB_3 = pow2db(threshold6_3); 247 | 248 | plot(14 : num_unit6-13, threshold6_dB_3, 'y', 'LineWidth', 0.5); 249 | 250 | fprintf("===> target position\n"); 251 | display(pos_detect6_3'); 252 | % pause; 253 | 254 | % ======S-CFAR(10, 3)=================================================== 255 | fprintf("===> S-CFAR(10, 3) for data6\n"); 256 | [pos_detect6_4, threshold6_4] = scfar(signal6, Pfa6, 10, 3, 30, 10); 257 | threshold6_dB_4 = pow2db(threshold6_4); 258 | 259 | plot(14 : num_unit6-13, threshold6_dB_4, 'm', 'LineWidth', 0.5); 260 | 261 | fprintf("===> target position\n"); 262 | display(pos_detect6_4'); 263 | pause; -------------------------------------------------------------------------------- /detection/cfar/cfar_sample5_curve1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cfar_sample5_curve1.m -------------------------------------------------------------------------------- /detection/cfar/cfar_sample5_curve_PD.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cfar_sample5_curve_PD.m -------------------------------------------------------------------------------- /detection/cfar/cfar_sample5_curve_Pfa.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cfar_sample5_curve_Pfa.m -------------------------------------------------------------------------------- /detection/cfar/cfar_sample5_sample.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/cfar_sample5_sample.m -------------------------------------------------------------------------------- /detection/cfar/generateDataGaussianWhite.m: -------------------------------------------------------------------------------- 1 | function signal = generateDataGaussianWhite(num_cells, ... 2 | pos_target, ... 3 | echo_power_dB, ... 4 | noise_power_dB) 5 | % ======>INPUT: 6 | % num_cells: The amount of cells.[DATATYPE: scalar] 7 | % pos_target: Range of all targets.[DATATYPE: vector] 8 | % echo_power_dB: Echo Wave power in dB.[DATATYPE: scalar] 9 | % noise_power_dB: Noise power in dB.[DATATYPE: scalar] 10 | % ======>OUTPUT: 11 | % signal: Mixed data of signal and noise.[DATATYPE: row vector] 12 | 13 | num_target = length(pos_target); 14 | echo_power = db2pow(echo_power_dB); 15 | noise_power = db2pow(noise_power_dB); 16 | 17 | noise_sample = randn(1, num_cells) + 1j * randn(1, num_cells); 18 | noise = abs(sqrt(noise_power/2) * noise_sample) .^ 2; 19 | 20 | if num_target == 0 21 | signal = noise; 22 | else 23 | signal_sample = zeros(1, num_cells); 24 | for ii = 1 : num_target 25 | signal_sample(pos_target(ii)) = echo_power(ii); 26 | end 27 | signal = signal_sample + noise; 28 | end 29 | 30 | return -------------------------------------------------------------------------------- /detection/cfar/gocacfar.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/gocacfar.m -------------------------------------------------------------------------------- /detection/cfar/noise_power_inflence.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/noise_power_inflence.m -------------------------------------------------------------------------------- /detection/cfar/oscfar.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/oscfar.m -------------------------------------------------------------------------------- /detection/cfar/socacfar.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/cfar/socacfar.m -------------------------------------------------------------------------------- /detection/cfar/test.m: -------------------------------------------------------------------------------- 1 | clear; close all; clc; 2 | 3 | alpha = linspace(0, 20, 100); 4 | N = 20; 5 | pfa = zeros(1, length(alpha)); 6 | for ii = 1:length(alpha) 7 | pfa(ii) = compute_pfa(alpha(ii), N); 8 | end 9 | 10 | plot(alpha, pfa); 11 | ylim([0, 0.001]); 12 | 13 | function pfa = compute_pfa(alpha, N) 14 | % SOCA CFAR 15 | part1 = (2 + alpha / (N / 2)) ^ (-N / 2); 16 | part2 = 0; 17 | for k = 0:(N/2 - 1) 18 | part2 = part2 + nchoosek(N/2 - 1 + k, k) * (2 + alpha / (N / 2)) ^ (-k); 19 | end 20 | pfa = 2 * part1 * part2; 21 | 22 | % GOCA CFAR 23 | % part1 = (1 + alpha / (N / 2)) ^ (-N / 2); 24 | % part2 = (2 + alpha / (N / 2)) ^ (-N / 2); 25 | % part3 = 0; 26 | % for k = 0:(N/2 - 1) 27 | % part3 = part3 + nchoosek(N/2 - 1 + k, k) * (2 + alpha / (N/2)) ^ (-k); 28 | % end 29 | % pfa = part1 - part2 * part3; 30 | % pfa = 2 * pfa; 31 | end -------------------------------------------------------------------------------- /detection/threshold_detection/main.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/main.m -------------------------------------------------------------------------------- /detection/threshold_detection/monte_carlo_swerling0.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/monte_carlo_swerling0.m -------------------------------------------------------------------------------- /detection/threshold_detection/monte_carlo_swerling1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/monte_carlo_swerling1.m -------------------------------------------------------------------------------- /detection/threshold_detection/swerling0.m: -------------------------------------------------------------------------------- 1 | function PD = swerling0(SNR_dB, Pfa, N) 2 | % ====== Swerling V ======================================================== 3 | SNR = db2pow(SNR_dB); 4 | T = gammaincinv(1 - Pfa, N); 5 | 6 | tmp = 0; 7 | for r = 2:N 8 | tmp = tmp + (T ./ (N .* SNR)).^((r - 1) / 2) .* ... 9 | besseli(r - 1, 2 * sqrt(N .* SNR .* T)); 10 | end 11 | PD = marcumq(sqrt(2 * N .* SNR), sqrt(2 * T)) + exp(-(T + N * SNR)) .* tmp; -------------------------------------------------------------------------------- /detection/threshold_detection/swerling0_false_alarm_N=1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/swerling0_false_alarm_N=1.fig -------------------------------------------------------------------------------- /detection/threshold_detection/swerling0_false_alarm_N=5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/swerling0_false_alarm_N=5.fig -------------------------------------------------------------------------------- /detection/threshold_detection/swerling0_only_target_N=1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/swerling0_only_target_N=1.fig -------------------------------------------------------------------------------- /detection/threshold_detection/swerling0_only_target_N=5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/swerling0_only_target_N=5.fig -------------------------------------------------------------------------------- /detection/threshold_detection/swerling1.m: -------------------------------------------------------------------------------- 1 | function PD = swerling1(SNR_dB, Pfa, N) 2 | % ====== Swerling I ======================================================== 3 | SNR = db2pow(SNR_dB); 4 | T = gammaincinv(1 - Pfa, N); 5 | 6 | if N == 1 7 | PD = exp(-T ./ (1 + SNR_dB)); 8 | elseif N > 1 9 | tmp = 1 + 1 ./ (N .* SNR); 10 | part_1 = tmp .^ (N-1); 11 | part_2 = gammainc(T ./ tmp, N - 1); 12 | part_3 = exp(-(T ./ (1 + N.*SNR))); 13 | PD = 1 - gammainc(T, N - 1) + part_1 .* part_2 .* part_3; 14 | end -------------------------------------------------------------------------------- /detection/threshold_detection/swerling2.m: -------------------------------------------------------------------------------- 1 | function PD = swerling2(SNR_dB, Pfa, N) 2 | % ====== Swerling II ======================================================= 3 | SNR = db2pow(SNR_dB); 4 | T = gammaincinv(1 - Pfa, N); 5 | 6 | PD = 1 - gammainc(T ./ (1 + SNR), N); -------------------------------------------------------------------------------- /detection/threshold_detection/swerling3.m: -------------------------------------------------------------------------------- 1 | function PD = swerling3(SNR_dB, Pfa, N) 2 | % ====== Swerling III ====================================================== 3 | SNR = db2pow(SNR_dB); 4 | T = gammaincinv(1 - Pfa, N); 5 | 6 | tmp = 1 + N .* SNR / 2; 7 | part1 = (1 + 2 ./ (N * SNR)) .^ (N - 2); 8 | part2 = 1 + T ./ tmp - 2 ./ (N * SNR) .* (N - 2); 9 | part3 = exp(-T ./ tmp); 10 | PD = part1 .* part2 .* part3; -------------------------------------------------------------------------------- /detection/threshold_detection/swerling4.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/swerling4.m -------------------------------------------------------------------------------- /detection/threshold_detection/test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/test.m -------------------------------------------------------------------------------- /detection/threshold_detection/不同模型检测概率_N=5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/detection/threshold_detection/不同模型检测概率_N=5.fig -------------------------------------------------------------------------------- /tracking/Kalman/data.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/data.mat -------------------------------------------------------------------------------- /tracking/Kalman/data_cv.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/data_cv.mat -------------------------------------------------------------------------------- /tracking/Kalman/data_cv2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/data_cv2.mat -------------------------------------------------------------------------------- /tracking/Kalman/generate_data.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/generate_data.m -------------------------------------------------------------------------------- /tracking/Kalman/generate_data_cv.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/generate_data_cv.m -------------------------------------------------------------------------------- /tracking/Kalman/kalman.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/kalman.m -------------------------------------------------------------------------------- /tracking/Kalman/main_nca.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/main_nca.m -------------------------------------------------------------------------------- /tracking/Kalman/main_ncv.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Kalman/main_ncv.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/NN_main.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/NN_main.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/NN_main2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/NN_main2.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/data.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/data.mat -------------------------------------------------------------------------------- /tracking/Measurement2Track/data2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/data2.mat -------------------------------------------------------------------------------- /tracking/Measurement2Track/generate_data.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/generate_data.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/generate_data2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/generate_data2.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/init_P.m: -------------------------------------------------------------------------------- 1 | function [P] = init_P(R, T) 2 | P = [R(1,1), R(1,1)/T, R(1,2), R(1,2)/T; ... 3 | R(1,1)/T, 2*R(1,1)/T^2, R(1,2)/T, 2*R(1,2)/T^2; ... 4 | R(1,2), R(1,2)/T, R(2,2), R(2,2)/T; ... 5 | R(1,2)/T, 2*R(1,2)/T^2, R(2,2)/T, 2*R(2,2)/T^2]; -------------------------------------------------------------------------------- /tracking/Measurement2Track/init_X.m: -------------------------------------------------------------------------------- 1 | function [X] = init_X(z1, z2, T) 2 | X = zeros(4, 2); 3 | X(:, 1) = [z1(1); 0; z1(2); 0]; 4 | X(:, 2) = [z2(1); (z2(1)-z1(1)) / T; z2(2); (z2(2) - z1(2)) / T]; -------------------------------------------------------------------------------- /tracking/Measurement2Track/main.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/main.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/main2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/main2.m -------------------------------------------------------------------------------- /tracking/Measurement2Track/monte_carlo.m: -------------------------------------------------------------------------------- 1 | clear; close all; clc; 2 | for mc_ii = 1:50 3 | fprintf('NO. %d\n', mc_ii); 4 | fprintf('generate data\n'); 5 | generate_data2; 6 | fprintf('NN\n'); 7 | NN_main2; 8 | fprintf('PDA\n'); 9 | main2; 10 | end -------------------------------------------------------------------------------- /tracking/Measurement2Track/monte_carlo1.m: -------------------------------------------------------------------------------- 1 | clear; close all; clc; 2 | 3 | for mc_ii = 1:50 4 | fprintf('NO. %d\n', mc_ii); 5 | fprintf('generate data\n'); 6 | generate_data; 7 | fprintf('NN\n'); 8 | NN_main; 9 | fprintf('PDA\n'); 10 | main; 11 | end -------------------------------------------------------------------------------- /tracking/Measurement2Track/单目标跟踪失败记录.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/单目标跟踪失败记录.xlsx -------------------------------------------------------------------------------- /tracking/Measurement2Track/多目标记录成功与失败次数.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/Measurement2Track/多目标记录成功与失败次数.xlsx -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/data_150.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/data_150.mat -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/data_50.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/data_50.mat -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/direct_method.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/direct_method.m -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/gate.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/gate.m -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/generate_data.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/generate_data.m -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/get_R.m: -------------------------------------------------------------------------------- 1 | function [R] = get_R(p, p0, sigma_rho, sigma_theta) 2 | delta_p = p - p0; 3 | [theta, rho] = cart2pol(delta_p(1), delta_p(2)); 4 | A = [cos(theta), -rho * sin(theta); ... 5 | sin(theta), rho * cos(theta)]; 6 | tmp = [sigma_rho ^ 2, 0; ... 7 | 0, sigma_theta ^ 2]; 8 | R = A * tmp * A'; -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/init_P.m: -------------------------------------------------------------------------------- 1 | function [P] = init_P(R, T) 2 | P = [R(1,1), R(1,1)/T, R(1,2), R(1,2)/T; ... 3 | R(1,1)/T, 2*R(1,1)/T^2, R(1,2)/T, 2*R(1,2)/T^2; ... 4 | R(1,2), R(1,2)/T, R(2,2), R(2,2)/T; ... 5 | R(1,2)/T, 2*R(1,2)/T^2, R(2,2)/T, 2*R(2,2)/T^2]; -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/init_Q.m: -------------------------------------------------------------------------------- 1 | function Q = init_Q(T, q) 2 | Q = [T^3 / 3, T^2 / 2, 0, 0; ... 3 | T^2 / 2, T, 0, 0; ... 4 | 0, 0, T^3 / 3, T^2 / 2; ... 5 | 0, 0, T^2 / 2, T]; 6 | Q = q * Q; -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/init_X.m: -------------------------------------------------------------------------------- 1 | function [X] = init_X(z1, z2, T) 2 | X = zeros(4, 2); 3 | X(:, 1) = [z1(1); 0; z1(2); 0]; 4 | X(:, 2) = [z2(1); (z2(1)-z1(1)) / T; z2(2); (z2(2) - z1(2)) / T]; -------------------------------------------------------------------------------- /tracking/TrajectoryFormation/logical_method.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aacirq/RadarDetectionAndTracking/70821814e77719b1c1e37a330ce050ab984017b9/tracking/TrajectoryFormation/logical_method.m --------------------------------------------------------------------------------