scijs/ndarray-tf2ss

Name: ndarray-tf2ss

Owner: scijs

Description: Converts a transfer function representation to state space.

Created: 2016-11-23 21:40:55.0

Updated: 2016-12-21 01:42:06.0

Pushed: 2016-12-02 05:24:29.0

Homepage: null

Size: 28

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ndarray-tf2ss

Converts a transfer function representation to state space.

Usage

The transfer function is defined using the following notation:

Transfer function notation

With that convention, some pseudocode for usage would be:

[bm, ... , b1, b0];
[1, an-1, ..., a1, a0];
B, C, D] = require('ndarray-tf2ss')(y, x);

The y and x arguments need to be ndarrays. Each row in the input arguments defines a separate function to be calculated. Single input-single output (SISO) systems can be defined with y having a single row and x having a single row.

Description

A transfer function typically relates the input of a system to an output. Control systems may need a state-space representation, and this function can convert the transfer function to the necessary matrices, which will be ndarrays.

State-space control needs 4 matrices and they satisfy the equations:

 Ax + Bu
Cx + Du

where dx is the derivative of the state variables. Note that the D matrix is zero. If m < n, the D matrix will always be zero. For causality (i.e. that we don't have to take into account future inputs), m ? n.

Author

Tim Bright

License

© 2016, Tim Bright. MIT License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.