diff options
Diffstat (limited to '2048/DEPENDENCIES/gmv.sci')
-rw-r--r-- | 2048/DEPENDENCIES/gmv.sci | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/2048/DEPENDENCIES/gmv.sci b/2048/DEPENDENCIES/gmv.sci new file mode 100644 index 000000000..1e3ee068c --- /dev/null +++ b/2048/DEPENDENCIES/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;
|