Agora
1.2.0
Agora project
|
Functions | |
Pilot RX by socket | threads (=reference time) |
fprintf ("Average delay between rx thread and main thread: %.2f\n",... mean(pilot_recv(subset))) | |
fprintf ("In main thread: queueing delay: %.2f, FFT of pilots done: %.2f, ZF done: %.2f, IFFT done: %.2f, total: %.2f\n",... avg_proc_start, avg_fft_duration, avg_zf_duration,... avg_ifft_duration, avg_proc_duration) | |
fprintf ("Frame duration: %.2f, RX duration: %.5f, Processing delay: %.5f\n", avg_frame_duration, avg_rx_duration, avg_proc_duration-avg_rx_duration) | |
fprintf ("Pilot RX duration: %.2f\n", mean(pilot_rx_duration(subset))) | |
fprintf ("Process delay 99th: %.2f, ZF delay 99th: %.3f\n", proc_delay_99th, zf_delay_99th) | |
fprintf ("Process delay mean: %.2f (std: %.2f), ZF delay mean: %.2f\n", avg_proc_delay, std_proc_delay, avg_zf_duration) | |
fprintf ("DL processing duration: %.2f, std: %.2f\n", avg_proc_duration, std_proc_duration) | |
figure (1) | |
plot (fft_duration(1:frame_count), 'LineWidth', 2) | |
plot (fft_time_in_function(subset), 'LineWidth', 2) | |
plot (zf_time_in_function(subset), 'LineWidth', 2) | |
plot (demul_time_in_function(subset), 'LineWidth', 2) | |
plot (zf_duration(subset), 'LineWidth', 2) | |
set (gca, 'FontSize', 18) | |
xlabel ('Frame id') | |
ylabel ('Duration(us)') | |
legend ({ 'FFT in function', 'ZF in function', 'Demodulation in function', 'ZF'}) | |
figure (2) | |
plot (frame_duration_fft(subset), 'LineWidth', 2) | |
plot (frame_duration_zf(subset), 'LineWidth', 2) | |
plot (frame_duration_demul(subset), 'LineWidth', 2) | |
plot (frame_duration_rx(subset), 'LineWidth', 2) | |
plot (frame_duration_encode(subset), 'LineWidth', 2) | |
legend ({ 'FFT of pilots', 'ZF', 'Demodulation', 'RX', "Deocde"}) | |
figure (4) | |
plot (process_delay(1:frame_count), 'LineWidth', 2) | |
ylabel ('Delay(us)') | |
title ('Processing delay') figure(5) | |
set (h1, 'LineWidth', 2) | |
xlabel ('Delay(us)') | |
plot (pilot_recv(1:end) -frame_start(1:end), 'LineWidth', 2) | |
ylabel ('Time(us)') | |
title ('Delay between main thread and rx thread') % figure(8) | |
xlabel ('Time(us)') | |
fprintf ("In emulator: TX duration %.5f\n", avg_tx_duration) | |
figure (6) | |
plot (frame_duration_tx(subset), 'LineWidth', 24) | |
set (gca, 'FontSize', 24) | |
title ('TX duration') | |
figure (3) | |
set (h2, 'LineWidth', 2) | |
set (h3, 'LineWidth', 2, 'LineStyle', '--', 'Color', 'k') | |
xlabel ('Duration(us)') | |
legend ({sprintf('RX duration(avg:%.2f us)', avg_rx_duration),... sprintf('Precode done(avg:%.2f us)', avg_precode_duration),... sprintf('IFFT done(avg:%.2f us)', avg_proc_duration)}, 'Location', 'southeast') | |
title ('CDF of frame duration and processing duration')[f_proc_delay | |
fprintf ('99th:%.2f, max:%.2f\n', tail_proc_duration, max(frame_duration_ifft(subset))) | |
figure | ( | 1 | ) |
figure | ( | 2 | ) |
figure | ( | 3 | ) |
figure | ( | 4 | ) |
figure | ( | 6 | ) |
fprintf | ( | "DL processing duration: %. | 2f, |
std:%.2f\n" | , | ||
avg_proc_duration | , | ||
std_proc_duration | |||
) |
fprintf | ( | "Frame duration: %. | 2f, |
RX duration:%. | 5f, | ||
Processing delay:%.5f\n" | , | ||
avg_frame_duration | , | ||
avg_rx_duration | , | ||
avg_proc_duration- | avg_rx_duration | ||
) |
fprintf | ( | "In emulator: TX duration %.5f\n" | , |
avg_tx_duration | |||
) |
fprintf | ( | "In main thread: queueing delay: %. | 2f, |
FFT of pilots done:%. | 2f, | ||
ZF done:%. | 2f, | ||
IFFT done:%. | 2f, | ||
total:%.2f\n" | , | ||
avg_proc_start, | |||
avg_fft_duration | , | ||
avg_zf_duration | , | ||
avg_ifft_duration, | |||
avg_proc_duration | |||
) |
fprintf | ( | "Pilot RX duration: %.2f\n" | , |
mean(pilot_rx_duration(subset)) | |||
) |
fprintf | ( | "Process delay 99th: %. | 2f, |
ZF delay 99th:%.3f\n" | , | ||
proc_delay_99th | , | ||
zf_delay_99th | |||
) |
fprintf | ( | "Process delay mean: %.2f | std: %.2f, |
ZF delay mean:%.2f\n" | , | ||
avg_proc_delay | , | ||
std_proc_delay | , | ||
avg_zf_duration | |||
) |
fprintf | ( | '99th:%. | 2f, |
max:%.2f\n' | , | ||
tail_proc_duration | , | ||
max(frame_duration_ifft(subset)) | |||
) |
legend | ( | {sprintf('RX duration(avg:%.2f us)', avg_rx_duration),... sprintf('Precode done(avg:%.2f us)', avg_precode_duration),... sprintf('IFFT done(avg:%.2f us)', avg_proc_duration)} | , |
'Location' | , | ||
'southeast' | |||
) |
plot | ( | demul_time_in_function(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | fft_duration(1:frame_count) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | fft_time_in_function(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | frame_duration_demul(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | frame_duration_encode(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | frame_duration_fft(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | frame_duration_rx(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | frame_duration_tx(subset) | , |
'LineWidth' | , | ||
24 | |||
) |
plot | ( | frame_duration_zf(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | pilot_recv(1:end) -frame_start(1:end) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | process_delay(1:frame_count) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | zf_duration(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
plot | ( | zf_time_in_function(subset) | , |
'LineWidth' | , | ||
2 | |||
) |
set | ( | gca | , |
'FontSize' | , | ||
18 | |||
) |
set | ( | gca | , |
'FontSize' | , | ||
24 | |||
) |
set | ( | h1 | , |
'LineWidth' | , | ||
2 | |||
) |
set | ( | h2 | , |
'LineWidth' | , | ||
2 | |||
) |
set | ( | h3 | , |
'LineWidth' | , | ||
2 | , | ||
'LineStyle' | , | ||
'--' | , | ||
'Color' | , | ||
'k' | |||
) |
Pilot RX by socket threads | ( | ) |
title | ( | 'CDF of frame duration and processing duration' | ) |
title | ( | 'Delay between main thread and rx thread' | ) |
title | ( | 'Processing delay' | ) |
title | ( | 'TX duration' | ) |
xlabel | ( | 'Delay(us)' | ) |
xlabel | ( | 'Duration(us)' | ) |
xlabel | ( | 'Frame id' | ) |
xlabel | ( | 'Time(us)' | ) |
ylabel | ( | 'Delay(us)' | ) |
ylabel | ( | 'Duration(us)' | ) |
ylabel | ( | 'Time(us)' | ) |
all_pilot_received = temp{4} |
avg_fft_duration = mean(fft_duration(subset)) |
avg_frame_duration = mean(frame_duration(subset)) |
avg_ifft_duration = mean(ifft_duration(subset)) |
avg_precode_duration = mean(frame_duration_precode(subset)) |
avg_proc_delay = mean(process_delay(subset)) |
avg_proc_duration = mean(frame_duration_ifft(subset)) |
avg_proc_start = mean(process_start(subset)) |
avg_rx_duration = mean(frame_duration_rx(subset)) |
avg_tx_duration = mean(frame_duration_tx(1200:length(frame_duration_tx)-1)) |
avg_zf_duration = mean(zf_duration(subset)) |
clf |
demul_duration = demul_processed-zf_processed |
encode_processed = temp{9} |
fft_duration = fft_processed |
fft_processed = temp{5} |
fid = fopen('../files/experiment/timeresult.txt') |
frame_count = length(precode_processed) |
frame_duration = diff(frame_start) |
frame_duration_encode = encode_processed |
frame_duration_fft = fft_processed |
frame_duration_ifft = ifft_processed |
frame_duration_precode = precode_processed |
frame_duration_processing = max([frame_duration,frame_duration_encode(1:end-1)],[],2) |
frame_duration_rx = rx_processed |
frame_duration_rx1 = diff(frame_start) |
frame_duration_tx = diff(frame_ends) |
frame_duration_zf = zf_processed |
frame_ends =temp{1} |
frame_start = temp{1} |
h1 = cdfplot(process_delay(subset)) |
h2 =cdfplot(frame_duration_precode(subset)) |
h3 =cdfplot(frame_duration_tx(1200:length(frame_duration_tx)-1)) |
ifft_duration = ifft_processed - zf_duration |
ifft_processed = temp{8} |
index = [1:frame_count] |
Pilot RX by socket kEncodeDone |
Pilot RX by socket kFFTDone |
Pilot RX by socket kIFFTDone |
Pilot RX by socket kPilotAllRX |
Pilot RX by socket kPilotRX |
Pilot RX by socket kPrecodeDone |
Pilot RX by socket kProcessingStarted |
Pilot RX by socket kZFDone |
grid on |
pilot_recv =temp{2} |
pilot_rx_duration = all_pilot_received |
precode_processed = temp{7} |
proc_delay_99th = x_set(1) |
process_delay = demul_processed-rx_processed |
process_start = temp{3} |
queueing_delay = process_start |
rx_processed = temp{10} |
std_proc_delay = std(process_delay(subset)) |
std_proc_duration = std(frame_duration_ifft(subset)) |
subset = index(1200:frame_count-2) |
tail_proc_duration = x_set(1) |
temp = textscan(fid,"%f%f%f%f%f%f%f%f%f%f", 'HeaderLines',2) |
x_proc_delay = ecdf(frame_duration_ifft(subset)) |
x_set = x_proc_delay(f_proc_delay>0.99) |
zf_delay_99th = x_set(1) |
zf_duration = zf_processed-fft_processed |
zf_processed = temp{6} |