# How to write this in cvx (GLFP)

I have a received signal equation in the form:

``````y1 = (alpha' * G1 *f2 ) X2 + (alpha'* G1* Z + z1 )
y2 = (alpha' * G2 *f1 ) X1 + (alpha'* G2* Z + z1 )
``````

where alpha,f1, f2, z are 3 element complex vectors
and G1, G2 are 3X3 complex diagonal matrices
and z is a 1X1 complex number

X1 & X2 are the signals ,
(alpha’* G1* Z + z1 ) & (alpha’* G2* Z + z1 ) are the noise terms in both received signals.

I am trying to express the signal-to-noise ratios as Objective function

``````maximize min(snr1,snr2)
``````

where alpha is the parameter to be optimized, snr1 and snr2 are expressed as:

``````snr1 = |(alphas' * G1 *f2 )|^2 * P2 / ( |alpha'* G1* Z |^2 + sigma^2)
snr2 = |(alphas' * G2 *f1 )|^2 * P1 / ( |alpha'* G2* Z |^2 + sigma^2)
``````

where P1, P2, sigma^2 are scalar positive values

# First: is it possible to use CVX for such objective function?

``````  i think it is similar to General linear fraction programing mentioned in convex optimization Boyd Book
``````

# Second: i have tried to express the numerator and demonator in CVX form but i have errors:

``````cvx_begin
variables alphas(3) ;
X1_a = square_pos(abs(alphas' * G1 * f2 ))
X1_b = (square_pos(abs(alphas'* g1))+1)* SigmaSq
% no problems till here
% i am trying to get the inverse of the demonator value and multiply it with the numerator
X1 =X1_a * inv_pos(X1_b)
%
%
cvx_end
``````

I got the following error:

Error using cvx/pow_cvx (line 144)
Disciplined convex programming error:
Illegal operation: pow_p( {convex}, {-1} )

Error in cvx/inv_pos (line 5)
y = pow_cvx( x, -1, ‘pow_p’ );

Error in Max_Min_optimize_Alphas_02 (line 55)
X1 = X1_a *inv_pos(X1_b)

# I need suggestion for the basic idea , is it possible to continue trying to solve the errors or my idea is wrong at all and i need to do other thing.

Is your problem convex, or not? That is the first question you should be asking before you use CVX. I do not believe it is. And if it is not convex, then the answer is almost certainly no: you cannot use CVX. From the documentation:

``````CVX is not meant to be a tool for checking if your problem is convex. You need to know a bit about convex optimization to effectively use CVX ... If you are not certain that your problem is convex before you enter it into CVX, you are using the tool improperly, and your efforts will likely fail.
``````

I simply cannot emphasize this enough: do not try to use CVX until you have established that your problem is convex. In fact, the steps that you take proving that your problem is convex are very likely to be drawn largely from rules that CVX codifies in the disciplined convex programming ruleset.