qfmu is a python package to generate continuous-time, LTI system FMUs from command line.
Installation
Install qfmu through PyPI
pip install qfmu
Noted that a C compiler is required
msvcfor Windowsgccfor Linuxclangfor MacOS
Features
Currently, qfmu is able to generate fmus that are compliant with FMI2 standard.
The following models are supported:
| Model | ME | CS |
|---|---|---|
State Space (ss) |
✔️ | ✔️ |
Transfer Function (tf) |
✔️ | ✔️ |
ZeroPoleGain (zpk) |
✔️ | ✔️ |
PID (pid) |
✔️ | ✔️ |
Noted that only continuous-time models are supported currently.
Examples
Generate a continuous-time state space FMU
qfmu ss -A "[[1,2],[3,4]]" -B "[[1],[2]]" -C "[[1,0],[0,1]]" -x0 "[3.14, 6]" -o ./example_ss.fmu
If qfmu is installed properly, you should see a example_ss.fmu file generated in your current working directory.
If you have fmpy installed, you can run fmpy info example_ss.fmu to see detailed model information.
Model Info
FMI Version 2.0
FMI Type Model Exchange, Co-Simulation
Model Name q
Description None
Platforms c-code, linux64
Continuous States 2
Event Indicators 0
Variables 10
Generation Tool qfmu
Generation Date 2023-10-08 21:24:32.733857
Default Experiment
Stop Time 1.0
Tolerance 0.0001
Variables (input, output)
Name Causality Start Value Unit Description
u1 input 0.0 Model input 1
y1 output Model output 1
y2 output Model output 2
Generate a continuous-time transfer function FMU using the numerator, denominator representation: $\frac{s}{s+1}$
qfmu tf --num "[1]" --den "[1,1]" -o ./example_tf.fmu
Generate a continuous-time transfer function FMU using the zero-pole-gain representation: $\frac{0.5(s-1)}{(s+1)(s+2)}$
qfmu zpk -z "[1]" -p "[-1, -2]" -k 0.5 -o ./example_zpk.fmu
Generate a continuous-time PI controller FMU: $3 + \frac{0.1}{s}$
qfmu pid --kp=3.0 --ki=0.1 -o ./example_pid.fmu
Metadata
Release files for qfmu 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qfmu-0.2.9.tar.gz | 29.8 kB | Without provenance | Details for qfmu-0.2.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qfmu-0.2.9-py3-none-any.whl | Python 3 | none | any | Details for qfmu-0.2.9-py3-none-any.whl |
Total release size: 62.5 kB
Release files / qfmu-0.2.9.tar.gz
| Download URL | qfmu-0.2.9.tar.gz |
|---|---|
| Size | 29.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d4f61c8fab44035cc12f17a747fc54eedb7d03d4c98dd30622200308f2a1b75
|
|
BLAKE2b-256 checksum How to use checksums |
e58a071119b35a02f66a894d6f382dbbee4b6996df04d9287edcd351f0a3a77d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / qfmu-0.2.9-py3-none-any.whl
| Download URL | qfmu-0.2.9-py3-none-any.whl |
|---|---|
| Size | 32.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d55201207417d4082655dcc68915706410cc1be96b44a86a9969b9709c27fb3
|
|
BLAKE2b-256 checksum How to use checksums |
75b89884effbb2e719202aef01b87f8411c7512c34dabced49c84aabb5d21124
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for qfmu 0.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.