~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/control/rtitr.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH rtitr G "April 1993" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an 
 
3
.SH NAME
 
4
rtitr - discrete time response (transfer matrix)
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
[y]=rtitr(Num,Den,u [,up,yp])
 
8
.fi
 
9
.SH PARAMETERS
 
10
.TP 10 
 
11
Num,Den 
 
12
: polynomial  matrices (resp. dimensions : \fVn\fRx\fVm\fR and \fVn\fRx\fVn\fR)
 
13
.TP
 
14
u
 
15
: real matrix (dimension \fVm\fRx\fV(t+1)\fR
 
16
.TP
 
17
up,yp 
 
18
: real matrices (\fVup\fR dimension \fVm\fRx\fV (maxi(degree(Den)))\fR (default values=\fV0\fR) , \fVyp\fR dimension \fVn\fRx\fV (maxi(degree(Den)))\fR)
 
19
.TP
 
20
y
 
21
: real matrix 
 
22
.SH DESCRIPTION
 
23
\fVy=rtitr(Num,Den,u [,up,yp])\fR returns the time response of
 
24
the discrete time linear system with transfer matrix \fVDen^-1 Num\fR 
 
25
for the input \fVu\fR, i.e \fVy\fR and \fVu\fR are such that \fVDen y = Num u\fR at t=0,1,...
 
26
.LP
 
27
If \fVd1=maxi(degree(Den))\fR, and \fVd2=maxi(degree(Num))\fR the polynomial 
 
28
matrices  \fVDen(z)\fR and \fVNum(z)\fR may be written respectively as:
 
29
.nf
 
30
  D(z)= D_0  + D_1  z + ... + D_d1   z^d1
 
31
  N(z)= N_0  + N_1  z + ... + N_d2   z^d2
 
32
.fi
 
33
and \fVDen y = Num u\fR is interpreted as the recursion:
 
34
.nf
 
35
  D(0)y(t)+D(1)y(t+1)+...+ D(d1)y(t+d1)= N(0) u(t) +....+ N(d2) u(t+d2)
 
36
.fi
 
37
It is assumed that \fVD(d1)\fR is non singular. 
 
38
.LP
 
39
The columns of u are the inputs of the system at t=0,1,...,T:
 
40
.nf
 
41
  u=[u(0) , u(1),...,u(T)]
 
42
.fi
 
43
The outputs at \fVt=0,1,...,T+d1-d2\fR are the columns of the matrix \fVy\fR:
 
44
.nf
 
45
  y=[y(0), y(1),  .... y(T+d1-d2)]
 
46
.fi
 
47
\fVup\fR and \fVyp\fR define the initial conditions for t < 0 i.e
 
48
.nf
 
49
  up=[u(-d1), ..., u(-1)  ]
 
50
  yp=[y(-d1), ...  y(-1)  ]
 
51
.fi
 
52
Depending on the relative values of \fVd1\fR and \fVd2\fR, some of the
 
53
leftmost components of \fVup\fR, \fVyp\fR are ignored.
 
54
The default values of \fVup\fR and \fVyp\fR are zero:
 
55
\fVup = 0*ones(m,d1), yp=0*ones(n,d1)\fR
 
56
.SH EXAMPLE
 
57
.nf
 
58
z=poly(0,'z');
 
59
Num=1+z;Den=1+z;u=[1,2,3,4,5];
 
60
rtitr(Num,Den,u)-u
 
61
//Other examples
 
62
//siso
 
63
//causal
 
64
n1=1;d1=poly([1 1],'z','coeff');       // y(j)=-y(j-1)+u(j-1)
 
65
r1=[0 1 0 1 0 1 0 1 0 1 0];
 
66
r=rtitr(n1,d1,ones(1,10));norm(r1-r,1)
 
67
//hot restart
 
68
r=rtitr(n1,d1,ones(1,9),1,0);norm(r1(2:11)-r)
 
69
//non causal
 
70
n2=poly([1 1 1],'z','coeff');d2=d1;    // y(j)=-y(j-1)+u(j-1)+u(j)+u(j+1)
 
71
r2=[2 1 2 1 2 1 2 1 2];
 
72
r=rtitr(n2,d2,ones(1,10));norm(r-r2,1)
 
73
//hot restart
 
74
r=rtitr(n2,d2,ones(1,9),1,2);norm(r2(2:9)-r,1)
 
75
//
 
76
//MIMO example
 
77
//causal
 
78
d1=d1*diag([1 0.5]);n1=[1 3 1;2 4 1];r1=[5;14]*r1;
 
79
r=rtitr(n1,d1,ones(3,10));norm(r1-r,1)
 
80
//
 
81
r=rtitr(n1,d1,ones(3,9),[1;1;1],[0;0]);
 
82
norm(r1(:,2:11)-r,1)
 
83
//polynomial n1  (same ex.)
 
84
n1(1,1)=poly(1,'z','c');r=rtitr(n1,d1,ones(3,10));norm(r1-r,1)
 
85
//
 
86
r=rtitr(n1,d1,ones(3,9),[1;1;1],[0;0]);
 
87
norm(r1(:,2:11)-r,1)
 
88
//non causal
 
89
d2=d1;n2=n2*n1;r2=[5;14]*r2;
 
90
r=rtitr(n2,d2,ones(3,10));norm(r2-r)
 
91
//
 
92
r=rtitr(n2,d2,ones(3,9),[1;1;1],[10;28]);
 
93
norm(r2(:,2:9)-r,1)
 
94
//
 
95
//  State-space or transfer
 
96
a = [0.21 , 0.63 , 0.56 , 0.23 , 0.31
 
97
     0.76 , 0.85 , 0.66 , 0.23 , 0.93
 
98
     0 , 0.69 , 0.73 , 0.22 , 0.21
 
99
     0.33 , 0.88 , 0.2 , 0.88 , 0.31
 
100
     0.67 , 0.07 , 0.54 , 0.65 , 0.36];
 
101
b = [0.29 , 0.5 , 0.92
 
102
     0.57 , 0.44 , 0.04
 
103
     0.48 , 0.27 , 0.48
 
104
     0.33 , 0.63 , 0.26
 
105
     0.59 , 0.41 , 0.41];
 
106
c = [0.28 , 0.78 , 0.11 , 0.15 , 0.84
 
107
     0.13 , 0.21 , 0.69 , 0.7 , 0.41];
 
108
d = [0.41 , 0.11 , 0.56
 
109
     0.88 , 0.2 , 0.59];
 
110
s=syslin('d',a,b,c,d);
 
111
h=ss2tf(s);num=h('num');den=h('den');den=den(1,1)*eye(2,2);
 
112
u=1;u(3,10)=0;r3=flts(u,s);
 
113
r=rtitr(num,den,u);norm(r3-r,1)
 
114
.fi
 
115
.SH SEE ALSO
 
116
ltitr, exp, flts
 
117