sos2ss
Transformation of the parameters of the second-order sections of the digital filter into the form of a state space.
| Library |
|
Arguments
Input arguments
# sos — representation in the form of second-order sections
+
the matrix
Details
A representation in the form of second-order sections, defined as a matrix. Argument sos — this is a matrix of size
For correct transformation into the state space, the elements of the matrix sos they must be substantial.
# g is the total gain of the system
+
scalar
Details
The total gain of the system, given as a real scalar. Function sos2ss applies the gain to the system as follows:
Output arguments
# A is a matrix of states
+
the matrix
Details
The matrix of states returned as a matrix of size
# B is the input-state vector
+
vector
Details
The input-state vector returned as a vector of size
# C is the output-state vector
+
vector
Details
The output-state vector returned as a vector of size
# D is the end—to- end transmission matrix
+
scalar
Details
The end-to-end transmission matrix returned as a scalar.
Examples
Representation of a system of second-order sections in the state space
Details
Let’s calculate the representation in the state space of a simple system of second-order sections with a gain factor 2.
import EngeeDSP.Functions: sos2ss
sos = [1 1 1 1 0 -1; -2 3 1 1 10 1]
A, B, C, D = sos2ss(sos, 2)
println("A = ", A, "\nB = ", B, "\nC = ", C, "\nD = ", D)
A = [-10.0 -0.0 10.0 1.0; 1.0 0.0 0.0 0.0; 0.0 1.0 0.0 0.0; 0.0 0.0 1.0 0.0]
B = [1.0, 0.0, 0.0, 0.0]
C = [42.0 4.0 -32.0 -2.0]
D = -4.0
Algorithms
Function sos2ss first, it converts the second-order sections into a transfer function using the function sos2tf, and then from the transfer function to the form of the state space using the function tf2ss.
The representation of the state space with one input and one output is given as follows: