A lightweight linear system identification tool
Project description
llsi
Lightweight Linear System Identification package.
llsi offers easy acess to system identification algorithms. Currently implemented are "n4sid", "PO-MOESP", and a prediction error method for state space identification ("PEM_SS") It only depeds on numpy, scipy and optionally matplotlib.
Usage
- Load data start with loading the heated wire dataset (found in the data/ folder at the root of this repo) using numpy
import numpy as np
d = np.load('heated_wire_data.npy')
- Create a SysIdData object
import llsi
data = llsi.SysIdData(t=d[:,0],Re=d[:,1],Nu=d[:,2])
the three data series are time (t), Reynolds number (Re) and Nußelt number (Nu). We are going to model the dynamics of the Nußelt number (heat transfer from wire to surrounding fluid) using Reynolds number (velocity of the surrounding fluid) as input. 3. Ensure the time steps are equidistant and the sampling rate is reasonable. Moreover, the beginning of the time series (transient start) is removed and finally the series are centerd around their respective mean value (which is a requirement for linear systems).
data.equidistant()
data.downsample(3)
data.crop(start=100)
data.center()
- Identify a state space model with order 3 using the "PO-MOESP" algorithm.
mod = llsi.sysid(data,'Nu','Re',(3,),method='po-moesp')
- Use it further with scipy by exporting it to a scipy.signal.StateSpace object
ss = mod.to_ss()
Contribution
Thank you for considering to contribute. Any exchange and help is welcome. However, I have to ask you to be patient with me responding.
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
Built Distribution
File details
Details for the file llsi-0.0.2.tar.gz
.
File metadata
- Download URL: llsi-0.0.2.tar.gz
- Upload date:
- Size: 607.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7b99757042e69235ecf11f504ca142bf4f52c7bee74b1f951c60891f7bb18a1 |
|
MD5 | 7c8eaf2038a00ec263c375d2f1a8768e |
|
BLAKE2b-256 | 0dc0a4813f820a534a4e87471a389f02337c3b62d4276895991016c6270637dd |
File details
Details for the file llsi-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: llsi-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2164ef35f8af589a0c2a7cb27c25d2345dd9dbf6c8d85c08491f9f2f5c40682d |
|
MD5 | 76df03606379e01e959af38c050e94f4 |
|
BLAKE2b-256 | c8d115fa5adcd135ee19fca94032bda5fc456873ee9f48c07e55c996862b08ea |