# Ofdm parameters

**URL:** <https://www.ruby-forum.com/t/ofdm-parameters/230518>\
**Category:** GNU Radio\
**Created:** [June 21, 2014, 4:01pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518 "2014-06-21T16:01:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 21, 2014, 4:01pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/1 "2014-06-21T16:01:55Z")

</div>

Hello ,

I want to implement ofdm system with these parameters:

FFT length=128

Occupied subcarriers=117.

4 pilots

1 DC

6 zeros subcarriers .

I put these parameters in ofdm tx & ofdm Rx:

Occupied carriers =(range(-58,-42)+range(-41, -14) + range(-13, -7) +  
range(-6, 0) + range(1, 7) + range(7, 14) + range(15, 42)+range(43,60),)

pilots carriers=((-42, -14, 14, 42,),)

pilot symbols =(((-1,1j),(1,-1j),(-1,1j),(-1j,1),),)

But I got this error , I don’t understand what is wrong

File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/digital/digital\_swig.py”,  
line 4635, in make  
return \_digital\_swig.ofdm\_equalizer\_simpledfe\_make(\*args, \*\*kwargs)  
TypeError: in method ‘ofdm\_equalizer\_simpledfe\_make’, argument 5 of type  
'std::vector\< std::vector\< gr\_complex,std::allocator\< gr\_complex \>

> ,std::allocator\< std::vector\< gr\_complex,std::allocator\< gr\_complex \> \> \>  
> const &’

Thanks.

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [June 21, 2014, 4:30pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/2 "2014-06-21T16:30:28Z")

</div>

Hello Sara,

It’s hard to tell without you offering us the actual line where you call  
make, but from looking at your symbols variable I’d say you have a tuple  
containing a tuple of tuples of floats,  
and what you need would be a  
tuple of tuples containing complexes.

Note that (1,1j) is _not_ a complex, but 1+1j is.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [June 22, 2014, 5:11pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/3 "2014-06-22T17:11:46Z")

</div>

Thanks Marcus .  
I want to append 2 plots on same graph ( the transmitted signal and the  
received signal ) . I connected WX GUI scope sink to the ofdm tx and  
another one to the ofdm rx . I put CFO model & channel model between the  
tx  
& rx . I want to compare between the signals while changing offset and  
noise. How can I append them on same graph ? & Is there any other method  
to  
plot in GNU Radio ?

Thanks in advance .

2014-06-21 17:29 GMT+03:00 Marcus Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [June 22, 2014, 5:31pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/4 "2014-06-22T17:31:58Z")

</div>

Hi Sara,  
when looking into the “Instrumentation” Category in the Companion, you  
will notice two subcategories with several different visualization  
types.  
On many of these, you can set a number of input ports.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [June 23, 2014, 7:30pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/5 "2014-06-23T19:30:07Z")

</div>

Hi Sara,  
On 23.06.2014 18:31, Sara C. wrote:

> I plot the signal before the tx and after the rx on same graph to compare  
> between them while increasing noise to know how much noise can affect it  
> for different types of channel & frequency offset . But when I set noise to  
> zero , I find that the 2 signals are not the same ! why ?! They may be the  
> same but they are not synchronized . How to solve this problem ?  
> (Attached the loopback.grc & the graph)  
> If one is delayed longer than the other, use the delay block to  
> compensate for this.

> (range(-61,-42)+range(-41, -14) + range(-13, -7) + range(-6, 0) + range(1,  
> 7) + range(7, 14) + range(15, 42)+range(43,62),) , ((-42, -14, 14, 42,),)  
> ) ?  
> Ok, this is a little much python parsing to do it in my head. Have you  
> verified that len() is actually correct? For  
> my python interpreter, it’s 117, not 128, just like the error said.  
> sync\_word1=None , sync\_word2=None  
> File  
> “/usr/local/lib/python2.7/dist-packages/gnuradio/digital/digital\_swig.py”,  
> line 4312, in make  
> return \_digital\_swig.ofdm\_carrier\_allocator\_cvc\_make(\*args, \*\*kwargs)  
> TypeError: in method ‘ofdm\_carrier\_allocator\_cvc\_make’, argument 5 of type  
> 'std::vector\< std::vector\< gr\_complex,std::allocator\< gr\_complex \>
> 
> > ,std::allocator\< std::vector\< gr\_complex,std::allocator\< gr\_complex \> \> \>  
> > const &’  
> > Again, this is a type error which has to do with the content and/or  
> > shape of your parameters. You’ll have to figure this one out yourself.

> Thanks is advance  
> No problem! However, I feel that you tend to ask questions that, with a  
> little more investigative vigor, you would have answered yourself, so  
> maybe it would pay to work a little more thoroughly before mailing the  
> list. That being said, whenever you’re stuck, feel absolutely free and  
> encouraged to ask!

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [June 23, 2014, 6:33pm UTC](https://www.ruby-forum.com/t/ofdm-parameters/230518/6 "2014-06-23T18:33:37Z")

</div>

## I plot the signal before the tx and after the rx on same graph to compare between them while increasing noise to know how much noise can affect it for different types of channel & frequency offset . But when I set noise to zero , I find that the 2 signals are not the same ! why ?! They may be the same but they are not synchronized . How to solve this problem ? (Attached the loopback.grc & the graph)

Second , There is a variable called sync word , I know that it is for  
synchronization using schmidl and cox algorithm & I know that is takes  
fft length & occupied carriers & pilot carriers  
as it is written in "ofdm\_rxrx.py  
“if sync\_word1 is None:  
self.sync\_word1 = \_make\_sync\_word1(fft\_len,  
occupied\_carriers,  
pilot\_carriers)”

## But why I get an error syaying that " sync words must be fft length" when I write in sync word 1 & sync word 2 fields in the tx & rx block : (128, (range(-61,-42)+range(-41, -14) + range(-13, -7) + range(-6, 0) + range(1, 7) + range(7, 14) + range(15, 42)+range(43,62),) , ((-42, -14, 14, 42,),) ) ?

Third , I tried my parameters in loopback example & I got no error , but  
I  
want to try tx\_ofdm.grc with my parameters & put file sink after each  
block  
to understand , but I got an error in tx\_ofdm.grc . Why I got an error  
while the same parameters don’t give an error in loopback ?!!  
Only I changed these parameters to be mine in tx & rx :  
fft len=128 , CP =fft\_len/8=16 , packet length=87  
occupied carriers = (range(-61,-42)+range(-41, -14) + range(-13, -7) +  
range(-6, 0) + range(1, 7) + range(7, 14) + range(15, 42)+range(43,62),)  
pilot carriers : ((-42, -14, 14, 42,),)  
pilot symbols : (((-1+1j),(1-1j),(-1+1j),(-1-1j),),)  
sync\_word1=None , sync\_word2=None

Here is the full output when executing :  
Using Volk machine: sse4\_2\_64\_orc  
Traceback (most recent call last):  
File “/home/sara/trials/tx\_ofdm.py”, line 241, in   
tb = tx\_ofdm()  
File “/home/sara/trials/tx\_ofdm.py”, line 100, in **init**  
self.digital\_ofdm\_carrier\_allocator\_cvc\_0 =  
digital.ofdm\_carrier\_allocator\_cvc(fft\_len, occupied\_carriers,  
pilot\_carriers, pilot\_symbols, (sync\_word1, sync\_word2), length\_tag\_key)  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/digital/digital\_swig.py”,  
line 4312, in make  
return \_digital\_swig.ofdm\_carrier\_allocator\_cvc\_make(\*args,  
\*\*kwargs)  
TypeError: in method ‘ofdm\_carrier\_allocator\_cvc\_make’, argument 5 of  
type  
'std::vector\< std::vector\< gr\_complex,std::allocator\< gr\_complex \>

> ,std::allocator\< std::vector\< gr\_complex,std::allocator\< gr\_complex \> \> \>  
> const &’

Thanks is advance

2014-06-22 18:30 GMT+03:00 Marcus Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
