Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2023.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> CACSD > Format representations and conversions > ss2ss


state-space to state-space conversion, feedback, injection

Calling Sequence

[Sl1,right,left]=ss2ss(Sl,T, [F, [G , [flag]]])



linear system (syslin list) in state-space form


square (non-singular) matrix

Sl1, right, left

linear systems (syslin lists) in state-space form


real matrix (state feedback gain)


real matrix (output injection gain)


Returns the linear system Sl1=[A1,B1,C1,D1] where A1=inv(T)*A*T, B1=inv(T)*B, C1=C*T, D1=D.

Optional parameters F and G are state feedback and output injection respectively.

For example, Sl1=ss2ss(Sl,T,F) returns Sl1 with:

and right is a non singular linear system such that Sl1=Sl*right.

Sl1*inv(right) is a factorization of Sl.

Sl1=ss2ss(Sl,T,0*F,G) returns Sl1 with:

and left is a non singular linear system such that Sl1=left*Sl (right=Id if F=0).

When both F and G are given, Sl1=left*Sl*right.

  • When flag is used and flag=1 an output injection as follows is used

    and then a feedback is performed, F must be of size (m+p,n)

    right and left have the following property:

    Sl1 = left*sysdiag(sys,eye(p,p))*right
  • When flag is used and flag=2 a feedback (F must be of size (m,n)) is performed and then the above output injection is applied. right and left have the following property:

    Sl1 = left*sysdiag(sys*right,eye(p,p)))


Sl=ssrand(2,2,5); trzeros(Sl)       // zeros are invariant:
trzeros(Sl1), trzeros(rand(2,2)*Sl1*rand(2,2))
// output injection [ A + GC, (B+GD,-G)]
//                  [   C   , (D   , 0)]
p=1,m=2,n=2; sys=ssrand(p,m,n);

// feedback (m,n)  first and then output injection.


// Sl1 equiv left*sysdiag(sys*right,eye(p,p)))

res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(p,p))))

// output injection then feedback (m+p,n) 
F2=rand(p,n); F=[F1;F2];

// Sl1 equiv left*sysdiag(sys,eye(p,p))*right 


// when F2= 0; sys1 and sys2 are the same 


See Also

Report an issue
<< ss2des Format representations and conversions ss2tf >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:41:05 CEST 2012