Changes to OQPSK Modulator objects after r2017
2 views (last 30 days)
Show older comments
Abhinav Reddy
on 13 Feb 2020
Commented: Abhinav Reddy
on 24 Feb 2020
I'm working with some old code that created an OQPSK signal with RRC pulse shaping and I'm trying to recreate some of its outputs. The signals originally produced by the code were using Matlab 2017a, and I'm currently using 2019a. The function signature for the OQPSKModulator object has changed between the two versions, but attempting to keep all things as equal as possible, the two versions create different constellations. The 2017 version also produces data twice as long as the 2019 version. What is the difference that is causing this?
Here is the 2017 code:
% 2017 Code
sps = 8;
hOQPSK = comm.OQPSKModulator('BitInput',true,'OutputDataType','single');
hTXFILT = comm.RaisedCosineTransmitFilter('FilterSpanInSymbols',10,'RolloffFactor',0.5,...
'OutputSamplesPerSymbol',sps,'Gain',sqrt(sps));
bits = randi([0,1], 1000, 1);
oqpsk = hOQPSK(bits);
oqpsk = hTXFILT(oqpsk)
and the 2019 code:
% 2019 Code
sps = 8;
hOQPSK = comm.OQPSKModulator('BitInput', 1, 'PulseShape','Root raised cosine','RolloffFactor',0.5,...
'FilterSpanInSymbols',10,'SamplesPerSymbol',sps);
bits = randi([0,1], 1000, 1);
oqpsk = hOQPSK(bits);
0 Comments
Accepted Answer
Siriniharika Katukam
on 21 Feb 2020
Hi
One thing you have missed is to set the output datatype in 2019 code. The default is ‘double’ in 2019 but it is defined as single in 2017 code. The following link might be helpful:
More Answers (0)
See Also
Categories
Find more on Modulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!