Skip to content

Commit fecc773

Browse files
committed
update module headers and docstrings
1 parent 3706083 commit fecc773

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+264
-615
lines changed

control/__init__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# __init__.py - initialization for control systems toolbox
22
#
3-
# Author: Richard M. Murray
4-
# Date: 24 May 2009
3+
# Initial author: Richard M. Murray
4+
# Creation date: 24 May 2009
5+
# Use `git shortlog -n -s` for full list of contributors
56

67
"""The Python Control Systems Library :mod:`control` provides common functions
78
for analyzing and designing feedback control systems.
@@ -20,7 +21,7 @@
2021
and the python-control User Guide, available from the `python-control
2122
homepage <https://www.python-control.org>`_.
2223
23-
The docstring examples assume that the following import commands::
24+
The docstring examples assume the following import commands::
2425
2526
>>> import numpy as np
2627
>>> import control as ct
@@ -30,14 +31,17 @@
3031
3132
The main control package includes the most common functions used in
3233
analysis, design, and simulation of feedback control systems. Several
33-
additional subpackages are available that provide more specialized
34-
functionality:
34+
additional subpackages and modules are available that provide more
35+
specialized functionality:
3536
3637
* :mod:`~control.flatsys`: Differentially flat systems
3738
* :mod:`~control.matlab`: MATLAB compatibility module
3839
* :mod:`~control.optimal`: Optimization-based control
3940
* :mod:`~control.phaseplot`: 2D phase plane diagrams
4041
42+
These subpackages and modules are described in more detail in the
43+
subpackage and module docstrings and in the User Guide.
44+
4145
"""
4246

4347
# Import functions from within the control system library

control/bdalg.py

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,14 @@
1-
"""bdalg.py
1+
# bdalg.py - block diagram algebra
2+
#
3+
# Initial author: Richard M. Murray
4+
# Creation date: 24 May 09
5+
# Pre-2014 revisions: Kevin K. Chen, Dec 2010
6+
# Use `git shortlog -n -s bdalg.py` for full list of contributors
27

3-
This file contains some standard block diagram algebra.
8+
"""Block diagram algebra.
49
5-
Routines in this module:
6-
7-
append
8-
series
9-
parallel
10-
negate
11-
feedback
12-
connect
13-
combine_tf
14-
split_tf
15-
16-
"""
17-
18-
"""Copyright (c) 2010 by California Institute of Technology
19-
All rights reserved.
20-
21-
Redistribution and use in source and binary forms, with or without
22-
modification, are permitted provided that the following conditions
23-
are met:
24-
25-
1. Redistributions of source code must retain the above copyright
26-
notice, this list of conditions and the following disclaimer.
27-
28-
2. Redistributions in binary form must reproduce the above copyright
29-
notice, this list of conditions and the following disclaimer in the
30-
documentation and/or other materials provided with the distribution.
31-
32-
3. Neither the name of the California Institute of Technology nor
33-
the names of its contributors may be used to endorse or promote
34-
products derived from this software without specific prior
35-
written permission.
36-
37-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
40-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH
41-
OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
44-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
45-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
47-
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48-
SUCH DAMAGE.
49-
50-
Author: Richard M. Murray
51-
Date: 24 May 09
52-
Revised: Kevin K. Chen, Dec 10
53-
54-
$Id$
10+
The :mod:`control.bdalg` module contains some standard block diagram
11+
algebra, including series, parallel, and feedback functions.
5512
5613
"""
5714

control/canonical.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# canonical.py - functions for converting systems to canonical forms
22
# RMM, 10 Nov 2012
33

4+
"""Functions for converting systems to canonical forms.
5+
6+
"""
7+
48
import numpy as np
59
from numpy import poly, transpose, zeros_like
610
from numpy.linalg import matrix_rank, solve
@@ -210,6 +214,9 @@ def similarity_transform(xsys, T, timescale=1, inverse=False):
210214
zsys : StateSpace object
211215
System in transformed coordinates, with state 'z'.
212216
217+
See Also
218+
--------
219+
canonical_form
213220
214221
Examples
215222
--------

control/config.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# config.py - package defaults
22
# RMM, 4 Nov 2012
33
#
4-
# This file contains default values and utility functions for setting
5-
# variables that control the behavior of the control package.
6-
# Eventually it will be possible to read and write configuration
7-
# files. For now, you can just choose between MATLAB and FBS default
8-
# values + tweak a few other things.
4+
# TODO: add ability to read/write configuration files (ala Matplotlib)
95

6+
"""Functions to access default parameter values.
7+
8+
The :mod:`control.config` module contains default values and utility
9+
functions for setting parameters that control the behavior of the
10+
control package.
11+
12+
"""
1013

1114
import collections
1215
import warnings

control/ctrlplot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# ctrlplot.py - utility functions for plotting
2-
# Richard M. Murray, 14 Jun 2024
2+
# RMM, 14 Jun 2024
33
#
4-
"""
5-
Collection of functions that are used by various plotting functions.
4+
5+
"""Utility functions for plotting.
6+
7+
The :mod:`control.ctrlplot` module contains a collection of functions
8+
that are used by various plotting functions.
9+
610
"""
711

812
# Code pattern for control system plotting functions:

control/ctrlutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ctrlutil.py - control system utility functions
22
#
3-
# Original author: Richard M. Murray
3+
# Initial author: Richard M. Murray
44
# Creation date: 24 May 2009
55
# Use `git shortlog -n -s ctrlutil.py` for full list of contributors
66

control/delay.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# -*-coding: utf-8-*-
2-
#! TODO: add module docstring
31
# delay.py - functions involving time delays
42
#
5-
# Author: Sawyer Fuller
6-
# Date: 26 Aug 2010
7-
#
3+
# Initial author: Sawyer Fuller
4+
# Creation date: 26 Aug 2010
5+
6+
"""Functions to implement time delays (pade)."""
87

98
__all__ = ['pade']
109

control/descfcn.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# descfcn.py - describing function analysis
2-
#
32
# RMM, 23 Jan 2021
4-
#
5-
# This module adds functions for carrying out analysis of systems with
6-
# memoryless nonlinear feedback functions using describing functions.
7-
#
83

94
"""The :mod:~control.descfcn` module contains function for performing
105
closed loop analysis of systems with memoryless nonlinearities using

control/dtime.py

Lines changed: 5 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,9 @@
1-
"""dtime.py
1+
# dtime.py - functions for manipulating discrete time systems
2+
#
3+
# Initial author: Richard M. Murray
4+
# Creation date: 6 October 2012
25

3-
Functions for manipulating discrete time systems.
4-
5-
Routines in this module:
6-
7-
sample_system()
8-
c2d()
9-
"""
10-
11-
"""Copyright (c) 2012 by California Institute of Technology
12-
All rights reserved.
13-
14-
Redistribution and use in source and binary forms, with or without
15-
modification, are permitted provided that the following conditions
16-
are met:
17-
18-
1. Redistributions of source code must retain the above copyright
19-
notice, this list of conditions and the following disclaimer.
20-
21-
2. Redistributions in binary form must reproduce the above copyright
22-
notice, this list of conditions and the following disclaimer in the
23-
documentation and/or other materials provided with the distribution.
24-
25-
3. Neither the name of the California Institute of Technology nor
26-
the names of its contributors may be used to endorse or promote
27-
products derived from this software without specific prior
28-
written permission.
29-
30-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
33-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH
34-
OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
37-
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
38-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
39-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
40-
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41-
SUCH DAMAGE.
42-
43-
Author: Richard M. Murray
44-
Date: 6 October 2012
45-
46-
$Id: dtime.py 185 2012-08-30 05:44:32Z murrayrm $
47-
48-
"""
6+
"""Functions for manipulating discrete time systems."""
497

508
from .iosys import isctime
519

control/exception.py

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,9 @@
11
# exception.py - exception definitions for the control package
22
#
3-
# Author: Richard M. Murray
4-
# Date: 31 May 2010
5-
#
6-
# This file contains definitions of standard exceptions for the control package
7-
#
8-
# Copyright (c) 2010 by California Institute of Technology
9-
# All rights reserved.
10-
#
11-
# Redistribution and use in source and binary forms, with or without
12-
# modification, are permitted provided that the following conditions
13-
# are met:
14-
#
15-
# 1. Redistributions of source code must retain the above copyright
16-
# notice, this list of conditions and the following disclaimer.
17-
#
18-
# 2. Redistributions in binary form must reproduce the above copyright
19-
# notice, this list of conditions and the following disclaimer in the
20-
# documentation and/or other materials provided with the distribution.
21-
#
22-
# 3. Neither the name of the California Institute of Technology nor
23-
# the names of its contributors may be used to endorse or promote
24-
# products derived from this software without specific prior
25-
# written permission.
26-
#
27-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28-
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29-
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30-
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH
31-
# OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32-
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33-
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
34-
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
35-
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36-
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
37-
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38-
# SUCH DAMAGE.
39-
#
40-
# $Id$
3+
# Initial author: Richard M. Murray
4+
# Creation date: 31 May 2010
5+
6+
"""Exception definitions for the control package."""
417

428
class ControlSlycot(ImportError):
439
"""Slycot import failed."""

0 commit comments

Comments
 (0)