Illegal operation: log( {convex} ) in a certain convex constraint

Hi everyone. There is a constraint as below:

This constraint only has two variables: Sk,j[n] and qj[n].
Obviously, the first part Rk.m[N] is a quadratic term repect to qj[n]. And the constant Ak,j[n] >= 0. Thus, the first part Rk.m[N] is concave. The second part which has the -log function is certainly concave. In conclusion, this constraint is convex.

But when I use cvx, it always says: Illegal operation: log( {convex} ). I understand that in cvx, we should make sure the formula within the log function should be concave. But I have no idea how to write the above convex constraint legally.

Thanks in advance!

Thanks for visiting this forum.

Presuming you are willing for S_{k,j}[n] to be implicitly constrained to be positive, I think you can adapt the formulation in the 3rd entry of the Entropy table in the Conic Modeling Cheatsheet

Hi Mark. Thanks so much for your help! The document you provide is certainly helpful. But I think it only works when there is only one variables. However, in my constraint, there are more than one variables.

The picture below illustrates what I mean: as you can see, the right part of the picture prove the idea you provide. But when I try to extend the model to mulitiple-variables case. A (x1x2) appears in the new constraints. Isn’t it?

Thanks again for your kind help!

Hi Mark, I mean, when there is a (x1*x2) in my constraint, it will have a error: Invalid quadratic form(s): not a square. Isn’t it?

If you want to do logarithm of sum of inverses, like on the right side of your scan, there are better ways. See https://docs.mosek.com/modeling-cookbook/expo.html#log-sum-inv for two of them.

Oh, Thanks so much Michal. It seems a great way to adjust the model. I will try as soon as possible. Thanks again!