Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
8bd36ee
Update split_tf and combine_tf docstrings + combine_tf kwargs
murrayrm Dec 28, 2024
210ab45
improved docstring checking + first round of fixes
murrayrm Dec 28, 2024
f2285e4
add standalone docstrings_test mode + fix docstrings
murrayrm Dec 21, 2024
8463f68
fix flatsys "legacy" keywords + enhance legacy keyword processing
murrayrm Dec 21, 2024
f00c89d
add unit test for the unit test
murrayrm Dec 21, 2024
edc453f
add numpydoc to test environment
murrayrm Dec 21, 2024
d366472
refine use of numpydoc parser
murrayrm Dec 22, 2024
555ba16
add numpydoc style testing + corrections
murrayrm Dec 23, 2024
b360c2a
isort -m2 on touched files
murrayrm Feb 3, 2025
884e865
use numpydoc to capture function signature for var_positional args
murrayrm Feb 3, 2025
724adc0
Add matlab docstring testing + fix section label capitalization
murrayrm Dec 30, 2024
aad3c75
add check for empty section + fix correlation() docstring
murrayrm Dec 30, 2024
d1ae6d2
improved docstring checking + first round of fixes
murrayrm Dec 21, 2024
e31ce00
add standalone docstrings_test mode + fix docstrings
murrayrm Dec 21, 2024
624439a
add numpydoc style testing + corrections
murrayrm Dec 23, 2024
dd078ae
add unit test for sphinx documentation
murrayrm Dec 24, 2024
d605807
update sphinxdocs and docstrings to fix missing function refs
murrayrm Dec 24, 2024
810e910
remove references to deprecated and legacy functions
murrayrm Dec 24, 2024
6070ca7
add pytest to CI workflow
murrayrm Dec 24, 2024
3153dfa
fix docstring example errors (in newly included functions)
murrayrm Dec 24, 2024
3692ef4
update Makefile and conf.py for current version of sphinx
murrayrm Dec 26, 2024
f089d3a
add sphinx_copybutton to user guide
murrayrm Dec 26, 2024
d874bca
move examples and figures to subdirectories
murrayrm Dec 27, 2024
3128e0b
move plotting -> response and conventions -> {linear, timeplot, config}
murrayrm Dec 27, 2024
5308888
initial refactoring of user guide and reference manual
murrayrm Dec 27, 2024
bb3aeb0
updated intro text
murrayrm Dec 27, 2024
2de0e89
add version info to Jupyter tutorial
murrayrm Dec 27, 2024
b158cef
set default_role to py:obj to allow use of single backticks
murrayrm Dec 27, 2024
ec89ffb
main LTI systems chapter content
murrayrm Dec 28, 2024
76346d8
state space systems section content
murrayrm Dec 28, 2024
2bd2bf4
initial transfer fucntion section content
murrayrm Dec 28, 2024
5c4a26b
add missing classes to reference section
murrayrm Dec 28, 2024
b906617
fix up warnings in make html, make doctest, pytest
murrayrm Dec 28, 2024
6d6cf25
add missing files + tweak noindex for readthedocs
murrayrm Dec 28, 2024
e4fd04f
update linear.rst and associated doc files and function docstrings
murrayrm Dec 28, 2024
aa05537
update response.rst and associated function docstrings
murrayrm Dec 28, 2024
01e8c3c
update nonlinear.rst and associated doc files
murrayrm Dec 28, 2024
eb70e96
update iosys.rst and associated doc files and docstrings
murrayrm Dec 29, 2024
ecc3b5a
update stochastic.rst
murrayrm Dec 29, 2024
02f7a13
spelling corrections
murrayrm Dec 29, 2024
5d7b328
fix doctest errors in {combine,split}_tf (by suppressing output)
murrayrm Dec 29, 2024
322dba6
reorganize functions.rst, classes.rst
murrayrm Dec 29, 2024
b750119
Restructure config.rst to document all defaults + update docstrings, …
murrayrm Dec 29, 2024
199e0dd
update copybutton to skip prompts, outputs
murrayrm Dec 30, 2024
4e06670
add documentation on __call__ functions
murrayrm Dec 30, 2024
87222ef
small formatting fixes in flatsys.rst
murrayrm Dec 30, 2024
3706083
rebase cleanup + remove unneeded spaces + header updates
murrayrm Jan 1, 2025
fecc773
update module headers and docstrings
murrayrm Jan 1, 2025
06b462c
update MATLAB module headers and docstrings
murrayrm Jan 1, 2025
bbfcfa3
fix: config.default[] to config.defaults[]
murrayrm Jan 1, 2025
9664acf
remove unnecessary :role:, ~control. and `` from docstrings
murrayrm Jan 1, 2025
9edd422
fix up sub-package/module references
murrayrm Jan 1, 2025
8864385
fix up class docstrings + See Also
murrayrm Jan 2, 2025
a8d5ff9
add checks for backticks + class docstrings and fix up docstrings
murrayrm Jan 3, 2025
c888ccc
initial set of developer notes
murrayrm Jan 3, 2025
e657edc
fix small typos
murrayrm Jan 8, 2025
6d5496c
update backtick guidelines, docstrings, CSS processing
murrayrm Jan 10, 2025
00d6f02
add custom CSS
murrayrm Jan 11, 2025
1506ab0
center figures + small fixes
murrayrm Jan 11, 2025
a69c014
fix capitalization of chapter and section titles
murrayrm Jan 11, 2025
eb2247c
User Guide copyedits
murrayrm Jan 11, 2025
b91598c
add doctest to user guide + internally generate figures
murrayrm Jan 12, 2025
a46f0b6
updated isort's + remove extraneous spaces
murrayrm Feb 3, 2025
b742bd2
add numpydoc dependency for pip OS/BLAS test matrix
murrayrm Jan 13, 2025
34f39dc
reformat numbered notes sections
murrayrm Jan 14, 2025
1ed8817
regularize `dt` keyword use and related annotations (see develop.rst)
murrayrm Jan 15, 2025
cdc5fe8
updated Makefile to avoid regenerating figures unless needed
murrayrm Jan 15, 2025
056110e
fix module/sub-package references (with developer notes)
murrayrm Jan 16, 2025
eedbf2b
update class documentation (+ unit tests)
murrayrm Jan 18, 2025
a6b30b1
update MATLAB function list
murrayrm Jan 18, 2025
e3ff9c9
update LTI convenience functions to allow proper documentation
murrayrm Feb 3, 2025
3de0ee7
add special processing for `sys`
murrayrm Jan 19, 2025
d498ad5
fix citations and references
murrayrm Jan 19, 2025
acaa417
regularize Returns docstring for bundle objects
murrayrm Jan 19, 2025
6c8da96
update docstrings for LTI.__call__: clearer language + consistency
murrayrm Jan 20, 2025
59e7314
address first round of TODO items + add stochastic system examples
murrayrm Jan 20, 2025
bb4ff1e
address remaining @sawyerbfuller review comments
murrayrm Jan 20, 2025
1f8d2e6
fix up docstrings, unit test for append() methods after rebase
murrayrm Jan 20, 2025
84079e0
update kalman-pvtol.ipynb to fully evaluated notebook (for RTD)
murrayrm Jan 21, 2025
e82670e
add examples for create_{statefbk,estimator}_iosystem + related fixes
murrayrm Jan 21, 2025
6e8195a
address doc-related TODOs; rename optimal_{ocp,oep}
murrayrm Feb 3, 2025
23cbde9
spell check
murrayrm Jan 22, 2025
fe0cd47
make frdata/xferfcn parameters and attributes more consistent
murrayrm Jan 24, 2025
e2a93dd
Get rid of duplicative reshaping within bode_plot
murrayrm Jan 24, 2025
8081ac3
add __repr__ for NamedSignal
murrayrm Jan 25, 2025
f96276d
address remaining @sawyerfuller comments + RMM copyedits
murrayrm Jan 25, 2025
8297a28
update userguide examples (copyedits + additional narrative)
murrayrm Jan 25, 2025
f566656
fix unit test issue (change in error message)
murrayrm Jan 25, 2025
49e3740
fix bug in predprey controller (was generating wrong steady state)
murrayrm Jan 26, 2025
81742f0
improve class documentation in Reference Manual
murrayrm Jan 26, 2025
74edc24
add (user-oriented) release notes to Reference Manual
murrayrm Jan 26, 2025
719fcb2
update !pip to %pip per #1113
murrayrm Feb 2, 2025
7da8c00
addressed @slivingston review comments
murrayrm Feb 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update response.rst and associated function docstrings
  • Loading branch information
murrayrm committed Feb 3, 2025
commit aa055377883a33b9ba7b76514f73cb1388eccf49
6 changes: 4 additions & 2 deletions control/ctrlplot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ctrlplot.py - utility functions for plotting
# Richard M. Murray, 14 Jun 2024
#
# Collection of functions that are used by various plotting functions.
"""
Collection of functions that are used by various plotting functions.
"""

# Code pattern for control system plotting functions:
#
Expand Down Expand Up @@ -116,7 +118,7 @@
#

class ControlPlot(object):
"""A class for returning control figures.
"""A class for representing control figures.

This class is used as the return type for control plotting functions.
It contains the information required to access portions of the plot
Expand Down
1 change: 1 addition & 0 deletions doc/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ipynb_checkpoints/
59 changes: 21 additions & 38 deletions doc/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. currentmodule:: control

**********************************
Input/output Response and Plotting
Input/Output Response and Plotting
**********************************

The Python Control Systems Toolbox contains a number of functions for
Expand Down Expand Up @@ -160,7 +160,7 @@ which will compute the step response for each input/output pair. See
The input, output, and state elements of the response can be accessed using
signal names in place of integer offsets::

plt.plot(response. time, response.states['x[1]']
plt.plot(response.time, response.states['x[1]']

For multi-trace systems generated by :func:`step_response` and
:func:`impulse_response`, the input name used to generate the trace can be
Expand Down Expand Up @@ -202,18 +202,15 @@ data frame correspond to time and "cols" (DataSeries) correspond to signals.
Time response plots
-------------------

.. todo:: Improve flow between previous section and this one

Input/output time responses are produced one of several python-control
functions: :func:`forced_response`,
The input/output time response functions ( :func:`forced_response`,
:func:`impulse_response`, :func:`initial_response`,
:func:`input_output_response`, :func:`step_response`.
Each of these return a :class:`TimeResponseData` object, which
contains the time, input, state, and output vectors associated with the
simulation. Time response data can be plotted with the
:func:`time_response_plot` function, which is also available as
the :func:`TimeResponseData.plot` method. For example, the step
response for a two-input, two-output can be plotted using the commands::
:func:`input_output_response`, :func:`step_response`) return a
:class:`TimeResponseData` object, which contains the time, input,
state, and output vectors associated with the simulation, as described
above. Time response data can be plotted with the
:func:`time_response_plot` function, which is also available as the
:func:`TimeResponseData.plot` method. For example, the step response
for a two-input, two-output can be plotted using the commands::

sys_mimo = ct.tf2ss(
[[[1], [0.1]], [[0.2], [1]]],
Expand All @@ -225,31 +222,17 @@ which produces the following plot:

.. image:: figures/timeplot-mimo_step-default.png

The :class:`TimeResponseData` object can also be used to access
the data from the simulation::

time, outputs, inputs = response.time, response.outputs, response.inputs
fig, axs = plt.subplots(2, 2)
for i in range(2):
for j in range(2):
axs[i, j].plot(time, outputs[i, j])

In addition to accessing time response data via integer indices, signal
names can allow be used::

plt.plot(response.time, response.outputs['y[0]', 'u[1]'])

A number of options are available in the `plot` method to customize
the appearance of input output data. For data produced by the
:func:`impulse_response` and :func:`step_response`
commands, the inputs are not shown. This behavior can be changed
using the `plot_inputs` keyword. It is also possible to combine
multiple lines onto a single graph, using either the `overlay_signals`
keyword (which puts all outputs out a single graph and all inputs on a
single graph) or the `overlay_traces` keyword, which puts different
traces (e.g., corresponding to step inputs in different channels) on
the same graph, with appropriate labeling via a legend on selected
axes.
A number of options are available in the :func:`time_response_plot`
function (and associated :func:`TimeResponseData.plot` method) to
customize the appearance of input output data. For data produced by
the :func:`impulse_response` and :func:`step_response` commands, the
inputs are not shown. This behavior can be changed using the
`plot_inputs` keyword. It is also possible to combine multiple lines
onto a single graph, using either the `overlay_signals` keyword (which
puts all outputs out a single graph and all inputs on a single graph)
or the `overlay_traces` keyword, which puts different traces (e.g.,
corresponding to step inputs in different channels) on the same graph,
with appropriate labeling via a legend on selected axes.

For example, using `plot_input=True` and `overlay_signals=True` yields the
following plot::
Expand Down