comm.MemorylessNonlinearity

Apply memoryless nonlinearity to input signal

Description

The MemorylessNonlinearity object applies a memoryless nonlinearity to a complex, baseband signal. You can use the object to model radio frequency (RF) impairments to a signal at the receiver.

To apply memoryless nonlinearity to the input signal:

  1. Define and set up your memoryless nonlinearity object. See Construction.

  2. Call step to apply memoryless nonlinearity according to the properties of comm.MemorylessNonlinearity. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Construction

H = comm.MemorylessNonlinearity creates a memoryless nonlinearity System object, H. This object models receiver radio frequency (RF) impairments.

H = comm.MemorylessNonlinearity(Name,Value) creates a memoryless nonlinearity object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

Method

Method used to model nonlinearity

Specify the nonlinearity method as one of Cubic polynomial | Hyperbolic tangent | Saleh model | Ghorbani model | Rapp model|'Lookup table'. The default is Cubic polynomial. This property is non-tunable.

InputScaling

Scale factor applied to input signal

Specify the scale factor in decibels. The object applies this factor to the input signal as a real scalar value of double- or single-precision data type. The default is 0. This property applies when you set the Method property to Saleh model or Ghorbani model. This property is tunable.

LinearGain

Linear gain applied to output signal

Specify the linear gain (in decibels) that the object applies to the output signal as a real scalar value of double- or single-precision data type. The default is 0. This property applies when you set the Method property to Cubic polynomial, Hyperbolic tangent, or Rapp model. This property is tunable.

IIP3

Third-order input intercept point

Specify the third-order input intercept point (in decibels relative to a milliwatt) as a real scalar value of double- or single-precision data type. The default is 30. This property applies when you set the Method property to Cubic polynomial or Hyperbolic tangent. This property is tunable.

AMPMConversion

AM/PM conversion factor

Specify the AM/PM conversion factor (in degrees per decibel) as a real scalar value of double- or single-precision data type. The default is 10. This property applies when you set the Method property to Cubic polynomial or Hyperbolic tangent. This property is tunable.

AMAMParameters

AM/AM conversion parameters

Specify the AM/AM conversion parameters that the object uses to compute the amplitude gain for an input signal as a real vector of double- or single-precision data type. The default is [2.1587 1.1517] for the Saleh model and [8.1081 1.5413 6.5202 -0.0718] for the Ghorbani model.

This property applies when you set the Method property to Saleh model or Ghorbani model.

When you set the Method property to Saleh model, this property is a two-element vector that specifies alpha and beta values. Otherwise, this property is a four-element vector that specifies x1, x2, x3, and x4 values. This property is tunable.

AMPMParameters

AM/PM conversion parameters

Specify the AM/PM conversion parameters used to compute the phase change for an input signal as a real vector of double- or single-precision data type. The default is [4.0033 9.1040] for the Saleh model and [4.6645 2.0965 10.88 -0.003] for the Ghorbani model.

This property applies when you set the Method property to Saleh model or Ghorbani model.

When you set the Method property to Saleh model, this property is a two-element vector that specifies alpha and beta values. Otherwise, this property is a four-element vector that specifies y1, y2, y3, and y4 values. This property is tunable.

PowerLowerLimit

Lower input power limit

Minimum input power in decibels relative to a milliwatt, specified as a scalar, for which AM/PM conversion scales linearly with input power value. The default is 10. Below this value, the phase shift resulting from AM/PM conversion is zero. This property applies when you set the Method property to Cubic polynomial or Hyperbolic tangent. This property is tunable.

PowerUpperLimit

Upper input power limit

Specify the maximum input power (in decibels relative to a milliwatt) for which AM/PM conversion scales linearly with input power value. The default is inf. Above this value, the phase shift resulting from AM/PM conversion is constant. You must set the PowerUpperLimit property to a real scalar value, which is greater than the PowerLowerLimit property and of double- or single-precision data type. This property applies when you set the Method property to Cubic polynomial or Hyperbolic tangent.This property is tunable.

OutputScaling

Scale factor applied to output signal

Specify the scale factor (in decibels) that the object applies to the output signal as a real scalar value of double- or single-precision data type. The default is 0. This property applies when you set the Method property to Saleh model or Ghorbani model. This property is tunable.

Smoothness

Smoothness factor

Specify the smoothness factor as a real scalar value of double- or single-precision data type. The default is 0.5. This property applies when you set the Method property to Rapp model. This property is tunable.

OutputSaturationLevel

Output saturation level

Specify the output saturation level as a real scalar value of double- or single-precision data type. This property applies when you set the Method property to Rapp model. The default is 1. This property is tunable.

Table

Amplifier characteristics lookup table

Amplifier characteristics lookup table, specified as a [Pin,Pout,Φ]-by-N matrix of measured power amplifier (PA) characteristics. The N rows of the matrix contain measured values of the PA input signal, Pin, The PA output signal, Pout, and the output phase shift, Φ. The signal levels (Pin and Pout) must be in dBm, and the phase shift (Φ) must be in degrees. This System object uses the measured PA characteristics defined by this property to compute the AM/AM (in dBm/dBm) and AM/PM (in deg/dBm) nonlinear impairment characteristics. The System object distorts the input signal by the computed AM/AM (in dBm/dBm) and AM/PM (in deg/dBm). The default PA characteristics matrix is [-25, 5.16, -0.25; -20, 10.11, -0.47; -15, 15.11, -0.68; -10, 20.05, -0.89; -5, 24.79, -1.22; 0, 27.64, 5.59; 5, 28.49, 12.03]. This property applies when you set the Method property to 'Lookup table'. This property is tunable.

Methods

stepApply memoryless nonlinearity to input signal
Common to All System Objects
release

Allow System object property value changes

Examples

expand all

Generate 16-QAM modulated data with an average power of 10 mW and pass the data through a nonlinear power amplifier.

M = 16;
data = randi([0 M-1]',1000,1);
avgPow = 1e-2;
minD = avgPow2MinD(avgPow, M);

Create Memoryless Nonlinearity System object using the Saleh model.

saleh = comm.MemorylessNonlinearity('Method','Saleh model');

Generate modulated symbols and pass them through the nonlinearity model.

modData = (minD/2).*qammod(data,M);
y = saleh(modData);

Plot the resultant scatter plot.

scatterplot(y)

function minD = avgPow2MinD(avgPow, M)
    % Average power to minimum distance    
    nBits = log2(M);
    if (mod(nBits,2)==0)
        % Square QAM
        sf = (M - 1)/6;
    else
        % Cross QAM
        if (nBits > 4)
            sf = ((31 * M / 32) - 1) / 6;
        else
            sf = ((5 * M / 4) - 1) / 6;
        end
    end
    minD = sqrt(avgPow/sf);
end

Plot the gain compression of a nonlinear amplifier for a 16-QAM signal.

Specify the modulation order and samples per symbol parameters.

M = 16;
sps = 4;

To model a nonlinear amplifier, create a memoryless nonlinearity object having a 30 dB third order intercept point. Create a raised cosine transmit filter.

amplifier = comm.MemorylessNonlinearity('IIP3',30);

txfilter = comm.RaisedCosineTransmitFilter('RolloffFactor',0.3, ...
    'FilterSpanInSymbols',6, ...
    'OutputSamplesPerSymbol',sps, ...
    'Gain',sqrt(sps));

Specify the input power in dBm. Convert the input power to W and initialize the gain vector.

pindBm = -5:25;
pin = 10.^((pindBm-30)/10);
gain = zeros(length(pindBm),1);

Execute the main processing loop, which includes these steps:

  • Generating random data symbols

  • Modulating the data and adjusting the average power

  • Filtering the modulated signal

  • Amplifying the signal

  • Measuring the gain

for k = 1:length(pin)
    data = randi([0 M-1],1000,1);
    modSig = qammod(data,M,'UnitAveragePower',true)*sqrt(pin(k));
    filtSig = txfilter(modSig);
    ampSig = amplifier(filtSig);
    gain(k) = 10*log10(var(ampSig)/var(filtSig));
end

Plot the amplifier gain as a function of the input signal power.

arrayplot = dsp.ArrayPlot('PlotType','Line','XLabel','Power In (dBm)', ...
'XOffset',-5,'YLimits',[-5 5]);

arrayplot(gain)

The 1 dB gain compression point occurs for an input power of 18.5 dBm. To increase the point at which a 1 dB compression is observed, increase the third order intercept point, amplifier.IIP3.

Apply nonlinear power amplifier (PA) characteristics to a 16-QAM signal by setting the Method property to Lookup table.

Define parameters for the modulation order, samples per symbol, input power, and create random data.

M = 16; % Modulation order
sps = 4; % Samples per symbol
pindBm = -2; % Input power
pin = 10.^((pindBm-30)/10); % power in Watts
data = randi([0 M-1],1000,1);
refdata = 0:M-1;
refconst = qammod(refdata,M,'UnitAveragePower',true);

Create a memoryless nonlinearity System object, a transmit filter System object, and a constellation diagram System objects. The default lookup table values are used for the memoryless nonlinearity System object.

amplifier = comm.MemorylessNonlinearity('Method','Lookup table');
txfilter = comm.RaisedCosineTransmitFilter('RolloffFactor',0.3, ...
    'FilterSpanInSymbols',6,'OutputSamplesPerSymbol',sps,'Gain',sqrt(sps));
constellation = comm.ConstellationDiagram('SamplesPerSymbol',4,'ReferenceConstellation',refconst, ...
    'Title','Amplified/Distorted Signal');

Modulate the random data. Filter and apply the nonlinear amplifier characteristics to the modulation symbols.

modSig = qammod(data,M,'UnitAveragePower',true)*sqrt(pin);
filtSig = txfilter(modSig);
ampSig = amplifier(filtSig);

Compute input and output signal levels and the phase shift.

poutdBm = (20*log10(abs(ampSig)))+30;
simulated_pindBm = (20*log10(abs(filtSig)))+30;
phase = angle(ampSig.*conj(filtSig))*180/pi;

Plot AM/AM characteristics, AM/PM characteristics, and the constellation results.

figure
set(gcf,'units','normalized','position',[.25 1/3 .5 1/3])
subplot(1,2,1)
plot(simulated_pindBm,poutdBm,'.'); 
hold on
plot(amplifier.Table(:,1),amplifier.Table(:,2),'.','Markersize',15);
xlabel('Input Power (dBm)')
ylabel('Output Power (dBm)');
grid on; 
title('AM/AM Characteristic');
Legend={'Simulated Results','Measurement'};
legend (Legend,'Location','north');

subplot(1,2,2)
plot(simulated_pindBm,phase,'.');
hold on
plot(amplifier.Table(:,1),amplifier.Table(:,3),'.','Markersize',15);
legend (Legend,'Location','north');
xlabel('Input Power (dBm)'); 
ylabel('Output Phase Shift (deg.)');
grid on; title('AM/PM Characteristic');

Constellation compression, due to the nonlinear amplifier characteristics, is evident compared to the reference constellation.

constellation(ampSig)

Apply nonlinear power amplifier (PA) characteristics to a 16-QAM signal by setting the Method property to Lookup table.

Define parameters for the modulation order, samples per symbol, input power, and create random data.

M = 16; % Modulation order
sps = 4; % Samples per symbol
pindBm = -8; % Input power
pin = 10.^((pindBm-30)/10); % power in Watts
data = randi([0 M-1],1000,1);
refdata = 0:M-1;
refconst = qammod(refdata,M,'UnitAveragePower',true);
paChar = pa_performance_characteristics();

Create a memoryless nonlinearity System object, a transmit filter System object, and a constellation diagram System object. The default lookup table values are used for the memoryless nonlinearity System object.

amplifier = comm.MemorylessNonlinearity('Method','Lookup table','Table',paChar);
txfilter = comm.RaisedCosineTransmitFilter('RolloffFactor',0.3, ...
    'FilterSpanInSymbols',6,'OutputSamplesPerSymbol',sps,'Gain',sqrt(sps));
constellation = comm.ConstellationDiagram('SamplesPerSymbol',4, ...
    'Title','Amplified/Distorted Signal','NumInputPorts',2, ...
    'ReferenceConstellation', refconst,'ShowLegend',true, ...
    'ChannelNames',{'Amplified signal','Filtered signal'});

Modulate the random data. Filter and apply the nonlinear amplifier characteristics to the modulation symbols.

modSig = qammod(data,M,'UnitAveragePower',true)*sqrt(pin);
filtSig = txfilter(modSig);
ampSig = amplifier(filtSig);

Compute input and output signal levels and the phase shift.

poutdBm = (20*log10(abs(ampSig)))+30;
simulated_pindBm = (20*log10(abs(filtSig)))+30;
phase = angle(ampSig.*conj(filtSig))*180/pi;

Plot AM/AM characteristics, AM/PM characteristics, and the constellation results.

figure
set(gcf,'units','normalized','position',[.25 1/3 .5 1/3])
subplot(1,2,1)
plot(simulated_pindBm,poutdBm,'.');
hold on
plot(amplifier.Table(:,1),amplifier.Table(:,2),'.','Markersize',15);
xlabel('Input Power (dBm)')
ylabel('Output Power (dBm)');
grid on;
title('AM/AM Characteristic');
Legend={'Simulated Results','Measurement'};
legend (Legend,'Location','south');

subplot(1,2,2)
plot(simulated_pindBm,phase,'.');
hold on
plot(amplifier.Table(:,1),amplifier.Table(:,3),'.','Markersize',15);
legend (Legend,'Location','south');
xlabel('Input Power (dBm)');
ylabel('Output Phase Shift (deg.)');
grid on; title('AM/PM Characteristic');

For the purpose of constellation comparison, normalize the amplified signal and the filtered signal. The nonlinear amplifier characteristics cause compression of the amplified signal constellation compared to the filtered constellation.

filtSig = filtSig/mean(abs(filtSig)); % Normalized filtered signal
ampSig = ampSig/mean(abs(ampSig)); % Normalized amplified signal
constellation(filtSig,ampSig)

function paChar = pa_performance_characteristics()

The pa_performance_characteristics helper function provides the amplifier performance characteristics. The data is extracted from figure 4 of Hammi, Oualid, et al. "Power amplifiers' model assessment and memory effects intensity quantification using memoryless post-compensation technique." IEEE Transactions on Microwave Theory and Techniques 56.12 (2008): 3170-3179.

The operating specification for the LDMOS-based Doherty Amplifier are:

  • Frequency: 2110MHz

  • Peak Power: 300w

  • Small Signal Gain: 61dB

Each row in HAV08_Table specifies Pin (dBm), Gain(dB), Phase shift (Degree).

HAV08_Table =...
    [-35,60.53,0.01;
    -34,60.53,0.01;
    -33,60.53,0.08;
    -32,60.54,0.08;
    -31,60.55,0.1;
    -30,60.56,0.08;
    -29,60.57,0.14;
    -28,60.59,0.19;
    -27,60.6,0.23;
    -26,60.64,0.21;
    -25,60.69,0.28;
    -24,60.76,0.21;
    -23,60.85,0.12;
    -22,60.97,0.08;
    -21,61.12,-0.13;
    -20,61.31,-0.44;
    -19,61.52,-0.94;
    -18,61.76,-1.59;
    -17,62.01,-2.73;
    -16,62.25,-4.31;
    -15,62.47,-6.85;
    -14,62.56,-9.82;
    -13,62.47,-12.29;
    -12,62.31,-13.82;
    -11,62.2,-15.03;
    -10,62.15,-16.27;
    -9,62,-18.05;
    -8,61.53,-20.21;
    -7,60.93,-23.38;
    -6,60.2,-26.64;
    -5,59.38,-28.75];

Convert the second column from Gain to Pout for use by the memoryless nonlinearity System object.

paChar = HAV08_Table;
paChar(:,2) = paChar(:,1)+paChar(:,2);
end

Algorithms

This object implements the algorithm, inputs, and outputs described on the Memoryless Nonlinearity block reference page. The object properties correspond to the block parameters.

Extended Capabilities

Introduced in R2012a