Pseudo code for my problem

clear, clc

%Known information(Transfer function, E-field)

h=[1; 2; 3; 1; 2; 3; 1; 2];

%constant

sigma=1;

law=1000;

SAR=3;

P=1;

R=50;

%Number of frequency, antenna

N=1;

M=8;

err=1;

t=1;

t0=0.1;

ini=1;

count=1;

xor=1;

% cvx_solver mosek

%Entire optimization process

while xor

%Initialize S (by Time-reversal)

```
if ini==1
S=[1; 2; 3; 1; 2; 3; 1; 2];
%Calculate g using signal & transfer function
for j=1:1:N
x=1;
y=1;
for i=1:1:M*(M+1)/2
if i<=M
G(i,j)=2;
else
y=y+1;
G(i,j)=1;
if y>=M
x=x+1;
y=x;
end
end
end
end
end
```

%Calculate gambma using updated result

gambma=G/sum(sum(G))

% Optimization function begin GP

cvx_begin gp

```
variable s(M, N)
variable t
%To prevent cvx to double error
expression h(M, N)
expression g(M*(M+1)/2, N)
%Known information(Transfer function, E-field)
h=[1; 2; 3; 1; 2; 3; 1; 2];
%Calculate g using s(signal) & h(transfer function)
for j=1:1:N
x=1;
y=1;
for i=1:1:M*(M+1)/2
if i<=M
g(i,j)=(h(i,j)^2)*(s(i,j)^2);
else
y=y+1;
g(i,j)=2*h(x,j)*h(y,j)*s(x,j)*s(y,j);
if y>=M
x=x+1;
y=x;
end
end
end
end
product=(g./gambma).^(-gambma)
%Optimization begin
min 1/t
subject to
t*prod(prod(product))<=1;
(norm(s, 'fro'))^2/(P*R)<=1
cvx_end
s0=s
G=g
ini=0;
count=count+1;
err=abs((1/t-1/t0)/(1/t))
t0=t
xor=xor((err>0.1), (count<6));
%Check optimum value
sub=(norm(s0, 'fro'))^2/(P*R)
SIGMA=t/(sum(sum(G)))
PRODUCT=t*prod(prod(product))
```

end

Result

## Successive approximation method to be employed.

Mosek will be called several times to refine the solution.

Original size: 121 variables, 9 equality constraints

8 exponentials add 64 variables, 40 equality constraints

## Cones | Errors |

Mov/Act | Centering Exp cone Poly cone | Status

--------±--------------------------------±--------

0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Solved

Status: Solved

Optimal value (cvx_optval): +0

The problem is simple GP problem (I think…)

The above result shows my question.

As you can see, the status is solved so I thought that my problem is solved well.

However the optimal value is +0 that I didn’t expected and the optimal variable is wrong also!

So I don’t know what does the status of my problem mean…

Please give me any comment or advice…