Initial conditions for transposed direct-form II filter implementation
z = filtic(b,a,y,x)
z = filtic(b,a,y)
z = filtic(b,a,y,x)
finds the initial conditions,z
, for the delays in thetransposed direct-form IIfilter implementation given past outputsy
and inputsx
. The vectorsb
anda
represent the numerator and denominator coefficients, respectively, of the filter's transfer function.
The vectorsx
andy
contain the most recent input or output first, and oldest input or output last.
wheren
islength(b)-1
(the numerator order) andm
islength(a)-1
(the denominator order). Iflength(x)
is less thann
,filtic
pads it with zeros to lengthn
; iflength(y)
is less thanm
,filtic
pads it with zeros to lengthm
. Elements ofx
beyondx(n-1)
and elements ofy
beyondy(m-1)
are unnecessary sofiltic
ignores them.
Outputz
is a column vector of length equal to the larger ofnandm.z
describes the state of the delays given past inputsx
and past outputsy
.
z = filtic(b,a,y)
assumes that the inputx
is 0 in the past.
The transposed direct-form II structure is shown in the following illustration.
n– 1 is the filter order.
filtic
works for both real and complex inputs.
If any of the input argumentsy
,x
,b
, ora
is not a vector (that is, if any argument is a scalar or array),filtic
gives the following error message:
Requires vector inputs.
filtic
performs a reverse difference equation to obtain the delay statesz
.
[1] Oppenheim, A.V., and R.W. Schafer,Discrete-Time Signal Processing, Prentice-Hall, 1989, pp. 296, 301-302.