[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5749 - gnuradio/branches/features/ofdm/sync/gnuradio-
From: |
trondeau |
Subject: |
[Commit-gnuradio] r5749 - gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm |
Date: |
Fri, 8 Jun 2007 14:10:38 -0600 (MDT) |
Author: trondeau
Date: 2007-06-08 14:10:37 -0600 (Fri, 08 Jun 2007)
New Revision: 5749
Added:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/ofdm_sync_pn.m
Modified:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/plot_ofdm.m
Log:
updating m-files to be more useful. Use plot_ofdm with arguments specifying the
fft length and the number of occupied tone. It expects to find the files
ofdm_corr_out_c.dat and fft_out_c.dat generated when using the --log
command-line argument of benmark_ofdm.py or benchmark_ofdm_rx.py.
Added:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/ofdm_sync_pn.m
===================================================================
---
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/ofdm_sync_pn.m
(rev 0)
+++
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/ofdm_sync_pn.m
2007-06-08 20:10:37 UTC (rev 5749)
@@ -0,0 +1,21 @@
+mf = read_float_binary('ofdm_sync_pn-mf_f.dat');
+theta_pn = read_float_binary('ofdm_sync_pn-theta_f.dat');
+peaks_pn = read_char_binary('ofdm_sync_pn-peaks_b.dat');
+regen_pn = read_char_binary('ofdm_sync_pn-regen_b.dat');
+angle_pn = read_float_binary('ofdm_sync_pn-epsilon_f.dat');
+
+plot(mf, 'k')
+hold
+plot(theta_pn, 'g');
+plot(peaks_pn, 'r');
+plot(regen_pn, 'b');
+xlim([100, 50000]);
+ylim([0, 1])
+i = find(peaks_pn);
+i(100:200)
+hold off
+
+ipeaks = find(peaks_pn);
+dpeaks = diff(ipeaks);
+hist(dpeaks, 30)
+set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
Modified:
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/plot_ofdm.m
===================================================================
---
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/plot_ofdm.m
2007-06-08 19:57:46 UTC (rev 5748)
+++
gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm/plot_ofdm.m
2007-06-08 20:10:37 UTC (rev 5749)
@@ -1,74 +1,5 @@
-theta_pn = read_float_binary('ofdm_sync_pn-theta_f.dat');
-angle_pn = read_float_binary('ofdm_sync_pn-epsilon_f.dat');
-anglesh_pn = read_float_binary('ofdm_sync_pn-sample_and_hold_f.dat');
-plot(theta_pn, 'k')
+function plot_ofdm(fft_size, occ_tones)
-theta_pnac = read_float_binary('ofdm_sync_pnac-theta_f.dat');
-angle_pnac = read_float_binary('ofdm_sync_pnac-angle_f.dat');
-plot(theta_pnac)
-
-
-plot(theta_pn, 'b-')
-plot(angle_pn+0.5, 'y*')
-plot(anglesh_pn+0.5, 'g*')
-ylim([-0, 1.1])
-xlim([0, 10000])
-hold on
-plot(theta_ml+1, 'g')
-hold off
-
-
-mf = read_float_binary('ofdm_sync_pn-mf_f.dat');
-theta_pn = read_float_binary('ofdm_sync_pn-theta_f.dat');
-peaks_pn = read_char_binary('ofdm_sync_pn-peaks_b.dat');
-regen_pn = read_char_binary('ofdm_sync_pn-regen_b.dat');
-plot(mf, 'k')
-hold
-plot(theta_pn, 'g');
-plot(peaks_pn, 'r');
-plot(regen_pn, 'b');
-xlim([100, 50000]);
-ylim([0, 1])
-i = find(peaks_pn);
-i(100:200)
-hold off
-
-
-regen_pn = read_char_binary('ofdm_sync_pn-regen_b.dat');
-peaks_ml = read_char_binary('ofdm_sync_ml-peaks_b.dat');
-plot(regen_pn, 'b')
-hold
-plot(peaks_ml, 'r-.');
-xlim([7300, 17000]);
-ylim([0, 1])
-hold off
-
-
-
-
-ofdm_tx = read_complex_binary('txpath.dat');
-figure
-plot(real(ofdm_tx));
-hold on
-plot(imag(ofdm_tx), 'r');
-hold off
-
-peaks = read_char_binary('peaks_b.dat');
-ipeaks = find(peaks);
-dpeaks = diff(ipeaks);
-hist(dpeaks, 100)
-set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
-
-pll = read_char_binary('dpll_b.dat');
-ipll = find(pll);
-dpll = diff(ipll);
-hist(dpll, 100)
-set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
-
-
-fft_size = 128;
-occ_tones = 100;
-
ofdm = read_complex_binary('ofdm_corr_out_c.dat');
ofdm_split = split_vect(ofdm, occ_tones);
@@ -76,35 +7,59 @@
fftc_split = split_vect(fftc, fft_size);
figure(1)
+set(gcf, 'Position', [50 50 1000 600]);
+a = size(ofdm_split);
+if nargin == 3
+ maxcount = count;
+ if maxcount > a(1)
+ error('plot_ofdm:tolong', 'Requested count size exceeds size of
vectors');
+ end
+else
+ maxcount = a(1);
+end
+
for i = 1:20000
x = ofdm_split(i,:);
- y = fftc_split(i,:);
+ y = fftc_split(i+1,:);
- subplot(4,1,1)
+ subplot(2,2,1)
plot(real(x), imag(x), 'bo')
set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
axis([-1.5, 1.5, -1.5, 1.5])
+ title('I&Q Constellation', 'FontSize', 36);
+ xlabel('Inphase', 'FontSize', 32);
+ ylabel('Quadrature', 'FontSize', 32);
- subplot(4,1,2)
+ subplot(2,2,3)
plot(angle(x*j), 'bo')
set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
axis([0, occ_tones, -3.5, 3.5])
+ title('Equalized Symbol Angle', 'FontSize', 36);
+ xlabel('Bin Number (Occ. Tones)', 'FontSize', 32);
+ ylabel('Symbol Angle', 'FontSize', 32);
- subplot(4,1,3)
+ subplot(2,2,2)
plot(angle(y*j), 'bo')
set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
axis([0, fft_size, -3.5, 3.5])
+ title('Unequalized Symbol Angle', 'FontSize', 36);
+ xlabel('Bin Number (FFT Size)', 'FontSize', 32);
+ ylabel('Symbol Angle', 'FontSize', 32);
- subplot(4,1,4)
- plot(abs(y), 'b-')
+ Y = 20*log10(abs(y) ./ max(abs(y)));
+ subplot(2,2,4)
+ plot(Y, 'b-')
set(gca, 'FontSize', 30, 'FontWeight', 'Bold');
- xlim([0, fft_size])
-
+ axis([0, fft_size, -50, 1]);
+ title('Frequency Domain of Unequalized Rx', 'FontSize', 36);
+ xlabel('Bin Number (FFT Size)', 'FontSize', 32);
+ ylabel('Power (dB)', 'FontSize', 32);
+
% N = 20*log10(var(abs(x)-1))
disp(sprintf('Symbol Number: %d\n', i))
- disp(sprintf('\tFreq Error: %f\n', anglesh_pn(1+(i-1)*fft_size)))
+% disp(sprintf('\tFreq Error: %f\n', anglesh_pn(1+(i-1)*fft_size)))
pause
end
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5749 - gnuradio/branches/features/ofdm/sync/gnuradio-examples/python/ofdm,
trondeau <=