summaryrefslogtreecommitdiff
path: root/2048/CH13/EX13.7/lqg_simple.sci
blob: fe72ef7520921c584d409c8426a505dbe0f89b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Simplified LQG control design, obtained by the solution of Eq. 13.53 on page 476.
// 13.7

// LQG controller simple design by method of Ahlen and Sternad
// function [R1,dR1,S,dS] = ...
// lqg_simple(A,dA,B,dB,C,dC,k,rho,V,dV,W,dW,F,dF)

function [R1,dR1,S,dS] = ...
lqg_simple(A,dA,B,dB,C,dC,k,rho,V,dV,W,dW,F,dF)
[r,b,db] = specfac(A,dA,B,dB,rho,V,dV,W,dW,F,dF);
[D,dD] = polmul(A,dA,F,dF);
[zk,dzk] = zpowk(k);
[N,dN] = polmul(zk,dzk,B,dB);
[RHS,dRHS] = polmul(C,dC,b,db);
[S,dS,R1,dR1] = xdync(N,dN,D,dD,RHS,dRHS);
endfunction;