在利用CVX工具箱求解二阶锥规划时,加了一条不等式约束,结果报错,在google搜到的结果是该约束非凸.
(1)首先对该约束的凸性存在疑惑
(2)如何修改可以把该约束由非凸转凸?
code如下:
- %%%% Use CVX solve the SOPC problem
- % cvx version
- opt_n = 2*N_global + 1;
- e_b = 1e1;
- e_d = 1e-4;
- e_g = 800;
- cvx_begin
- variable b(opt_n) complex
- minimize( norm(Tb*b-ab))
- subject to
- norm(Td*b) <= sqrt(e_d);
- norm(Tb*b) >= sqrt(e_b);
- norm(b) <= sqrt(e_g);
- cvx_end
报错结果如下:
- Warning: A non-empty cvx problem already exists in this scope.
- It is being overwritten.
- > In cvxprob (line 28)
- In cvx_begin (line 41)
- In demostration_scatter_without_to_2D_8_27_dft_add_acc (line 59)
- Error using cvxprob/newcnstr (line 192)
- Disciplined convex programming error:
- Invalid constraint: {convex} >= {real constant}
- Error in >= (line 21)
- b = newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '>=' );
- Error in demostration_scatter_without_to_2D_8_27_dft_add_acc (line 64)
- norm(Tb*b) >= sqrt(e_b);