# comm.DPD

Digital predistorter

## Description

The `comm.DPD`

System object™ applies digital predistortion (DPD) to a complex baseband signal by using a
memory polynomial to compensate for nonlinearities in a power amplifier. For more information,
see Digital Predistortion and Optimizing Estimator Polynomial Degree and Memory Depth.

To predistort signals:

Create the

`comm.DPD`

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?

## Creation

### Description

creates a digital
predistorter System object to predistort a signal.`dpd`

= comm.DPD

sets properties using one or more name-value pairs. For example,
`dpd`

= comm.DPD(`Name`

,`Value`

)`comm.DPD('PolynomialType','Cross-term memory polynomial')`

configures
the predistorter System object to predistort the input signal by using a memory polynomial with cross
terms. Enclose each property name in quotes.

## 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.

`PolynomialType`

— Polynomial type

`'Memory polynomial'`

(default) | `'Cross-term memory polynomial'`

Polynomial type used for predistortion, specified as one of these values:

`'Memory polynomial'`

— Predistorts the input signal by using a memory polynomial without cross terms.`'Cross-term memory polynomial'`

— Predistorts the input signal by using a memory polynomial with cross terms.

For more information, see Digital Predistortion.

`Coefficients`

— Memory-polynomial coefficients

```
complex([1 0 0 0 0; 0 0 0 0 0; 0 0 0 0
0])
```

(default) | matrix

Memory-polynomial coefficients, specified as a matrix. The number of rows in the matrix must equal the memory depth of the memory polynomial.

If

`PolynomialType`

is`'Memory polynomial'`

, the number of columns in the matrix is the degree of the memory polynomial.If

`PolynomialType`

is`'Cross-term memory polynomial'`

, the number of columns in the matrix must equal*m*(*n*-1)+1.*m*is the memory depth of the polynomial, and*n*is the degree of the memory polynomial.

For more information, see Digital Predistortion.

**Data Types: **`double`

**Complex Number Support: **Yes

## Usage

### Syntax

### Description

### Input Arguments

`in`

— Input baseband signal

column vector

Input baseband signal, specified as a column vector.

This object accepts variable-size inputs. After the object is locked, you can change the size of each input channel, but you cannot change the number of channels. For more information, see Variable-Size Signal Support with System Objects.

**Data Types: **`double`

**Complex Number Support: **Yes

### Output Arguments

`out`

— Predistorted baseband signal

column vector

Predistorted baseband signal, returned as a column vector of the same length as the input signal.

## 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

### Predistort Power Amplifier Input Signal

Apply digital predistortion (DPD) to a power amplifier input signal. The DPD coefficient estimator System object uses a captured signal containing power amplifier input and output signals to determine the predistortion coefficient matrix.

Load a file containing the input and output signals for the power amplifier.

load('commpowamp_dpd_data.mat','PA_input','PA_output')

Generate a DPD coefficient estimator System object and a raised cosine transmit filter System object.

estimator = comm.DPDCoefficientEstimator( ... 'DesiredAmplitudeGaindB',10, ... 'PolynomialType','Memory polynomial', ... 'Degree',5,'MemoryDepth',3,'Algorithm','Least squares'); rctFilt = comm.RaisedCosineTransmitFilter('OutputSamplesPerSymbol',2);

Estimate the digital predistortion memory-polynomial coefficients.

coef = estimator(PA_input,PA_output);

Generate a DPD System object using `coef`

, the estimated coefficients output from the DPD coefficient estimator, as for the coefficient matrix.

dpd = comm.DPD('PolynomialType','Memory polynomial', ... 'Coefficients',coef);

Generate 2000 random symbols and apply 16-QAM modulation to the signal. Apply raised cosine transmit filtering to the modulated signal.

s = randi([0,15],2000,1); u = qammod(s,16); x = rctFilt(u);

Apply digital predistortion to the data. The DPD System object returns a predistorted signal to provide as input to the power amplifier.

y = dpd(x);

### Format of Coefficient Matrix for Digital Predistortion Memory Polynomial

This example shows the format of the coefficient matrix for the DPD memory polynomial by using a randomly generated coefficient matrix. Steps in the example include:

Creation of a digital predistorter System object configured using a memory polynomial coefficient matrix with the memory depth set to

`3`

and the polynomial degree set to`5`

consisting of random values.Predistortion of a signal using the memory-polynomial coefficient matrix.

Comparison of one predistorted output element to the corresponding input element that has been manually computed using the memory-polynomial coefficient matrix.

Create a coefficient matrix representing a predistorter with the output equal to the input by generating a 3-by-5 coefficient matrix of zeros and setting the `coef(1,1)`

element to `1`

. Add small random complex nonlinear terms to the coefficient matrix.

coef = zeros(3,5); coef(1,1) = 1; coef = coef + 0.01*(randn(3,5)+1j*randn(3,5));

Create a DPD System object using the memory polynomial coefficient matrix, `coef`

.

dpd = comm.DPD( ... 'PolynomialType','Memory polynomial', ... 'Coefficients',coef);

Generate an input signal and predistort it using the `dpd`

System object.

x = randn(20,1) + 1j*randn(20,1); y = dpd(x);

Compare the manually distorted output for an input corresponding output element `y(18)`

to show how the coefficient matrix is used to calculate that particular output value.

```
u = x(18:-1:(18-3+1));
isequal(y(18),sum(sum(coef .* ...
[u u.*abs(u) u.*(abs(u).^2) u .* (abs(u).^3) u .* (abs(u).^4)])))
```

`ans = `*logical*
1

### Format of Cross-Term Coefficient Matrix for Digital Predistortion Memory Polynomial

This example shows the format of the coefficient matrix for the DPD memory polynomial by using a randomly generated coefficient matrix. Steps in the example include:

Creation of a digital predistorter System object configured using a cross-term memory polynomial coefficient matrix with the memory depth set to

`3`

and the polynomial degree set to`5`

consisting of random values.Predistortion of a signal using the cross-term memory polynomial coefficient matrix.

Comparison of one predistorted output element to the corresponding input element that has been manually computed using the cross-term memory polynomial coefficient matrix.

Create a coefficient matrix representing a predistorter with the output equal to the input by generating a 3-by-5 coefficient matrix of zeros and setting the `coef(1,1)`

element to `1`

. Add small random complex nonlinear terms to the coefficient matrix.

coef = zeros(3,3*(5-1)+1); coef(1,1) = 1; coef = coef + 0.01*(randn(3,13) + 1j*randn(3,13));

Create a DPD System object using the cross-term memory polynomial coefficient matrix, `coef`

.

dpd = comm.DPD( ... 'PolynomialType','Cross-term memory polynomial', ... 'Coefficients',coef);

Generate an input signal and predistort it using the `dpd`

System object.

x = randn(20,1) + 1j*randn(20,1); y = dpd(x);

Compare the manually distorted output for an input corresponding output element `y(18)`

to show how the coefficient matrix is used to calculate that particular output value.

```
u = x(18:-1:(18-3+1));
isequal(y(18),sum(sum(coef .* ...
[u u*abs(u.') u*(abs(u.').^2) u*(abs(u.').^3) u*(abs(u.').^4)])))
```

`ans = `*logical*
1

## Algorithms

### Digital Predistortion

Wireless communication transmissions commonly require wide bandwidth signal transmission over a wide signal dynamic range. To transmit signals over a wide dynamic range and achieve high efficiency, RF power amplifiers (PAs) commonly operate in their nonlinear region. As this constellation diagram shows, the nonlinear behavior of a PA causes signal constellation distortions that pinch the amplitude (AM-AM distortion) and twist phase (AM-PM distortion) of constellation points proportional to the amplitude of the constellation point.

The goal of digital predistortion is to find a nonlinear function that linearizes the net
effect of the PA nonlinear behavior at the PA output across the PA operating range. When the
PA input is *x*(*n*), and the predistortion function is
*f*(*u*(*n*)), where
*u*(*n*) is the true signal to be amplified, the PA
output is approximately equal to
*G*×*u*(*n*), where
*G* is the desired amplitude gain of the PA.

The digital predistorter can be configured to use a memory polynomial with or without cross terms.

The memory polynomial with cross terms predistorts the input signal as

$$x\text{(}n\text{)}=f\text{(}u\text{(}n\text{))}\triangleq {\displaystyle \sum _{m\text{=0}}^{M-1}{c}_{m}\times u\text{(}n\text{-}m\text{)}}+{\displaystyle \sum _{m\text{=0}}^{M-1}{\displaystyle \sum _{j\text{=0}}^{M-1}{\displaystyle \sum _{k\text{=0}}^{K-1}{a}_{mjk}\times u\text{(}n\text{-}m\text{)}\times |u\text{(}n\text{-}j\text{)}{|}^{k}}}}.$$

The memory polynomial with cross terms has (

*M*+*M*×*M*×(*K*-*1*)) coefficients for*c*and_{m}*a*_{mjk}.The memory polynomial without cross terms predistorts the input signal as

$$x\text{(}n\text{)}=f\text{(}u\text{(}n\text{))}\triangleq {\displaystyle \sum _{m\text{=0}}^{M-1}{\displaystyle \sum _{k\text{=0}}^{K-1}{a}_{mk}\times u\text{(}n\text{-}m\text{)}\times |u\text{(}n\text{-}m\text{)}{|}^{k}}}.$$

The polynomial without cross terms has

*M*×*K*coefficients for*a*._{mk}

**Estimating Predistortion Function and Coefficients**

The DPD coefficient estimation uses an indirect learning architecture to find function
*f*(*u*(*n*)) to predistort input
signal *u*(*n*) which precedes the PA input.

The DPD coefficient estimation algorithm models nonlinear PA memory effects based on the work in reference papers by Morgan, et al [1], and by Schetzen [2], using the theoretical foundation developed for Volterra systems.

Specifically, the inverse mapping from the PA output normalized by the PA gain,
{*y*(*n*)/*G*}, to the PA input,
{*x*(*n*)}, provides a good approximation to the
function *f*(*u*(*n*)), needed to
predistort {*u*(*n*)} to produce
{*x*(*n*)}.

Referring to the memory polynomial equations above, estimates are computed for the memory-polynomial coefficients:

*c*and_{m}*a*for a memory polynomial with cross terms_{mjk}*a*for a memory polynomial without cross terms_{mk}

The memory-polynomial coefficients are estimated by using a least squares fit
algorithm or a recursive least squares algorithm. The least squares fit algorithm or a
recursive least squares algorithms use the memory polynomial equations above for a memory
polynomial with or without cross terms, by replacing
{*u*(*n*)} with
{*y*(*n*)/*G*}. The function order
and dimension of the coefficient matrix are defined by the degree and depth of the memory
polynomial.

For an example that details the process of accurately estimating memory-polynomial coefficients and predistorting a PA input signal, see Digital Predistortion to Compensate for Power Amplifier Nonlinearities.

For background reference material, see the works listed in [1] and [2].

### Optimizing Estimator Polynomial Degree and Memory Depth

The DPD coefficient estimator based on [1] offers one specific indirect learning architecture, and may not be an optimal estimator. Other estimators, such as those using a direct learning architecture, may achieve better DPD results.

With the indirect learning architecture coefficient estimator, choosing the optimal degree and memory depth for the DPD coefficient estimator is a manual and iterative process. Consider starting by using a DPD coefficient estimator that has the same degree and the memory depth as that of the PA model, and check the DPD results. Assuming the results look promising, try reducing the degree and the memory depth for the DPD coefficient estimator. If DPD results are roughly the same or better, consider using the smaller degree and a smaller memory depth for the DPD coefficient estimator because it will be less computationally intensive. You should also experiment with degrees and memory depths above the degree and the memory depth of the PA model. If DPD performance improves using a higher degree or a larger memory depth for the DPD coefficient estimator may be desirable.

Regardless of the polynomial degree used for the estimator, you must control the bandwidth of the DPD input signal to avoid aliasing due to nonlinearities. As a rule of thumb, set the oversampling ratio of the DPD input signal equal to or greater than the degree of the DPD memory polynomial.

## References

[1] Morgan, Dennis R., Zhengxiang Ma,
Jaehyeong Kim, Michael G. Zierdt, and John Pastalan. "A Generalized Memory Polynomial Model
for Digital Predistortion of Power Amplifiers." *IEEE ^{®} Transactions on Signal Processing*. Vol. 54, Number 10, October
2006, pp. 3852–3860.

[2] M. Schetzen. *The
Volterra and Wiener Theories of Nonlinear Systems.* New York: Wiley,
1980.

## Extended Capabilities

### C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

Usage notes and limitations:

See System Objects in MATLAB Code Generation (MATLAB Coder).

## Version History

**Introduced in R2019a**

## See Also

### Objects

### Blocks

## MATLAB-Befehl

Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:

Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.

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)