Skip to main content

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

  1. 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')
  1. 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()
  1. Identify a state space model with order 3 using the "PO-MOESP" algorithm.
mod = llsi.sysid(data,'Nu','Re',(3,),method='po-moesp')
  1. 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

llsi-0.0.1.tar.gz (607.0 kB view details)

Uploaded Source

Built Distribution

llsi-0.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file llsi-0.0.1.tar.gz.

File metadata

  • Download URL: llsi-0.0.1.tar.gz
  • Upload date:
  • Size: 607.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for llsi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2c1711912fd3222dfe3c0a560572858507ae83e3d0c0afbda52c1b132deb7a0b
MD5 80abbae68277f084fc658daddad464ca
BLAKE2b-256 750514a88ac1f4a15afb5b394b98e1db5b3a84f79cbf2a84b8f74fd4490b77c2

See more details on using hashes here.

File details

Details for the file llsi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: llsi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for llsi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 172785eea0812d4f7fd30d94e02861c1b152209991205a5d3990215f91bd069a
MD5 2ac6579cc853033d109321cdfe32106c
BLAKE2b-256 81ba9abf073ab7b6fc3985a4ed305a6f55bad8867f81d14dd36f7a496521c342

See more details on using hashes here.

Supported by

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