Memory polynomial for a power amplifier

17 views (last 30 days)
Ali
Ali on 31 Oct 2023
Edited: Walter Roberson on 13 Aug 2024
How to implement the momory polynomial (MP) for a power amlifier (PA) complex data? The MP equation is:
Where:
• y[n] => Instantaneous complex output signal
• x[n-j] => Instantaneous complex input signal
• M => Model memory depth
• N => Model nonlinear order
• a_ji => Model complex coefficients
The problem is that I'm not sure how to go back to the old input "x[n-j]".
Below is a simple example. The expected x_new is a 9x3 matrix. Could someone help me, please?
%% Clean up
% Clear all variables
clear;
% Close all figures
close all;
% Clear command window
clc;
%% Test
x = [20; 40; 60; 80; 100];
y = x.^2;
M = 5;
N = 3;
for j = 3:M
for i = 1:N
x_new(:,i) = x(j:-1:end) .* (abs(x(j:-1:end)).^(i-1));
end
end
a_ji = x_new\y; % Solve systems for linear equation Ax = B (mldivide, \)
y_new = x_new * a_ji; % Memory polynomial output matrix y[n]

Answers (1)

Rajanya
Rajanya on 13 Aug 2024
Hi @Ali,
The code provided will always throw an error while calculating “a_ji” because the equation in the loops will end up producing a 0x3 vector and hence the ‘\‘ operator would not work. Assuming you will be having ‘a_ji’ coefficient matrix as input, you can calculate the given equation in the following way:
y = zeros(size(x));
%Run n from 1 to length of input signal maybe,
for j = 1:M+1
if (n-j) > 0
for i = 2:N+1
y(n) = y(n) + a(j, i)*x(n-j)*abs(x(n-j))^(i-2);
end
end
end
%End the outermost loop to get y values for all n.
To avoid any out of bound array accesses, the condition and the indexing have been put accordingly.
Please note that if you don’t have “a_ji” as input and you need to get it using “mldivide” operator (as you have intended to do in the example code), make sure you are producing the correct dimensions of the matrices before performing the operation.
Thanks.
  1 Comment
Ali
Ali on 13 Aug 2024
Edited: Walter Roberson on 13 Aug 2024
Thanks a lot for your answer and your time! I solved long ago, my answer is quiet similar. I computed the memory polynomial this way:
%% Test
x = [20; 40; 60; 80; 100];
y = x.^2;
M = 5;
N = 3;
% Initilize empty matrices
x_MP1 = [];
x_MP2 = [];
% Compute x[n-j].|x[n-j]|^(i-1)
for n = M+1:numel(x)
for i = 1:N
for j = 0:M
x_MP = x(n-j) .* abs(x(n-j)).^(i-1);
x_MP1 = [x_MP1 x_MP];
end
end
x_MP2 = [x_MP2; x_MP1];
x_MP1 = [];
x_MP = [];
end
% Solve for "a" coefficients, Xa = Y (Least square using backslash "\")
a_ij = x_MP2\y(M+1:1:end); % Forward model extraction
% Evaluation of the forward model
y_new = x_MP2 * a_ij;

Sign in to comment.

Categories

Find more on Polynomials in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!