@@ -37,7 +37,7 @@ Gcl0 = let
3737 tempB = [- 0.1065 0.1309 ; - 0.0091 0.0112 ; - 0.0001 0.0001 ; - 0.0081 0.0 ; - 0.1157 0.0 ; 0.0216 0.0 ; 0.0093 0.0 ; 0.0012 0.0 ]
3838 tempC = [0.0 0.0 15.625 0.0 0.0 0.0 0.0 0.0 ; 0.0 0.0 - 12.7105 2.0 - 2.5903 - 7.941 - 47.9883 - 5.1294 ]
3939 tempD = [1.0 0.0 ; - 0.8135 0.0 ]
40- ss (tempA, tempB, tempC, tempD, 0.01 )
40+ diagm ([ 1 , - 1 ]) * ss (tempA, tempB, tempC, tempD, 0.01 ) * diagm ([ 1 , - 1 ] )
4141end
4242
4343@test hinfnorm2 (Gcl0 - info. Gcl)[1 ] < 0.02
@@ -115,7 +115,7 @@ Gcl0 = let
115115 tempB = [0.0 2.0 ; 0.0 0.0 ; 0.0 0.0 ; 0.0985 0.0 ; 0.7981 0.0 ; 1.0 0.0 ]
116116 tempC = [0.5 0.625 0.0 0.0 0.0 0.0 ; 0.0 0.0 1.0 0.0 0.0 0.0 ]
117117 tempD = [1.0 0.0 ; 0.0 0.0 ]
118- ss (tempA, tempB, tempC, tempD)
118+ diagm ([ 1 , - 1 ]) * ss (tempA, tempB, tempC, tempD) * diagm ([ 1 , - 1 ] )
119119end
120120
121121K0 = let
@@ -151,8 +151,8 @@ S, PS, CS, T = RobustAndOptimalControl.gangoffour2(P,K)
151151gof = extended_gangoffour (P, K)
152152isstable (gof)
153153@test nugap (S, gof[1 ,1 ])[1 ] < 1e-6
154- @test nugap (PS, gof[1 ,2 ])[1 ] < 1e-6
155- @test nugap (CS, - gof[2 ,1 ])[1 ] < 1e-6
154+ @test nugap (PS, - gof[1 ,2 ])[1 ] < 1e-6
155+ @test nugap (CS, gof[2 ,1 ])[1 ] < 1e-6
156156@test nugap (T, - gof[2 ,2 ])[1 ] < 1e-6
157157
158158gof = extended_gangoffour (P, K, false )
@@ -181,13 +181,3 @@ bodeplot(info2.K1, w, lab="Feedforward filter")
181181@test dcgain (G2)[] ≈ 1 rtol= 1e-4
182182
183183
184-
185- P = ssrand (1 ,2 ,1 ,proper= false )
186- K = ssrand (2 ,1 ,1 ,proper= false )
187- G = extended_gangoffour (P, K, false )
188- @test tf (G[1 ,1 ]) ≈ tf (sensitivity (P, K))
189- @test tf (G[2 ,1 ]) ≈ tf (G_CS (P, K))
190-
191- G = extended_gangoffour (P, K, true )
192- @test tf (G[1 ,1 ]) ≈ tf (sensitivity (P, K))
193- @test tf (G[2 ,1 ]) ≈ tf (- G_CS (P, K))
0 commit comments