[RX]
- added SFO estimation (Zwischenstand) git-svn-id: http://moon:8086/svn/matlab/trunk@85 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
+17
-2
@@ -105,6 +105,7 @@ phi_foff = 0;
|
||||
phi_track = 0;
|
||||
df_track = 0;
|
||||
df_track_ = [];
|
||||
sfo_ = [];
|
||||
max_H_plot = 0;
|
||||
|
||||
fileRemain = wav_size;
|
||||
@@ -360,13 +361,24 @@ while((fileRemain > fileChunkSize) | (buf_recv.len() > 2*N)) % ToDo: don't leave
|
||||
H_too_small_index = find( abs(H_syms)<equalizer.eps_abs_h );
|
||||
H_syms( H_too_small_index ) = equalizer.eps_abs_h;
|
||||
|
||||
% SFO
|
||||
% CTO per carrier
|
||||
c_sfo = H_syms.' .* conj(H_raw(carrier_indexes)) + equalizer.eps_abs_h;
|
||||
sum_sfoL = sum(c_sfo(1:103));
|
||||
sum_sfoH = sum(c_sfo(105:207));
|
||||
sfoL = angle(sum_sfoL);
|
||||
sfoH = angle(sum_sfoH);
|
||||
sfo_ = [sfo_ 2*fs/(2*pi*N)*(sfoH - sfoL)];
|
||||
|
||||
% equalize symbol
|
||||
sym_eq = sym ./ H_syms;
|
||||
if strcmpi(plot_mode, 'h_pilots')
|
||||
subplot(2, 1, 1)
|
||||
subplot(3, 1, 1)
|
||||
plot(1:length(Hr), abs(Hr), 'b-', 1:length(H_pilots), abs(H_pilots), 'r-'); grid;
|
||||
subplot(2, 1, 2)
|
||||
subplot(3, 1, 2)
|
||||
plot(1:length(Hr), angle(Hr), 'b-', 1:length(H_pilots), angle(H_pilots), 'r-'); grid;
|
||||
subplot(3, 1, 3)
|
||||
plot(1:length(c_sfo), angle(c_sfo), 'b-'); grid;
|
||||
title(str);
|
||||
pause(0.01);
|
||||
end
|
||||
@@ -431,6 +443,9 @@ subplot(4, 1, 4)
|
||||
plot(0:length(df_track_)-1, df_track_); grid; title('df_{track}')
|
||||
hold on;
|
||||
|
||||
figure;
|
||||
plot(0:length(sfo_)-1, sfo_); grid; title('SFO');
|
||||
|
||||
% --------------------------------------------------------------
|
||||
% Write wave files
|
||||
% --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user