- fixed foff mixing

[CalcWiener]
- added debug text

git-svn-id: http://moon:8086/svn/matlab/trunk@74 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2015-05-03 16:58:18 +00:00
parent 7c1bd55a5e
commit d290cdf5d2
2 changed files with 9 additions and 6 deletions
+4 -2
View File
@@ -19,8 +19,10 @@ num_symbols_per_frame = num_symbols_per_frame * num_carrier_per_symbol;
f_cut_t = 0.0675*1/params.y; % two-sided maximum doppler frequency (normalized w.r.t symbol duration Ts)
f_cut_k = 1.75*Ng/Nu; % two-sided maximum echo delay (normalized w.r.t useful symbol duration Tu)
f_D_max = f_cut_t*12000/Ns/2
tau_max = f_cut_k*Nu/12000/2
f_D_max = f_cut_t*12000/Ns/2;
tau_max = f_cut_k*Nu/12000/2;
fprintf('Calculating Wiener filter with f_D_max=%f and tau_max=%f\n', f_D_max, tau_max);
W_syms = cell( params.y, 1 );
W_pilots = cell( params.y, 1 );
+5 -4
View File
@@ -43,8 +43,6 @@ fac_cell_list = ...
[carrier_pilot, phi_pilot, mag_pilot] = getRefFreq(drm_mode);
[carrier_time, phi_time, mag_time] = getRefTime(drm_mode);
[W_syms, W_pilots] = calcWiener(drm_mode, drm_bw);
filter_h = FIRCalcLowpass(0.25, 15);
N = ofdm_drm_params.nu;
Ng = ofdm_drm_params.ng;
@@ -60,6 +58,9 @@ carrier_indexes = c2i(N, carriers);
wav_numCh = wav_size(2);
wav_size = wav_size(1);
filter_h = FIRCalcLowpass(0.25, 15);
filter_z = [];
% --------------------------------------------------------------
% Determine data mode
% --------------------------------------------------------------
@@ -102,7 +103,6 @@ phi_mix = 0;
phi_foff = 0;
df_track = 0;
df_track_ = [];
filter_z = [];
max_H_plot = 0;
symbol_count = -1;
@@ -134,7 +134,7 @@ while(fileRemain > fileChunkSize) % ToDo: don't leave loop, if file has been con
x = x(1:4:length(x));
end
x = x.*exp(-j*(2*pi*(foff/fs)*(0:length(x)-1)' + phi_foff));
x = x.*exp(j*(2*pi*(foff/fs)*(0:length(x)-1)' + phi_foff));
phi_foff = mod(phi_foff + 2*pi*(foff/fs)*length(x), 2*pi);
if flip_spec
@@ -307,6 +307,7 @@ while(fileRemain > fileChunkSize) % ToDo: don't leave loop, if file has been con
H_raw = zeros(length(carriers),1);
fprintf('Channel estimation and symbol reception\n');
[W_syms, W_pilots] = calcWiener(drm_mode, drm_bw);
end
Z = transpose(buf_Z.read(N));