From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2048/CH11/EX11.12/gmv.sci | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 2048/CH11/EX11.12/gmv.sci (limited to '2048/CH11/EX11.12/gmv.sci') diff --git a/2048/CH11/EX11.12/gmv.sci b/2048/CH11/EX11.12/gmv.sci new file mode 100755 index 000000000..1e3ee068c --- /dev/null +++ b/2048/CH11/EX11.12/gmv.sci @@ -0,0 +1,17 @@ +// General minimum variance controller design, as given by Eq. 11.66 on page 421 and Eq. 11.70 on page 422. +// 11.12 + +// function [Sc,dSc,Rc,dRc] = gmv(A,dA,B,dB,C,dC,k,rho,int) +// implements the generalized minimum variance controller +// if int>=1, integrated noise is assumed; otherwise, +// it is not integrated noise + +function [Sc,dSc,R,dR] = gmv(A,dA,B,dB,C,dC,k,rho,int1) +zk = zeros(1,k+1); zk(k+1) = 1; +if int1>=1, [A,dA] = polmul([1 -1],1,A,dA); end +[Fk,dFk,Ek,dEk] = xdync(zk,k,A,dA,C,dC); +[Gk,dGk] = polmul(Ek,dEk,B,dB); +alpha0 = Gk(1)/C(1); +Sc = alpha0 * Fk; dSc = dFk; +[R,dR] = poladd(alpha0*Gk,dGk,rho*C,dC); +endfunction; -- cgit