@@ -7,6 +7,7 @@ Guide. This guide contains information on using the python-control
77package, including documentation for all functions in the package and
88examples illustrating their use.
99
10+
1011Package overview
1112================
1213
@@ -16,6 +17,7 @@ Package overview
1617 :no-inherited-members:
1718 :no-special-members:
1819
20+
1921Installation
2022============
2123
@@ -82,6 +84,35 @@ control package::
8284Note that Google colab does not currently support Slycot, so some
8385functionality may not be available.
8486
87+
88+ Package conventions
89+ ===================
90+
91+ The python-control package makes use of a few naming and calling conventions:
92+
93+ * Function names are written in lower case with underscores between
94+ words ('frequency_response').
95+
96+ * Class names use camel case ('StateSpace', 'ControlPlot', etc) and
97+ instances of the class are created with "factory functions" ('ss')
98+ or as the output of an operation ('bode_plot').
99+
100+ * Functions that return multiple values use either objects (with
101+ elements for each return value) or tuples. For those functions that
102+ return tuples, the underscore variable can be used if only some of
103+ the return values are needed::
104+
105+ K, _, _ = lqr(sys)
106+
107+ * Python-control supports both single-input, single-output (SISO)
108+ systems and mullti-input, multi-output (MIMO) systems, including
109+ time and frequency responses. By default, SISO systems will
110+ typically generate objects that have the input and output dimensions
111+ supressed (using the NumPy :func: `~numpy.squeeze ` function). The
112+ `squeeze ` keyword can be set to `False ` to force functions to return
113+ objects that include the input and output dimensions.
114+
115+
85116Some differences from MATLAB
86117============================
87118
@@ -102,11 +133,11 @@ some things to keep in mind:
102133 vectors implemented as nested list . So [1 2 3] must be written as
103134 [1, 2, 3] and matrices are written using 2D nested lists, e.g., [[1,
104135 2], [3, 4]].
105- * Functions that return multiple values use either objects (with
106- elements for each return value) or tuples. The number of elements
107- in a tuple is fixed and so functions that return variable numbers of
108- return values will have a parameter of the form ` return_<val> `
109- that is used to return additional data.
136+ * Functions that in MATLAB would return variable numbers of values
137+ will have a parameter of the form ` return_<val> ` that is used to
138+ return additional data. (These functions usually return an object of
139+ a class that has attributpes that can be used to access the
140+ information and this is the preferred usage pattern.)
110141* You cannot use braces for collections; use tuples instead.
111142* Time series data have time as the final index (see
112143 :ref: `time-series-convention `).
0 commit comments