am trying to implement OQPSK modulation with half sine pulse shaping. If I simulate the OQPSK modulation without pulse shaping, the simulated curve is similar to the theoretical value. However, when I introduce pulse shaping, the simulated values are lesser than the theoretical case. I am not sure where I am going wrong. Below is the code where I am using pulse shaping:

  Rc = 2e6;       % Chip rate
  Tc = 1/Rc;      % inverse of chip rate
  Fs = 12e6;      % sampling frequency
  dt = 1/Fs;
  over = Fs/Rc;   % sampling factor
  TSim = 0.01;
  N = floor(TSim/4e-6);
  data = randi([0 1],N,1); 

  hMod = comm.OQPSKModulator('BitInput',true);
  modulated_data = step(hMod, data);

   %% Upsample
  over_data = upsample(modulated_data,over);

  %% Pulse Shape
  time = 0:dt:2*Tc;
  hSineflt = sin(pi*time/(2*Tc)); 

  %% AWGN channel
  hAWGN = comm.AWGNChannel('EbNo',SNR);
  noisy_signal = step(hAWGN, tx); 

  %% Matched filter

  %% Downsample
  downsampled_signal = rx(1:over:end);

  %% OQPSK Demodulation
  hDemod = comm.OQPSKDemodulator('BitOutput',true);
  demod_data = step(hDemod,downsampled_signal);

  %% BER 
  hError = comm.ErrorRate('ReceiveDelay',2);
  errors = step(hError,data, demod_data);
  BER_sim = errors(1);

This is the part where I calculated the theoretical value

  BER_Theo = berawgn(SNR,'oqpsk','nondiff');

I expect both BER_sim and BER_Theo to be almost the same. But I am unable to figure out where I am going wrong.

  • 1
    $\begingroup$ The pulse shape has absolutely no bearing on the bit-error rate in an AWGN channel. If you get different results, then you're doing something wrong. $\endgroup$
    – MBaz
    May 28 '15 at 23:40
  • $\begingroup$ I figured out that the power of the half sine wave that I was using was high, which was the reason for the deviation. $\endgroup$
    – smyslov
    May 29 '15 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.