@@ -384,7 +384,7 @@ def test_siso_disk_margin():
384
384
# Balanced (S - T) disk-based stability margins
385
385
DM , DGM , DPM = disk_margins (L , omega , skew = 0.0 )
386
386
assert_allclose ([DM ], [0.46 ], atol = 0.1 ) # disk margin of 0.46
387
- assert_allclose ([DGM ], [4.05 ], atol = 0.1 ) # disk-based gain margin of 4.05 dB
387
+ assert_allclose ([DGM ], [4.05 ], atol = 0.1 ) # disk-based gain margin of 4.05 dB
388
388
assert_allclose ([DPM ], [25.8 ], atol = 0.1 ) # disk-based phase margin of 25.8 deg
389
389
390
390
# For SISO systems, the S-based (S) disk margin should match the third output
@@ -408,13 +408,13 @@ def test_mimo_disk_margin():
408
408
# Balanced (S - T) disk-based stability margins at plant output
409
409
DMo , DGMo , DPMo = disk_margins (Lo , omega , skew = 0.0 )
410
410
assert_allclose ([DMo ], [0.3754 ], atol = 0.1 ) # disk margin of 0.3754
411
- assert_allclose ([DGMo ], [3.3 ], atol = 0.1 ) # disk-based gain margin of 3.3 dB
411
+ assert_allclose ([DGMo ], [3.3 ], atol = 0.1 ) # disk-based gain margin of 3.3 dB
412
412
assert_allclose ([DPMo ], [21.26 ], atol = 0.1 ) # disk-based phase margin of 21.26 deg
413
413
414
414
# Balanced (S - T) disk-based stability margins at plant input
415
415
DMi , DGMi , DPMi = disk_margins (Li , omega , skew = 0.0 )
416
416
assert_allclose ([DMi ], [0.3754 ], atol = 0.1 ) # disk margin of 0.3754
417
- assert_allclose ([DGMi ], [3.3 ], atol = 0.1 ) # disk-based gain margin of 3.3 dB
417
+ assert_allclose ([DGMi ], [3.3 ], atol = 0.1 ) # disk-based gain margin of 3.3 dB
418
418
assert_allclose ([DPMi ], [21.26 ], atol = 0.1 ) # disk-based phase margin of 21.26 deg
419
419
else :
420
420
# Slycot not installed. Should throw exception.
@@ -435,7 +435,7 @@ def test_siso_disk_margin_return_all():
435
435
atol = 0.01 ) # sensitivity peak at 1.94 rad/s
436
436
assert_allclose ([min (DM )], [0.46 ], atol = 0.1 ) # disk margin of 0.46
437
437
assert_allclose ([DGM [np .argmin (DM )]], [4.05 ],\
438
- atol = 0.1 ) # disk-based gain margin of 4.05 dB
438
+ atol = 0.1 ) # disk-based gain margin of 4.05 dB
439
439
assert_allclose ([DPM [np .argmin (DM )]], [25.8 ],\
440
440
atol = 0.1 ) # disk-based phase margin of 25.8 deg
441
441
@@ -457,7 +457,7 @@ def test_mimo_disk_margin_return_all():
457
457
atol = 0.01 ) # sensitivity peak at 0 rad/s (or smallest provided)
458
458
assert_allclose ([min (DMo )], [0.3754 ], atol = 0.1 ) # disk margin of 0.3754
459
459
assert_allclose ([DGMo [np .argmin (DMo )]], [3.3 ],\
460
- atol = 0.1 ) # disk-based gain margin of 3.3 dB
460
+ atol = 0.1 ) # disk-based gain margin of 3.3 dB
461
461
assert_allclose ([DPMo [np .argmin (DMo )]], [21.26 ],\
462
462
atol = 0.1 ) # disk-based phase margin of 21.26 deg
463
463
@@ -468,7 +468,7 @@ def test_mimo_disk_margin_return_all():
468
468
assert_allclose ([min (DMi )], [0.3754 ],\
469
469
atol = 0.1 ) # disk margin of 0.3754
470
470
assert_allclose ([DGMi [np .argmin (DMi )]], [3.3 ],\
471
- atol = 0.1 ) # disk-based gain margin of 3.3 dB
471
+ atol = 0.1 ) # disk-based gain margin of 3.3 dB
472
472
assert_allclose ([DPMi [np .argmin (DMi )]], [21.26 ],\
473
473
atol = 0.1 ) # disk-based phase margin of 21.26 deg
474
474
else :
0 commit comments