How to deal with Log( {complex affine} )

This is my code:

variable Psi_hat(M+1, M+1) hermitian
for k=1 : K
for j=1 : K
V1(k, j) =real(trace(V(:, :, k, j)* Psi_hat)) + (h_d(k, j))^2;
d1(k, j)= trans_power_ini(j)*V1(k, j);
d1_all = d1_all +d1(k, j);
end
end

for k=1 : K
D1(k) = (log(d1_all + (noise_maxpower^2)*(norm(W_ini(:, k)', 2))^2))/(log(2)) ;
end

The problem I detected may be d1_ all is an affine function, while log () should convert the parentheses into concave functions, that is, V1 into concave functions, but I will not convert it. I have also referred to this article, Log( {complex affine} ) - #6 by Mark_L_Stone but I still haven’t solved it.

Please help me :pray:

It must be the case that some of the input data is complex. The argument of log needs to be concave, which implies it needs to be real.

I can’t tell you what the proper fix is, because it’s not my model.

ok,thank you. Let me try to convert my input parameters to real numbers.

Problem solved,The advice you gave was very helpful! thank you so much! :grin: