Borrar filtros
Borrar filtros

waterfall diagram problem for lfm signals like chirp

5 visualizaciones (últimos 30 días)
Rohitashya
Rohitashya el 13 de Dic. de 2023
Editada: Rangesh el 28 de Dic. de 2023
write a code in matlab about a transmitter transmitting a linear frequency modulating signalwave to 4 target receivers sererated by a vector r and angle phi vector .Draw the waterfall diagram of the phase delayed signals received by 60 hydrophones near the transmitter each hydrophone is seprated by lambda by 2
The figure is coming distorted how can I improvise
my code
% Parameters
c = 1500; % Speed of sound in water (m/s)
f_start = 50e3; % Starting frequency of the LFM signal (Hz)
f_end = 100e3; % Ending frequency of the LFM signal (Hz)
T = 1; % Pulse duration (s)
Fs = 1e6; % Sampling frequency (Hz)
lambda = c / f_start; % Wavelength (m)
delta_lambda = lambda / 2; % Distance between hydrophones (m)
num_hydrophones = 60; % Number of hydrophones
num_receivers = 4; % Number of receivers
% Transmitter coordinates
tx_coords = [0, 0];
% Receiver coordinates
receiver_coords = [100, 0; 0, 100; -100, 0; 0, -100];
% Hydrophone coordinates
hydrophone_coords = zeros(num_hydrophones, 2);
for i = 1:num_hydrophones
hydrophone_coords(i, :) = [cos(2*pi*(i-1)/num_hydrophones), sin(2*pi*(i-1)/num_hydrophones)] * delta_lambda * (i-1);
end
% Generate linear frequency modulated signal
t = 0:1/Fs:T;
lfm_signal = chirp(t, f_start, T, f_end, 'linear');
% Calculate distances and angles
distances = zeros(num_hydrophones, num_receivers);
angles = zeros(num_hydrophones, num_receivers);
for i = 1:num_hydrophones
for j = 1:num_receivers
distances(i, j) = norm(hydrophone_coords(i, :) - receiver_coords(j, :));
angles(i, j) = atan2(hydrophone_coords(i, 2) - receiver_coords(j, 2), hydrophone_coords(i, 1) - receiver_coords(j, 1));
end
end
% Calculate phase delays
phase_delays = distances / lambda;
received_signals = zeros(num_hydrophones, length(lfm_signal));
% Simulate the received signals
for i = 1:num_hydrophones
for j = 1:num_receivers
received_signals(i, :) = received_signals(i, :) + lfm_signal .* exp(1i*(2*pi*f_start + 2*pi*(f_end - f_start)/(2*T)*t - phase_delays(i, j) + angles(i, j)));
end
end
% Waterfall diagram
figure;
imagesc(abs(received_signals));
colormap('jet');
colorbar;
xlabel('Sample');
ylabel('Hydrophone');
title('Waterfall Diagram of Phase-Delayed LFM Signals');

Respuestas (1)

Rangesh
Rangesh el 28 de Dic. de 2023
Editada: Rangesh el 28 de Dic. de 2023
Hello Rohitshya,
From my understanding, you would like to know why the plot of LFM signals looks distorted.
There are few things which I feel which might be the problem in the following code:
  • You have determined the distances from the hydrophones to the receiver targets, but it is also necessary to account for the distances between the transmitter and the receiver targets.
distances(i, j) = norm(hydrophone_coords(i, :) - receiver_coords(j, :))+norm(receiver_coord(j,:));
  • As for the signal received, there will be delay due to the distance. So, the phase delay of the signals would be
phase_delays = distances /c ;%where c is the sound of water
  • The received samples by the hydrophones experience a shift due to delays caused by the varying distances between target receiver and each hydrophone. These shifts were not accounted for in the calculations.
  • It appears that all received signals have been summed directly without accounting for any time delays, although phase shifts have been taken into consideration. Suppose is delay of the signal, the received signal is given by, where is the carrier frequency and the is the signal sent from the transmitter.
To better visualize you can make use of the function “waterfall” which will create a waterfall plot from the received signals: https://www.mathworks.com/help/matlab/ref/waterfall.html
I believe the above suggestions would resolve your query.

Categorías

Más información sobre Signal Radiation and Collection en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by