# Re: OFDM demodulation problem / example video

**URL:** <https://www.ruby-forum.com/t/re-ofdm-demodulation-problem-example-video/93604>\
**Category:** GNU Radio\
**Created:** [April 5, 2006, 1:56am UTC](https://www.ruby-forum.com/t/re-ofdm-demodulation-problem-example-video/93604 "2006-04-05T01:56:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [April 5, 2006, 1:56am UTC](https://www.ruby-forum.com/t/re-ofdm-demodulation-problem-example-video/93604/1 "2006-04-05T01:56:12Z")

</div>

Jens,

I used a complete ad-hoc method for automatic frequency estimation:  
tracing the minimum ratio of the power of DC over the total power of the  
remaining channels, averaged over all symbols in a frame.  
Your estimate seems quite good!

I atatch the .m file

I have not tried anything with the timing yet…

Achilleas

---

<div class="post-metadata">

**Author:** ![Achilleas\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Achilleas\_A](https://www.ruby-forum.com/u/Achilleas_A)\
**Post date:** [April 5, 2006, 5:41pm UTC](https://www.ruby-forum.com/t/re-ofdm-demodulation-problem-example-video/93604/2 "2006-04-05T17:41:52Z")

</div>

Achilleas,

my estimate is based on frequency domain correlation. Just count the  
offset of the maximum (o). Then estimate the fractional offset (fo) by  
taking the  
value left (l) and right ® of the maximum and calculate fo =  
(r-l)/(r+l).  
To compensate substract the resulting frequency offset (o+fo) from the  
received signal. Works as long the channel doesn’t interfere too much.

Jens

On Tue, Apr 04, 2006 at 07:52:58PM -0400, Achilleas A.  
wrote:

> Achilleas

> d\_re = fread(fid, 1000000, ‘float32’,4);  
> e = d\_re + j\*d\_im;
> 
> ```
> [m offset] = max(xc);
> glob_max = m
> 
> ```
> 
> % first OFDM symbol is used for synchronization - no data.  
> %dem=dem./abs(dem);  
> data\_l = data;
> 
> end
