Skip to content

Commit c86b35a

Browse files
committed
Add final point to docstrings
1 parent d153035 commit c86b35a

20 files changed

+56
-56
lines changed

control/canonical.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
def canonical_form(xsys, form='reachable'):
22-
"""Convert a system into canonical form
22+
"""Convert a system into canonical form.
2323
2424
Parameters
2525
----------
@@ -71,7 +71,7 @@ def canonical_form(xsys, form='reachable'):
7171

7272
# Reachable canonical form
7373
def reachable_form(xsys):
74-
"""Convert a system into reachable canonical form
74+
"""Convert a system into reachable canonical form.
7575
7676
Parameters
7777
----------
@@ -134,7 +134,7 @@ def reachable_form(xsys):
134134

135135

136136
def observable_form(xsys):
137-
"""Convert a system into observable canonical form
137+
"""Convert a system into observable canonical form.
138138
139139
Parameters
140140
----------
@@ -255,7 +255,7 @@ def rsolve(M, y):
255255

256256

257257
def _bdschur_defective(blksizes, eigvals):
258-
"""Check for defective modal decomposition
258+
"""Check for defective modal decomposition.
259259
260260
Parameters
261261
----------
@@ -290,7 +290,7 @@ def _bdschur_defective(blksizes, eigvals):
290290

291291

292292
def _bdschur_condmax_search(aschur, tschur, condmax):
293-
"""Block-diagonal Schur decomposition search up to condmax
293+
"""Block-diagonal Schur decomposition search up to condmax.
294294
295295
Iterates mb03rd with different pmax values until:
296296
- result is non-defective;
@@ -393,7 +393,7 @@ def _bdschur_condmax_search(aschur, tschur, condmax):
393393

394394

395395
def bdschur(a, condmax=None, sort=None):
396-
"""Block-diagonal Schur decomposition
396+
"""Block-diagonal Schur decomposition.
397397
398398
Parameters
399399
----------
@@ -482,7 +482,7 @@ def bdschur(a, condmax=None, sort=None):
482482

483483

484484
def modal_form(xsys, condmax=None, sort=False):
485-
"""Convert a system into modal canonical form
485+
"""Convert a system into modal canonical form.
486486
487487
Parameters
488488
----------

control/ctrlutil.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
# Utility function to unwrap an angle measurement
5252
def unwrap(angle, period=2*math.pi):
53-
"""Unwrap a phase angle to give a continuous curve
53+
"""Unwrap a phase angle to give a continuous curve.
5454
5555
Parameters
5656
----------
@@ -87,7 +87,7 @@ def unwrap(angle, period=2*math.pi):
8787

8888
def issys(obj):
8989
"""Return True if an object is a Linear Time Invariant (LTI) system,
90-
otherwise False
90+
otherwise False.
9191
9292
Examples
9393
--------
@@ -105,7 +105,7 @@ def issys(obj):
105105
return isinstance(obj, lti.LTI)
106106

107107
def db2mag(db):
108-
"""Convert a gain in decibels (dB) to a magnitude
108+
"""Convert a gain in decibels (dB) to a magnitude.
109109
110110
If A is magnitude,
111111
@@ -133,7 +133,7 @@ def db2mag(db):
133133
return 10. ** (db / 20.)
134134

135135
def mag2db(mag):
136-
"""Convert a magnitude to decibels (dB)
136+
"""Convert a magnitude to decibels (dB).
137137
138138
If A is magnitude,
139139

control/descfcn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _f(self, x):
7474

7575
def describing_function(
7676
F, A, num_points=100, zero_check=True, try_method=True):
77-
"""Numerically compute the describing function of a nonlinear function
77+
"""Numerically compute the describing function of a nonlinear function.
7878
7979
The describing function of a nonlinearity is given by magnitude and phase
8080
of the first harmonic of the function when evaluated along a sinusoidal

control/dtime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
def sample_system(sysc, Ts, method='zoh', alpha=None, prewarp_frequency=None,
5757
name=None, copy_names=True, **kwargs):
5858
"""
59-
Convert a continuous time system to discrete time by sampling
59+
Convert a continuous time system to discrete time by sampling.
6060
6161
Parameters
6262
----------

control/frdata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def _convert_to_FRD(sys, omega, inputs=1, outputs=1):
729729
def frd(*args):
730730
"""frd(d, w)
731731
732-
Construct a frequency response data model
732+
Construct a frequency response data model.
733733
734734
frd models store the (measured) frequency response of a system.
735735

control/freqplot.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
def bode_plot(syslist, omega=None,
9595
plot=True, omega_limits=None, omega_num=None,
9696
margins=None, method='best', *args, **kwargs):
97-
"""Bode plot for a system
97+
"""Bode plot for a system.
9898
9999
Plots a Bode plot for the system over a (optional) frequency range.
100100
@@ -542,7 +542,7 @@ def nyquist_plot(
542542
syslist, omega=None, plot=True, omega_limits=None, omega_num=None,
543543
label_freq=0, color=None, return_contour=False,
544544
warn_encirclements=True, warn_nyquist=True, **kwargs):
545-
"""Nyquist plot for a system
545+
"""Nyquist plot for a system.
546546
547547
Plots a Nyquist plot for the system over a (optional) frequency range.
548548
The curve is computed by evaluating the Nyqist segment along the positive
@@ -1251,7 +1251,7 @@ def _compute_curve_offset(resp, mask, max_offset):
12511251
#
12521252
# TODO: think about how (and whether) to handle lists of systems
12531253
def gangof4_plot(P, C, omega=None, **kwargs):
1254-
"""Plot the "Gang of 4" transfer functions for a system
1254+
"""Plot the "Gang of 4" transfer functions for a system.
12551255
12561256
Generates a 2x2 plot showing the "Gang of 4" sensitivity functions
12571257
[T, PS; CS, S]

control/iosys.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def find_states(self, name_list):
363363

364364
def isctime(self, strict=False):
365365
"""
366-
Check to see if a system is a continuous-time system
366+
Check to see if a system is a continuous-time system.
367367
368368
Parameters
369369
----------
@@ -397,7 +397,7 @@ def isdtime(self, strict=False):
397397
return self.dt > 0
398398

399399
def issiso(self):
400-
"""Check to see if a system is single input, single output"""
400+
"""Check to see if a system is single input, single output."""
401401
return self.ninputs == 1 and self.noutputs == 1
402402

403403
def _isstatic(self):
@@ -408,7 +408,7 @@ def _isstatic(self):
408408
# Test to see if a system is SISO
409409
def issiso(sys, strict=False):
410410
"""
411-
Check to see if a system is single input, single output
411+
Check to see if a system is single input, single output.
412412
413413
Parameters
414414
----------
@@ -427,7 +427,7 @@ def issiso(sys, strict=False):
427427

428428
# Return the timebase (with conversion if unspecified)
429429
def timebase(sys, strict=True):
430-
"""Return the timebase for a system
430+
"""Return the timebase for a system.
431431
432432
dt = timebase(sys)
433433
@@ -500,7 +500,7 @@ def common_timebase(dt1, dt2):
500500
# Check to see if a system is a discrete time system
501501
def isdtime(sys, strict=False):
502502
"""
503-
Check to see if a system is a discrete time system
503+
Check to see if a system is a discrete time system.
504504
505505
Parameters
506506
----------
@@ -521,7 +521,7 @@ def isdtime(sys, strict=False):
521521
# Check to see if a system is a continuous time system
522522
def isctime(sys, strict=False):
523523
"""
524-
Check to see if a system is a continuous-time system
524+
Check to see if a system is a continuous-time system.
525525
526526
Parameters
527527
----------

control/lti.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def zeros(sys):
252252

253253
def damp(sys, doprint=True):
254254
"""
255-
Compute natural frequencies, damping ratios, and poles of a system
255+
Compute natural frequencies, damping ratios, and poles of a system.
256256
257257
Parameters
258258
----------
@@ -446,7 +446,7 @@ def frequency_response(sys, omega, squeeze=None):
446446

447447

448448
def dcgain(sys):
449-
"""Return the zero-frequency (or DC) gain of the given system
449+
"""Return the zero-frequency (or DC) gain of the given system.
450450
451451
Returns
452452
-------

control/margins.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def phase_crossover_frequencies(sys):
505505
def margin(*args):
506506
"""margin(sysdata)
507507
508-
Calculate gain and phase margins and associated crossover frequencies
508+
Calculate gain and phase margins and associated crossover frequencies.
509509
510510
Parameters
511511
----------

control/mateqn.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def sb03md(n, C, A, U, dico, job='X', fact='N', trana='N', ldwork=None):
8888

8989

9090
def lyap(A, Q, C=None, E=None, method=None):
91-
"""Solves the continuous-time Lyapunov equation
91+
"""Solves the continuous-time Lyapunov equation.
9292
9393
X = lyap(A, Q) solves
9494
@@ -214,7 +214,7 @@ def lyap(A, Q, C=None, E=None, method=None):
214214

215215

216216
def dlyap(A, Q, C=None, E=None, method=None):
217-
"""Solves the discrete-time Lyapunov equation
217+
"""Solves the discrete-time Lyapunov equation.
218218
219219
X = dlyap(A, Q) solves
220220
@@ -342,7 +342,7 @@ def dlyap(A, Q, C=None, E=None, method=None):
342342

343343
def care(A, B, Q, R=None, S=None, E=None, stabilizing=True, method=None,
344344
A_s="A", B_s="B", Q_s="Q", R_s="R", S_s="S", E_s="E"):
345-
"""Solves the continuous-time algebraic Riccati equation
345+
"""Solves the continuous-time algebraic Riccati equation.
346346
347347
X, L, G = care(A, B, Q, R=None) solves
348348
@@ -496,7 +496,7 @@ def care(A, B, Q, R=None, S=None, E=None, stabilizing=True, method=None,
496496
def dare(A, B, Q, R, S=None, E=None, stabilizing=True, method=None,
497497
A_s="A", B_s="B", Q_s="Q", R_s="R", S_s="S", E_s="E"):
498498
"""Solves the discrete-time algebraic Riccati
499-
equation
499+
equation.
500500
501501
X, L, G = dare(A, B, Q, R) solves
502502

control/matlab/timeresp.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
__all__ = ['step', 'stepinfo', 'impulse', 'initial', 'lsim']
88

99
def step(sys, T=None, input=0, output=None, return_x=False):
10-
'''Step response of a linear system
10+
'''Step response of a linear system.
1111
1212
If the system has multiple inputs or outputs (MIMO), one input has
1313
to be selected for the simulation. Optionally, one output may be
@@ -132,7 +132,7 @@ def stepinfo(sysdata, T=None, yfinal=None, SettlingTimeThreshold=0.02,
132132
return S
133133

134134
def impulse(sys, T=None, input=0, output=None, return_x=False):
135-
'''Impulse response of a linear system
135+
'''Impulse response of a linear system.
136136
137137
If the system has multiple inputs or outputs (MIMO), one input has
138138
to be selected for the simulation. Optionally, one output may be
@@ -181,7 +181,7 @@ def impulse(sys, T=None, input=0, output=None, return_x=False):
181181
return (out[1], out[0], out[2]) if return_x else (out[1], out[0])
182182

183183
def initial(sys, T=None, X0=0., input=None, output=None, return_x=False):
184-
'''Initial condition response of a linear system
184+
'''Initial condition response of a linear system.
185185
186186
If the system has multiple outputs (?IMO), optionally, one output
187187
may be selected. If no selection is made for the output, all
@@ -232,7 +232,7 @@ def initial(sys, T=None, X0=0., input=None, output=None, return_x=False):
232232

233233

234234
def lsim(sys, U=0., T=None, X0=0.):
235-
'''Simulate the output of a linear system
235+
'''Simulate the output of a linear system.
236236
237237
As a convenience for parameters `U`, `X0`:
238238
Numbers (scalars) are converted to constant arrays with the correct shape.

control/matlab/wrappers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def bode(*args, **kwargs):
1818
"""bode(syslist[, omega, dB, Hz, deg, ...])
1919
20-
Bode plot of the frequency response
20+
Bode plot of the frequency response.
2121
2222
Plots a bode gain and phase diagram
2323
@@ -79,7 +79,7 @@ def bode(*args, **kwargs):
7979
def nyquist(*args, **kwargs):
8080
"""nyquist(syslist[, omega])
8181
82-
Nyquist plot of the frequency response
82+
Nyquist plot of the frequency response.
8383
8484
Plots a Nyquist plot for the system over a (optional) frequency range.
8585
@@ -184,7 +184,7 @@ def ngrid():
184184

185185

186186
def dcgain(*args):
187-
'''Compute the gain of the system in steady state
187+
'''Compute the gain of the system in steady state.
188188
189189
The function takes either 1, 2, 3, or 4 parameters:
190190

control/nichols.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767

6868
def nichols_plot(sys_list, omega=None, grid=None):
69-
"""Nichols plot for a system
69+
"""Nichols plot for a system.
7070
7171
Plots a Nichols plot for the system over a (optional) frequency range.
7272
@@ -133,7 +133,7 @@ def _inner_extents(ax):
133133

134134
def nichols_grid(cl_mags=None, cl_phases=None, line_style='dotted', ax=None,
135135
label_cl_phases=True):
136-
"""Nichols chart grid
136+
"""Nichols chart grid.
137137
138138
Plots a Nichols chart grid on the current axis, or creates a new chart
139139
if no plot already exists.

control/phaseplot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _find(condition):
5353
def phase_plot(odefun, X=None, Y=None, scale=1, X0=None, T=None,
5454
lingrid=None, lintime=None, logtime=None, timepts=None,
5555
parms=(), verbose=True):
56-
"""Phase plot for 2D dynamical systems
56+
"""Phase plot for 2D dynamical systems.
5757
5858
Produces a vector field or stream line plot for a planar system.
5959

control/rlocus.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
7979
plotstr=None, plot=True, print_gain=None, grid=None, ax=None,
8080
initial_gain=None, **kwargs):
8181

82-
"""Root locus plot
82+
"""Root locus plot.
8383
8484
Calculate the root locus by finding the roots of 1+k*TF(s)
8585
where TF is self.num(s)/self.den(s) and each k is an element

control/sisotool.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def rootlocus_pid_designer(plant, gain='P', sign=+1, input_signal='r',
205205
Kp0=0, Ki0=0, Kd0=0, deltaK=0.001, tau=0.01,
206206
C_ff=0, derivative_in_feedback_path=False,
207207
plot=True):
208-
"""Manual PID controller design based on root locus using Sisotool
208+
"""Manual PID controller design based on root locus using Sisotool.
209209
210210
Uses `sisotool` to investigate the effect of adding or subtracting an
211211
amount `deltaK` to the proportional, integral, or derivative (PID) gains of

0 commit comments

Comments
 (0)