n = 40;
m = 15*n;
wa = 0.01*pi; wb = pi;
wl = logspace(log10(wa),log10(wb),m)';
D = 1./sqrt(wl);
Al = [ones(m,1) 2*cos(kron(wl,[1:n-1]))];
cvx_begin
variable r(n,1)
variable R(m,1)
minimize( max( max( [R./(D.^2) (D.^2).*inv_pos(R)]' ) ) )
subject to
R == Al*r;
cvx_end
disp(['Problem is ' cvx_status])
if ~strfind(cvx_status,'Solved')
return
end
h = spectral_fact(r);
figure(1)
H = exp(-j*kron(wl,[0:n-1]))*h;
loglog(wl,abs(H),wl,D,'r--')
set(gca,'XLim',[wa pi])
xlabel('freq w')
ylabel('mag H(w) and D(w)')
legend('optimized','desired')
Calling sedumi: 3641 variables, 2400 equality constraints
------------------------------------------------------------
SeDuMi 1.21 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
Split 41 free variables
eqs m = 2400, order n = 3083, dim = 4283, blocks = 601
nnz(A) = 5400 + 49200, nnz(ADA) = 9600, nnz(L) = 6000
Handling 82 + 0 dense columns.
it : b*y gap delta rate t/tP* t/tD* feas cg cg prec
0 : 4.04E-01 0.000
1 : 3.49E+01 8.25E-02 0.000 0.2042 0.9000 0.9000 -0.98 1 1 6.4E+01
2 : 2.06E+02 7.52E-03 0.000 0.0911 0.9900 0.9900 -0.82 1 1 2.8E+01
3 : 9.16E+01 3.21E-03 0.000 0.4272 0.9000 0.9000 1.69 1 1 7.7E+00
4 : 3.04E+01 9.91E-04 0.000 0.3088 0.9000 0.9000 3.48 1 1 8.0E-01
5 : 8.04E+00 4.32E-04 0.000 0.4361 0.9000 0.9000 4.95 1 1 1.0E-01
6 : 3.44E+00 2.23E-04 0.000 0.5151 0.9000 0.9000 2.91 1 1 3.2E-02
7 : 2.17E+00 1.01E-04 0.000 0.4548 0.9000 0.9000 1.53 1 1 1.3E-02
8 : 1.68E+00 5.00E-05 0.000 0.4938 0.9000 0.9000 1.08 1 1 6.4E-03
9 : 1.45E+00 3.11E-05 0.000 0.6218 0.9000 0.9000 0.92 1 1 4.1E-03
10 : 1.27E+00 1.52E-05 0.000 0.4900 0.9000 0.9000 0.91 1 1 2.1E-03
11 : 1.23E+00 8.33E-06 0.000 0.5466 0.9000 0.9000 1.02 1 1 1.1E-03
12 : 1.20E+00 2.57E-06 0.000 0.3089 0.9016 0.9000 1.00 1 1 3.9E-04
13 : 1.19E+00 7.43E-07 0.000 0.2887 0.9044 0.9000 1.00 1 1 1.2E-04
14 : 1.19E+00 2.24E-07 0.000 0.3009 0.9012 0.9000 1.00 1 1 3.8E-05
15 : 1.19E+00 2.61E-08 0.000 0.1168 0.9000 0.0000 1.00 1 1 1.3E-05
16 : 1.19E+00 4.21E-09 0.000 0.1611 0.9292 0.9000 1.00 5 5 3.5E-06
17 : 1.19E+00 2.24E-10 0.176 0.0532 0.9900 0.8463 1.00 6 6 3.3E-07
18 : 1.19E+00 3.95E-12 0.000 0.0176 0.9900 0.9900 1.00 14 14 6.2E-09
iter seconds digits c*x b*y
18 8.5 Inf 1.1873313477e+00 1.1873324283e+00
|Ax-b| = 2.5e-08, [Ay-c]_+ = 2.1E-09, |x|= 2.7e+02, |y|= 1.1e+00
Detailed timing (sec)
Pre IPM Post
4.000E-02 8.540E+00 3.000E-02
Max-norms: ||b||=1, ||c|| = 1,
Cholesky |add|=7, |skip| = 2, ||L.L|| = 3.72784.
------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +1.18733
Problem is Solved