Question about the synchronization symbol used in ofdm example

Hello all:
Thank you in advance.I have two questions about the symbol
used in ofdm example.
1.The first synchronization symbol is:
n1=00000001.414213538169860-1.4142135381698601.414213538169860-1.414213538169860-1.414213538169860-1.4142135381698601.414213538169860-1.4142135381698601.414213538169860-1.414213538169860-1.414213538169860-1.414213538169860-1.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.41421353816986000000
As the algorithm said,the first half of the symbol is same
to the second half of the symbol.
But i do ifft(n1) in matlab,and the result is
0.0441941730678082 + 0.00000000000000i0.0644254533894132 +
0.175326551876726i-0.0367461119467220 -
0.0453679674017572i0.0265416620395810 +
0.0320366536443552i-0.0985725617473446 -
0.0915672254739864i-0.0570202679872770 +
0.0717009594634221i0.00862185545503520 -
0.0331748224844260i0.0431267759560735 -
0.101430672698735i0.0937499983955371 +
0.0624999989303581i-0.116910980048072 +
0.0875939237146428i0.0433449944244991 +
0.00659888247777708i0.0708002546250446 -
0.00739045916472342i0.00700533627335824 -
0.105577898020703i-0.0292347816053780 +
0.0541379637893818i0.0245529670293908 -
0.0678979614538899i-0.237561871221452 +
0.0681675029413550i0.00000000000000 + 0.00000000000000i0.237561871221452

  • 0.0681675029413550i-0.0245529670293908 -
    0.0678979614538899i0.0292347816053780 +
    0.0541379637893818i-0.00700533627335823 -
    0.105577898020703i-0.0708002546250446 -
    0.00739045916472342i-0.0433449944244991 +
    0.00659888247777708i0.116910980048072 +
    0.0875939237146428i-0.0937499983955371 +
    0.0624999989303581i-0.0431267759560735 -
    0.101430672698735i-0.00862185545503520 -
    0.0331748224844260i0.0570202679872771 +
    0.0717009594634221i0.0985725617473446 -
    0.0915672254739864i-0.0265416620395810 +
    0.0320366536443552i0.0367461119467220 -
    0.0453679674017572i-0.0644254533894132 +
    0.175326551876726i-0.0441941730678082 +
    0.00000000000000i-0.0644254533894132 -
    0.175326551876726i0.0367461119467220 +
    0.0453679674017572i-0.0265416620395810 -
    0.0320366536443552i0.0985725617473446 +
    0.0915672254739864i0.0570202679872770 -
    0.0717009594634221i-0.00862185545503520 +
    0.0331748224844260i-0.0431267759560735 +
    0.101430672698735i-0.0937499983955371 -
    0.0624999989303581i0.116910980048072 -
    0.0875939237146428i-0.0433449944244991 -
    0.00659888247777708i-0.0708002546250446 +
    0.00739045916472342i-0.00700533627335824 +
    0.105577898020703i0.0292347816053780 -
    0.0541379637893818i-0.0245529670293908 +
    0.0678979614538899i0.237561871221452 -
    0.0681675029413550i0.00000000000000 +
    0.00000000000000i-0.237561871221452 -
    0.0681675029413550i0.0245529670293908 +
    0.0678979614538899i-0.0292347816053780 -
    0.0541379637893818i0.00700533627335823 +
    0.105577898020703i0.0708002546250446 +
    0.00739045916472342i0.0433449944244991 -
    0.00659888247777708i-0.116910980048072 -
    0.0875939237146428i0.0937499983955371 -
    0.0624999989303581i0.0431267759560735 +
    0.101430672698735i0.00862185545503520 +
    0.0331748224844260i-0.0570202679872771 -
    0.0717009594634221i-0.0985725617473446 +
    0.0915672254739864i0.0265416620395810 -
    0.0320366536443552i-0.0367461119467220 +
    0.0453679674017572i0.0644254533894132 - 0.175326551876726i
    The first half of the symbol in time domain isn’t same to
    the second half of the symbol.It is a fault?
    2.I read the document fft_vcc_fftw.cc
    gr_complex dst = d_fft->get_inbuf();
    unsigned int len = (unsigned int)(floor(d_fft_size/2.0));
    // half length of complex array
    memcpy(&dst[0], &in[len], sizeof(gr_complex)
    (d_fft_size -
    len));
    memcpy(&dst[d_fft_size - len], &in[0],
    sizeof(gr_complex)*len);
    Before doing the ifft operation,should I first do this?
    Thank you very much.
    Best regards,
    kun

​Hello Kun,

Could you please verify whether the input to the FFT call are supposed
to
be shifted or not?

Best,
Aditya​

Hello Aditya:
I think it should be shifted.In the transmitter of
the OFDM,the ifft operation is adopted.
Another phenomenon I have found that the result of
the input data go through the FFT block (gnuradio)isn’t same to the
result in matlab(just ifft(data)).Can you explain it?

Best regards,
Kun

At 2014-11-03 00:00:29, “Aditya D.” [email protected] wrote:

Hello Kun,

Could you please verify whether the input to the FFT call are supposed
to be shifted or not?

Best,
Aditya

On Sun, Nov 2, 2014 at 10:44 AM, xianda [email protected]
wrote:

Hello all:
Thank you in advance.I have two questions about the symbol
used in ofdm example.
1.The first synchronization symbol is:
n1=00000001.414213538169860-1.4142135381698601.414213538169860-1.414213538169860-1.414213538169860-1.4142135381698601.414213538169860-1.4142135381698601.414213538169860-1.414213538169860-1.414213538169860-1.414213538169860-1.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.414213538169860-1.4142135381698601.4142135381698601.4142135381698601.41421353816986000000
As the algorithm said,the first half of the symbol is same
to the second half of the symbol.
But i do ifft(n1) in matlab,and the result is
0.0441941730678082 + 0.00000000000000i0.0644254533894132 +
0.175326551876726i-0.0367461119467220 -
0.0453679674017572i0.0265416620395810 +
0.0320366536443552i-0.0985725617473446 -
0.0915672254739864i-0.0570202679872770 +
0.0717009594634221i0.00862185545503520 -
0.0331748224844260i0.0431267759560735 -
0.101430672698735i0.0937499983955371 +
0.0624999989303581i-0.116910980048072 +
0.0875939237146428i0.0433449944244991 +
0.00659888247777708i0.0708002546250446 -
0.00739045916472342i0.00700533627335824 -
0.105577898020703i-0.0292347816053780 +
0.0541379637893818i0.0245529670293908 -
0.0678979614538899i-0.237561871221452 +
0.0681675029413550i0.00000000000000 + 0.00000000000000i0.237561871221452

  • 0.0681675029413550i-0.0245529670293908 -
    0.0678979614538899i0.0292347816053780 +
    0.0541379637893818i-0.00700533627335823 -
    0.105577898020703i-0.0708002546250446 -
    0.00739045916472342i-0.0433449944244991 +
    0.00659888247777708i0.116910980048072 +
    0.0875939237146428i-0.0937499983955371 +
    0.0624999989303581i-0.0431267759560735 -
    0.101430672698735i-0.00862185545503520 -
    0.0331748224844260i0.0570202679872771 +
    0.0717009594634221i0.0985725617473446 -
    0.0915672254739864i-0.0265416620395810 +
    0.0320366536443552i0.0367461119467220 -
    0.0453679674017572i-0.0644254533894132 +
    0.175326551876726i-0.0441941730678082 +
    0.00000000000000i-0.0644254533894132 -
    0.175326551876726i0.0367461119467220 +
    0.0453679674017572i-0.0265416620395810 -
    0.0320366536443552i0.0985725617473446 +
    0.0915672254739864i0.0570202679872770 -
    0.0717009594634221i-0.00862185545503520 +
    0.0331748224844260i-0.0431267759560735 +
    0.101430672698735i-0.0937499983955371 -
    0.0624999989303581i0.116910980048072 -
    0.0875939237146428i-0.0433449944244991 -
    0.00659888247777708i-0.0708002546250446 +
    0.00739045916472342i-0.00700533627335824 +
    0.105577898020703i0.0292347816053780 -
    0.0541379637893818i-0.0245529670293908 +
    0.0678979614538899i0.237561871221452 -
    0.0681675029413550i0.00000000000000 +
    0.00000000000000i-0.237561871221452 -
    0.0681675029413550i0.0245529670293908 +
    0.0678979614538899i-0.0292347816053780 -
    0.0541379637893818i0.00700533627335823 +
    0.105577898020703i0.0708002546250446 +
    0.00739045916472342i0.0433449944244991 -
    0.00659888247777708i-0.116910980048072 -
    0.0875939237146428i0.0937499983955371 -
    0.0624999989303581i0.0431267759560735 +
    0.101430672698735i0.00862185545503520 +
    0.0331748224844260i-0.0570202679872771 -
    0.0717009594634221i-0.0985725617473446 +
    0.0915672254739864i0.0265416620395810 -
    0.0320366536443552i-0.0367461119467220 +
    0.0453679674017572i0.0644254533894132 - 0.175326551876726i
    The first half of the symbol in time domain isn’t same to
    the second half of the symbol.It is a fault?
    2.I read the document fft_vcc_fftw.cc
    gr_complex dst = d_fft->get_inbuf();
    unsigned int len = (unsigned int)(floor(d_fft_size/2.0));
    // half length of complex array
    memcpy(&dst[0], &in[len], sizeof(gr_complex)
    (d_fft_size -
    len));
    memcpy(&dst[d_fft_size - len], &in[0],
    sizeof(gr_complex)*len);
    Before doing the ifft operation,should I first do this?
    Thank you very much.
    Best regards,
    kun

On 11/02/2014 04:44 PM, xianda wrote:

Hello all:
Thank you in advance.I have two questions about the symbol
used in ofdm example.
1.The first synchronization symbol is:

n1=00000001.414213538169860[…]

Waah lots of numbers.

If the first half wasn’t identical to the second half, this wouldn’t
work. Also, it’s a mathemetical necessity given every 2nd sub-carrier is
zero that the halfs be equal.

However, they don’t have t have the same sign. See this line in the
OFDM sync block:

64 gr::filter::fir_filter_ccf::sptr delay_ma(
gr::filter::fir_filter_ccf::make(
1, std::vector(
fft_len/2, use_even_carriers ? 1.0 : -1.0
)
)
);

The reason is basic FFT math (hint: phase shift in one domain equals
what in the other domain?).

Literally all you needed to do was plot the ifft() results and you would
have seen this.

         Before doing the ifft operation,should I first do this?

It is unclear what you mean by “this”. My guess is, the answer is no.

M