# CAS2TF

## Purpose:

Converts cascade form filter coefficients to transfer function (direct) form.

## Syntax:

CAS2TF(c)

(b, a) = CAS2TF(c)

 c - A series. The filter coefficients in cascade form.

## Returns:

A two column series, where the first column contains the direct form numerator coefficients and the second column contains the direct form denominator coefficients.

(b, a) = CAS2TF(c) returns the direct form numerator and denominator coefficients as two separate series.

## Example:

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

d = cas2tf(c);

d == {{1,  1},

{0, -0.5},

{0,  0.2}}

The 2nd order cascade filter coefficients represent the following Z transform: The resulting direct form filter coefficients represent the equivalent Z transform: Since the original coefficients represent a single 2nd order system, the cascade denominator coefficients are identical.

## Example:

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

d = cas2tf(c);

d == {{1,  1},

{0, -0.5},

{0,  0.2},

{0,  0.1}}

The 2nd order cascade coefficients represent the equivalent Z transform: The resulting direct form filter coefficients represent the following Z transform: ## Example:

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

(b, a) = cas2tf(b, a);

b == {1, 0, 0, 0}

a == {1, -0.5, 0.2, 0.1}

Same as the previous example except the direct form coefficients are returned as two separate series.

## Remarks:

CAS2TF converts cascade form filter coefficients to direct form. The cascade form coefficients represent the following Z transform: or: where G is the system gain, bk and ak are the filter coefficients for the kth 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}

The equivalent direct form coefficients represent the following Z transform: z = e jω complex frequency N = number of numerator terms M = number of denominator terms

The direct form of the filter coefficients can be processed by the FILTEQ function. However, filtering with direct form coefficients can be more prone to numerical roundoff errors compared to the same filtering operation in CASCADE form.

See TF2CAS to convert direct form coefficients to cascade form.

CAS2SOS

CAS2ZP

FILTEQ

RESIDUEZ

SOS2TF

TF2CAS

TF2ZP

TF2ZPK

ZFREQ