Name

parapinv — Para-pseudoinverse.

Calling Sequence

[SYSRc,SYSRac] = parapinv(SYSH)

Parameters

SYSH

Discrete-time state-space realization of H(z) (a syslin list). SYSH should have full normal rank and no unit circle zeros.

SYSRc

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

SYSRac

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

Description

This routine computes two stable systems Rc(z) and Rac(z) such that Rc(z)+Rac(1/z)=inv(H(1/z)'*H(z))*H(1/z)'. (Or, if H is fat, Rc(z)+Rac(1/z)=H(1/z)'*inv(H(z)*H(1/z)').)

Examples

      
// Example 1: Computation of a para-pseudoinverse and comparison with
// para-pseudoinverse computed via horner and inv.

z = poly(0,"z");
H = [1 ; 1-1/z];				// define transfer function
disp(H);					// show transfer function
SYSH = tf2ss(H);				// convert to state-space
SYSH.dt = "d";					// mark as discrete-time
[SYSRc,SYSRac] = parapinv(SYSH);		// compute causal & anti-causal
						// part of the para-
						// pseudoinverse R
R = ss2tf(SYSRc) + horner(ss2tf(SYSRac),1/z);	// compute rational matrix of R
disp("Para-pseudoinverse R of H via parapinv:");// show results
disp(R); disp("R*H:"); disp(R*H);
R2 = inv(horner(H,1/z)'*H)*horner(H,1/z)';	// compute para-pseudoinverse
						// directly
						// show results
disp("Para-pseudoinverse R2 of H via inv and horner:");
disp(R2); disp("R2*H:"); disp(R2*H);
disp("R-R2:"); disp(R-R2);			// compare with earlier result