Skip to main content

Python Control Systems Library

Project description

https://anaconda.org/conda-forge/control/badges/version.svg https://img.shields.io/pypi/v/control.svg https://github.com/python-control/python-control/actions/workflows/python-package-conda.yml/badge.svg https://github.com/python-control/python-control/actions/workflows/install_examples.yml/badge.svg https://github.com/python-control/python-control/actions/workflows/control-slycot-src.yml/badge.svg https://coveralls.io/repos/python-control/python-control/badge.svg

Python Control Systems Library

The Python Control Systems Library is a Python module that implements basic operations for analysis and design of feedback control systems.

Have a go now!

Try out the examples in the examples folder using the binder service.

https://mybinder.org/badge_logo.svg

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

!pip install control
import control as ct

Features

  • Linear input/output systems in state-space and frequency domain

  • Block diagram algebra: serial, parallel, feedback, and other interconnections

  • Time response: initial, step, impulse

  • Frequency response: Bode, Nyquist, and Nichols plots

  • Control analysis: stability, reachability, observability, stability margins, root locus

  • Control design: eigenvalue placement, linear quadratic regulator, sisotool, hinfsyn, rootlocus_pid_designer

  • Estimator design: linear quadratic estimator (Kalman filter)

  • Nonlinear systems: optimization-based control, describing functions, differential flatness

Dependencies

The package requires numpy, scipy, and matplotlib. In addition, some routines use a module called slycot, that is a Python wrapper around some FORTRAN routines. Many parts of python-control will work without slycot, but some functionality is limited or absent, and installation of slycot is recommended (see below). The Slycot wrapper can be found at:

https://github.com/python-control/Slycot

Installation

Conda and conda-forge

The easiest way to get started with the Control Systems library is using Conda.

The Control Systems library has packages available using the conda-forge Conda channel, and as of Slycot version 0.3.4, binaries for that package are available for 64-bit Windows, OSX, and Linux.

To install both the Control Systems library and Slycot in an existing conda environment, run:

conda install -c conda-forge control slycot

Mixing packages from conda-forge and the default conda channel can sometimes cause problems with dependencies, so it is usually best to instally NumPy, SciPy, and Matplotlib from conda-forge as well.

Pip

To install using pip:

pip install slycot   # optional; see below
pip install control

If you install Slycot using pip you’ll need a development environment (e.g., Python development files, C and Fortran compilers). Pip installation can be particularly complicated for Windows.

Installing from source

To install from source, get the source code of the desired branch or release from the github repository or archive, unpack, and run from within the toplevel python-control directory:

pip install .

Article and Citation Information

An article about the library is available on IEEE Explore. If the Python Control Systems Library helped you in your research, please cite:

@inproceedings{python-control2021,
  title={The Python Control Systems Library (python-control)},
  author={Fuller, Sawyer and Greiner, Ben and Moore, Jason and
          Murray, Richard and van Paassen, Ren{\'e} and Yorke, Rory},
  booktitle={60th IEEE Conference on Decision and Control (CDC)},
  pages={4875--4881},
  year={2021},
  organization={IEEE}
}

or the GitHub site: https://github.com/python-control/python-control

Development

Code

You can check out the latest version of the source code with the command:

git clone https://github.com/python-control/python-control.git

Testing

You can run the unit tests with pytest to make sure that everything is working correctly. Inside the source directory, run:

pytest -v

or to test the installed package:

pytest --pyargs control -v

License

This is free software released under the terms of the BSD 3-Clause License. There is no warranty; not even for merchantability or fitness for a particular purpose. Consult LICENSE for copying conditions.

When code is modified or re-distributed, the LICENSE file should accompany the code or any subset of it, however small. As an alternative, the LICENSE text can be copied within files, if so desired.

Contributing

Your contributions are welcome! Simply fork the GitHub repository and send a pull request.

Please see the Developer’s Wiki for detailed instructions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

control-0.9.4.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

control-0.9.4-py3-none-any.whl (455.1 kB view details)

Uploaded Python 3

File details

Details for the file control-0.9.4.tar.gz.

File metadata

  • Download URL: control-0.9.4.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for control-0.9.4.tar.gz
Algorithm Hash digest
SHA256 0fa57d2216b7ac4e9339c09eab6827660318a641779335864feee940bd19c9ce
MD5 42c8b00dbdc1144430e49e4f2b740e71
BLAKE2b-256 e893a85db3742a80c96478067cfb2bbe3eb82f84551264bca57c15bafbfc1867

See more details on using hashes here.

File details

Details for the file control-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: control-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 455.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for control-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ab68980abd8d35ae5015ffa090865cbbd926deea7e66d0b9a41cfd12577e63ff
MD5 06bfe23e4952248c4ccfc60697924d26
BLAKE2b-256 0c614017876325c2d03c897d0f7565fb1d7ef6f26de97005b1f1c3cbc708609f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page