comm.SOQPSKDemodulator
R2026bDescription
The comm.SOQPSKDemodulator
System object™ demodulates an input signal that was modulated by using the shaped-offset
quadrature phase shift keying (SOQPSK) method. The input is a baseband representation of
the modulated signal. For more information about the demodulation and filtering applied,
see Algorithms.
To demodulate a signal that was modulated using the SOQPSK method:
Create the
comm.SOQPSKDemodulatorobject and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
soqpskdemod = comm.SOQPSKDemodulator creates a demodulator
System object to demodulate input SOQPSK signals using the Viterbi algorithm.
soqpskdemod = comm.SOQPSKDemodulator(
sets properties using one or more name-value arguments. For example,
Name=Value)comm.SOQPSKDemodulator(FrequencyPulse="A") specifies type A
frequency pulse shaping.
Properties
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release function unlocks them.
If a property is tunable, you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.
Type of frequency pulse shaping used by the modulator to smooth the phase
transitions of the modulated signal, specified as "TG",
"A", or "B". For more information, see
Pulse Shape Filtering.
Demodulation decision method, specified as "hard" or
"approxllr".
When you set this property to
"hard", the outputYis returned as a column vector with element values of0or1. The output data type is specified byOutputDataType.When you set this property to
"approxllr", the output data type is the same as the inputX. For the approximate log-likelihood ratio, the object generates positive values for 0s and negative values for 1s.
For more information, see SOQPSK Demodulation.
Noise variance, specified as a positive scalar or
"input".
Dependencies
This property applies when you set DecisionMethod to "approxllr".
Data Types: double | single | string
Precoder initial input, specified as a binary-valued scalar or a two-element row vector. When provided as a scalar, the same value applies to both elements.
This property defines the first data symbol used by the modulator before the first call of the object, in reverse chronological order.
Initial phase offset in radians, specified as a scalar. This parameter value is the initial phase offset of the modulated waveform.
Samples per symbol, specified as a positive even integer. This property specifies the output symbol upsampling factor for each input sample.
Traceback depth for the Viterbi algorithm, specified as a positive integer representing the number of trellis branches that the Viterbi algorithm uses to construct each traceback path. For more information, see Traceback Depth and Output Delays.
Data type of the output, specified as "double",
"single", or "int8".
Dependencies
This property applies when you set DecisionMethod to "hard".
This property is read-only.
Demodulator output delay, specified as a positive integer. For more information, see Traceback Depth and Output Delays.
Usage
Syntax
Input Arguments
SOQPSK-modulated signal, specified as a column vector with a length equal to
an integer multiple of the SamplesPerSymbol property.
This object accepts variable-size inputs. After the object is locked, you can change the frame size (number of rows) of the signal during simulation. For more information, see Variable-Size Signals in Code.
Data Types: double | single
Complex Number Support: Yes
Noise variance, specified as a positive scalar value.
Dependencies
This property applies when you set VarianceSource to "input", and DecisionMethod to "approxllr".
Data Types: double | single
Output Arguments
Demodulated output signal, returned as a column vector with 2×NSamp/(NSPS) elements. NSamp is
the length of input Y
and NSPS is the value of SamplesPerSymbol.
To specify the output data type, use the OutputDataType property.
The output has a processing delay. For more information, see Traceback Depth and Output Delays.
Data Types: single | double | int8
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj, use
this syntax:
release(obj)
Examples
Demodulate a noisy SOQPSK-B-modulated waveform by using hard-decision processing.
Create SOQPSK modulator and demodulator objects, and a frame of random binary data. Set an level for the AWGN channel and convert the value to SNR.
soqpskMod = comm.SOQPSKModulator(FrequencyPulse="B")soqpskMod =
comm.SOQPSKModulator with properties:
FrequencyPulse: "B"
InitialConditions: [0 0]
InitialPhaseOffset: 0
SamplesPerSymbol: 8
OutputDataType: "double"
soqpskDemod = comm.SOQPSKDemodulator(FrequencyPulse="B")soqpskDemod =
comm.SOQPSKDemodulator with properties:
FrequencyPulse: "B"
DecisionMethod: "hard"
InitialConditions: [0 0]
InitialPhaseOffset: 0
SamplesPerSymbol: 8
TracebackDepth: 8
OutputDataType: "double"
Show all properties
data = randi([0 1],1e3,1); EbNodB = 11; snrdB = convertSNR(EbNodB,'ebno', ... BitsPerSymbol=2,SamplesPerSymbol=soqpskMod.SamplesPerSymbol);
Apply SOQPSK modulation, add AWGN to the modulated signal, and then demodulate the received symbols.
txOut = soqpskMod(data);
rxIn = awgn(txOut,snrdB,'measured');
rxOut = soqpskDemod(rxIn);Account for the delay, which equals the sum of the traceback depth and the filter delay, and then calculate the number of errors. The delay equals TracebackDepth + PulseLength/2. Set the delay based on the traceback depth length and the frequency pulse type used for demodulation.
if soqpskMod.FrequencyPulse=="B" PulseLength = 16; else PulseLength = 8; end delay = soqpskDemod.TracebackDepth+PulseLength/2;
Confirm the expected delay by using the finddelay function.
delaycheck = finddelay(data,rxOut)
delaycheck = 16
isequal(delay,delaycheck)
ans = logical
1
numErr = sum(data(1:end-delay)~=rxOut(delay+1:end))
numErr = 0
Shaped-offset quadrature phase shift keying (SOQPSK) modulate random bits with an SOQPSK modulator object, add AWGN, demodulate with a matching SOQPSK demodulator object, and then compute the error rate comparing hard decision and approximate LLR decision decoding. Error rate performance of the hard and approximate LLR decision decoding match because no forward error correction is included.
rng(2024) % For repeatable runs numBits = 1e6; % Number of input bits bps = 2; % Bits per symbol for SOQPSK sps = 4; % Samples per symbol EbNo_dB = 8; % Eb/No in dB
Create a column vector of random bits. Create objects for SQPSK modulation, SOQPSK hard-decision and soft-decision demodulation, and error rate computation for hard- and soft-decision. In the error rate objects, set the receive delay to the OutputDelay property of the SQPSK demodulator hard and soft decision objects, respectively.
txBits = randi([0 1],numBits,1); mod = comm.SOQPSKModulator(SamplesPerSymbol=sps); demod_hd = comm.SOQPSKDemodulator(SamplesPerSymbol=sps); delay_hd = demod_hd.OutputDelay; demod_sd = comm.SOQPSKDemodulator( ... SamplesPerSymbol=sps,DecisionMethod="approxllr",Variance="input"); delay_sd = demod_sd.OutputDelay; errorRate_hd = comm.ErrorRate(ReceiveDelay=delay_hd); errorRate_sd = comm.ErrorRate(ReceiveDelay=delay_sd);
Pass an SOQPSK modulated signal through AWGN. Demodulate the signal using the SOQPSK demodulator. Compute and display the bit error rate.
modOut = mod(txBits); SNRdB = convertSNR(EbNo_dB,"ebno", ... SamplesPerSymbol=sps,BitsPerSymbol=bps); chanOut = awgn(modOut,SNRdB,"measured"); rxBits_hard = demod_hd(chanOut); var =10^(-SNRdB/10); llrdemodOut = demod_sd(chanOut,var); rxBits_llr = llrdemodOut < 0; errorStats_hd = errorRate_hd(txBits,rxBits_hard(1:length(txBits))); fprintf("Hard decision:\n Error rate = %f\n Number of errors = %d\n", ... errorStats_hd(1),errorStats_hd(2))
Hard decision: Error rate = 0.000605 Number of errors = 605
errorStats_sd = errorRate_sd(txBits,rxBits_llr(1:length(txBits))); fprintf("Soft decision:\n Error rate = %f\n Number of errors = %d\n", ... errorStats_sd(1),errorStats_sd(2))
Soft decision: Error rate = 0.000605 Number of errors = 605
reset(errorRate_hd) reset(errorRate_sd) reset(demod_hd) reset(demod_sd)
Option to plot BER vs Eb/No curve.
berPlot = 0; if berPlot EbNoVec = -2:2:8; SNRdBVec = convertSNR(EbNoVec,"ebno", ... SamplesPerSymbol=sps,BitsPerSymbol=bps); errorStats_hd = zeros(length(EbNoVec),3); errorStats_sd = zeros(length(EbNoVec),3); for ii=1:length(EbNoVec) chanOut = awgn(modOut,SNRdBVec(ii),"measured"); rxBits_hard = demod_hd(chanOut); llrdemodOut = demod_sd(chanOut,var); rxBits_llr = llrdemodOut < 0; errorStats_hd(ii,:) = errorRate_hd( ... txBits,rxBits_hard(1:length(txBits))); errorStats_sd(ii,:) = errorRate_sd( ... txBits,rxBits_llr(1:length(txBits))); reset(errorRate_hd) reset(errorRate_sd) reset(demod_hd) reset(demod_sd) end semilogy(EbNoVec,errorStats_hd(:,1),"--+b", ... EbNoVec,errorStats_sd(:,1),"-or"); grid on; xlabel("E_b/N_0 (dB)"); ylabel("BER"); legend("hd","sd") title("SOQPSK BER vs Eb/No"); end
Estimate the bit error rate (BER) performance of a shaped-offset quadrature phase shift keying - telemetry group (SOQPSK-TG) with low-density parity-check (LDPC) coding over an additive white Gaussian noise (AWGN) channel.
Define a prototype matrix and block size to configure a rate 3/4 LDPC code. Create a parity-check matrix by using the ldpcQuasiCyclicMatrix function, and then use the parity-check matrix to create LDPC encoder and decoder configuration objects.
P = [
16 17 22 24 9 3 14 -1 4 2 7 -1 26 -1 2 -1 21 -1 1 0 -1 -1 -1 -1
25 12 12 3 3 26 6 21 -1 15 22 -1 15 -1 4 -1 -1 16 -1 0 0 -1 -1 -1
25 18 26 16 22 23 9 -1 0 -1 4 -1 4 -1 8 23 11 -1 -1 -1 0 0 -1 -1
9 7 0 1 17 -1 -1 7 3 -1 3 23 -1 16 -1 -1 21 -1 0 -1 -1 0 0 -1
24 5 26 7 1 -1 -1 15 24 15 -1 8 -1 13 -1 13 -1 11 -1 -1 -1 -1 0 0
2 2 19 14 24 1 15 19 -1 21 -1 2 -1 24 -1 3 -1 2 1 -1 -1 -1 -1 0
];
blockSize = 27;
pcmatrix = ldpcQuasiCyclicMatrix(blockSize,P);
cfgLDPCEnc = ldpcEncoderConfig(pcmatrix);
cfgLDPCDec = ldpcDecoderConfig(pcmatrix,"norm-min-sum");Create System objects for SOQPSK-TG modulation and demodulation.
soqpskmod = comm.SOQPSKModulator;
soqpskdemod = comm.SOQPSKDemodulator(DecisionMethod="approxllr");
delay = soqpskdemod.OutputDelay;Define simulation parameters, convert to SNR, and initialize variables to track coded error rate results.
codeRate = 3/4; maxnumiter = 10; numframes = 5000; EbNo = 3:0.5:4.5; snr = convertSNR(EbNo,'ebno', ... BitsPerSymbol=2, ... SamplesPerSymbol=soqpskmod.SamplesPerSymbol, ... CodingRate=codeRate); numErrsCoded = zeros(length(snr),1); numBitsCoded = zeros(length(snr),1);
For each setting, transmit an LDPC-encoded, SOQPSK-TG-modulated bit stream through an AWGN channel. Demodulate the signal using soft-decision (approximate LLR) output, and decode the received codewords. Use a buffer to align codewords across frame boundaries. Since SOQPSK-TG is a continuous-phase modulation with memory, the soft-decision demodulator produces outputs with a processing delay that must be accounted for when count bit errors.
for ii = 1:length(EbNo)
numErrs = 0;
numBits = 0;
release(soqpskdemod);
soqpskdemod.Variance = 10^(-snr(ii)/10);
demBuffer = zeros(cfgLDPCEnc.BlockLength,1);
dataBuffer = zeros(cfgLDPCEnc.NumInformationBits,1);Simulate multiple frames by using a for loop.
for frameCnt = 1:numframes data = randi([0 1],cfgLDPCEnc.NumInformationBits,1,'int8'); encodedData = ldpcEncode(data,cfgLDPCEnc); modSig = soqpskmod(double(encodedData)); rxSig = awgn(modSig,snr(ii),'measured'); demOut = soqpskdemod(rxSig); % Account for demodulator delay and align codewords across frames. if frameCnt > 1 demAligned = [demBuffer(delay+1:end); demOut(1:delay)]; % Pad or truncate to match block length llrIn = demAligned(1:cfgLDPCEnc.BlockLength); rxbits = ldpcDecode(llrIn,cfgLDPCDec,maxnumiter, ... MinSumScalingFactor=0.75,Termination="early"); numErrsCoded(ii) = numErrsCoded(ii) + nnz(dataBuffer ~= rxbits); numBitsCoded(ii) = numBitsCoded(ii) + numel(dataBuffer); end demBuffer = demOut; dataBuffer = data; end fprintf('SNR = %2.1f dB (Eb/No = %2.1f dB)\n', ... snr(ii),EbNo(ii)); fprintf(' Coded BER: %1.6f (%d errors / %d bits)\n', ... numErrsCoded(ii)/max(numBitsCoded(ii),1), ... numErrsCoded(ii),numBitsCoded(ii)); end
SNR = -4.3 dB (Eb/No = 3.0 dB)
Coded BER: 0.006105 (14831 errors / 2429514 bits)
SNR = -3.8 dB (Eb/No = 3.5 dB)
Coded BER: 0.000529 (1284 errors / 2429514 bits)
SNR = -3.3 dB (Eb/No = 4.0 dB)
Coded BER: 0.000004 (10 errors / 2429514 bits)
SNR = -2.8 dB (Eb/No = 4.5 dB)
Coded BER: 0.000000 (0 errors / 2429514 bits)
More About
The traceback depth D is the number of trellis branches used to construct each traceback path in the trellis description of the modulation scheme for demodulation using the Viterbi algorithm. The Viterbi algorithm processing and the frequency pulse length add to determine the delay preceding the first meaningful demodulated value in the output. The combined delay is (D + L/2) symbols. This table lists the pulse length L in bit duration for each frequency pulse type.
FrequencyPulse Value | Pulse Length, L (Bit Duration) |
|---|---|
"TG" | 8 |
"A" | 8 |
"B" | 16 |
Algorithms
This implementation of the SOQPSK method conforms to the specification in IRIG Standard 106-17, Chapter 2 [1], and includes support for SOQPSK-TG, SOQPSK-A, and SOQPSK-B frequency pulse-shapes.
SOQPSK demodulation is a hybrid mixture of CPM and OQPSK. The phase output of partial response SOQPSK-TG can approximate the phase output of full response rectangular SOQPSK by using a pulse truncation method that reduces the frequency pulse shaping filter to Tb duration. This pulse truncation effectively makes the partial response SOQPSK-TG behave as a full response CPM and reduces the trellis state to four phase states. This equation represents a pulse shaping filter q, where duration T equals Tb and L is the pulse length in bit duration.
For both odd and even current symbol values, the precoder equation has a dependency on two previous symbols. The precoder implementation uses a four-state trellis with different sections for n-even and n-odd case to demodulate SOQPSK signals.
This constellation diagram shows the one-to-one mapping between precoder state variables and phase state variables.
Hard decision — The demodulator generates hard decision (0s and 1s) using the Viterbi algorithm.
Soft decision — The approximate log-likelihood demodulation generates soft decision log-likelihood ratios (positive values for 0s and negative values for 1s) using the maximum logarithmic maximum a posteriori probability (max-log-MAP) algorithm.
The forward and backward path metric calculations implement the BCJR algorithm with a sliding window. The BCJR algorithm produces a soft estimate for each bit by considering the incoming bits as a maximum a posteriori probability (MAP) detection problem as described in [4] and [5] and uses max(ai) for the logarithmic approximation.
This equation shows the branch metric calculation:
yk is the kth received symbol.
xk is one of the possible kth transmitted symbols.
s is the current state of the branch metric.
s' is the previous state of the branch metric.
σ is the noise variance.
The SOQPSK method is a family of constant-envelope CPM waveforms. This block diagram from Section 2.3.3.2 of IRIG Standard 106-17 shows the input signal flow through a precoder, a pulse shaping filter, and a modulator:
Precoding performed on binary input data generates ternary symbols {–1,0,1}. The Q branch is offset from the I branch by Tb, where Tb is the bit duration in seconds. For each new bit the precoder processes, the modulator outputs a new ternary symbol.
The ternary symbol mapping follows these rules:
The SOQPSK precoder uses this mapping for input data:
| SOQPSK Precoding Table for IRIG-106 Compatibility | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Map αK from IK | Map αK+1 from QK+1 | ||||||||
| Ik | Qk–1 | Ik–2 | ΔΦ | αk | Qk+1 | Ik | Qk–1 | ΔΦ | αk+1 |
| –1 | +1 or –1 | –1 | 0 | 0 | –1 | +1 or –1 | –1 | 0 | 0 |
| +1 | +1 or –1 | +1 | 0 | 0 | +1 | +1 or –1 | +1 | 0 | 0 |
| –1 | –1 | +1 | –π/2 | –1 | –1 | –1 | +1 | +π/2 | +1 |
| –1 | +1 | +1 | +π/2 | +1 | –1 | +1 | +1 | –π/2 | –1 |
| +1 | –1 | –1 | +π/2 | +1 | +1 | –1 | –1 | –π/2 | –1 |
| +1 | +1 | –1 | –π/2 | –1 | +1 | +1 | –1 | +π/2 | +1 |
| Included from Table 2-5 in IRIG Standard 106-17 | |||||||||
Since I and Q do not vary at the same instant, the ternary symbols generated are constrained so that in a given bit interval, a precoded symbol can be mapped from the set {0,–1} or {0,+1}. Specifically, +1 cannot be followed by –1 and vice versa.
For SOQPSK, the modulation index is ½. The output of the modulator is a baseband representation of the modulated signal:
The SOQPSK method uses pulse shaping to smooth the phase transitions of the modulated signal. The function q(t) is the phase response obtained from the frequency pulse, g(t), through this relation:
The specified frequency pulse shape corresponds to a spectrally raised cosine windowed by a modified temporal raised-cosine function expression for g(t).
The function n(t) is a modified spectral raised cosine filter of amplitude A, rolloff factor ρ, and an additional time scaling factor B.
The function w(t) is a time domain windowing function that limits the duration of g(t).
The SOQPSK-TG, -A, and -B frequency pulse-shapes use these parameters to realize the spectral raised cosine pulse shape filtering variants.
| SOQPSK Type | ρ | B | T1 | T2 | Resulting Pulse Length (Bit Duration) |
|---|---|---|---|---|---|
| SOQPSK-TG (IG 106-04) | 0.7 | 1.25 | 1.5 | 0.5 | 8 |
| SOQPSK-A | 1 | 1.35 | 1.4 | 0.6 | 8 |
| SOQPSK-B | 0.5 | 1.45 | 2.8 | 1.2 | 16 |
For more information on pulse shape filtering, see Section 2.3.3.2 of IRIG Standard 106-17.
References
[1] Inter-Range Instrumentation Group (IRIG) Telemetry Standards, IRIG Standard 106-17, Chapter 2, July 2017.
[2] E. Perrins and M. Rice, "Reduced-Complexity Approach to Iterative Detection of Coded SOQPSK," in IEEE® Transactions on Communications, vol. 55, no. 7, pp. 1354-1362, July 2007, doi: 10.1109/TCOMM.2007.900614.
[3] E. Perrins, "FEC Systems for Aeronautical Telemetry," in IEEE Transactions on Aerospace and Electronic Systems, vol. 49, no. 4, pp. 2340-2352, OCTOBER 2013, doi: 10.1109/TAES.2013.6621820.
[4] Benedetto, S., G. Montorsi, D. Divsalar, and F. Pollara. "A Soft-Input Soft-Output Maximum A Posterior (MAP) Module to Decode Parallel and Serial Concatenated Codes." Jet Propulsion Lab TDA Progress Report (November 1996): 42–127.
[5] Viterbi, A.J. “An Intuitive Justification and a Simplified Implementation of the MAP Decoder for Convolutional Codes.” IEEE Journal on Selected Areas in Communications 16, no. 2 (February 1998): 260–64. https://doi.org/10.1109/49.661114.
Extended Capabilities
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
Refer to the usage notes and limitations in the C/C++ Code Generation section. The same usage notes and limitations apply to GPU code generation.
Version History
Introduced in R2026aWhen you set DecisionMethod to 'approxllr', the demodulator
generates soft decision log-likelihood ratios (positive values for 0s and negative
values for 1s) using the maximum log maximum a-posteriori probability (max-log-MAP)
algorithm.
See Also
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)