wkf — Wiener-Kalman Filter.
SYSK = wkf(SYSL,SYSH,Q,R)
Computes a stable and causal discrete-time system K(z) such that
||([L(z)-K(z)H(z))*sqrt(Q), -K(z)*sqrt(R)||_2=min
.
// Example 1: Approximate delay-one left inverse of H(z)=[1/z;1-1/z] z = poly(0,"z"); H = [1/z ; 1-1/z]; // create transfer function of the channel SYSH = tf2ss(H); // convert into state-space model SYSH.dt = "d"; // mark as discrete-time SYSL = tf2ss(1/z); // create state-space model of the SYSL.dt = "d"; // mark as discrete-time Q = 1; // covariance of the data R = 1e-8*eye(2,2); // covariance of the noise is very small // => filter is approximately a left inverse SYSK = wkf(SYSL,SYSH,Q,R); // compute wiener-kalman filter disp(clean(ss2tf(SYSK*SYSH))); // should be approximately L(z)=1/z