Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

sos2ss

Convert digital filter second-order section parameters to state-space form

Syntax

[A,B,C,D] = sos2ss(sos)
[A,B,C,D] = sos2ss(sos,g)

Description

sos2ss converts a second-order section representation of a digital filter to an equivalent state-space representation.

[A,B,C,D] = sos2ss(sos) converts sos, a system expressed in second-order section form, to a single-input, single-output state-space representation:

x(n+1)=Ax(n)+Bu(n),y(n)=Cx(n)+Du(n).

The discrete transfer function in second-order section form is given by

H(z)=k=1LHk(z)=k=1Lb0k+b1kz1+b2kz21+a1kz1+a2kz2.

sos is a L × 6 matrix organized as

sos=[b01b11b211a11a21b02b12b221a12a22b0Lb1Lb2L1a1La2L].

The entries of sos must be real for proper conversion to state space. The returned matrix A is of size 2L × 2L, B is a 2L × 1 column vector, C is a 1 × 2L row vector, and D is a 1 × 1 scalar.

[A,B,C,D] = sos2ss(sos,g) converts to state space a system sos in second-order section form with gain g:

H(z)=gk=1LHk(z).

Examples

collapse all

Compute the state-space representation of a simple second-order section system with a gain of 2.

sos = [1  1  1  1   0  -1 ;
      -2  3  1  1  10   1];
[A,B,C,D] = sos2ss(sos,2)
A =

   -10     0    10     1
     1     0     0     0
     0     1     0     0
     0     0     1     0


B =

     1
     0
     0
     0


C =

    42     4   -32    -2


D =

    -4

More About

collapse all

Algorithms

sos2ss first converts from second-order sections to transfer function using sos2tf, and then from transfer function to state-space using tf2ss.

See Also

| | | |

Introduced before R2006a

Was this topic helpful?