1
.TH csim 1 "April 1993" "Scilab Group" "Scilab Function"
4
csim - simulation (time response) of linear system
7
[y [,x]]=csim(u,t,sl,[x0 [,tol]])
12
: function, list or string (control)
15
: real vector specifying times with, \fVt(1)\fR is the initial
16
time (\fVx0=x(t(1))\fR).
22
: a matrix such that \fVy=[y(t(i)]\fR, i=1,..,n
25
: a matrix such that \fVx=[x(t(i)]\fR, i=1,..,n
28
: a 2 vector [atol rtol] defining absolute and relative tolerances for
32
simulation of the controlled linear system \fVsl\fR.
33
\fVsl\fR is assumed to be a continuous-time system
34
represented by a \fVsyslin\fR list.
36
\fVu\fR is the control and \fVx0\fR the initial state.
38
\fVy\fR is the output and \fVx\fR the state.
42
1. a function : \fV[inputs]=u(t)\fR
44
2. a list : \fVlist(ut,parameter1,....,parametern)\fR such that:
45
\fVinputs=ut(t,parameter1,....,parametern)\fR (\fVut\fR is a function)
47
3. the string \fV"impuls"\fR for impulse response calculation
48
(here \fVsl\fR is assumed SISO without direct feed through and \fVx0=0\fR)
50
4. the string \fV"step"\fR for step response calculation
51
(here \fVsl\fR is assumed SISO without direct feed-through and
54
5. a vector giving the values of u correponding to each t value.
57
s=poly(0,'s');rand('seed',0);w=ssrand(1,1,3);w('A')=w('A')-2*eye();
59
//impulse(w) = step (s * w)
60
xbasc(0);xset("window",0);xselect();
61
plot2d([t',t'],[(csim('step',t,tf2ss(s)*w))',0*t'])
62
xbasc(1);xset("window",1);xselect();
63
plot2d([t',t'],[(csim('impulse',t,w))',0*t'])
64
//step(w) = impulse (s^-1 * w)
65
xbasc(3);xset("window",3);xselect();
66
plot2d([t',t'],[(csim('step',t,w))',0*t'])
67
xbasc(4);xset("window",4);xselect();
68
plot2d([t',t'],[(csim('impulse',t,tf2ss(1/s)*w))',0*t'])
70
//input defined by a time function
71
deff('u=input(t)','u=abs(sin(t))')
72
xbasc();plot2d([t',t'],[(csim(input,t,w))',0*t'])
76
syslin, dsimul, flts, ltitr, rtitr, ode, impl