Skip to main content

Transfer function estimation based on frequency response.

Project description

Tfest

Transfer function estimation with frequency response. Python equivalent of MATLAB tfest (but the algorithm is not exactly the same)

Only works wuth SISO systems for now.

Installation:

pip install tfest

Example:

To get a scipy transfer function:

import tfest
# u: input
# y: output
te = tfest.tfest(u, y)
# n_zeros, n_poles
te.estimate(3, 4, time=1)
te.get_transfer_function()

"time" is simulation length in seconds. To plot its bode diagram:

te.plot_bode()

Default method to calculate the frequency response Y/U is H1 estimator, if you want to use H2 or frequency/frequency just set the method to "h2" or "fft" and specify the time length of the simulation (in seconds, default is 1):

te.estimate(3, 4, method="h2", time=1)
te.estimate(3, 4, method="fft", time=1)

To use L1 normalization set the value of lambda l1 (default l1=0):

te.estimate(3, 4, time=1, l1=0.1)

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

tfest-0.2.3.tar.gz (3.3 kB view hashes)

Uploaded Source

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