Python library for block-oriented modeling and simulation in control theory
Project description
GENERAL INFORMATION
Pyblocksim aims to mitigate the lack of a tool like Simulink (or scicos) in the world of python based scientific computing. It aims to enable you to quickly implement a model of a dynamic system which is suited to be modeled by the feedback-free directed interconnection of blocks such as transfer functions.
pyblocksim provides a framework for:
- describing blocks and their interconnections (including explicit feedback) as compact source code
- converting the whole model into a state space form
- passing it to the numerical integrator of scipy
- easily accessing the simulation results
Pyblocksim does not provide a graphical user interface. Model description has to be done textually.
Currently, only little development work has been invested. What already works is the following:
- specifying a model consisting of linear proper transfer functions (i.e. degree(num)<= degree(denominator)) and (possibly nonlinear) interconnections of such
- describing system inputs as python functions
- simulate (i.e. numerically integrate) the models with the given inputs
- collecting the simulation results and make them available for e.g. visualization.
The following features should be possible to be implemented
- representation of systems with dead time
- representation of (linear and nonlinear) systems in state space
- graphical visualization of the blocks and their interconnections (for visual model checking)
- things like Nyquist and bode plots
- a module for controller/observer design
HINT: Some of these features (and many others) are available in python-control, see: http://python-control.sourceforge.net/
Warning
There is absolutely NO GUARANTEE that the produced results are correct. There was only a quick plausibility check for the examples by the author.
Installation
The command
pip install pyblocksim
should install the package including all examples. If something goes wrong, feel free to file an issue or contact the author(s).
Getting started
The recommended entry point ist the examples
-folder.
Note: the examples are not installed with pip and have to be downloaded
separately.
Dependencies
Since 2016-11-09 this package uses python3 syntax.
The python2.7.x code is still available in the branch leagacy-py2
.
Besides the Python standard library pyblocksim depends on
- scipy, numpy
- sympy
- matplotlib (for visualization only)
When installing with pip
the dependencies should be automatically
installed. See also requirements.txt
.
Documentation
Currently handwritten documentation is outdated. The examples should be self-explanatory and cover the whole functionality. Tanking a glance at the source code should reveal the internals (at least if the meaning of the terminology can be guessed). In the case of questions asking for support is encouraged.
There is also a the directory docs/notebooks
.
License
Pyblocksim is released under the terms of the GNU GPLv3.
See the LICENSE
-file for details.
Contact and Feedback
Any feedback (suggestions, bug reports, etc) is highly welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyblocksim-0.3.3.tar.gz
.
File metadata
- Download URL: pyblocksim-0.3.3.tar.gz
- Upload date:
- Size: 671.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ff2fc3df23db851cb59869869d0026cbd5a76e8974a1d84b9b88b292ca1e2b |
|
MD5 | 69505a2334681e1243e98332bdcd099d |
|
BLAKE2b-256 | a2d055b93bbb6079a06edb95b672ce8377bca11ebd81ffe9b0cec168998ea15e |
File details
Details for the file pyblocksim-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: pyblocksim-0.3.3-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 290b9f04b1dcffe7ff0b79eba973878cde387837504fdb09ef6ae5e460a25d5a |
|
MD5 | 04a8bec1cd8e7a3fb7e1158edfd61f3d |
|
BLAKE2b-256 | 4722ed71376072d50cb371b2b3a1710de011c74349c256046a494eb468cac472 |