hi everyone, I am trying to understand how to calculate the phase angle, delay, and multipath signal. I hope everyone can help me for ideas.
My scenario: I have a radio hardware (SDR) with rx1 and rx2, and the TV station (center frequency = 533MHZ, bandwidth = 6MHz), with 4.8 km distance away from me (from google map to measure a distance). From FCC data base that I have information for the TX (latitude, longitude, antenna height, and model...).
First, I calculate the phase between 2 antennas:
%%%%%%
x = .... ; % complex data from rx1
y = .... ; % complex data from rx2
x = x - mean(x); X = fft(x);
y = y - mean(y); Y = fft(y);
[mag_x idx_x] = max(abs(X));
[mag_y idx_y] = max(abs(Y));
px = angle(X(idx_x));
py = angle(Y(idx_y));
phase_lag = py - px;
%%%%%
is it correct? then trying to calculate the multipath signal:
speed_of_light = 3e8 ; % m/s
distance = 3 * 1.6;
freq = 533e6;
lamda = speed_of_light / freq;
k = 2 * pi / lamda;
x = distance / 2;
y = 0;
w = 2 * pi * freq;
phase = 0;
delta = 1e-6; % delay
i = sqrt(-1);
t = 0:0.01:1;
degree = 0;
mutilpath = zeros(1,length(t));
index = 10;
for j = 1: index
mutilpath = mutilpath + exp(i * (k * (x * cos(phase+degree) + y * ... sin(phase+degree)) - w * (t - delta)));
degree = degree + pi/6;
end
figure(1), plot(t,abs(mutilpath));
figure(2), plot(t,angle(mutilpath));
%figure(3), plot(t,abs(mutilpath));
%figure(4), plot(t,angle(mutilpath));
%%%%%%%%%
when i set index = 1; i have a plot abs(mutilpath) is a straight line (figure1)
when i set index = ! 1; i have a plot abs(mutilpath) is a different line (figure3)
I have a bad feeling that i am not doing right.
If everyone have ideas, please recommend.
Thank you very much.