Add experiment

This commit is contained in:
Ksyer
2024-05-09 16:48:29 +08:00
parent 06b3aa1a6d
commit d7b4d9beb2
7 changed files with 173 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
clc; clear;
configure_parameters;
global s_T s_R c
% 时域上的匹配滤波
matched_filter = conv(s_R, fliplr(s_T), 'same');
[~, peak] = max(matched_filter);
t_delay = peak / length(matched_filter) - 0.5;
d = (c * t_delay) / 2;
fprintf("r = %f, predict d = %f\n", r_0, d);
fprintf("eps = %f\n", abs(r_0 - d));
figure(1);
subplot(311);
plot(t, s_T);
title("Chirp signal");
subplot(312);
plot(t, s_R);
title("Received Chirp signal");
subplot(313);
plot(t, matched_filter);
title("Matcher filter");