Changes to OQPSK Modulator objects after r2017

2 次查看(过去 30 天)
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);

采纳的回答

Siriniharika Katukam
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:
  1 个评论
Abhinav Reddy
Abhinav Reddy 2020-2-24
Thanks for the reply, using the solution from your link produced identical constellations

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by