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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Converts a transfer function representation to state space.
The transfer function is defined using the following 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.
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.
Tim Bright
© 2016, Tim Bright. MIT License.