Model narrowband power amplifier with memory
RF Blockset / Idealized Baseband
The Power Amplifier block models a two-port power amplifier using a memory polynomial expression derived from the Volterra series. The Volterra series models the nonlinear relationship between input and output signals. This block includes memory effects: the output response depends on the current input signal and the input signal at previous times. Use this block when transmitting narrowband signals into your RF system.
The Power Amplifier block mask icons are dynamic and show the model specified in the Model Type parameter.
|Model Type: ||Model Type: |
Port_1 — Time-dependent input signal
real scalar | real column | complex scalar | complex column
Time-dependent input signal, specified as a real scalar, real column, complex scalar, or complex column. A column represents consecutive points in time.
Port_1 — Time-dependent output signal
complex scalar | complex column
Time-dependent output signal, returned as a complex scalar or complex column. The output time-dependent signal is equal in size to the input time dependent signal.
Model type — Model to design amplifier
Memory polynomial (default) |
Use either the
Memory polynomial model or the
Cross-Term Memory model to design the power amplifier. The
following table summarizes the characteristics of the two models.
|Model||Characterization Data||Type of Coefficients||In-Band Spectral Regrowth||Out-of-Band Harmonic Generation|
For more information, see Model Type.
Coefficient matrix — Coefficient matrix
1 (default) | complex matrix | real matrix
Coefficient matrix, specified as a complex matrix for the
Cross-Term Memory models.
Memory polynomial and
Memory models, you can identify the complex coefficient matrix based on
the measured complex (I,Q) output-vs.-input amplifier characteristic. As an example, see
the helper function in Coefficient Matrix Computation .
The size of the matrix depends on the number of delays and the degree of the system nonlinearity.
Memory polynomialmodel, the matrix has dimensions .
Cross-Term Memorymodel, the matrix has dimensions .
Time interval of measured PA data (s) — Sample time of measured input-output data
1e-6 (default) | positive scalar
Sample time of the measured input-output data used to construct the coefficient matrix, specified in seconds.
Simulate using — Type of simulation to run
Code generation (default) |
Type of simulation to run, specified as one of the following:
Code generation— Simulate model using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time, but the speed of the subsequent simulations is faster than
Interpreted execution— Simulate model using the MATLAB® interpreter. This option shortens startup time speed, but the speed of the subsequent simulations is slower than
Code generation. In this mode, you can debug the source code of the block.
The Power Amplifier block in the Idealized Baseband library supports two model types.
Memory polynomial— The narrowband memory polynomial implementation (equation (19) of ) used in this model operates on the envelope of the input signal, does not generate new frequency components, and captures in-band spectral regrowth. Use this model to create a narrowband amplifier operating at high frequency.
The output signal, at any instant of time, is the sum of all the elements of the complex matrix of dimensions :
In the matrix, the number of rows equals the number of memory terms, and the number of columns equals the degree of the nonlinearity. The signal subscript represents the amount of delay.
Cross-Term Memory— The narrowband memory polynomial implementation (equation (23) of ) used in this model also operates on the envelope of the input signal, does not generate new frequency components, and captures in-band spectral regrowth. Use this model to create a narrowband amplifier operating at high frequency. This model includes leading and lagging memory terms and provides a generalized implementation of the memory polynomial model.
The output signal, at any instant of time, is the sum of all the elements of the matrix specified by the element-by-element product
C .* MCTM,
where C is a complex coefficient matrix of dimensions and
In the matrix, the number of rows equals the number of memory terms, and the number of columns is proportional to the degree of the nonlinearity and the number of memory terms. The signal subscript represents the amount of delay. The additional columns that do not appear in the
Memory polynomialmodel represent the cross terms.
Coefficient Matrix Computation
To compute coefficient matrices, the block solves an overdetermined linear system of
equations. Consider the
Memory polynomial model for the case
where the memory length is 2 and the system nonlinearity is of third degree. The matrix that
describes the system is and the sum of its elements is equivalent to the inner product
If the input to the amplifier is the five-sample signal [x(1) x(2) x(3) x(4) x(5)] and the corresponding output is [y(1) y(2) y(3) y(4) y(5)], then the solution to which can be found using the MATLAB backslash operator, provides an estimate of the coefficient matrix.
The treatment of the
Cross-Term Memory model is similar. The
matrix that describes the system is and the sum of its elements is equivalent to the inner product
If the input to the amplifier is the five-sample signal [x(1) x(2) x(3) x(4) x(5)] and the corresponding output is [y(1) y(2) y(3) y(4) y(5)],
then the solution to provides an estimate of the coefficient matrix.
Use this helper function to compute coefficient matrices for the
Cross-Term Memory models. The
inputs to the function are the given input and output signals, the memory length, the degree
of nonlinearity, and the absence or presence of cross terms.
function a_coef = fit_memory_poly_model(x,y,memLen,degLen,modType) % FIT_MEMORY_POLY_MODEL % Procedure to compute a coefficient matrix given input and output % signals, memory length, nonlinearity degree, and model type. % % Copyright 2017 MathWorks, Inc. x = x(:); y = y(:); xLen = length(x); switch modType case 'memPoly' % Memory polynomial xrow = reshape((memLen:-1:1)' + (0:xLen:xLen*(degLen-1)),1,); xVec = (0:xLen-memLen)' + xrow; xPow = x.*(abs(x).^(0:degLen-1)); xVec = xPow(xVec); case 'ctMemPoly' % Cross-term memory polynomial absPow = (abs(x).^(1:degLen-1)); partTop1 = reshape((memLen:-1:1)'+(0:xLen:xLen*(degLen-2)),1,); topPlane = reshape( ... [ones(xLen-memLen+1,1),absPow((0:xLen-memLen)' + partTop1)].', ... 1,memLen*(degLen-1)+1,xLen-memLen+1); sidePlane = reshape(x((0:xLen-memLen)' + (memLen:-1:1)).', ... memLen,1,xLen-memLen+1); cube = sidePlane.*topPlane; xVec = reshape(cube,memLen*(memLen*(degLen-1)+1),xLen-memLen+1).'; end coef = xVec\y(memLen:xLen); a_coef = reshape(coef,memLen,numel(coef)/memLen);
 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, No. 10, October 2006, pp. 3852–3860.
 Gan, Li, and Emad Abd-Elrady. "Digital Predistortion of Memory Polynomial Systems using Direct and Indirect Learning Architectures". Proceedings of the Eleventh IASTED International Conference on Signal and Image Processing (SIP) (F. Cruz-Roldán and N. B. Smith, eds.), No. 654-802. Calgary, AB: ACTA Press, 2009.