Dear all,
In the following, I am trying to maximize R_sum by jointly optimizing beta_t and beta_r.
Omega_t and Omega_r are both hermitian and defined. Meanwhile, omega_t and omega_r are also defined and complex, and phi_t and phi_r are complex vectors equal to betaexp(1jphase).
> function [beta_t, beta_r, phase_t, phase_r, phi_t, phi_r] = Phase(N, Q, omega_t, omega_r, Omega_t, Omega_r)
> theta_vals = linspace(0, 2*pi*(Q-1)/Q, Q);
> Phi_t = inv(Omega_t) * omega_t.‘/2;
> Phi_r = inv(Omega_r) * omega_r.’/2;
> Phi_t = Phi_t ./ abs(Phi_t);
> Phi_r = Phi_r ./ abs(Phi_r);
> for i = 1:N
> phase_t(i) = project_to_discrete(angle(Phi_t(i)), theta_vals);
> phase_r(i) = project_to_discrete(angle(Phi_r(i)), theta_vals);
> end
> Omega_t = 0.5*(Omega_t + Omega_t’);
> Omega_r = 0.5*(Omega_r + Omega_r’);
>
> cvx_begin quiet
> cvx_solver mosek
> variable beta_t(N) binary;
> variable beta_r(N) binary;
> expressions phi_t(N) phi_r(N) R_sum;
>
> for x = 1:N
> phi_t(x) = beta_t(x) * exp(1i * phase_t(x));
> phi_r(x) = beta_r(x) * exp(1i * phase_r(x));
> end
>
> R_sum = 2*real(omega_t * phi_t) - real(phi_t’ * Omega_t * phi_t) + 2*real(omega_r * phi_r) - real(phi_r’ * Omega_r * phi_r);
>
> maximize(R_sum);
> subject to
>
> beta_t + beta_r == 1;
>
> cvx_end
>
> for x = 1:N
> phi_t(x) = beta_t(x) * exp(1i * phase_t(x));
> phi_r(x) = beta_r(x) * exp(1i * phase_r(x));
> end
>
end
I got the following error and I have no idea why!
Disciplined convex programming error:
Invalid quadratic form: product is complex.
I appreciate your help.