# Why is CVXPY throwing a DCP error with cp.sqrt but no error with cp.norm

I am trying to use CVXPY to optimise signal-to-noise-plus interference ratio (SINR) for a visible light communication (VLC) system. I have one of my SINR constraints stated as

$$$$\mathbf{h}^{\textsf{T}}_{l,u}\mathbf{p}_{l} \geq \sqrt{\gamma_{u}\sum_{j\in \mathcal{L}\backslash\lbrace l\rbrace}\left(\mathbf{h}^{\textsf{T}}_{j,u}\mathbf{p}_{j}\right)^{{2}} + \sigma_{u}^{{2}}}.$$$$

If I use cp.sqrt(A), where A is the term inside the square root, my constraint violates DCCP rules but when I cast it with cp.norm(A), there seems to be no violations. May somebody please clarify to me why this is the case. I doubt that simply taking cp.norm(A) is correct. I have just started learning how to use CVXPY, I appreciate any help and guide.

Based on your experience, one of (ignoring the subscripts) h or p must be a variable. Therefore h'*p is affine. After introducing subscripts, you can form the norm of the vector of these individual affine terms in compliance with CVXPY's DCP rules, because the argument of norm is affine (vector). cp.norm of the appropriate vector is correct, but not cp.norm of the argument of the square root.
When norm is used, CVXPY will recognize this constraint as a Second Order Cone Constraint, and send it to the solver accordingly.
• I agree with the last sentence of your first paragraph. If I am getting you correctly, I should take the norm of each vector individually right? So, when casting this constraint in CVXPY, I will end up having the RHS as $\gamma_u$ * (cp.norm(vector1) + cp.norm(vector2) + ... + cp.norm(vectorL) + $\sigma_u$)? Can I use the infix operators * and + here as I just did since my norms are affine? Jan 21 at 18:38
• Hhhmm, this seems trivial yet I am still a bit lost. What happens to $\gamma_u$ if I am to have an expression as abs(x) + abs(y) as per the convention of the given example? Jan 21 at 19:29