Reorganization
[scilab.git] / scilab / modules / overloading / macros / %lss_v_lss.sci
1 function [s]=%lss_v_lss(s1,s2)
2 //s=%lss_v_lss(s1,s2)  <=> s = s1 "fedback" with s2
3 //             <=> s=s1/.s2    (in state-space)
4 //!
5 // origine s. steer inria 1987
6 // Copyright INRIA
7 [s1,s2]=sysconv(s1,s2)
8 [a1,b1,c1,d1,x1,dom1]=s1(2:7)
9 [a2,b2,c2,d2,x2]=s2(2:6);
10 e12=1/(eye()+d2*d1)
11 e21=eye()-d1*e12*d2;b21=b2*e21;e12=b1*e12
12 a=[a1-e12*d2*c1 , -e12*c2 ; b21*c1 , a2-b21*d1*c2]
13 s=tlist(['lss','A','B','C','D','X0','dt'],a,[e12;b21*d1],e21*[c1 -d1*c2],...
14             e21*d1,[x1;x2],dom1)
15 endfunction