Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Updated documentation #1094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 93 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/conda-env/doctest-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dependencies:
- nbsphinx
- docutils
- numpydoc
- sphinx-copybutton
1 change: 1 addition & 0 deletions .github/conda-env/test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dependencies:
- numpy
- matplotlib
- scipy
- numpydoc
7 changes: 7 additions & 0 deletions .github/workflows/doctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ jobs:
make html
make doctest

- name: Run pytest
shell: bash -l {0}
working-directory: doc
run: |
make html
PYTHONPATH=../ pytest

- name: Archive results
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os-blas-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ jobs:
- name: Install Wheel
run: |
python -m pip install --upgrade pip
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage numpydoc
pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl
pip show slycot
- name: Test with pytest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ record.txt
.coverage
doc/_build
doc/generated
examples/.ipynb_checkpoints/
.ipynb_checkpoints/
.settings/org.eclipse.core.resources.prefs
.pydevproject
.project
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Try out the examples in the examples folder using the binder service.

The package can also be installed on Google Colab using the commands::

!pip install control
%pip install control
import control as ct

Features
Expand All @@ -49,11 +49,11 @@ Features
Links
-----

- Project home page: http://python-control.org
- Project home page: https://python-control.org
- Source code repository: https://github.com/python-control/python-control
- Documentation: http://python-control.readthedocs.org/
- Documentation: https://python-control.readthedocs.io/
- Issue tracker: https://github.com/python-control/python-control/issues
- Mailing list: http://sourceforge.net/p/python-control/mailman/
- Mailing list: https://sourceforge.net/p/python-control/mailman/

Dependencies
------------
Expand Down Expand Up @@ -158,7 +158,7 @@ License
-------

This is free software released under the terms of `the BSD 3-Clause
License <http://opensource.org/licenses/BSD-3-Clause>`_. There is no
License <https://opensource.org/licenses/BSD-3-Clause>`_. There is no
warranty; not even for merchantability or fitness for a particular
purpose. Consult LICENSE for copying conditions.

Expand Down
1 change: 0 additions & 1 deletion benchmarks/optestim_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def time_oep_minimizer_methods(minimizer_name, noise_name, initial_guess):
initial_guess = (res.states, V)
else:
initial_guess = None


# Set up optimal estimation function using Gaussian likelihoods for cost
traj_cost = opt.gaussian_likelihood_cost(sys, Rv, Rw)
Expand Down
78 changes: 23 additions & 55 deletions control/__init__.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,27 @@
# __init__.py - initialization for control systems toolbox
#
# Author: Richard M. Murray
# Date: 24 May 09
#
# This file contains the initialization information from the control package.
#
# Copyright (c) 2009 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the California Institute of Technology nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH
# OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$

"""
The Python Control Systems Library :mod:`control` provides common functions
for analyzing and designing feedback control systems.
# Initial author: Richard M. Murray
# Creation date: 24 May 2009
# Use `git shortlog -n -s` for full list of contributors

"""The Python Control Systems Library (python-control) provides common
functions for analyzing and designing feedback control systems.

The initial goal for the package is to implement all of the
functionality required to work through the examples in the textbook
`Feedback Systems <https://fbsbook.org>`_ by Astrom and Murray. In
addition to standard techniques available for linear control systems,
support for nonlinear systems (including trajectory generation, gain
scheduling, phase plane diagrams, and describing functions) is
included. A :ref:`matlab-module` is available that provides many of
the common functions corresponding to commands available in the MATLAB
Control Systems Toolbox.

Documentation is available in two forms: docstrings provided with the code,
and the python-control users guide, available from `the python-control
and the python-control User Guide, available from the `python-control
homepage <https://www.python-control.org>`_.

The docstring examples assume that the following import commands::
The docstring examples assume the following import commands::

>>> import numpy as np
>>> import control as ct
Expand All @@ -57,14 +31,17 @@

The main control package includes the most common functions used in
analysis, design, and simulation of feedback control systems. Several
additional subpackages are available that provide more specialized
functionality:
additional subpackages and modules are available that provide more
specialized functionality:

* :mod:`~control.flatsys`: Differentially flat systems
* :mod:`~control.matlab`: MATLAB compatibility module
* :mod:`~control.optimal`: Optimization-based control
* :mod:`~control.phaseplot`: 2D phase plane diagrams

These subpackages and modules are described in more detail in the
subpackage and module docstrings and in the User Guide.

"""

# Import functions from within the control system library
Expand Down Expand Up @@ -123,14 +100,5 @@
except ImportError:
__version__ = "dev"

# patch the LTI class with function aliases for convenience functions
# this needs to be done after the fact since the modules that contain the functions
# all heavily depend on the LTI class
LTI.to_ss = ss
LTI.to_tf = tf
LTI.bode_plot = bode_plot
LTI.nyquist_plot = nyquist_plot
LTI.nichols_plot = nichols_plot

# Initialize default parameter values
reset_defaults()
Loading
Loading