sos_gs_cfp.m

 アーム型倒立振子の GS 制御系設計の可解条件である連立 PDLMI (こちらを参照)を二乗和 (SOS) を利用して解く.
 そのために,前の例題と同様の考え方で,連立 PDLMI
  

  
のように書き換え,
  
が行列二乗和多項式となるような,行列二乗和多項式
  
が存在するかどうかを調べる.ただし,
  
であり,また, は微小な正数である.

 M ファイル sos_gs_cfp.m では,決定変数の数を減らすため, 式の代わりに
  
を考えるという工夫を施している(詳しくは,

  • H. Ichihara: Optimal Control for Polynomial Systems Using Matrix Sum of Squares Relaxations, IEEE Transactions on Automatic Control, Vol. 54, No. 5, pp.1050-1055 (2009)
  • 市原,川田: SOS に基づくアクロボットのゲインスケジューリング制御 ―姿勢制御実験による検証―, 計測自動制御学会論文集, Vol. 46, No. 7, pp.373-382 (2010)
を参照のこと).その上で,解を 2 次式
  
とし, (この値が最小値)を与え,凸可解問題を解いている.
実行結果 (gamma = 148)

>> sos_gs_cfp

-------------------------------------------------------------------------
YALMIP SOS module started...
-------------------------------------------------------------------------
Detected 222 parametric variables and 2 independent variables.
Detected 0 linear inequalities, 0 equality constraints and 0 LMIs.
Using kernel representation (options.sos.model=1).
Initially 2 monomials in R^1
Newton polytope (0 LPs).........Keeping 2 monomials (0.0468sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 2 monomials in R^1
Newton polytope (0 LPs).........Keeping 2 monomials (0.0312sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 2 monomials in R^1
Newton polytope (0 LPs).........Keeping 2 monomials (0sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 3 monomials in R^1
Newton polytope (0 LPs).........Keeping 3 monomials (0sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 2 monomials in R^1
Newton polytope (0 LPs).........Keeping 2 monomials (0sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 2 monomials in R^1
Newton polytope (0 LPs).........Keeping 2 monomials (0sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 5 monomials in R^2
Newton polytope (1 LPs).........Keeping 3 monomials (0.81121sec)
Finding symmetries..............Found no symmetries (0sec)
Initially 3 monomials in R^1
Newton polytope (0 LPs).........Keeping 3 monomials (0sec)
Finding symmetries..............Found no symmetries (0sec)
 
SeDuMi 1.3 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
Put 222 free variables in a quadratic cone
eqs m = 635, order n = 106, dim = 1993, blocks = 10
nnz(A) = 1733 + 0, nnz(ADA) = 220525, nnz(L) = 110580
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            2.05E-001 0.000
  1 : -3.42E-001 1.25E-001 0.000 0.6098 0.9000 0.9000   1.20  1  1  3.7E+000
  2 : -3.50E-001 4.51E-002 0.000 0.3617 0.9000 0.9000   1.25  1  1  1.7E+000
  3 : -1.55E-001 1.37E-002 0.000 0.3040 0.9000 0.9000   1.32  1  1  9.2E-001
  4 : -5.55E-002 3.58E-003 0.000 0.2608 0.9000 0.9000   1.52  1  1  5.5E-001
  5 : -8.93E-003 9.41E-004 0.000 0.2629 0.9000 0.9000   2.17  1  1  3.0E-001
  6 : -1.86E-003 2.27E-004 0.000 0.2409 0.9000 0.9000   1.43  1  1  2.4E-001
  7 : -4.01E-004 5.35E-005 0.000 0.2360 0.9000 0.9000   1.27  1  1  8.4E-002
  8 : -1.93E-004 2.43E-005 0.000 0.4539 0.9000 0.9000   0.94  1  1  4.6E-002
  9 : -1.24E-004 1.27E-005 0.000 0.5236 0.9000 0.9000   0.35  1  1  4.1E-002
 10 : -6.00E-005 5.55E-006 0.000 0.4370 0.9000 0.9000   0.28  1  1  2.8E-002
 11 : -2.19E-005 2.40E-006 0.000 0.4315 0.9000 0.9000   0.11  2  1  1.5E-002
 12 :  1.13E-006 9.64E-007 0.000 0.4024 0.9000 0.9000   0.14  2  2  2.3E-005
 13 :  8.54E-006 3.54E-007 0.000 0.3671 0.9000 0.9000   0.24  2  2  1.1E-005
 14 :  4.33E-006 1.21E-007 0.000 0.3419 0.9000 0.9000   0.54  2  2  4.5E-006
 15 :  4.55E-007 2.84E-008 0.000 0.2349 0.9000 0.9000   0.93  2  2  1.0E-006
 16 :  5.53E-008 5.20E-009 0.000 0.1829 0.9000 0.9000   1.11  3  3  1.8E-007
 17 :  1.18E-008 1.13E-009 0.000 0.2171 0.9000 0.9000   1.04  4  4  3.8E-008
 18 :  4.00E-009 2.90E-010 0.000 0.2570 0.9000 0.9000   1.01 14 17  9.8E-009
 19 :  1.78E-009 8.73E-011 0.000 0.3006 0.9000 0.9000   0.97 29 29  3.0E-009
 20 :  4.76E-010 2.19E-011 0.000 0.2507 0.9000 0.9000   0.99 39 32  7.5E-010

iter seconds digits       c*x               b*y
 20      2.9  11.1  0.0000000000e+000  4.7633667531e-010
|Ax-b| =  1.5e-008, [Ay-c]_+ =  1.5E-010, |x|= 4.8e+002, |y|= 6.3e+000

Detailed timing (sec)
   Pre          IPM          Post
9.300E-002    2.670E+000    4.199E-002    
Max-norms: ||b||=8.602129e+000, ||c|| = 0,
Cholesky |add|=15, |skip| = 0, ||L.L|| = 5.14682e+007.
sol = 
    yalmiptime: 4.7810
    solvertime: 2.8080
          info: 'No problems detected (SeDuMi-1.3)'
       problem: 0
        dimacs: [1.5599e-009 0 0 1.3039e-010 -4.7634e-010 2.7773e-008]
monos = 
  Columns 1 through 6
    [8x4 sdpvar]    [8x4 sdpvar]    [8x4 sdpvar]    [12x4 sdpvar]    [8x4 sdpvar]    [8x4 sdpvar]
  Columns 7 through 8
    [27x9 sdpvar]    [24x8 sdpvar]
Q0 = 
  Columns 1 through 6
    [8x8 double]    [8x8 double]    [8x8 double]    [12x12 double]    [8x8 double]    [8x8 double]
  Columns 7 through 8
    [27x27 double]    [24x24 double]

>> double(X0)
ans =
    0.9762    0.0102   -4.0300    1.2057
    0.0102    1.3585   -1.1611   -7.6394
   -4.0300   -1.1611   39.7430  -11.8807
    1.2057   -7.6394  -11.8807   53.1434

>> double(X1)
ans =
   -0.0830   -0.2078    1.4779   -0.4113
   -0.2078   -0.4548    4.2534   -0.3667
    1.4779    4.2534  -30.6182    3.2240
   -0.4113   -0.3667    3.2240   -1.5102

>> double(X2)
ans =
   -0.1102    0.0451    0.9587    0.0437
    0.0451    0.5253   -1.3450   -1.1731
    0.9587   -1.3450   -2.9983    0.7352
    0.0437   -1.1731    0.7352    6.5125

>> double(F0)
ans =
   -0.6686    2.2860   -4.6581   -7.6866

>> double(F1)
ans =
    0.1687   -0.0552   -8.5015   -0.7997

>> double(F2)
ans =
    0.2954   -0.5668   -1.8054    0.2137
    
前のページ (ichihara.zip) に戻る