Qn on QPSK demodulation
I've a problem demodulating in QPSK.
My transmitter is a vector signal analyzer (VSG) and a labVIEW programme is used to capture the data. Matlab is used to despread the data using PN sequence of 1024 bits, after which the data is being demodulated.
Below is a portion of the code using BPSK,
% Read off Gain Factor and offset
Gain_factor = fread(fid, 1, 'double');
Offset = fread(fid, 1, 'double');
% take out the unscaled data
Rx = fread(fid, [1, length], 'int16');
r = 0.9; % the rolloff factor, r.
[num,den] = rcosine(Fsym,Fsamp,'sqrt',r,2);
SQRCfilter = num;
PN_filter = filter(num, 1, PN);
w = 2*pi*(IF_freq/Fsamp );
n = 0 : (length -1); % time index in point number
% Demodulation in BPSK
sI = (Gain_factor.*Rx+Offset).*cos(w*n + 0.0);
sQ = (Gain_factor.*Rx+Offset).*sin(w*n + 0.0);
My trial and error QPSK code,
% Demodulation in QPSK
Please advise. Thank you.