commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5595 - gnuradio/branches/features/ofdm/receiver/gnura


From: matt
Subject: [Commit-gnuradio] r5595 - gnuradio/branches/features/ofdm/receiver/gnuradio-examples/python/ofdm
Date: Fri, 1 Jun 2007 15:57:29 -0600 (MDT)

Author: matt
Date: 2007-06-01 15:57:28 -0600 (Fri, 01 Jun 2007)
New Revision: 5595

Added:
   
gnuradio/branches/features/ofdm/receiver/gnuradio-examples/python/ofdm/ofdm_sync.m
Log:
octave sync code


Added: 
gnuradio/branches/features/ofdm/receiver/gnuradio-examples/python/ofdm/ofdm_sync.m
===================================================================
--- 
gnuradio/branches/features/ofdm/receiver/gnuradio-examples/python/ofdm/ofdm_sync.m
                          (rev 0)
+++ 
gnuradio/branches/features/ofdm/receiver/gnuradio-examples/python/ofdm/ofdm_sync.m
  2007-06-01 21:57:28 UTC (rev 5595)
@@ -0,0 +1,26 @@
+%
+
+function theta = ofdm_sync(signal,SNR,FFTSIZE,CPLEN)
+
+  rho = SNR/(SNR+1);
+
+  d = abs(signal).^2;
+  g = [ zeros(1,FFTSIZE) signal(1:max(size(signal))-FFTSIZE) ];
+  f = abs(g).^2;
+  c = d + f;
+  moving_sum_taps = rho/2 * ones(1,CPLEN);
+  b = conv(c,moving_sum_taps);
+  b = b(1:max(size(signal)));
+
+  k = g .* signal;
+
+  moving_sum_taps2 = ones(CPLEN,1);
+  h = conv(k,moving_sum_taps2);
+  h = h(1:max(size(signal)));
+  
+  a = abs(h).^2;
+  
+
+  theta = a-b;
+
+endfunction





reply via email to

[Prev in Thread] Current Thread [Next in Thread]