When you made d
a variable, it changed from being an LMI (Linear Matrix Inequality, a.k.a. Linear SDP) to a BMI (Blinear Matrix Inequality), which is non-convex and not allowed by CVX.
P*An
includes a term P*d*A1
, which has a (bilinear) product of variables, hence the error message. Similarly for P*Ap
.
If you fix d, you can solve a convex feasibility problem, so perhaps can apply bisection (section 4.2.5 of Convex Optimization – Boyd and Vandenberghe ).