BER of OFDM, how scale correct after IFFT?

조회 수: 9 (최근 30일)
Bernd
Bernd 2012년 2월 21일
편집: Image Analyst 2013년 10월 19일
Hi
I want to simulate the Bit Error Rate of OFDM and compare it to the theoretic max.
After the IFFT of the Symbol I want to add noise to my time Signal. Without noise it works fine (BER = 0). When I checked the amplitudes I get a higher noise than signal. Here I think I should scale the signal correct but i don't know how to do this.
I tried this Scaling the FFT and the IFFT but it didn't work.
Thanks a lot!
Bernd
nSubcarriers = 1000;
nFFT = 2^(nextpow2(nSubcarriers) + 1);
data = rand(nSubcarriers,1) > 0.5;% BPSK
modSymbol = 2*data - 1; % OFDM Symbol
H = 1; % ideal channel
modSymbol = H.*modSymbol; % multiply with my channel
Y_f = [0; modSymbol; 0; conj(flipud(modSymbol))];
y_t = ifft(Y_f,nFFT); % get time signal
snr = 0:10;
for ii = 1:length(snr)
sigma = sqrt(1./(2*10.^(snr(ii)/10))); % AWGN Noise
n_t = sigma * (randn(length(y_t),1) + 1i*(randn(length(y_t),1)));
r_t = y_t + n_t; % add noise to signal
receivedSymbol = fft(r_t,nFFT); % FFT
receivedSymbol = receivedSymbol(2:nSubcarriers+1);
received_bits = 2*floor(real(receivedSymbol + 1 )) > 0;
error_bits = sum(xor(received_bits,data));
BER = error_bits/length(data);
BER_theo = 0.5*erfc(sqrt(10.^(snr(ii)/10)));
fprintf('SNR: %d dB, BER: %d, BER theoretic: %d\n', snr(ii), BER, BER_theo );
end
  댓글 수: 2
Dr. Seis
Dr. Seis 2012년 2월 21일
I am a bit confused with what you are doing here.
What from that post on scaling the FFT and IFFT didn't work?
You have real/complex data in the frequency domain with symmetry about 0 frequency, but then you are adding complex noise to the time data. Shouldn't the time domain data be all real?
Why are you padding your frequency domain data before you transform it back to the time domain? You lose your symmetry when you do this, which will lead to complex time domain data.
Bernd
Bernd 2012년 2월 21일
I didn't work with Fourier for long time...
- I don't know how to get my correct scale-factor, that's my main problem. I can't just say 45 works so i'll take it. I need to know how to get the factor.
- Isn't noise always complex? I got real time domain data when i use QPSK, now i use BPSK -> complex.
- I want to use QPSK, too.

댓글을 달려면 로그인하십시오.

답변 (1개)

Dr. Seis
Dr. Seis 2012년 2월 21일
I use the FFT for a much different problem. In my case, the time domain data are always real and the frequency domain data are always real/imaginary and symmetric/anti-symmetric.
In your case, what is the time increment (dt) or sampling frequency (Fs = 1/dt) in the time domain? Here is what I typically do:
If:
Fs = 100; % samples per second
N = 128; % Number of samples
data_time = randn(1,N);
Then:
data_freq = fft(data_time)*1/Fs;
and:
data_time = ifft(data_freq)*Fs;
When Matlab takes the IFFT of data, it will automatically normalize the output amplitudes by "N".
  댓글 수: 2
Bernd
Bernd 2012년 2월 22일
Well I got a sampling frequency of 10 MHz - that's why i'm confused that this should work...
Dr. Seis
Dr. Seis 2012년 2월 22일
The Fourier transform involves integration. What we are doing is the discrete Fourier transform, which means integration over a discrete set of data. In order to do discrete integration, one must know both the amplitudes and the interval spacing between discrete data points (area = height of amplitude * width of interval spacing). The FFT implemented by Matlab assumes the data were sampled once every second. The discrete integral (or discrete area under the curves) will be way off if the width of the interval spacing is significantly different from 1. In your case, Fs = 10e6 samples/sec is significantly different from Fs = 1.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Test and Measurement에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by