Please help me how to define the upper bound of variable in CVX

To transform the problem to be convex, I define u[t] as the upper bound of \sqrt(d_{B I}[t]d_{I B}[t]), and v[t] as the lower bound. Where d_{B I}^{2}=H^{2}+\|\boldsymbol{q[t]}-\boldsymbol{w}_{b s}\|^{2}, d_{I B}^{2}=H^{2}+\|\boldsymbol{q[t]}-\boldsymbol{w}_{b}\|^{2}, and I want to maximize the value of the upper bound (u[t]) to get the optimal q. But I don’t know how to define the bounds in CVX.

  1. If I define inequalities, then this doesn’t work because {convex} . * {convex}
expressions v(1,T) u(1, T)
pow_pos(v, 4) <= (pow_pos((norms(Q(:, 1:T)-repmat(w_a, 1, T), 2, 1) + H2) .* (norms(Q(:, 1:T)-repmat(w_b, 1, T), 2, 1) + H2), alpha));
  1. With the above problem solved, can I define upper and lower bounds using max and min?

the convex Problem is:

This is the final optimization problem for a particular published paper. The authors say it can be solved with CVX.

Have you proven the optimization problem is convex? How did you do so?

The forum readers can’t determine from your preceding post whether the problem is convex, because sufficient information is not provided in it. We don’t know what all those symbols mean, and which of them might have some unstated relation to the listed optimization variables.

We don’t know the value of \alpha. If 0 < \alpha <= 2, then u^{2/\alpha} is concave, and rhe 2nd constraint is convex, and can be entered as is, presuming the LHS is constant (which I don’t know, because I don’t know what those symbols are).

Please carefully read

Edit: corrected typo to 0 < \alpha <= 2.

Thanks for your reply, α is a constant, in fact the only variable is q[t], I need to make the upper bound u and the lower bound v vary with q as well. and make u[t] as small as possible, but I can’t define the bound correctly in code.

Of course this problem is convex, and it is into this problem that the original nonconvex problem is transformed in the thesis.

“In fact the only variable is q[t]”
Perhaps you could have told us that to begin with, Apparently?, Q is just a collection of the q? How are we supposed to know that?

u is listed as an optimization variable in the image. So I considered it as such.

In any event, what you need to do is write out very clearly in mathematical form the constraint you are having difficulty with, Of course, you will have already proved it is a convex constraint.

“Of course” is not a proof. In any event, I don’t even know what the problem is. It’s not obvious to me that you do either. Understanding what the problem should be the first thing to do. Then prove convexity of the specific problem you are trying to solve.

Well, actually I was just wondering how to define upper and lower boundaries. I’ll provide this detail if knowing the details will help you.

You need to CLEARLY define the optimization problem, specifying what are the optimization variables, what is input data, and explicitly state any relations between the symbols. Then you need to tell specifically which constraints (bound or whatever) you are having difficulty with. Upper and lower bound constraints aren’t treated special when inputting a problem, but you need to follow al CVX’s DCP rules. And you need to provide the convexity proof, not merely state that some thesis has something convex in it.

The original question was this:

To transform the problem to be convex, I define u[t] as the upper bound of \sqrt(d_{B I}[t]d_{I B}[t]), and v[t] as the lower bound. Where d_{B I}^{2}=H^{2}+\|\boldsymbol{q[t]}-\boldsymbol{w}_{b s}\|^{2}, d_{I B}^{2}=H^{2}+\|\boldsymbol{q[t]}-\boldsymbol{w}_{b}\|^{2}

You need to show us thew SPECIFIC convex optimization problem you wish to solve in CVX, along with the proof of convexity.

It sort of looks like you just copying stuff out of a thesis or paper without thoroughly understanding it. Trying to code it in CVX, or anything else, before you do that is premature.

Thanks for your prompt reply. Sorry for the inconvenience. I think I understand the idea of optimizing it, but I can’t finish the algorithm, maybe I didn’t understand it as you said, but the paper says it can be solved by CVX solved :smiling_face_with_tear:


The original paper is such a sentence argument, and my research is based on this paper, but I can’t complete the algorithm, which has been bothering me for quite some time.

So you want to solve problem (34(. You need to figure our what all the input data is and optimization variables are for the CVX problem. That is for you to figure out, not CVX readers.

I still don’t know what all those symbols are, but you need to. It looks like it might be straightforward to enter, presuming 0 < \alpha \le 2, as I wrote before. And maybe move v(t) to the RHS of (34b) (or use inv_pos), both presuming v(t) >= 0, which I don’t know to be the case, but you better know.

I suggest you take your time, and don’t rush to post again until you thoroughly understand the problem and algorithm. Those are prerequisites to successful use of CVX.

Edit: corrected typo to 0 < \alpha <= 2.

Thank you for taking your valuable time to respond to my question, this optimization problem is very complex in various notations, so my main post was asking how to define upper and lower bounds. I figured out the problem and the idea of this post, but I couldn’t reproduce its experiments, which took me a couple of weeks. It is because of the inability to define upper and lower bounds that I have not been able to complete this code, I tried to define u>= \sqrt(d_{B I}[t]d_{I B}[t]) in terms of variable but was unable to do so because {convex} . * {convex}, I tried defining u in expressions and then using max(), but apparently that’s not how this function works. I couldn’t think of anything else, and I didn’t find a solution in the CVX forum, so I came to ask a question.

Your difficulty is you don’t even understand the specification of the problem you are trying to solve. Figuring out the specification of a problem is what posters are supposed to do before asking for help on this forum, not something that forum readers should be providing on problems that are not their own. I encourage toy to CAREFULLY re-read the link I provided.

α is generally greater than or equal to 2. Forgive me for thinking that these details don’t matter.

I have nor corrected my typo to 0 < \alpha <= 2, which makes the exponent of u <= 1, which makes the RHS of (34c) concave, which makes (34c) convex, presuming the LHS of (34b) is convex. If \alpha > 2, the RHS of (34b) would be convex, which would make that constraint non-convex.

You would know this from carefully studying the CVX Users’ Guide.

Before trying to do research, perhaps you need to strengthen your knowledge of the fundamentals of convex optimization, for instance by reading and doing the exercises in the first 5 chapters of Convex Optimization – Boyd and Vandenberghe