I am trying to implement in java Matlab’s function “filter” in Java.
Y = FILTER(B,A,X)
It says that : The filter is a “Direct Form II Transposed” implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
Can somebody help me with that as I don’t really understand the above formula. Can somebody show me an example of the above formula using these parameters:
e.g. filter([1 -1],[1 -hpf_pole],S')
where hpf_pole = 0.98
S =
-3.26368263029463 0.598694437762099 0.925551549649237
-3.15561902947223 0.00249461257261130 2.35703360665011
-2.89398994439634 1.98384531062216 3.67478741307554
You can read about Direct Form II Transposed. But it’s useful to read more about Direct Forms and Implementation of discrete transfer functions in general to know why it’s useful and when to use it.