Skip to content

Commit f96276d

Browse files
committed
address remaining @sawyerfuller comments + RMM copyedits
1 parent 8081ac3 commit f96276d

32 files changed

Lines changed: 408 additions & 284 deletions

control/bdalg.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727

2828

2929
def series(*sys, **kwargs):
30-
r"""series(sys1, sys2[, ..., sysn])
30+
"""series(sys1, sys2[, ..., sysn])
3131
32-
Return series connection (`sysn` \* ...\ \*) `sys2` \* `sys1`.
32+
Series connection of I/O systems.
33+
34+
Generates a new system ``[sysn * ... *] sys2 * sys1``.
3335
3436
Parameters
3537
----------
@@ -100,7 +102,9 @@ def series(*sys, **kwargs):
100102
def parallel(*sys, **kwargs):
101103
r"""parallel(sys1, sys2[, ..., sysn])
102104
103-
Return parallel connection `sys1` + `sys2` (+ ...\ + `sysn`).
105+
Parallel connection of I/O systems.
106+
107+
Generates a parallel connection ``sys1 + sys2 [+ ... + sysn]``.
104108
105109
Parameters
106110
----------

control/freqplot.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,24 +2621,24 @@ def _determine_omega_vector(syslist, omega_in, omega_limits, omega_num,
26212621
"""Determine the frequency range for a frequency-domain plot
26222622
according to a standard logic.
26232623
2624-
If omega_in and omega_limits are both None, then omega_out is computed
2625-
on omega_num points according to a default logic defined by
2626-
_default_frequency_range and tailored for the list of systems syslist, and
2627-
omega_range_given is set to False.
2628-
2629-
If omega_in is None but omega_limits is an array_like of 2 elements, then
2630-
omega_out is computed with the function np.logspace on omega_num points
2631-
within the interval [min, max] = [omega_limits[0], omega_limits[1]], and
2632-
omega_range_given is set to True.
2633-
2634-
If omega_in is a list or tuple of length 2, it is interpreted as a
2635-
range and handled like omega_limits. If omega_in is a list or tuple of
2636-
length 3, it is interpreted a range plus number of points and handled
2637-
like omega_limits and omega_num.
2638-
2639-
If omega_in is an array or a list/tuple of length greater than
2640-
two, then omega_out is set to omega_in (as an array), and
2641-
omega_range_given is set to True
2624+
If `omega_in` and `omega_limits` are both None, then `omega_out` is
2625+
computed on `omega_num` points according to a default logic defined by
2626+
`_default_frequency_range` and tailored for the list of systems
2627+
syslist, and `omega_range_given` is set to False.
2628+
2629+
If `omega_in` is None but `omega_limits` is a tuple of 2 elements, then
2630+
`omega_out` is computed with the function `numpy.logspace` on
2631+
`omega_num` points within the interval ``[min, max] = [omega_limits[0],
2632+
omega_limits[1]]``, and `omega_range_given` is set to True.
2633+
2634+
If `omega_in` is a tuple of length 2, it is interpreted as a range and
2635+
handled like `omega_limits`. If `omega_in` is a tuple of length 3, it
2636+
is interpreted a range plus number of points and handled like
2637+
`omega_limits` and `omega_num`.
2638+
2639+
If `omega_in` is an array or a list/tuple of length greater than two,
2640+
then `omega_out` is set to `omega_in` (as an array), and
2641+
`omega_range_given` is set to True
26422642
26432643
Parameters
26442644
----------

control/iosys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __repr__(self):
115115
out += f",\nsignal_labels={self.signal_labels}"
116116
if self.trace_labels is not None:
117117
out += f",\ntrace_labels={self.trace_labels}"
118-
out += "\n)"
118+
out += ")"
119119
return out
120120

121121

control/nlsys.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class NonlinearIOSystem(InputOutputSystem):
7575
following values:
7676
7777
* `dt` = 0: continuous-time system (default)
78-
* `dt` > 0: discrete-time system with sampling period 'dt'
78+
* `dt` > 0: discrete-time system with sampling period `dt`
7979
* `dt` = True: discrete time with unspecified sampling period
8080
* `dt` = None: no timebase specified
8181
@@ -1388,7 +1388,7 @@ def nlsys(updfcn, outfcn=None, **kwargs):
13881388
following values:
13891389
13901390
* `dt` = 0: continuous-time system (default)
1391-
* `dt` > 0: discrete-time system with sampling period 'dt'
1391+
* `dt` > 0: discrete-time system with sampling period `dt`
13921392
* `dt` = True: discrete time with unspecified sampling period
13931393
* `dt` = None: no timebase specified
13941394
@@ -2414,7 +2414,7 @@ def interconnect(
24142414
values:
24152415
24162416
* `dt` = 0: continuous-time system (default)
2417-
* `dt` > 0`: discrete-time system with sampling period 'dt'
2417+
* `dt` > 0`: discrete-time system with sampling period `dt`
24182418
* `dt` = True: discrete time with unspecified sampling period
24192419
* `dt` = None: no timebase specified
24202420

control/robust.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
def h2syn(P, nmeas, ncon):
18-
"""H_2 control synthesis for plant P.
18+
"""H2 control synthesis for plant P.
1919
2020
Parameters
2121
----------
@@ -87,7 +87,7 @@ def h2syn(P, nmeas, ncon):
8787

8888
def hinfsyn(P, nmeas, ncon):
8989
# TODO: document significance of rcond
90-
"""H_{inf} control synthesis for plant P.
90+
"""H-infinity control synthesis for plant P.
9191
9292
Parameters
9393
----------

control/statesp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
class StateSpace(NonlinearIOSystem, LTI):
6161
r"""StateSpace(A, B, C, D[, dt])
6262
63-
State space representation for LIT input/output systems.
63+
State space representation for LTI input/output systems.
6464
6565
The StateSpace class is used to represent state-space realizations of
6666
linear time-invariant (LTI) systems:
@@ -109,7 +109,7 @@ class StateSpace(NonlinearIOSystem, LTI):
109109
when the system is constructed:
110110
111111
* `dt` = 0: continuous-time system (default)
112-
* `dt` > 0: discrete-time system with sampling period 'dt'
112+
* `dt` > 0: discrete-time system with sampling period `dt`
113113
* `dt` = True: discrete time with unspecified sampling period
114114
* `dt` = None: no timebase specified
115115

control/tests/robust_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def testH2syn(self):
3737
"""Test h2syn"""
3838
p = ss(-1, [[1, 1]], [[1], [1]], [[0, 1], [1, 0]])
3939
k = h2syn(p, 1, 1)
40-
# from Octave, which also uses SB10HD for H-2 synthesis:
40+
# from Octave, which also uses SB10HD for H2 synthesis:
4141
# a= -1; b1= 1; b2= 1; c1= 1; c2= 1; d11= 0; d12= 1; d21= 1; d22= 0;
4242
# g = ss(a,[b1,b2],[c1;c2],[d11,d12;d21,d22]);
4343
# k = h2syn(g,1,1);

control/timeresp.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,15 +1682,15 @@ def step_info(sysdata, T=None, T_num=None, yfinal=None, params=None,
16821682
steady_state_value = InfValue
16831683

16841684
retij = {
1685-
'RiseTime': rise_time,
1686-
'SettlingTime': settling_time,
1687-
'SettlingMin': settling_min,
1688-
'SettlingMax': settling_max,
1689-
'Overshoot': overshoot,
1690-
'Undershoot': undershoot,
1691-
'Peak': peak_value,
1692-
'PeakTime': peak_time,
1693-
'SteadyStateValue': steady_state_value
1685+
'RiseTime': float(rise_time),
1686+
'SettlingTime': float(settling_time),
1687+
'SettlingMin': float(settling_min),
1688+
'SettlingMax': float(settling_max),
1689+
'Overshoot': float(overshoot),
1690+
'Undershoot': float(undershoot),
1691+
'Peak': float(peak_value),
1692+
'PeakTime': float(peak_time),
1693+
'SteadyStateValue': float(steady_state_value)
16941694
}
16951695
retrow.append(retij)
16961696

control/xferfcn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class TransferFunction(LTI):
122122
'timebase' dt when the system is constructed:
123123
124124
* `dt` = 0: continuous-time system (default)
125-
* `dt` > 0: discrete-time system with sampling period 'dt'
125+
* `dt` > 0: discrete-time system with sampling period `dt`
126126
* `dt` = True: discrete time with unspecified sampling period
127127
* `dt` = None: no timebase specified
128128

doc/Makefile

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
# RMM, 15 Jan 2025
33

44
FIGS = figures/classes.pdf
5-
RST_FIGS = figures/flatsys-steering-compare.png \
6-
figures/iosys-predprey-open.png \
7-
figures/timeplot-servomech-combined.png \
8-
figures/steering-optimal.png figures/ctrlplot-servomech.png \
9-
figures/phaseplot-dampedosc-default.png \
10-
figures/timeplot-mimo_step-default.png \
11-
figures/freqplot-siso_bode-default.png \
12-
figures/pzmap-siso_ctime-default.png \
13-
figures/rlocus-siso_ctime-default.png \
14-
figures/stochastic-whitenoise-response.png
5+
RST_FIGS = figures/flatsys-steering-compare.png \
6+
figures/iosys-predprey-open.png \
7+
figures/timeplot-servomech-combined.png \
8+
figures/steering-optimal.png figures/ctrlplot-servomech.png \
9+
figures/phaseplot-dampedosc-default.png \
10+
figures/timeplot-mimo_step-default.png \
11+
figures/freqplot-siso_bode-default.png \
12+
figures/pzmap-siso_ctime-default.png \
13+
figures/rlocus-siso_ctime-default.png \
14+
figures/stochastic-whitenoise-response.png \
15+
figures/xferfcn-delay-compare.png figures/descfcn-pade-backlash.png
1516

1617
# You can set these variables from the command line.
1718
SPHINXOPTS =
@@ -47,13 +48,22 @@ figures/timeplot-mimo_step-default.png \
4748
figures/stochastic-whitenoise-response.png: stochastic.rst
4849
@$(SPHINXBUILD) -M doctest "$(SOURCEDIR)" "$(BUILDDIR)"
4950

51+
figures/xferfcn-delay-compare.png: xferfcn.rst
52+
@$(SPHINXBUILD) -M doctest "$(SOURCEDIR)" "$(BUILDDIR)"
53+
54+
figures/descfcn-pade-backlash.png: descfcn.rst
55+
@$(SPHINXBUILD) -M doctest "$(SOURCEDIR)" "$(BUILDDIR)"
56+
5057
# Other figure rules
5158
figure/classes.pdf: figure/classes.fig
5259
make -C figures classes.pdf
5360

5461
# Catch-all target: route all unknown targets to Sphinx using the new
5562
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
56-
html latexpdf doctest clean: Makefile $(FIGS) $(RST_FIGS)
63+
html latexpdf: Makefile $(FIGS) $(RST_FIGS)
64+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
65+
66+
doctest clean: Makefile
5767
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
5868

5969
distclean: clean

0 commit comments

Comments
 (0)