I’m new to CVX and thanks for your contribution to CVX and for helping users. I have successfully used CVX to solve the optimization problem I have built, but the procedure is too verbose and I don’t know how to modify it to a more simplified form under the CVX grammar rules.
As shown in the figure, I want to optimize multiple hermite matrices, and the current procedure is to set multiple optimization variables separately. If I want to set it as W(N,N,K), that is, K N-N matrix W, how should I construct the optimization objective function problem shown in the figure ?
In addition, the judgment is involved in the constraint (a), so I also use the method of brute force enumeration. Is it possible to rewrite them into a convenient form?
This is my program now:
function [rate_tmp,W_tmp,gamm,senor_power] = ISAC_sub1(h_matr,n_vec,a_matr,R_min,p_max,rho,alpha_vec,beta_vec,N,W_bfrc)
W_bfr1 = W_bfrc(:,:,1);
W_bfr2 = W_bfrc(:,:,2);
W_bfr3 = W_bfrc(:,:,3);
cvx_clear
cvx_begin sdp
variable W1(4,4) hermitian semidefinite
variable W2(4,4) hermitian semidefinite
variable W3(4,4) hermitian semidefinite
variable gamm(3)
maximize(sum(gamm)+real(a_matr(:,1)’*(W1+W2+W3)a_matr(:,1)+a_matr(:,2)’(W1+W2+W3)*a_matr(:,2)));
subject to
log(n_vec+real(trace(h_matr(:,1)*h_matr(:,1)’*W1))+real(trace(h_matr(:,1)*h_matr(:,1)’*W2))+real(trace(h_matr(:,1)*h_matr(:,1)’*W3)))/log(2)-alpha_vec(1)-(real(trace(h_matr(:,1)h_matr(:,1)’(W2-W_bfr2)))+real(trace(h_matr(:,1)h_matr(:,1)’(W3-W_bfr3))))/beta_vec(1)-gamm(1) >= 0
log(n_vec+real(trace(h_matr(:,2)*h_matr(:,2)'*W1))+real(trace(h_matr(:,2)*h_matr(:,2)'*W2))+real(trace(h_matr(:,2)*h_matr(:,2)'*W3)))/log(2) -alpha_vec(2)-(real(trace(h_matr(:,2)*h_matr(:,2)'*(W2-W_bfr2)))+real(trace(h_matr(:,2)*h_matr(:,2)'*(W3-W_bfr3))))/beta_vec(2)-gamm(1) >= 0
log(n_vec+real(trace(h_matr(:,3)*h_matr(:,3)'*W1))+real(trace(h_matr(:,3)*h_matr(:,3)'*W2))+real(trace(h_matr(:,3)*h_matr(:,3)'*W3)))/log(2)-alpha_vec(3)-(real(trace(h_matr(:,3)*h_matr(:,3)'*(W2-W_bfr2)))+real(trace(h_matr(:,3)*h_matr(:,3)'*(W3-W_bfr3))))/beta_vec(3)-gamm(1) >= 0
log(n_vec+real(trace(h_matr(:,2)*h_matr(:,2)'*W2))+real(trace(h_matr(:,2)*h_matr(:,2)'*W3)))/log(2)-alpha_vec(4)-(real(trace(h_matr(:,2)*h_matr(:,2)'*(W3-W_bfr3))))/beta_vec(4)-gamm(2) >= 0
log(n_vec+real(trace(h_matr(:,3)*h_matr(:,3)'*W2))+real(trace(h_matr(:,3)*h_matr(:,3)'*W3)))/log(2)-alpha_vec(5)-(real(trace(h_matr(:,3)*h_matr(:,3)'*(W3-W_bfr3))))/beta_vec(5)-gamm(2) >= 0
log(n_vec+real(trace(h_matr(:,3)*h_matr(:,3)'*W3)))/log(2)-alpha_vec(6)-gamm(3) >= 0
real(trace(W1)+trace(W2)+trace(W3)) <= p_max
cvx_end
W_tmp = zeros(N,N,3);
W_tmp(:,:,1) = (h_matr(:,1)'*W1*h_matr(:,1))^(-1)*W1*h_matr(:,1)*h_matr(:,1)'*W1';W_tmp(:,:,2) = (h_matr(:,2)'*W2*h_matr(:,2))^(-1)*W1*h_matr(:,2)*h_matr(:,2)'*W2';W_tmp(:,:,3) = (h_matr(:,3)'*W3*h_matr(:,3))^(-1)*W3*h_matr(:,3)*h_matr(:,3)'*W3;
rate_tmp = cvx_optval;
gamm = sum(gamm);
senor_power = abs(a_matr(:,1)'*(W1+W2+W3)*a_matr(:,1)+a_matr(:,2)'*(W1+W2+W3)*a_matr(:,2));
end