# SOS2CAS

## Purpose:

Converts second order section form filter coefficients to cascade coefficients.

## Syntax:

SOS2CAS(sos, g)

 sos - A Nx6 array where the first 3 columns are the numerator terms and the last 3 columns are the denominator terms. Each row represents a 2nd order stage. g - Optional. A real, the system gain. Defaults to 1.0.

## Returns:

A series, the coefficients in 2nd order cascade form.

## Example:

sos = {{1, 0, 0, 1, -0.5, 0.2}};

c = sos2cas(sos, 1.0);

c == {1, 1, 0, 0, -0.5, 0.2}

The 2nd order section filter coefficients represent the following Z transform: The resulting cascade form filter coefficients represent the same Z transform.

## Example:

sos = {{1, 0, 0, 1, -0.754856, 0.292379},

{1, 0, 0, 1,  0.254856, 0}};

gain = 1.0;

c = sos2cas(sos, gain);

c == {1, 1, 0, 0, -0.754856, 0.392379, 1, 0, 0, 0.254856, 0};

The 2nd order section filter coefficients represent the following 2 stage cascaded Z transform: The resulting cascade form filter coefficients represent the same Z transform.

## Remarks:

SOS2CAS converts second order section form filter coefficients to cascade form. Both forms represent the following Z transform: or: where G is the system gain, bk and ak are the filter coefficients for the kth stage.

The SOS form is an Nx6 array:

{{b10,  b11,  b12,  1.0,  a11,  a12},

{b20,  b21,  b22,  1.0,  a21,  a22},

...

{bN0,  bN1,  bN2,  1.0,  aN1,  aN2}}

Each row of the SOS coefficients represents a second order stage.

The cascade filter coefficients are returned as a single column series with the coefficients in the following order:

{G, b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ... , bN0, bN1, bN2, aN1, aN2}

See CAS2SOS to convert cascade form coefficients to second order section form.

CAS2SOS

CAS2TF

CAS2ZP

SOS2TF

SOS2ZP

SOSFILT

TF2CAS

TF2ZP

TF2ZPK

ZFREQ