% function [Sc,dSc,R,dR] = 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,int) zk = zeros(1,k+1); zk(k+1) = 1; if int>=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);