Skip to main content

Python implementation of Generalized Binary Noise

Project description

pygbn

ci ci

This package implements the generalized binary noise (GBN) model of [1] in Python. The code is based on the Matlab implementation revised by Ivo Houtzager in 2007 at the Delft Center of Systems and Control.

Installation

You can very easily install the package using pip:

pip install pygbn

or after locally cloning the source code:

pip install .

Usage

Below is an example of how to use the package.

import matplotlib.pyplot as plt
from pygbn import gbn

if __name__ == '__main__':
    seed = 0 # random seed

    h = 0.05 # sampling period [s]
    T = 1 # length of signal [s]
    A = 1 # amplitude of signal
    ts = 1 # estimated settling time of the process [s]

    # flag indicating process damping properties
    # flag = 0 if the process is over-damped (default)
    # flag = 1 if the process is oscillary (min phase)
    # flag = 2 if the process is oscillary (non min phase)
    flag = 0

    # generate time array
    t = np.arange(start=0, stop=T, step=h)

    # generate the signal
    # the gbn function returns a time array and a signal array
    u = gbn(h, T, A, ts, flag, seed=seed)

    # optional: plot the generated signal
    plt.plot(t, u)

Citations

[1] Tulleken, H. J. (1990). Generalized binary noise test-signal concept for improved identification-experiment design. Automatica, 26(1), 37-49.

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

pygbn-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygbn-0.1.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pygbn-0.1.3.tar.gz.

File metadata

  • Download URL: pygbn-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygbn-0.1.3.tar.gz
Algorithm Hash digest
SHA256 aec0a1ba484ca78c64dfd5aa58f3d021acb8ff209b29a2aa85ec2acdd7179fc4
MD5 7a0cffd1fc719d8e8b67b36b2f825380
BLAKE2b-256 d29b98a72bd6325718dcc7a2e11d13277245d0bac86133943ea8f9a4c0da91b3

See more details on using hashes here.

File details

Details for the file pygbn-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pygbn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygbn-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b45d8fdc254e05f409b6db08f804598170eac3f8c1d669dc2644fcc5c5739bc9
MD5 8a73c839c4731834224a7858030096a2
BLAKE2b-256 2a93275f4835eb8c45cdb0da2283d7d713f63d4ee8be8473c2a407c7f618b9df

See more details on using hashes here.

Supported by

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