Skip to main content

Code style: black PyPI version ci read the docs

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.

https://github.com/cknoll/pyblocksim/wiki/Contact

Metadata

Release files for pyblocksim 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyblocksim 0.3.3
File Size Uploaded
pyblocksim-0.3.3.tar.gz 671.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyblocksim 0.3.3
File Interpreter ABI Platform
pyblocksim-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 702.0 kB

Release files / pyblocksim-0.3.3.tar.gz

Download URL pyblocksim-0.3.3.tar.gz
Size 671.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5ff2fc3df23db851cb59869869d0026cbd5a76e8974a1d84b9b88b292ca1e2b
BLAKE2b-256 checksum
How to use checksums
a2d055b93bbb6079a06edb95b672ce8377bca11ebd81ffe9b0cec168998ea15e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / pyblocksim-0.3.3-py3-none-any.whl

Download URL pyblocksim-0.3.3-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
290b9f04b1dcffe7ff0b79eba973878cde387837504fdb09ef6ae5e460a25d5a
BLAKE2b-256 checksum
How to use checksums
4722ed71376072d50cb371b2b3a1710de011c74349c256046a494eb468cac472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.1

1 release file

0.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page