File: ssrand.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (61 lines) | stat: -rw-r--r-- 2,111 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

ssrand(1)                      Scilab Function                      ssrand(1)
NAME
  ssrand - random system generator

CALLING SEQUENCE
  sl=ssrand(nout,nin,nstate)
  [sl,U]=ssrand(nout,nin,nstate,flag)

PARAMETERS

  nout      : integer (number of output)

  nin       : integer (number of input)

  nstate    : integer (dimension of state-space)

  flag      : list made of one character string and one or several integers

  sl        : list (syslin list)

  U square (nstate x nstate) nonsingular matrix

DESCRIPTION
  sl=ssrand(nout,nin,nstate) returns a random strictly proper (D=0) state-
  space system of size [nout,nint] represented by a syslin list and with
  nstate state variables.

  [sl,U]=ssrand(nout,nin,nstate,flag) returns a test linear system with given
  properties specified by flag.  flag can be one of the following:
  flag=list('co',dim_cont_subs)
  flag=list('uo',dim_unobs_subs)
  flag=list('ncno',dim_cno,dim_ncno,dim_co,dim_nco)
  flag=list('st',dim_cont_subs,dim_stab_subs,dim_stab0)
  flag=list('dt',dim_inst_unob,dim_instb0,dim_unobs)
  flag=list('on',nr,ng,ng0,nv,rk)
  flag=list('ui',nw,nwu,nwui,nwuis,rk)
  The complete description of the Sys is given in the code of the ssrand
  function (in SCIDIR/macros/util).  For example with
  flag=list('co',dim_cont_subs) a non-controllable system is return and
  dim_cont_subs is the dimension of the controllable subspace of Sys.  The
  character strings 'co','uo','ncno','st','dt','on','ui' stand for "controll-
  able", "unobservable", "non-controllable-non-observable",
  "stabilizable","detectable","output-nulling","unknown-input".

EXAMPLE
  //flag=list('st',dim_cont_subs,dim_stab_subs,dim_stab0)
  //dim_cont_subs<=dim_stab_subs<=dim_stab0
  //pair (A,B) U-similar to:
  //    [*,*,*,*;     [*;
  //    [0,s,*,*;     [0;
  //A=  [0,0,i,*;   B=[0;
  //    [0,0,0,u]     [0]
  //
  // (A11,B1) controllable  s=stable matrix i=neutral matrix u=unstable matrix
  [Sl,U]=ssrand(2,3,8,list('st',2,5,5));
  w=ss2ss(Sl,inv(U)); //undo the random change of basis => form as above
  [n,nc,u,sl]=st_ility(Sl);n,nc

SEE ALSO:
  syslin