how to solve a SDP problem or LMI with compelx data?

333 views
Skip to first unread message

Ricardo May

unread,
Jul 6, 2015, 2:07:16 AM7/6/15
to yal...@googlegroups.com

in addition, W contains complex numbers, and W is expected to be hermitian symmetric.


what I want to solve is just to recover a theorem in a paper I read, which was solved by SEDUMI. However, something occurred in my codes. to do that, I have write my codes just using SEDUMI and YALMIP, but I am not familiar with the K structure in SEDUMI, which may cause some mistakes. in addition, when I run my codes in MATLAB, here comes some unacceptable problems.
if you have any advice, please help me.
SDP_YALMIP.m
SDP_SEDUMI.m

Johan Löfberg

unread,
Jul 6, 2015, 3:30:16 AM7/6/15
to yal...@googlegroups.com
Your YALMIP code doesn't make sense as you defined a complex-valued objective

>> obj
Linear scalar (complex, 22 variables)


Ricardo May

unread,
Jul 6, 2015, 3:59:42 AM7/6/15
to yal...@googlegroups.com
sorry, I have attached a wrong file, here is the exact one I am proceeding. but after I update the latest YALMIP, a new problem occurred.


MOSEK Version 7.1.0.12 (Build date: 2014-12-12 11:23:25)
Copyright (c) 1998-2014 MOSEK ApS, Denmark. WWW: http://mosek.com
Platform: Windows/64-X86

Computer
  Platform               : Windows/64-X86  
  Cores                  : 2               

Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 81              
  Cones                  : 0               
  Scalar variables       : 1               
  Matrix variables       : 400             
  Integer variables      : 0               

Optimizer started.
Optimizer terminated. Time: 0.03    
Optimizer summary
  Optimizer                 -                        time: 0.03    
    Interior-point          - iterations : 0         time: 0.00    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
        Clean primal-dual   - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
      Primal-dual simplex   - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

Mosek error: MSK_RES_ERR_MISSING_LICENSE_FILE (MOSEK cannot locate a license. The default search path is 'C:\Users\Ricardo\mosek\mosek.lic'.)
ans = 
    yalmiptime: NaN
    solvertime: NaN
          info: 'Unknown problem in solver (Turn on '...'
       problem: 9
ans =
   NaN

by the way, could please give me some instructions about the K structure in SEDUMI, it is hard for me to understand K structure using the Guide, thank you!
SDP_YALMIP.m

Johan Löfberg

unread,
Jul 6, 2015, 4:09:25 AM7/6/15
to yal...@googlegroups.com
Well, now you've installed mosek for which you obviously have no license visible. Select sedumi as solver through sdpsettings if you want to use it

Ricardo May

unread,
Jul 6, 2015, 4:49:26 AM7/6/15
to yal...@googlegroups.com
SeDuMi 1.34 (beta) by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
eqs m = 81, order n = 2403, dim = 14403, blocks = 402
nnz(A) = 93609 + 0, nnz(ADA) = 6561, nnz(L) = 3321
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            1.07E+02 0.000
  1 :  -6.79E-02 6.79E+01 0.000 0.6363 0.9000 0.9000   5.75  1  1  1.3E+02
  2 :  -7.90E-02 2.12E+01 0.000 0.3125 0.9000 0.9000   5.73  1  1  1.4E+01
  3 :   8.09E-03 1.66E+00 0.000 0.0781 0.9900 0.9900   0.88  1  1  1.7E+00
  4 :   1.64E+00 1.60E-01 0.000 0.0962 0.9900 0.9900  -1.11  1  1  5.5E+00
  5 :   2.16E+01 1.15E-02 0.000 0.0723 0.9900 0.9900  -1.13  1  1  5.5E+00
  6 :   3.26E+02 7.64E-04 0.000 0.0662 0.9900 0.9900  -1.01  1  1  5.5E+00
  7 :   4.98E+03 5.02E-05 0.000 0.0657 0.9900 0.9900  -1.00  1  1  5.5E+00
  8 :   7.61E+04 3.29E-06 0.000 0.0655 0.9900 0.9900  -1.00  3  2  5.5E+00
  9 :   1.22E+06 2.00E-07 0.000 0.0608 0.9900 0.9900  -1.00  5  7  5.4E+00
 10 :   1.67E+07 1.44E-08 0.000 0.0722 0.9900 0.9900  -1.00  9 17  5.4E+00
 11 :   2.58E+08 9.37E-10 0.000 0.0649 0.9900 0.9900  -1.00 19 21  5.4E+00
Run into numerical problems.

Primal infeasible, dual improving direction found.
iter seconds  |Ax|    [Ay]_+     |x|       |y|
 11     19.9   1.8e-08   2.7e-09   4.5e+00   1.3e+01

Detailed timing (sec)
   Pre          IPM          Post
1.560E-01    1.260E+01    9.800E-02    
Max-norms: ||b||=2.805704e-01, ||c|| = 1,
Cholesky |add|=0, |skip| = 8, ||L.L|| = 1.06693.
ans = 
    yalmiptime: 1.9756
    solvertime: 12.8994
          info: 'Unbounded objective function (SeDuMi...'
       problem: 2
ans =
    -1

but I finally got an unbounded objective funtion with the latter SDP_YALMIP.m

Johan Löfberg

unread,
Jul 6, 2015, 5:04:12 AM7/6/15
to yal...@googlegroups.com
Yes, the model you've created is unbounded. Simply look at the solutions you get when you artificially constrain it. Now take that solution and understand which constraint you've forgot, or declared incorrectly

optimize([F,norm(W) <= 100],obj) % Increase 100 and it simply generates larger solutions
value(W)


Reply all
Reply to author
Forward
0 new messages