Engee documentation

tf2ss

Transformation of the transfer function filter parameters into the form of a state space.

Library

EngeeDSP

Syntax

Function call

  • A,B,C,D = tf2ss(b,a) — transforms a continuous or discrete transfer function with one input into its equivalent form in the state space.

Arguments

Input arguments

# b — coefficients of the numerator of the transfer function

+ vector | the matrix

Details

The coefficients of the numerator of the transfer function, specified as a vector or matrix. If b — the matrix, then each row b corresponds to the output signal of the system.

  • For discrete systems, the argument b contains coefficients in descending order of degrees .

  • For continuous systems, the argument b contains coefficients in descending order of degrees .

For discrete systems, the matrix b It must have a number of columns equal to the length of the vector. a. If the numbers differ, they should be equalized by adding zeros. To do this, you can use the function eqtflength.

# a — coefficients of the denominator of the transfer function

+ vector

Details

The coefficients of the denominator of the transfer function, specified as a vector.

  • For discrete systems, the argument a contains coefficients in descending order of degrees .

  • For continuous systems, the argument a contains coefficients in descending order of degrees .

Output arguments

# A is a matrix of states

+ the matrix

Details

The matrix of states returned as a matrix. If the system is described state variables, then A It has a size on .

Типы данных

Float32, Float64

# B is the input-state matrix

+ the matrix

Details

The input-state matrix returned as a matrix. If the system is described state variables, then B has a size of on .

Типы данных

Float32, Float64

# C is the output-state matrix

+ the matrix

Details

The output-state matrix returned as a matrix. If the system has outputs and is described state variables, then C has a size of on .

Типы данных

Float32, Float64

# D is the end—to- end transmission matrix

+ the matrix

Details

The end-to-end transmission matrix returned as a matrix. If the system has outputs, then D has a size of on .

Типы данных

Float32, Float64

Examples

Transformation of the transfer function into the form of a state space

Details

Consider the system described by the transfer function

We transform it into the form of a state space using the function tf2ss.

import EngeeDSP.Functions: tf2ss

b = [0 2 3; 1 2 1]
a = [1 0.4 1]

A, B, C, D = tf2ss(b, a)

println("A = ", A, "\nB = ", B, "\nC = ", C, "\nD = ", D)
A = [-0.4 -1.0; 1.0 0.0]
B = [1.0, 0.0]
C = [2.0 3.0; 1.6 0.0]
D = [0.0, 1.0]

Additional Info

Transfer function

Details

Function tf2ss converts the parameters of the representation of the transfer function of a given system into parameters of an equivalent representation in the state space.

  • For discrete systems, the state space matrices relate the state vector , entrance and the exit :



    The transfer function is the Z-transformation of the impulse response of the system. It can be expressed in terms of state space matrices as follows:

  • For continuous systems, the state space matrices relate the state vector , entrance and the exit :



    The transfer function is the Laplace transform of the impulse response of the system. It can be expressed in terms of state space matrices as follows: