Name

wkf — Wiener-Kalman Filter.

Calling Sequence

SYSK = wkf(SYSL,SYSH,Q,R)

Parameters

SYSL

Discrete-time state-space realization of L(z) (a syslin list).

SYSH

Discrete-time state-space realization of H(z) (a syslin list).

Q

Covariance matrix of the data.

R

Covariance matrix of the noise.

SYSK

Discrete-time state-space realization of K(z) (a syslin list).

Description

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.

Examples

// 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