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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
.TH csim 1 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
csim - simulation (time response) of linear system
.SH CALLING SEQUENCE
.nf
[y [,x]]=csim(u,t,sl,[x0 [,tol]])
.fi
.SH PARAMETERS
.TP
u
: function, list or string (control)
.TP
t
: real vector specifying times with, \fVt(1)\fR is the initial
time (\fVx0=x(t(1))\fR).
.TP
sl
: list (\fVsyslin\fR)
.TP
y
: a matrix such that \fVy=[y(t(i)]\fR, i=1,..,n
.TP
x
: a matrix such that \fVx=[x(t(i)]\fR, i=1,..,n
.TP
tol
: a 2 vector [atol rtol] defining absolute and relative tolerances for
ode solver (see ode)
.SH DESCRIPTION
simulation of the controlled linear system \fVsl\fR.
\fVsl\fR is assumed to be a continuous-time system
represented by a \fVsyslin\fR list.
.LP
\fVu\fR is the control and \fVx0\fR the initial state.
.LP
\fVy\fR is the output and \fVx\fR the state.
.LP
The control can be:
.LP
1. a function : \fV[inputs]=u(t)\fR
.LP
2. a list : \fVlist(ut,parameter1,....,parametern)\fR such that:
\fVinputs=ut(t,parameter1,....,parametern)\fR (\fVut\fR is a function)
.LP
3. the string \fV"impuls"\fR for impulse response calculation
(here \fVsl\fR is assumed SISO without direct feed through and \fVx0=0\fR)
.LP
4. the string \fV"step"\fR for step response calculation
(here \fVsl\fR is assumed SISO without direct feed-through and
\fVx0=0\fR)
.LP
5. a vector giving the values of u correponding to each t value.
.SH EXAMPLE
.nf
s=poly(0,'s');rand('seed',0);w=ssrand(1,1,3);w('A')=w('A')-2*eye();
t=0:0.05:5;
//impulse(w) = step (s * w)
xbasc(0);xset("window",0);xselect();
plot2d([t',t'],[(csim('step',t,tf2ss(s)*w))',0*t'])
xbasc(1);xset("window",1);xselect();
plot2d([t',t'],[(csim('impulse',t,w))',0*t'])
//step(w) = impulse (s^-1 * w)
xbasc(3);xset("window",3);xselect();
plot2d([t',t'],[(csim('step',t,w))',0*t'])
xbasc(4);xset("window",4);xselect();
plot2d([t',t'],[(csim('impulse',t,tf2ss(1/s)*w))',0*t'])
//input defined by a time function
deff('u=input(t)','u=abs(sin(t))')
xbasc();plot2d([t',t'],[(csim(input,t,w))',0*t'])
.fi
.SH SEE ALSO
syslin, dsimul, flts, ltitr, rtitr, ode, impl
|