Skip to content

Commit ee8f4b7

Browse files
committed
fix up warnings in make html, make doctest, pytest
1 parent 8784ad4 commit ee8f4b7

18 files changed

+338
-449
lines changed

control/statesp.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,18 +1213,19 @@ def sample(self, Ts, method='zoh', alpha=None, prewarp_frequency=None,
12131213
----------
12141214
Ts : float
12151215
Sampling period.
1216-
method : {"gbt", "bilinear", "euler", "backward_diff", "zoh"}
1217-
Which method to use:
1218-
1219-
* gbt: generalized bilinear transformation
1220-
* bilinear: Tustin's approximation ("gbt" with alpha=0.5)
1221-
* euler: Euler (or forward differencing) method ("gbt" with
1216+
method : {'gbt', 'bilinear', 'euler', 'backward_diff', 'zoh'}
1217+
Method to use for sampling:
1218+
1219+
* 'gbt': generalized bilinear transformation
1220+
* 'backward_diff': Backwards differencing ('gbt' with alpha=1.0)
1221+
* 'bilinear' (or 'tustin'): Tustin's approximation ('gbt' with
1222+
alpha=0.5)
1223+
* 'euler': Euler (or forward differencing) method ('gbt' with
12221224
alpha=0)
1223-
* backward_diff: Backwards differencing ("gbt" with alpha=1.0)
1224-
* zoh: zero-order hold (default)
1225+
* 'zoh': zero-order hold (default)
12251226
alpha : float within [0, 1]
12261227
The generalized bilinear transformation weighting parameter, which
1227-
should only be specified with method="gbt", and is ignored
1228+
should only be specified with method='gbt', and is ignored
12281229
otherwise.
12291230
prewarp_frequency : float within [0, infinity)
12301231
The frequency [rad/s] at which to match with the input continuous-
@@ -1523,8 +1524,7 @@ def ss(*args, **kwargs):
15231524
systems, `B` and `C` can be given as 1D arrays and D can be given
15241525
as a scalar.
15251526
1526-
``ss(*args, inputs=['u1', ..., 'up'], outputs=['y1', ..., 'yq'],
1527-
states=['x1', ..., 'xn'])``
1527+
`ss(*args, inputs=['u1', ..., 'up'], outputs=['y1', ..., 'yq'], states=['x1', ..., 'xn'])`
15281528
Create a system with named input, output, and state signals.
15291529
15301530
Parameters

control/xferfcn.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def __getitem__(self, key):
773773
indices[0], self.output_labels, slice_to_list=True)
774774
inpdx, inputs = _process_subsys_index(
775775
indices[1], self.input_labels, slice_to_list=True)
776-
776+
777777
# Construct the transfer function for the subsyste
778778
num = _create_poly_array((len(outputs), len(inputs)))
779779
den = _create_poly_array(num.shape)
@@ -1114,15 +1114,17 @@ def sample(self, Ts, method='zoh', alpha=None, prewarp_frequency=None,
11141114
----------
11151115
Ts : float
11161116
Sampling period.
1117-
method : {"gbt", "bilinear", "euler", "backward_diff",
1118-
"zoh", "matched"}
1117+
method : {'gbt', 'bilinear', 'euler', 'backward_diff', 'zoh', 'matched'}
11191118
Method to use for sampling:
11201119
1121-
* gbt: generalized bilinear transformation
1122-
* bilinear or tustin: Tustin's approximation ("gbt" with alpha=0.5)
1123-
* euler: Euler (or forward difference) method ("gbt" with alpha=0)
1124-
* backward_diff: Backwards difference ("gbt" with alpha=1.0)
1125-
* zoh: zero-order hold (default)
1120+
* 'gbt': generalized bilinear transformation
1121+
* 'backward_diff': Backwards differencing ('gbt' with alpha=1.0)
1122+
* 'bilinear' (or 'tustin'): Tustin's approximation ('gbt' with
1123+
alpha=0.5)
1124+
* 'euler': Euler (or forward differencing) method ('gbt' with
1125+
alpha=0)
1126+
* 'matched': pole-zero match method
1127+
* 'zoh': zero-order hold (default)
11261128
alpha : float within [0, 1]
11271129
The generalized bilinear transformation weighting parameter, which
11281130
should only be specified with method="gbt", and is ignored

doc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ clean:
2424
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2525

2626
distclean: clean
27-
make -C figures clean
2827
/bin/rm -rf generated

doc/config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ for various types of plots and establishing the underlying representation for
1010
state space matrices.
1111

1212
To set the default value of a configuration variable, set the appropriate
13-
element of the `control.config.defaults` dictionary::
13+
element of the `config.defaults` dictionary::
1414

1515
ct.config.defaults['module.parameter'] = value
1616

17-
The :func:`~control.set_defaults` function can also be used to
17+
The :func:`set_defaults` function can also be used to
1818
set multiple configuration parameters at the same time::
1919

2020
ct.set_defaults('module', param1=val1, param2=val2, ...]

doc/descfcn.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. _descfcn-module:
22

3+
.. currentmodule:: control
4+
35
Describing functions
46
====================
57

@@ -29,7 +31,7 @@ because it assumes that higher harmonics can be neglected.
2931
Module usage
3032
------------
3133

32-
The function :func:`~control.describing_function` can be used to
34+
The function :func:`describing_function` can be used to
3335
compute the describing function of a nonlinear function::
3436

3537
N = ct.describing_function(F, A)
@@ -44,15 +46,15 @@ amplitudes :math:`a` and frequencies :math`\omega` such that
4446
These points can be determined by generating a Nyquist plot in which
4547
the transfer function :math:`H(j\omega)` intersections the negative
4648
reciprocal of the describing function :math:`N(A)`. The
47-
:func:`~control.describing_function_response` function computes the
49+
:func:`describing_function_response` function computes the
4850
amplitude and frequency of any points of intersection::
4951

5052
response = ct.describing_function_response(H, F, amp_range[, omega_range])
5153
response.intersections # frequency, amplitude pairs
5254

5355
A Nyquist plot showing the describing function and the intersections
5456
with the Nyquist curve can be generated using `response.plot()`, which
55-
calls the :func:`~control.describing_function_plot` function.
57+
calls the :func:`describing_function_plot` function.
5658

5759

5860
Pre-defined nonlinearities
@@ -76,15 +78,15 @@ nonlinearity::
7678
F = ct.saturation_nonlinearity(1)
7779

7880
These functions use the
79-
:class:`~control.DescribingFunctionNonlinearity`, which allows an
81+
:class:`DescribingFunctionNonlinearity`, which allows an
8082
analytical description of the describing function.
8183

8284
Module classes and functions
8385
----------------------------
8486
.. autosummary::
8587
:template: custom-class-template.rst
8688

87-
~control.DescribingFunctionNonlinearity
88-
~control.friction_backlash_nonlinearity
89-
~control.relay_hysteresis_nonlinearity
90-
~control.saturation_nonlinearity
89+
DescribingFunctionNonlinearity
90+
friction_backlash_nonlinearity
91+
relay_hysteresis_nonlinearity
92+
saturation_nonlinearity

doc/flatsys.rst

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ Module usage
110110
============
111111

112112
To create a trajectory for a differentially flat system, a
113-
:class:`~control.flatsys.FlatSystem` object must be created. This is done
114-
using the :func:`~control.flatsys.flatsys` function:
113+
:class:`~flatsys.FlatSystem` object must be created. This is done
114+
using the :func:`~flatsys.flatsys` function:
115115

116116
import control.flatsys as fs
117117
sys = fs.flatsys(forward, reverse)
@@ -120,12 +120,12 @@ The `forward` and `reverse` parameters describe the mappings between the
120120
system state/input and the differentially flat outputs and their
121121
derivatives ("flat flag").
122122

123-
The :func:`~control.flatsys.FlatSystem.forward` method computes the
123+
The :func:`~flatsys.FlatSystem.forward` method computes the
124124
flat flag given a state and input:
125125

126126
zflag = sys.forward(x, u)
127127

128-
The :func:`~control.flatsys.FlatSystem.reverse` method computes the state
128+
The :func:`~flatsys.FlatSystem.reverse` method computes the state
129129
and input given the flat flag:
130130

131131
x, u = sys.reverse(zflag)
@@ -139,11 +139,11 @@ The number of flat outputs must match the number of system inputs.
139139

140140
For a linear system, a flat system representation can be generated by
141141
passing a :class:`~control.StateSpace` system to the
142-
:func:`~control.flatsys.flatsys` factory function::
142+
:func:`~flatsys.flatsys` factory function::
143143

144144
sys = fs.flatsys(linsys)
145145

146-
The :func:`~control.flatsys.flatsys` function also supports the use of
146+
The :func:`~flatsys.flatsys` function also supports the use of
147147
named input, output, and state signals::
148148

149149
sys = fs.flatsys(
@@ -153,23 +153,23 @@ In addition to the flat system description, a set of basis functions
153153
:math:`\phi_i(t)` must be chosen. The `FlatBasis` class is used to
154154
represent the basis functions. A polynomial basis function of the
155155
form 1, :math:`t`, :math:`t^2`, ... can be computed using the
156-
:class:`~control.flatsys.PolyFamily` class, which is initialized by
156+
:class:`~flatsys.PolyFamily` class, which is initialized by
157157
passing the desired order of the polynomial basis set::
158158

159159
basis = fs.PolyFamily(N)
160160

161161
Additional basis function families include Bezier curves
162-
(:class:`~control.flatsys.BezierFamily`) and B-splines
163-
(:class:`~control.flatsys.BSplineFamily`).
162+
(:class:`~flatsys.BezierFamily`) and B-splines
163+
(:class:`~flatsys.BSplineFamily`).
164164

165165
Once the system and basis function have been defined, the
166-
:func:`~control.flatsys.point_to_point` function can be used to compute a
166+
:func:`~flatsys.point_to_point` function can be used to compute a
167167
trajectory between initial and final states and inputs::
168168

169169
traj = fs.point_to_point(
170170
sys, Tf, x0, u0, xf, uf, basis=basis)
171171

172-
The returned object has class :class:`~control.flatsys.SystemTrajectory` and
172+
The returned object has class :class:`~flatsys.SystemTrajectory` and
173173
can be used to compute the state and input trajectory between the initial and
174174
final condition::
175175

@@ -178,11 +178,11 @@ final condition::
178178
where `T` is a list of times on which the trajectory should be evaluated
179179
(e.g., `T = numpy.linspace(0, Tf, M)`.
180180

181-
The :func:`~control.flatsys.point_to_point` function also allows the
181+
The :func:`~flatsys.point_to_point` function also allows the
182182
specification of a cost function and/or constraints, in the same
183183
format as :func:`~control.optimal.solve_ocp`.
184184

185-
The :func:`~control.flatsys.solve_flat_ocp` function can be used to
185+
The :func:`~flatsys.solve_flat_ocp` function can be used to
186186
solve an optimal control problem without a final state::
187187

188188
traj = fs.solve_flat_ocp(
@@ -311,19 +311,21 @@ cost:`
311311
Module classes and functions
312312
============================
313313

314+
.. currentmodule:: control
315+
314316
.. autosummary::
315317
:template: custom-class-template.rst
316318

317-
~control.flatsys.BasisFamily
318-
~control.flatsys.BezierFamily
319-
~control.flatsys.BSplineFamily
320-
~control.flatsys.FlatSystem
321-
~control.flatsys.LinearFlatSystem
322-
~control.flatsys.PolyFamily
323-
~control.flatsys.SystemTrajectory
319+
flatsys.BasisFamily
320+
flatsys.BezierFamily
321+
flatsys.BSplineFamily
322+
flatsys.FlatSystem
323+
flatsys.LinearFlatSystem
324+
flatsys.PolyFamily
325+
flatsys.SystemTrajectory
324326

325327
.. autosummary::
326328

327-
~control.flatsys.flatsys
328-
~control.flatsys.point_to_point
329-
~control.flatsys.solve_flat_ocp
329+
flatsys.flatsys
330+
flatsys.point_to_point
331+
flatsys.solve_flat_ocp

doc/freqresp.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/functions.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ System interconnections
5858
append
5959
combine_tf
6060
split_tf
61+
summing_junction
6162
connection_table
6263

6364
Time domain simulation
@@ -108,7 +109,6 @@ Control system analysis
108109
bandwidth
109110
damp
110111
dcgain
111-
describing_function
112112
get_input_ff_index
113113
get_output_fb_index
114114
ispassive
@@ -128,8 +128,7 @@ Control system analysis
128128
singular_values_plot
129129
singular_values_response
130130
sisotool
131-
StateSpace.__call__
132-
TransferFunction.__call__
131+
133132

134133
Control system synthesis
135134
========================
@@ -138,7 +137,6 @@ Control system synthesis
138137

139138
acker
140139
create_statefbk_iosystem
141-
create_estimator_iosystem
142140
dlqr
143141
h2syn
144142
hinfsyn
@@ -165,12 +163,8 @@ Nonlinear system support
165163
.. autosummary::
166164
:toctree: generated/
167165

168-
describing_function
169166
find_operating_point
170167
linearize
171-
input_output_response
172-
summing_junction
173-
flatsys.point_to_point
174168

175169
Stochastic system support
176170
=========================
@@ -207,6 +201,7 @@ Describing functions
207201
.. autosummary::
208202
:toctree: generated/
209203

204+
describing_function
210205
friction_backlash_nonlinearity
211206
relay_hysteresis_nonlinearity
212207
saturation_nonlinearity

doc/intro.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Package overview
1414
:no-members:
1515
:no-inherited-members:
1616
:no-special-members:
17+
:no-index:
1718

1819
Installation
1920
============

doc/linear.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. module:: control
1+
.. currentmodule:: control
22

33
********************************************
44
Linear System Modeling, Analysis, and Design

0 commit comments

Comments
 (0)