Apply memoryless nonlinearity to complex baseband signal
The comm.MemorylessNonlinearity
System object™ applies memoryless nonlinear impairments to a complex baseband signal. Use this
System object to model memoryless nonlinear impairments caused by signal amplification in a
radio frequency (RF) transmitter or receiver. For more information, see Memoryless Nonlinear Impairments.
Note
All values of power assume a nominal impedance of 1 ohm.
To apply memoryless nonlinear impairments to a complex baseband signal:
Create the comm.MemorylessNonlinearity
object 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?.
creates a
memoryless nonlinearity System object that models RF nonlinear impairments.mnl
= comm.MemorylessNonlinearity
specifies properties using one or more name-value pair arguments. Enclose each property
name in quotes. For example, mnl
= comm.MemorylessNonlinearity(Name
,Value
)'Method','Saleh model'
sets the modeling
method to the Saleh method.
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.
Method
— Nonlinearity modeling method'Cubic polynomial'
(default) | 'Hyperbolic tangent'
| 'Saleh model'
| 'Ghorbani model'
| 'Rapp model'
| 'Lookup table'
Nonlinearity modeling method, specified as 'Cubic polynomial'
,
'Hyperbolic tangent'
, 'Saleh model'
,
'Ghorbani model'
, 'Rapp model'
, or
'Lookup table'
. For more information, see Memoryless Nonlinear Impairments.
Data Types: char
| string
InputScaling
— Input signal scaling factor0
(default) | scalarInput signal scaling factor in decibels, specified as a scalar. This property scales the power gain of the input signal.
Tunable: Yes
To enable this property, set the Method
property to 'Saleh model'
or 'Ghorbani
model'
.
Data Types: double
LinearGain
— Linear gain0
(default) | scalarLinear gain in decibels, specified as a scalar. This property scales the power gain of the output signal.
Tunable: Yes
To enable this property, set the Method
property to 'Cubic polynomial'
, 'Hyperbolic
tangent'
, or 'Rapp model'
.
Data Types: double
IIP3
— Third-order input intercept point30
(default) | scalarThird-order input intercept point in dBm, specified as a scalar.
Tunable: Yes
To enable this property, set the Method
property to 'Cubic polynomial'
or 'Hyperbolic
tangent'
.
Data Types: double
AMPMConversion
— AM/PM conversion factor10
(default) | scalarAM/PM conversion factor in degrees per decibel, specified as a scalar. For more information, see Cubic Polynomial and Hyperbolic Tangent Model Methods.
Tunable: Yes
To enable this property, set the Method
property to 'Cubic polynomial'
or 'Hyperbolic
tangent'
.
Data Types: double
AMAMParameters
— AM/AM parameters[2.1587 1.1517]
| [8.1081 1.5413 6.5202 -0.0718]
| row vectorAM/AM parameters used to compute the amplitude gain for an input signal, specified as a row vector.
When the Method
property is set to
'Saleh model'
, this property must be a two-element vector
that specifies alpha and beta values. In this case, the default value is
[2.1587 1.1517]
.
When the Method
property is set to
'Ghorbani model'
, this property must be a four-element vector
that specifies x1,
x2,
x3, and
x4 values. In this case, the default
value is [8.1081 1.5413 6.5202 -0.0718]
.
For more information, see Saleh Model Method and Ghorbani Model Method.
Tunable: Yes
To enable this property, set the Method
property is set to 'Saleh model'
or 'Ghorbani
model'
.
Data Types: double
AMPMParameters
— AM/PM parameters[4.0033 9.1040]
| [4.6645 2.0965 10.88 -0.003]
| row vectorAM/PM parameters used to compute the phase change for an input signal, specified as a row vector.
When the Method
property is set to
'Saleh model'
, this property must be a two-element vector
that specifies alpha and beta values. In this case, the default value is
[4.0033 9.1040]
.
When the Method
property is set to
'Ghorbani model'
, this property must be a four-element vector
that specifies y1,
y2,
y3, and
y4 values. In this case, the default
value is [4.6645 2.0965 10.88 -0.003]
For more information, see Saleh Model Method and Ghorbani Model Method.
Tunable: Yes
To enable this property, set the Method
property is set to 'Saleh model'
or 'Ghorbani
model'
.
Data Types: double
PowerLowerLimit
— Input power lower limit10
(default) | scalarInput power lower limit in dBm, specified as a scalar less than the
PowerUpperLimit
property value. The AM/PM conversion scales
linearly for input power values in the range [PowerLowerLimit
,
PowerUpperLimit
]. If the input signal power is below the input
power lower limit, the phase shift resulting from AM/PM conversion is zero. For more
information, see Cubic Polynomial and Hyperbolic Tangent Model Methods.
Tunable: Yes
To enable this property, set the Method
property is set to 'Cubic polynomial'
or 'Hyperbolic
tangent'
.
Data Types: double
PowerUpperLimit
— Input power upper limitinf
(default) | scalarInput power upper limit in dBm, specified as a scalar greater than
PowerLowerLimit
. The AM/PM conversion scales linearly for input
power values in the range [PowerLowerLimit
,
PowerUpperLimit
]. If the input signal power is above the input
power upper limit, the phase shift resulting from AM/PM conversion is constant. For more
information, see Cubic Polynomial and Hyperbolic Tangent Model Methods.
Tunable: Yes
To enable this property, set the Method
property is set to 'Cubic polynomial'
or 'Hyperbolic
tangent'
.
Data Types: double
OutputScaling
— Output signal scaling factor0
(default) | scalarOutput signal scaling factor in decibels, specified as a scalar. This property scales the power gain of the output signal.
Tunable: Yes
To enable this property, set the Method
property is set to 'Saleh model'
or 'Ghorbani
model'
.
Data Types: double
Smoothness
— Smoothness factor0.5
(default) | scalarSmoothness factor, specified as a scalar. For more information, see Rapp Model Method.
Tunable: Yes
To enable this property, set the Method
property is set to 'Rapp model'
.
Data Types: double
OutputSaturationLevel
— Output saturation level1
(default) | scalarOutput saturation level, specified as a scalar. For more information, see Rapp Model Method.
Tunable: Yes
To enable this property, set the Method
property is set to 'Rapp model'
.
Data Types: double
Table
— Amplifier characteristics lookup tableAmplifier characteristics lookup table, specified as an N-by-3
matrix of measured power amplifier (PA) characteristics. Each row is of the form
[Pin,
Pout, ΔΦ].
Pin specifies the PA input signal in dBm,
Pout specifies the PA output signal in dBm,
and ΔΦ specifies the output phase shift in degrees. The default value 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]
.
The measured PA characteristics defined by this property are used 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) values.
Note
To determine appropriate Pout and ΔΦ
for Pin values outside the range of values
specified in the Table
property, the System object applies linear extrapolation from the first two or last two
[Pin,
Pout, ΔΦ] rows of
Table
.
Tunable: Yes
To enable this property, set the Method
property is set to 'Lookup table'
.
Data Types: double
insig
— Input RF baseband signalInput RF baseband signal, specified as a scalar or column vector. Values in this input must be complex.
Data Types: double
Complex Number Support: Yes
outsig
— Output RF baseband signalOutput RF baseband signal, returned as a scalar or column vector. The output is of the same data type as the input.
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)
Generate 16-QAM data with an average power of 10 mW and pass the data through a nonlinear power amplifier (PA).
M = 16; data = randi([0 (M - 1)]',1000,1); avgPow = 1e-2; minD = avgPow2MinD(avgPow,M);
Create a memoryless nonlinearity System object, specifying the Saleh model method.
saleh = comm.MemorylessNonlinearity('Method','Saleh model');
Generate modulated symbols and pass them through the PA nonlinearity model.
modData = (minD/2).*qammod(data,M); y = saleh(modData);
Generate a scatter plot of the results.
scatterplot(y)
Average power normalization of input signal.
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;
Model a nonlinear amplifier, by creating a memoryless nonlinearity System object with a 30 dB third-order input intercept point. Create a raised cosine transmit filter System object.
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.
Generate random data symbols.
Modulate the data symbols and adjust the average power of the signal.
Filter the modulated signal.
Amplify the signal.
Measure 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. 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
.
arrayplot = dsp.ArrayPlot('PlotType','Line','XLabel','Power In (dBm)', ... 'XOffset',-5,'YLimits',[-5 5]); arrayplot(gain)
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, and input power. 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 object. 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 Characteristics'); leglabels = {'Simulated results','Measurement'}; legend (leglabels,'Location','north'); subplot(1,2,2) plot(simulated_pindBm,phase,'.'); hold on plot(amplifier.Table(:,1),amplifier.Table(:,3),'.','Markersize',15); legend (leglabels,'Location','north'); xlabel('Input Power (dBm)'); ylabel('Output Phase Shift (degrees)'); grid on; title('AM/PM Characteristics');
Generate a constellation diagram of the amplified signal and reference constellation. The nonlinear amplifier characteristics cause compression of the amplified signal constellation 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, and input power. 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',{'Filtered signal','Amplified 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 Characteristics'); leglabel = {'Simulated results','Measurement'}; legend (leglabel,'Location','south'); subplot(1,2,2) plot(simulated_pindBm,phase,'.'); hold on plot(amplifier.Table(:,1),amplifier.Table(:,3),'.','Markersize',15); legend (leglabel,'Location','south'); xlabel('Input Power (dBm)'); ylabel('Output Phase Shift (degrees)'); grid on; title('AM/PM Characteristics');
For the purpose of constellation comparison, normalize the amplified signal and the filtered signal. Generate a constellation diagram of the filtered signal and amplified 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)
The pa_performance_characteristics
helper function calculates 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.
function paChar = pa_performance_characteristics()
The operating specification for the LDMOS-based Doherty amplifier are:
A frequency of 2110 MHz
A peak power of 300 W
A small signal gain of 61 dB
Each row in HAV08_Table
specifies Pin (dBm), gain (dB), phase shift (degrees).
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 of the HAV08_Table from gain to Pout for use by the memoryless nonlinearity System object.
paChar = HAV08_Table;
paChar(:,2) = paChar(:,1) + paChar(:,2);
end
Memoryless nonlinear impairments distort the input signal amplitude and phase. The amplitude distortion is amplitude-to-amplitude modulation (AM/AM) and the phase distortion is amplitude-to-phase modulation (AM/PM).
Model Method | Memoryless Nonlinear Impairment |
---|---|
Cubic polynomial | AM/AM and AM/PM |
Hyperbolic tangent | |
Saleh model | |
Ghorbani model | |
Rapp model | AM/AM only |
Lookup table | Applies impairment according to
[Pin,
Pout, ΔΦ] amplifier characteristics
specified by the Table property |
The modeled impairments apply the AM/AM and AM/PM distortions differently, according to the model method you specify. The models apply the memoryless nonlinear impairment to the input signal by following these steps.
Multiply the signal by an input gain factor.
Note
You can normalize the signal to 1 by setting the input scaling gain to the inverse of the input signal amplitude.
Split the complex signal into its magnitude and angle components.
Apply an AM/AM distortion to the magnitude of the signal, according to the selected model method, to produce the magnitude of the output signal.
Apply an AM/PM distortion to the phase of the signal, according to the selected model method, to produce the angle of the output signal.
Note
This step does not apply for the Rapp model.
Combine the new magnitude and angle components into a complex signal. Then, multiply the result by an output gain factor.
The first four model methods (cubic polynomial, hyperbolic tangent, Saleh model, and Ghorbani model) apply AM/AM and AM/PM impairments as shown in this figure.
The Rapp model method applies AM/AM distortion as shown in this figure.
The lookup table method uses the power amplifier (PA) characteristics lookup table,
specified as an N-by-3 matrix of measured power amplifier (PA)
characteristics. Each row is of the form [Pin,
Pout, ΔΦ].
Pin specifies the PA input signal in dBm,
Pout specifies the PA output signal in dBm, and
ΔΦ specifies the output phase shift in degrees. The measured PA characteristics defined by
the Table
property are used 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) values.
Note
To determine appropriate Pout and ΔΦ for
Pin values outside the range of values
specified in the Table
property, the System object applies linear extrapolation from the first two or last two
[Pin,
Pout, ΔΦ] rows of
Table
.
This figure shows the AM/PM conversion behavior for the cubic polynomial and hyperbolic tangent model methods.
The AM/PM conversion scales linearly with an input power value between the lower and upper limits of the input power level. Outside this range, the AM/PM conversion is constant at the values corresponding to the lower and upper input power limits, which are zero and (AM/PM conversion) × (upper input power limit – lower input power limit), respectively.
This figure shows the AM/AM behavior (output voltage versus input voltage for the AM/AM distortion) and the AM/PM behavior (output phase versus input voltage for the AM/PM distortion) for the Saleh model method.
The AM/AM parameters, αAMAM and βAMAM, are used to compute the amplitude distortion of the input signal by using
where u is the magnitude of the scaled signal.
The AM/PM parameters, αAMPM and βAMPM, are used to compute the phase distortion of the input signal by using
where u is the magnitude of the scaled signal. The α and β parameters for AM/AM and AM/PM are similarly named but distinct.
The Ghorbani model method applies AM/AM and AM/PM distortion as described in this section.
The AM/AM parameters (x1, x2, x3, and x4) are used to compute the amplitude distortion of the input signal by using
where u is the magnitude of the scaled signal.
The AM/PM parameters (y1, y2, y3, and y4) are used to compute the phase distortion of the input signal by using
where u is the magnitude of the scaled signal.
The Rapp model method applies AM/AM distortion as described in this section. The Rapp model does not apply AM/PM distortion to the input signal.
The smoothness factor and output saturation level are used to compute the amplitude distortion of the input signal given by
where
u is the magnitude of the scaled signal.
S is the smoothness factor.
Osat is the output saturation level.
[1] Saleh, A.A.M. “Frequency-Independent and Frequency-Dependent Nonlinear Models of TWT Amplifiers.” IEEE Transactions on Communications 29, no. 11 (November 1981): 1715–20. https://doi.org/10.1109/TCOM.1981.1094911.
[2] Ghorbani, A., and M. Sheikhan. "The Effect of Solid State Power Amplifiers (SSPAs) Nonlinearities on MPSK and M-QAM Signal Transmission." In 1991 Sixth International Conference on Digital Processing of Signals in Communications, 193–97, 1991.
[3] Rapp, Ch. "Effects of HPA-Nonlinearity on a 4-DPSK/OFDM-Signal for a Digital Sound Broadcasting System." In Proceedings Second European Conf. on Sat. Comm. (ESA SP-332), 179–84. Liege, Belgium, 1991. https://elib.dlr.de/33776/.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
You have a modified version of this example. Do you want to open this example with your edits?