Wednesday, September 3, 2014

Re: [Discuss-gnuradio] integral frequency shift correcting in ofdm_frame_equalizer_vcvc_impl.cc

Hi Martin,
Thank you, I got it. Those code take charge correcting phase shift
caused by CP.
The real IFO correcting is done when copy IN buff to OUT buff.
Seems there is a minor issue, if all carriers were occupied by data, OUT
buff will lose some data, right?

// Copy the frame and the channel state vector
// such that the symbols are shifted to the correct position
if (carrier_offset < 0) {
memset((void *) out, 0x00, sizeof(gr_complex) *
(-carrier_offset));<===1
memcpy(
(void *) &out[-carrier_offset], (void *) in,
sizeof(gr_complex) * (d_fft_len * frame_len +
carrier_offset)
);
} else {
memset((void *) (out + d_fft_len * frame_len -
carrier_offset), <====2
0x00, sizeof(gr_complex) * carrier_offset);
memcpy(
(void *) out, (void *) (in+carrier_offset),
sizeof(gr_complex) * (d_fft_len * frame_len -
carrier_offset)
);
}


在 2014年09月02日 23:37, Martin Braun 写道:
> Tiankan,
>
> this corrects the coarse freq offset propagation due to the CP.
> As 'i' increments, this represents later times. So, in a sense, this is
> in time direction.
>
> M
>
> On 09/02/2014 04:14 PM, Tiankun Hu wrote:
>> Hi All,
>> I found "ofdm_frame_equalizer_vcvc_impl.cc" use below code to correct
>> integral freq shift(IFO) in freq domain, but as I known, the IFO only
>> cause signal cyclic shifting in freq domain, why this block use gr_expj
>> to correcting IFO in freq domain? might be blow code should be done in
>> time domain.
>>
>> // Correct the frequency shift on the symbols
>> gr_complex phase_correction;
>> for (int i = 0; i < frame_len; i++) {
>> phase_correction = gr_expj(-M_TWOPI * carrier_offset * d_cp_len /
>> d_fft_len * (i+1));
>> for (int k = 0; k < d_fft_len; k++) {
>> out[i*d_fft_len+k] *= phase_correction;
>> }
>> }
>>
>>


--
Thanks
Tiankun

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment