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)); tx=conv(over_data,hSineflt,'same'); %% AWGN channel hAWGN = comm.AWGNChannel('EbNo',SNR); noisy_signal = step(hAWGN, tx); %% Matched filter rx=conv(noisy_signal,hSineflt,'same'); %% 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.