OFDM frequency sensitivity (MATLAB related)

In summary, the conversation is about simulating an OFDM system and investigating the Bit Error Rate with respect to frequency offset. A code is provided as a reference for the desired curve, but the speaker is having trouble with their own code, as the offset vs BER plot is incorrect. The speaker is unsure of what to modify in their code to address this issue and shares their code for further assistance.
  • #1
O.J.
199
0
Hello everyone,

I am trying to simulate an OFDM system and part of what I want to do is investigate the Bit Error Rate with respect to frequency offset. I understand how the offset vs BER curve should be looking like the curve obtained in the code in this link http://www.dsplog.com/db-install/wp-content/uploads/2009/08/script_frequency_offset_ofdm.m which is available on this page:
http://www.dsplog.com/2009/08/08/effect-of-ici-in-ofdm/
All u have to do is run the code in MATLAB and you will see the correct offset vs error plot.

I am developing a code with which the offset vs BER plot seems incorrect. By that I mean, the error starts growing slowly from teh 0 offset (no offset) and slowly grows (like a parabola) when the slope of the curve should be steepest (theoretically) just above or below zero offset and then should start to slow down approaching +/- 0.5 offset.

I cannot understand what I should modify in my code to address this issue. Here is the code I am using:
%% OFDM parameters
N = 2048; %number of carriers
Tu = 0.001; %symbol period for each carrier
T = Tu/N; %Symbol period of serial stream
R = 1/8; %guard time ratio (WiMAX standard) R*N should be integer
G = Tu*R; %guard time
fu = 1/Tu; %symbol rate of each datastream
Fs = fu*N; %sampling frequency
Q = 4; %upsampling factor



%% TRANSMITTER

%generate message
Mt = randint(1,N);
tn = 0:N-1;
stem(tn/Fs,Mt); xlabel('Time (seconds)'); ylabel('Binary Data');

%BPSK (mapping 0's to -1's)
M1=2*Mt-1;
stem (tn,M1); %plot the original message (BPSK)
xlabel('Time (seconds)'); ylabel('BPSK Data');

%S/P conversion
A = reshape(M1,N,1);

%modulate each subcarrier using IFFT
B = ifft(A);

%P/S conversion
C = reshape(B,1,N);

%guard time/cyclic prefixing
Guard = zeros(1,length(1:R*N));
C_gcp = [C Guard];
C_gcp(N+1:N+R*N) = C_gcp(1:R*N);

%oversample by a factor of Q (DAC ~)
D = ones(Q,1)*C_gcp;
D = conj(D(:)');

%plot the OFDM signal
t = 0:Q*(N+R*N)-1;
plot (t/(Q*Fs),D);xlabel ('Time (seconds)');ylabel ('OFDM Signal');title ('OFDM Symbol (with guard time & cyclic prefix) vs Time');SNR = 10;
BER = 0;
BER_t = 0;
N_Max = 50;
S = [];
f0 = 1/Tu;
offset = -0.5:0.1:0.5;
t = 0:Q*(N+N*R)-1;

for tr = 1:length(offset);
for n = 1:N_Max

%% RECEIVER

%noise
D_n = awgn(D,SNR,'measured');

%frequency offset
D_n_o = D_n.*exp(sqrt(-1)*2*pi*offset(tr)*f0*t/(Q*Fs));

%Downsampling
E = [];
for j =1:N+R*N
E(j) = D_n_o(j*Q);
end

%Removing CP
F = zeros(1,N);
F(1:N) = E(1:N);

%S/P
M2 = fft(F);

%Demapping
h = modem.pskdemod(2,pi);
Mr = demodulate(h,M2);

%Bit Error Computation
Error = length(find(Mt~=Mr));
Error_Rate = Error/length(Mt);
BER_t = BER_t + Error_Rate;
end
BER = BER_t/N_Max;
S = [S BER];
BER_t = 0;
end

plot(offset,S); xlabel('Normalized Offset'); ylabel('Bit Error Rate');
grid on
 
Physics news on Phys.org
  • #2
bump...
 

Related to OFDM frequency sensitivity (MATLAB related)

1. What is OFDM frequency sensitivity and why is it important?

OFDM frequency sensitivity refers to the ability of an OFDM (Orthogonal Frequency Division Multiplexing) system to maintain its performance in the presence of frequency errors. It is an important factor to consider because frequency errors can cause interference and degrade the quality of the transmitted signal.

2. How is OFDM frequency sensitivity measured?

OFDM frequency sensitivity is typically measured by calculating the Bit Error Rate (BER) or the Signal-to-Noise Ratio (SNR) of the received signal. These metrics can indicate the system's ability to tolerate frequency errors and maintain a clear and accurate signal.

3. Can OFDM frequency sensitivity be improved?

Yes, OFDM frequency sensitivity can be improved by implementing error correction techniques such as Forward Error Correction (FEC) or by using a higher-order modulation scheme. These techniques can help reduce the impact of frequency errors on the transmitted signal and improve overall performance.

4. What factors can affect OFDM frequency sensitivity?

OFDM frequency sensitivity can be affected by various factors, including the quality of the transmission channel, the accuracy of the receiver's frequency synchronization, and the presence of interference from other signals. It can also be impacted by the modulation scheme and the specific implementation of the OFDM system.

5. How can MATLAB be used to analyze OFDM frequency sensitivity?

MATLAB is a powerful tool for analyzing OFDM frequency sensitivity. It offers various functions and toolboxes that can simulate and analyze OFDM systems with different parameters and configurations. MATLAB can also be used to generate plots and graphs to visualize the effects of frequency errors on the system's performance.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
847
  • Engineering and Comp Sci Homework Help
Replies
1
Views
974
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Differential Equations
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top