10BC0 documentation updates for 0.10.2 release · python-control/python-control@dd3d4d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd3d4d0

Browse files
committed
documentation updates for 0.10.2 release
1 parent 03ae372 commit dd3d4d0

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

control/margins.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,12 @@ def disk_margins(L, omega, skew=0.0, returnall=False):
536536
1D array of (non-negative) frequencies (rad/s) at which
537537
to evaluate the disk-based stability margins.
538538
skew : float or array_like, optional
539-
skew parameter(s) for disk margin (default = 0.0).
540-
skew = 0.0 "balanced" sensitivity function 0.5*(S - T).
541-
skew = 1.0 sensitivity function S.
542-
skew = -1.0 complementary sensitivity function T.
539+
Skew parameter(s) for disk margin (default = 0.0):
540+
541+
* skew = 0.0 "balanced" sensitivity function 0.5*(S - T)
542+
* skew = 1.0 sensitivity function S
543+
* skew = -1.0 complementary sensitivity function T
544+
543545
returnall : bool, optional
544546
If True, return frequency-dependent margins.
545547
If False (default), return worst-case (minimum) margins.
@@ -553,7 +555,7 @@ def disk_margins(L, omega, skew=0.0, returnall=False):
553555
DPM : float or array_like
554556
Disk-based phase margin.
555557
556-
Example
558+
Examples
557559
--------
558560
>> omega = np.logspace(-1, 3, 1001)
559561
>> P = control.ss([[0, 10], [-10, 0]], np.eye(2), [[1, 10],

control/pzmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def replot(self, cplt: ControlPlot):
129129
130130
Parameters
131131
----------
132-
cplt: ControlPlot
132+
cplt : `ControlPlot`
133133
Graphics handles of the existing plot.
134134
"""
135135
pole_zero_replot(self, cplt)

control/tests/margin_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def test_siso_disk_margin():
384384
# Balanced (S - T) disk-based stability margins
385385
DM, DGM, DPM = disk_margins(L, omega, skew=0.0)
386386
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
388388
assert_allclose([DPM], [25.8], atol=0.1) # disk-based phase margin of 25.8 deg
389389

390390
# For SISO systems, the S-based (S) disk margin should match the third output
@@ -408,13 +408,13 @@ def test_mimo_disk_margin():
408408
# Balanced (S - T) disk-based stability margins at plant output
409409
DMo, DGMo, DPMo = disk_margins(Lo, omega, skew=0.0)
410410
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
412412
assert_allclose([DPMo], [21.26], atol=0.1) # disk-based phase margin of 21.26 deg
413413

414414
# Balanced (S - T) disk-based stability margins at plant input
415415
DMi, DGMi, DPMi = disk_margins(Li, omega, skew=0.0)
416416
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
418418
assert_allclose([DPMi], [21.26], atol=0.1) # disk-based phase margin of 21.26 deg
419419
else:
420420
# Slycot not installed. Should throw exception.
@@ -435,7 +435,7 @@ def test_siso_disk_margin_return_all():
435435
atol=0.01) # sensitivity peak at 1.94 rad/s
436436
assert_allclose([min(DM)], [0.46], atol=0.1) # disk margin of 0.46
437437
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
439439
assert_allclose([DPM[np.argmin(DM)]], [25.8],\
440440
atol=0.1) # disk-based phase margin of 25.8 deg
441441

@@ -457,7 +457,7 @@ def test_mimo_disk_margin_return_all():
457457
atol=0.01) # sensitivity peak at 0 rad/s (or smallest provided)
458458
assert_allclose([min(DMo)], [0.3754], atol=0.1) # disk margin of 0.3754
459459
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
461461
assert_allclose([DPMo[np.argmin(DMo)]], [21.26],\
462462
atol=0.1) # disk-based phase margin of 21.26 deg
463463

@@ -468,7 +468,7 @@ def test_mimo_disk_margin_return_all():
468468
assert_allclose([min(DMi)], [0.3754],\
469469
atol=0.1) # disk margin of 0.3754
470470
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
472472
assert_allclose([DPMi[np.argmin(DMi)]], [21.26],\
473473
atol=0.1) # disk-based phase margin of 21.26 deg
474474
else:

doc/examples.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ other sources.
3939
examples/mrac_siso_lyapunov
4040
examples/markov
4141
examples/era_msd
42+
examples/disk_margins
4243

4344
Jupyter Notebooks
4445
=================

0 commit comments

Comments
 (0)
0