Invalid quadratic form: product is complex - but real() is used

Hi,

Consider a matrix \mathbf{A}\in\mathbb{C}^{Nt} that is non-Hermitian (i.e., \mathbf{A}^{\dagger} \neq \mathbf{A}) positive semi-definite (PSD), meaning that for any arbitrary vector \mathbf{x}\in\mathbb{C}^{Nt} we have \text{Re}\left\{\mathbf{x}^{\dagger}\mathbf{A}\mathbf{x}\right\} \geq 0. The Hermitian part of \mathbf{A} is a matrix \mathbf{B}\in\mathbb{C}^{Nt} defined as \mathbf{B} = \frac{1}{2}\left(\mathbf{A} + \mathbf{A}^{\dagger}\right). This matrix is Hermitian (i.e., \mathbf{B}^{\dagger} = \mathbf{B}) PSD (i.e., \mathbf{B} \succeq 0) in the conventional sense, meaning that \mathbf{x}^{\dagger}\mathbf{B}\mathbf{x} \geq 0.

I am dealing with the following constraint that includes quadratic forms:

\mathbf{w}_{k}^{\dagger}\mathbf{B}\mathbf{w}_{k} \geq S,

where \mathbf{w}_{k}\in\mathbb{C}^{Nt} are the beamforming vectors (optimization variables), k = 1,\dots,K (the number of users), Nt is the number of transmit antennas, \mathbf{A} is given (and, therefore, we can construct \mathbf{B} as described above), and S > 0 is a given constraint.

Since, as mentioned earlier, \mathbf{B} is Hermitian PSD, this should work. However, as indicated by the title of this post, I get an “Invalid quadratic form: product is complex” error. Thus, I used as a workaround \text{Re}\left\{\mathbf{w}_{k}^{\dagger}\mathbf{B}\mathbf{w}_{k} \right\} \geq S, believing that this is simply a floating-point error or something similar that produces results of the form a + 0j (j = \sqrt{-1} being the imaginary unit - I apologize to the non-engineers for that! :slight_smile:) Nevertheless, this did not solve the aforementioned problem.

Do I miss something - possibly related with the inner-mechanics of CVX?

Thanks.

EDIT: My bad, I typed wrong values in the matrix, that is why it didn’t work. When I typed it correctly, thus inserting indeed a Hermitian PSD matrix, it worked correctly.