MATLAB Examples

CCDF Measurements

This example shows how to use the Complementary Cumulative Distribution Function (CCDF) System object to measure the probability of a signal's instantaneous power being greater than a specified level over its average power. Construct the comm.CCDF object, enable the PAPR output port, and set the maximum signal power limit to 50 dBm.

ccdf = comm.CCDF('PAPROutputPort',true,'MaximumPowerLimit', 50);

Create an OFDM modulator having an FFT length of 256 and a cyclic prefix length of 32.

ofdmMod = comm.OFDMModulator('FFTLength',256,'CyclicPrefixLength',32);

Determine the input and output sizes of the OFDM modulator object using the info function of the comm.OFDMModulator object.

ofdmDims = info(ofdmMod)
ofdmInputSize = ofdmDims.DataInputSize;
ofdmOutputSize = ofdmDims.OutputSize;
ofdmDims = 

  struct with fields:

    DataInputSize: [245 1]
       OutputSize: [288 1]

Set the number of OFDM frames.

numFrames = 20;

Allocate memory for the signal arrays.

qamSig = repmat(zeros(ofdmInputSize),numFrames,1);
ofdmSig = repmat(zeros(ofdmOutputSize),numFrames,1);

Generate the 64-QAM and OFDM signals for evaluation.

for k = 1:numFrames
    % Generate random data symbols
    data = randi([0 63],ofdmInputSize);
    % Apply 64-QAM modulation
    tmpQAM = qammod(data,64);
    % Apply OFDM modulation to the QAM-modulated signal
    tmpOFDM = ofdmMod(tmpQAM);
    % Save the signal data
    qamSig((1:ofdmInputSize)+(k-1)*ofdmInputSize(1)) = tmpQAM;
    ofdmSig((1:ofdmOutputSize)+(k-1)*ofdmOutputSize(1)) = tmpOFDM;

Determine the average signal power, the peak signal power, and the PAPR ratios for the two signals. The two signals being evaluated must be the same length so the first 4000 symbols are evaluated.

[Fy,Fx,PAPR] = ccdf([qamSig(1:4000),ofdmSig(1:4000)]);

Plot the CCDF data. Observe that the likelihood of the power of the OFDM modulated signal being more than 3 dB above its average power level is much higher than for the QAM modulated signal.


Compare the PAPR values for the QAM modulated and OFDM modulated signals.

fprintf('\nPAPR for 64-QAM = %5.2f dB\nPAPR for OFDM = %5.2f dB\n',...
    PAPR(1), PAPR(2))
PAPR for 64-QAM =  3.65 dB
PAPR for OFDM =  9.44 dB

You can see that by applying OFDM modulation to a 64-QAM modulated signal, the PAPR increases by 5.8 dB. This means that if 30 dBm transmit power is needed to close a 64-QAM link, the power amplifier needs to have a maximum power of 33.7 dBm to ensure linear operation. If the same signal were then OFDM modulated, a 39.5 dBm power amplifier is required.