cvx_begin
variables P(Nt,3) a(1,k) time_slot_allocation min_rate alpha_rate_private(1,k) alpha_rate_common(1,k) raw_SINR_private(1,k) raw_SINR_common(1,k);
maximize(min_rate);
subject to
a(1)>=0;
a(2)>=0;
square_pos(norm(P,'fro'))<= max_power;
1+raw_SINR_private-(2.^(alpha_rate_private))>=0;
1+raw_SINR_common-(2.^(alpha_rate_common))>=0;
0.5*(time_slot_allocation_old+alpha_rate_private_old).*(time_slot_allocation+alpha_rate_private)-0.25*((time_slot_allocation_old+alpha_rate_private_old).^2)-0.25*((time_slot_allocation-alpha_rate_private).^2)+a >= min_rate;
0.5*(time_slot_allocation_old+alpha_rate_common_old(1))*(time_slot_allocation+alpha_rate_common(1))-0.25*((time_slot_allocation_old+alpha_rate_common_old(1))^2)-0.25*((time_slot_allocation-alpha_rate_common(1))^2)>= a(1)+a(2);
0.5*(time_slot_allocation_old+alpha_rate_common_old(2))*(time_slot_allocation+alpha_rate_common(2))-0.25*((time_slot_allocation_old+alpha_rate_common_old(2))^2)-0.25*((time_slot_allocation-alpha_rate_common(2))^2)+((1-time_slot_allocation)*log2(1+SINR_common_sec))>= a(1)+a(2);
(square_pos(norm(((g_U1)')*(P(:,3)))))+noise_power-((2*real(((P_old(:,2))')*(g_U1)*((g_U1)')*(P(:,2))))./raw_SINR_private_old(1))+(square((norm(((g_U1)')*P_old(:,2))))*raw_SINR_private(1))/square(raw_SINR_private_old(1))<=0;
(square_pos(norm(((g_U2)')*(P(:,2)))))+noise_power-((2*real(((P_old(:,3))')*(g_U2)*((g_U2)')*(P(:,3))))./raw_SINR_private_old(2))+(square((norm(((g_U2)')*P_old(:,3))))*raw_SINR_private(2))/square(raw_SINR_private_old(2))<=0;
(square_pos(norm(((g_U1)')*(P(:,2)))))+(square_pos(norm(((g_U1)')*(P(:,3)))))+noise_power-(((2*real(((P_old(:,1))')*(g_U1)*((g_U1)')*(P(:,1)))))./raw_SINR_common_old(1)) +((square((norm(((g_U1)')*P_old(:,1))))*raw_SINR_common(1))/square(raw_SINR_common_old(1)))<=0;
(square_pos(norm(((g_U2)')*(P(:,2)))))+(square_pos(norm(((g_U2)')*(P(:,3)))))+noise_power-(((2*real(((P_old(:,1))')*(g_U2)*((g_U2)')*(P(:,1)))))./raw_SINR_common_old(2))+((square((norm(((g_U2)')*P_old(:,1))))*raw_SINR_common(2))/square(raw_SINR_common_old(2)))<=0;
cvx_end
NOTE:
t: min rate
I initialize the values with zeros.
I am new to CVX and this my optimization problem and code, it gives me that rate with negative value which is wrong. I do not know what is wrong so can someone help me.
Thank you in advance.