# 怎么解决 问题状态：ill_posed 解决方案状态：dual_illposed_cer

I need everyone’s help, thank you very much.
In a for loop, satisfying the condition is to output the optimal solution, but during the iteration process, the error Problem status: ILL will occur while running_ POSED
Solution status : DUAL_ ILLPOSED_ CER
How to solve it?
Mosek warning has a large number of null values, does this refer to the null value of a variable。

``````First iteration value
tau_max_t =

0.3036
0.3788
0.2991
0.0131

gammaa_t =

1.0403    1.0852
1.0177    0.1224
1.0006    0.4026
0.9999    0.0992
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (0) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (1) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (2) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (3) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (4) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (5) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (7) of matrix 'A'.
MOSEK warning 710: #10 (nearly) zero elements are specified in sparse col '' (8) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (9) of matrix 'A'.
Warning number 710 is disabled.
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 187
Cones                  : 10
Scalar variables       : 179
Matrix variables       : 17
Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.01
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.01
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 187
Cones                  : 10
Scalar variables       : 179
Matrix variables       : 17
Integer variables      : 0

Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 177
Optimizer  - Cones                  : 11
Optimizer  - Scalar variables       : 162               conic                  : 97
Optimizer  - Semi-definite variables: 17                scalarized             : 6356
Factor     - setup time             : 0.00              dense det. time        : 0.00
Factor     - ML order time          : 0.00              GP order time          : 0.00
Factor     - nonzeros before factor : 1.20e+04          after factor           : 1.29e+04
Factor     - dense dim.             : 0                 flops                  : 7.75e+06
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   2.0e+01  2.2e+04  1.6e+06  0.00e+00   1.641198899e+06   -2.145220299e+00  1.0e+00  0.03
1   1.2e+01  1.3e+04  1.3e+06  -1.00e+00  1.641158579e+06   -4.167924771e+01  6.0e-01  0.09
2   3.2e+00  3.5e+03  6.6e+05  -1.00e+00  1.640832328e+06   -3.613791873e+02  1.6e-01  0.09
3   3.1e-01  3.4e+02  2.1e+05  -1.00e+00  1.636129109e+06   -4.900141851e+03  1.6e-02  0.09
4   5.6e-02  6.0e+01  8.6e+04  -9.99e-01  1.607235330e+06   -2.843630011e+04  2.8e-03  0.11
5   1.1e-02  1.2e+01  3.6e+04  -9.76e-01  1.364059422e+06   -1.343324849e+05  5.4e-04  0.11
6   4.2e-03  4.5e+00  1.6e+04  -6.13e-01  8.625567225e+05   -2.118976553e+05  2.1e-04  0.13
7   1.4e-03  1.5e+00  3.1e+03  2.11e-01   2.834847200e+05   -1.253587477e+05  7.1e-05  0.13
8   1.9e-04  2.0e-01  9.7e+01  1.01e+00   2.999168374e+04   -1.995532581e+04  9.3e-06  0.13
9   1.5e-05  1.6e-02  2.2e+00  1.05e+00   2.275501979e+03   -1.638963903e+03  7.5e-07  0.14
10  4.1e-06  4.5e-03  3.3e-01  1.01e+00   6.178094709e+02   -4.665877927e+02  2.1e-07  0.14
11  1.0e-06  1.1e-03  5.2e-02  1.00e+00   1.491658647e+02   -1.208836182e+02  5.2e-08  0.16
12  4.7e-07  5.1e-04  1.7e-02  1.00e+00   6.617900085e+01   -5.782218298e+01  2.4e-08  0.16
13  3.0e-07  3.2e-04  8.5e-03  9.97e-01   4.450190218e+01   -3.418554552e+01  1.5e-08  0.17
14  1.9e-07  2.1e-04  4.4e-03  9.89e-01   3.066487076e+01   -1.978790022e+01  9.6e-09  0.19
15  1.4e-07  1.5e-04  2.8e-03  9.70e-01   2.540322653e+01   -1.149529877e+01  6.9e-09  0.19
16  1.2e-07  1.3e-04  2.4e-03  9.49e-01   2.352450093e+01   -9.513169552e+00  6.2e-09  0.20
17  5.1e-08  5.5e-05  6.9e-04  9.30e-01   1.658489630e+01   2.121162864e+00   2.5e-09  0.20
18  3.7e-08  4.0e-05  4.6e-04  7.20e-01   1.548638457e+01   3.956670969e+00   1.8e-09  0.20
19  1.8e-08  1.9e-05  1.7e-04  6.93e-01   1.379420023e+01   7.576280608e+00   8.8e-10  0.22
20  8.4e-09  9.0e-06  5.9e-05  8.46e-01   1.269090293e+01   9.553951407e+00   4.2e-10  0.22
21  2.9e-09  3.2e-06  1.3e-05  8.96e-01   1.201500354e+01   1.085605166e+01   1.5e-10  0.23
22  1.7e-09  1.8e-06  6.3e-06  8.22e-01   1.187970626e+01   1.115773369e+01   8.4e-11  0.23
23  9.9e-10  1.1e-06  3.0e-06  8.49e-01   1.179030974e+01   1.134333448e+01   4.9e-11  0.25
24  5.8e-10  6.2e-07  1.5e-06  7.56e-01   1.175468411e+01   1.146335815e+01   2.9e-11  0.25
25  2.8e-10  3.0e-07  5.1e-07  8.35e-01   1.170487910e+01   1.155686186e+01   1.4e-11  0.25
26  1.3e-10  1.4e-07  1.9e-07  7.22e-01   1.169137387e+01   1.161070799e+01   6.5e-12  0.27
27  7.0e-11  7.5e-08  8.2e-08  7.88e-01   1.167964037e+01   1.163269914e+01   3.5e-12  0.27
28  2.9e-11  3.1e-08  2.6e-08  6.85e-01   1.167714395e+01   1.165437825e+01   1.4e-12  0.28
29  2.0e-11  2.2e-08  1.6e-08  6.97e-01   1.167660869e+01   1.165912591e+01   1.0e-12  0.28
30  6.5e-12  7.0e-09  3.9e-09  6.06e-01   1.167883106e+01   1.167168898e+01   3.2e-13  0.28
31  3.5e-12  3.8e-09  1.8e-09  6.29e-01   1.168036100e+01   1.167583393e+01   1.8e-13  0.30
32  1.6e-12  2.2e-09  7.3e-10  4.89e-01   1.168307827e+01   1.168034335e+01   8.1e-14  0.30
33  1.0e-12  2.3e-09  3.8e-10  6.11e-01   1.168363057e+01   1.168176972e+01   5.0e-14  0.31
34  3.0e-13  4.6e-09  8.8e-11  4.88e-01   1.168583398e+01   1.168507496e+01   1.5e-14  0.31
35  1.4e-13  2.3e-09  3.8e-11  4.84e-01   1.168678583e+01   1.168631675e+01   7.3e-15  0.33
36  4.8e-14  7.4e-10  8.9e-12  5.82e-01   1.168749627e+01   1.168730587e+01   2.4e-15  0.33
37  2.4e-14  3.7e-10  3.8e-12  5.37e-01   1.168790495e+01   1.168778806e+01   1.2e-15  0.34
38  1.2e-14  9.9e-10  1.5e-12  1.07e+00   1.168805471e+01   1.168799398e+01   6.9e-16  0.36
39  5.2e-15  1.8e-10  4.2e-13  1.01e+00   1.168811532e+01   1.168808964e+01   3.0e-16  0.36
40  5.1e-15  2.4e-10  3.8e-13  1.01e+00   1.168808104e+01   1.168805711e+01   2.8e-16  0.36
41  5.2e-15  3.2e-09  3.8e-13  1.23e+00   1.168780747e+01   1.168778363e+01   2.8e-16  0.38
42  2.7e-15  1.7e-09  2.8e-13  -9.99e-01  1.168771196e+01   1.168768889e+01   1.6e-16  0.38
43  2.7e-15  1.7e-09  2.8e-13  -9.98e-01  1.168771196e+01   1.168768889e+01   1.6e-16  0.39
44  2.7e-15  1.7e-09  2.8e-13  -9.93e-01  1.168771196e+01   1.168768889e+01   1.6e-16  0.41
Optimizer terminated. Time: 0.44

Interior-point solution summary
Problem status  : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal.  obj: 1.1687711965e+01    nrm: 2e+07    Viol.  con: 4e-10    var: 1e-11    barvar: 0e+00    cones: 0e+00
Dual.    obj: 1.1687688884e+01    nrm: 1e+06    Viol.  con: 0e+00    var: 3e-06    barvar: 3e-07    cones: 0e+00
Optimizer summary
Optimizer                 -                        time: 0.44
Interior-point          - iterations : 45        time: 0.42
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
Simplex                 -                        time: 0.00
Primal simplex        - iterations : 0         time: 0.00
Dual simplex          - iterations : 0         time: 0.00
Mixed integer           - relaxations: 0         time: 0.00

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3.04764

ans =

3.0586

rho =

0.0011

Second iteration value
u_t =

0.6432 - 0.7657i
0.6432 - 0.7657i
0.6434 - 0.7655i
0.6436 - 0.7654i
0.6431 - 0.7658i
0.9927 - 0.1205i
0.8736 + 0.4867i
0.9866 - 0.1631i
0.9968 + 0.0804i
0.6923 - 0.7216i

tau_max_t =

0.1323
0.1849
0.1468
0.0078

gammaa_t =

1.0076    1.1202
1.0440    0.8631
1.0030    0.8569
0.9988    0.8344

Saving prefs...done.

Calling Mosek 9.1.9: 3243 variables, 187 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (0) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (1) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (2) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (3) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (4) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (5) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (6) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (7) of matrix 'A'.
MOSEK warning 710: #10 (nearly) zero elements are specified in sparse col '' (8) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (9) of matrix 'A'.
Warning number 710 is disabled.
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 187
Cones                  : 10
Scalar variables       : 179
Matrix variables       : 17
Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.00
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.01
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 187
Cones                  : 10
Scalar variables       : 179
Matrix variables       : 17
Integer variables      : 0

Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 177
Optimizer  - Cones                  : 11
Optimizer  - Scalar variables       : 162               conic                  : 97
Optimizer  - Semi-definite variables: 17                scalarized             : 6356
Factor     - setup time             : 0.00              dense det. time        : 0.00
Factor     - ML order time          : 0.00              GP order time          : 0.00
Factor     - nonzeros before factor : 1.20e+04          after factor           : 1.29e+04
Factor     - dense dim.             : 0                 flops                  : 7.75e+06
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   2.0e+01  2.2e+04  1.6e+06  0.00e+00   1.641198899e+06   -2.154131558e+00  1.0e+00  0.03
1   9.7e+00  1.0e+04  1.1e+06  -1.00e+00  1.641162170e+06   -3.765691394e+01  4.8e-01  0.09
2   3.2e+00  3.4e+03  6.5e+05  -1.00e+00  1.640905651e+06   -2.876870081e+02  1.6e-01  0.09
3   8.3e-02  9.0e+01  1.1e+05  -1.00e+00  1.628429594e+06   -1.213092799e+04  4.2e-03  0.11
4   1.4e-02  1.5e+01  4.2e+04  -9.92e-01  1.502572518e+06   -7.086230096e+04  6.8e-04  0.11
5   5.9e-03  6.4e+00  2.3e+04  -7.49e-01  1.153117180e+06   -1.243531654e+05  2.9e-04  0.11
6   2.0e-03  2.2e+00  6.5e+03  -2.53e-01  5.002638183e+05   -1.430414010e+05  1.0e-04  0.13
7   4.7e-04  5.1e-01  4.5e+02  9.00e-01   8.467091941e+04   -5.300020044e+04  2.4e-05  0.13
8   2.6e-05  2.8e-02  4.7e+00  1.16e+00   3.543301662e+03   -3.364172961e+03  1.3e-06  0.14
9   4.4e-06  4.8e-03  3.5e-01  1.01e+00   5.923657726e+02   -5.660902339e+02  2.2e-07  0.14
10  1.5e-06  1.6e-03  8.3e-02  1.00e+00   2.058705809e+02   -1.848101223e+02  7.4e-08  0.14
11  5.4e-07  5.9e-04  1.9e-02  1.00e+00   7.104908624e+01   -7.174131020e+01  2.7e-08  0.16
12  3.2e-07  3.5e-04  8.9e-03  9.96e-01   4.405730703e+01   -4.047194529e+01  1.6e-08  0.16
13  2.1e-07  2.2e-04  4.7e-03  9.91e-01   2.948437213e+01   -2.482968297e+01  1.0e-08  0.17
14  1.5e-07  1.6e-04  2.9e-03  9.73e-01   2.440353045e+01   -1.454404797e+01  7.3e-09  0.19
15  9.1e-08  9.9e-05  1.5e-03  9.42e-01   1.973151096e+01   -5.404777804e+00  4.6e-09  0.19
16  7.5e-08  8.1e-05  1.2e-03  8.95e-01   1.802885335e+01   -3.096239031e+00  3.8e-09  0.20
17  3.4e-08  3.7e-05  4.1e-04  8.41e-01   1.474868791e+01   3.998411417e+00   1.7e-09  0.20
18  1.8e-08  1.9e-05  1.6e-04  6.42e-01   1.319782923e+01   7.113627459e+00   9.0e-10  0.22
19  6.7e-09  7.2e-06  3.9e-05  8.23e-01   1.207882313e+01   9.673291245e+00   3.3e-10  0.22
20  1.8e-09  2.0e-06  6.4e-06  9.24e-01   1.158827113e+01   1.088635571e+01   9.2e-11  0.22
21  1.0e-09  1.1e-06  2.8e-06  8.51e-01   1.148382221e+01   1.107558569e+01   5.0e-11  0.23
22  5.8e-10  6.2e-07  1.3e-06  8.55e-01   1.142689004e+01   1.117718928e+01   2.9e-11  0.23
23  4.0e-10  4.4e-07  8.0e-07  7.47e-01   1.141404918e+01   1.122397185e+01   2.0e-11  0.25
24  1.8e-10  1.9e-07  2.5e-07  8.63e-01   1.137525420e+01   1.128587053e+01   9.0e-12  0.25
25  7.6e-11  8.1e-08  8.1e-08  7.49e-01   1.136505480e+01   1.132145064e+01   3.8e-12  0.25
26  3.3e-11  3.6e-08  2.6e-08  7.88e-01   1.135862762e+01   1.133742068e+01   1.7e-12  0.27
27  1.8e-11  1.9e-08  1.2e-08  6.50e-01   1.135879706e+01   1.134540164e+01   8.9e-13  0.27
28  1.0e-11  1.1e-08  5.7e-09  7.67e-01   1.135742542e+01   1.134900303e+01   5.2e-13  0.28
29  3.4e-12  3.6e-09  1.4e-09  6.35e-01   1.135835707e+01   1.135490650e+01   1.7e-13  0.28
30  1.7e-12  1.9e-09  6.3e-10  5.27e-01   1.135969748e+01   1.135743256e+01   8.7e-14  0.28
31  9.2e-13  9.9e-10  2.7e-10  6.90e-01   1.136004559e+01   1.135869911e+01   4.6e-14  0.30
32  3.4e-13  8.2e-10  8.2e-11  5.21e-01   1.136117867e+01   1.136051401e+01   1.7e-14  0.30
33  2.2e-13  1.0e-09  5.0e-11  4.80e-01   1.136149887e+01   1.136098794e+01   1.1e-14  0.31
34  6.7e-14  1.6e-09  1.2e-11  4.48e-01   1.136228986e+01   1.136207863e+01   3.4e-15  0.31
35  3.4e-14  2.5e-09  5.2e-12  5.09e-01   1.136258214e+01   1.136244933e+01   1.7e-15  0.31
36  1.3e-14  9.2e-10  1.5e-12  5.77e-01   1.136280147e+01   1.136273990e+01   6.4e-16  0.33
37  7.6e-15  3.6e-09  9.1e-13  1.38e+00   1.136310026e+01   1.136305718e+01   4.8e-16  0.33
38  4.3e-15  1.8e-09  3.7e-13  7.45e-01   1.136301246e+01   1.136298793e+01   2.4e-16  0.34
39  4.9e-15  9.2e-10  3.6e-13  1.35e+00   1.136290011e+01   1.136287657e+01   2.4e-16  0.34
40  3.0e-15  6.9e-10  4.2e-13  -9.17e-01  1.136282318e+01   1.136278973e+01   2.0e-16  0.36
41  1.8e-15  4.0e-10  3.2e-13  -5.17e-01  1.136224825e+01   1.136221574e+01   1.3e-16  0.38
42  5.3e-15  7.3e-10  1.8e-13  -7.10e-01  1.135976732e+01   1.135974529e+01   5.3e-17  0.38
43  1.4e-15  2.6e-10  8.9e-14  -9.03e-01  1.134619522e+01   1.134620968e+01   1.5e-17  0.39
44  5.6e-16  1.1e-10  5.8e-14  -9.81e-01  1.132164590e+01   1.132171903e+01   6.5e-18  0.39
45  1.1e-16  2.7e-11  2.8e-14  -9.95e-01  1.117337256e+01   1.117377200e+01   1.5e-18  0.39
46  9.0e-17  2.2e-11  2.5e-14  -9.96e-01  1.112625385e+01   1.112675747e+01   1.2e-18  0.41
47  8.9e-17  2.2e-11  2.4e-14  -8.42e-01  1.114727884e+01   1.114776239e+01   1.2e-18  0.41
48  8.9e-17  2.2e-11  2.4e-14  -8.07e-01  1.114727884e+01   1.114776239e+01   1.2e-18  0.42
49  8.9e-17  2.2e-11  2.4e-14  -8.06e-01  1.114727884e+01   1.114776239e+01   1.2e-18  0.44
Optimizer terminated. Time: 0.47

Interior-point solution summary
Problem status  : ILL_POSED
Solution status : DUAL_ILLPOSED_CER
Primal.  obj: 4.5261768468e-07    nrm: 3e+02    Viol.  con: 6e-07    var: 5e-19    barvar: 0e+00    cones: 3e-08
Optimizer summary
Optimizer                 -                        time: 0.47
Interior-point          - iterations : 50        time: 0.45
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
Simplex                 -                        time: 0.00
Primal simplex        - iterations : 0         time: 0.00
Dual simplex          - iterations : 0         time: 0.00
Mixed integer           - relaxations: 0         time: 0.00

------------------------------------------------------------
Status: Failed
Optimal value (cvx_optval): NaN
``````

My Code

``````    for e_i=1:100
cvx_begin
cvx_solver mosek
cvx_save_prefs
variable U(N_all+1,N_all+1) hermitian
variable uu(N_all+1) complex
variables  relax_IN_VB(K,L) relax_IN_Vr(K,L) relax_S_B(K,L)  relax_S_R(K,L)  rho  tau_max(K)   gammaa(K,L)
expressions   A(M+N_all,M+N_all,K)  a0(M+N_all,M+N_all,K,L)  b0(M+N_all,K,L)  c0(K,L)  LMI_S(M+N_all+1,M+N_all+1,K,L)  ...
right_up(K,L)  e(K,L) delta(K,L) LMI_IN(M+N_all+2,M+N_all+2,K,L) RR_lp(K) S2(K)  LIM(N_all+2,N_all+2) ;
a=zeros(N_all,N_all);
ut=[u_t;1];
for l=1:L
E(l,:)=[H_rE(:,l)',h_BE(:,l)'];
for k=1:K
w_temp=zeros(M,M);
for j=k+1:K
w_temp=w_temp+w(:,j)*w(:,j)';
end
[UU,SS,VV]=svd(G*w_temp*G');
for n=1:N_all
ss(:,:,n)=[diag((SS(n,n)*UU(:,n))),zeros(N_all,1)];
vv(:,:,n)=[diag(VV(:,n)');zeros(1,N_all)];
a=a+ss(:,:,n)*U*vv(:,:,n);
end
A(:,:,k)=[a, diag(uu(1:N_all)')*G* w_temp;...
w_temp*G'*diag(uu(1:N_all)),  w_temp];
a0(:,:,k,l)=A(:,:,k)+relax_S_B(k,l)*[zeros(N_all,N_all),zeros(N_all,M);zeros(M,N_all),eye(M)]...
+relax_S_R(k,l)*[eye(N_all),zeros(N_all,M);zeros(M,N_all),zeros(M,M)];
b0(:,k,l)=A(:,:,k)'*E(1,:)';
c0(k,l)=E(1,:)*A(:,:,k)*E(1,:)'+noise-gammaa(k,l)-relax_S_R(k,l)*epsilong_R(l)-relax_S_B(k,l)*epsilong_B(l);
LMI_S(:,:,k,l)=[a0(:,:,k,l)   b0(:,k,l);...
b0(:,k,l)'    c0(k,l)];
right_up(k,l)=(2^(tau_max_t(k)))*gammaa(k,l)+(2^(tau_max_t(k)))*gammaa_t(k,l)*log(2)...
*(tau_max(k)-tau_max_t(k))-gammaa(k,l);
e(k,l)=right_up(k,l)-relax_IN_VB(k,l)-relax_IN_Vr(k,l)*N_all;
delta(k,l)=(uu(1:N_all)'*diag(H_rE(:,l)')*G+h_BE(:,l)')*w(:,k);
LMI_IN(:,:,k,l)=[e(k,l)            delta(k,l)                    zeros(1,M)                   zeros(1,N_all);...
delta(k,l)'       1-relax_IN_VB(k,l)        h_BE_error(l)*w(:,k)'       h_rE_error(l)*w(:,k)'*G';...
zeros(M,1)        h_BE_error(l)*w(:,k)      relax_IN_VB(k,l)*eye(M)      zeros(M,N_all);...
zeros(N_all,1)    h_rE_error(l)*G*w(:,k)    zeros(N_all,M)               relax_IN_Vr(k,l)*eye(N_all)];
end
end
LMI=[1,uu';uu,U];
for k=1:K
w_temp1=0;w_temp2=0;
for i=k+1:K
w_temp1=w_temp1+pow_abs((u_t'*H(:,:,k)+h_Bk(:,k)')*w(:,i),2);
w_temp2=w_temp2+pow_abs((uu(1:N_all)'*H(:,:,k)+h_Bk(:,k)')*w(:,i),2);
end
w_temp3=pow_abs((u_t'*H(:,:,k)+h_Bk(:,k)')*w(:,k),2);
w_temp4=pow_abs((uu(1:N_all)'*H(:,:,k)+h_Bk(:,k)')*w(:,k),2);
RR_lp(k)=log(1+(w_temp3)/(w_temp1+noise))/log(2)+2*real((u_t'*H(:,:,k)+h_Bk(:,k)')*w(:,k)*...
((uu(1:N_all)'*H(:,:,k)+h_Bk(:,k)')*w(:,k)))/((w_temp1+noise)*log(2))...
-(w_temp3)*(w_temp2+noise+w_temp4)/((w_temp1+noise)*((w_temp1+noise)+w_temp3)*log(2))-w_temp3/((w_temp1+noise)*log(2));
S2(k)=RR_lp(k)-tau_max(k);
end
maximize sum(S2)-f*rho
subject to
diag(U)==1;
for n=1:N_all+1
2*real(ut(n)*uu(n)')-abs(ut(n))^2>=1-rho;%正惩罚项
end
for k=2:K
for j=1:k-1
for n=j+1:K
real(trace(P(:,:,k)*w(:,j)*w(:,j)'*P(:,:,k)'*U))>=real(trace(P(:,:,k)*w(:,n)*w(:,n)'*P(:,:,k)'*U));
end
end
end
LMI==hermitian_semidefinite(N_all+2);
for l=1:L
for k=1:K
LMI_S(:,:,k,l) ==hermitian_semidefinite(M+N_all+1);
LMI_IN(:,:,k,l) ==hermitian_semidefinite(M+N_all+2);
relax_IN_VB(k,l)>0;
relax_IN_Vr(k,l)>0;
relax_S_B(k,l)>0;
relax_S_R(k,l)>0;
gammaa(k,l)>0;
RR_lp(k)-tau_max(k)>0;
end
end
cvx_end
sum(S2)
rho
if cvx_status(1)=='S' || cvx_status(3)=='a'
S(e_i+1)=sum(S2);
u_t=uu(1:N_all)
tau_max_t=tau_max
gammaa_t=gammaa
if rho<0.001&&abs(S(e_i+1)-S(e_i))/S(e_i+1)<0.001
break;
end
else
break
end
end
``````

I think the iteration value is relatively normal and has not become particularly large or small, but I don’t know why the next loop failed.

Mosek warned about near zero input data. You should look at all the input data which was used on the iteration in which Mosek provided the warnings and failed to solve the problem. As you run SCA, the solution in each iteration can become more and more extreme, eventually resulting in failure.