~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/elementary/bloc2exp.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 bloc2exp 1 "April 1993" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an 
 
3
.SH NAME
 
4
bloc2exp - block-diagram to symbolic expression
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
[str]=bloc2exp(blocd)
 
8
[str,names]=bloc2exp(blocd)
 
9
.fi
 
10
.SH PARAMETERS
 
11
.TP 10
 
12
blocd
 
13
: list
 
14
.TP 10
 
15
str
 
16
: string
 
17
.TP 10
 
18
names
 
19
: string
 
20
.SH DESCRIPTION
 
21
given a block-diagram representation of a linear system
 
22
\fVbloc2exp\fR returns its symbolic evaluation.
 
23
The first element of the list \fVblocd\fR must be the string \fV'blocd'\fR.
 
24
Each other element of this list \fV(blocd(2),blocd(3),...)\fR
 
25
is itself a list of one the following types :
 
26
 
 
27
.nf
 
28
list('transfer','name_of_linear_system')
 
29
.fi
 
30
 
 
31
.nf
 
32
list('link','name_of_link',
 
33
               [number_of_upstream_box,upstream_box_port],
 
34
               [downstream_box_1,downstream_box_1_portnumber],
 
35
               [downstream_box_2,downstream_box_2_portnumber],
 
36
               ...)
 
37
.fi
 
38
 
 
39
The strings \fV'transfer'\fR and \fV'links'\fR are keywords which
 
40
indicate the type of element in the block diagram.
 
41
 
 
42
Case 1 :  the second parameter of the list is a character string which 
 
43
may refer (for a possible further evaluation) 
 
44
to the Scilab name of a linear system given
 
45
in state-space representation (\fVsyslin\fR list) or in transfer
 
46
form (matrix of rationals).
 
47
.LP
 
48
To each transfer block is associated an integer.
 
49
To each input and output of a transfer block is also
 
50
associated its number, an integer (see examples)
 
51
 
 
52
Case 2 :  the second kind of element in a block-diagram representation
 
53
is a link.
 
54
A link links one output of a block represented by the pair
 
55
\fV[number_of_upstream_box,upstream_box_port]\fR, to different
 
56
inputs of other blocks. Each such input is represented by 
 
57
the pair \fV[downstream_box_i,downstream_box_i_portnumber]\fR.
 
58
.LP
 
59
The different elements of a block-diagram can be defined
 
60
in an arbitrary order.
 
61
 
 
62
For example
 
63
.LP
 
64
[1] \fVS1*S2\fR with unit feedback.
 
65
.LP
 
66
There are 3 transfers \fVS1\fR (number \fVn_s1=2\fR) , \fVS2\fR (number \fVn_s2=3\fR)
 
67
and an adder (number \fVn_add=4\fR) with symbolic transfer 
 
68
function \fV['1','1']\fR.
 
69
.LP
 
70
There are 4 links. The first one (named \fV'U'\fR) links the input 
 
71
(port 0 of fictitious block -1, omitted) to port 1 of the adder.
 
72
The second and third one link respectively (output)port 1 
 
73
of the adder to (input)port 1 of system \fVS1\fR, and 
 
74
(output)port 1 of \fVS1\fR to (input)port 1 of \fVS2\fR.
 
75
The fourth link (named \fV'Y'\fR) links (output)port 1 of \fVS2\fR to 
 
76
the output (port 0 of fictitious block -1, omitted) and to 
 
77
(input)port 2 of the adder.
 
78
.nf
 
79
//Initialization
 
80
syst=list('blocd'); l=1;
 
81
//
 
82
//Systems
 
83
l=l+1;n_s1=l;syst(l)=list('transfer','S1');  //System 1
 
84
l=l+1;n_s2=l;syst(l)=list('transfer','S2');  //System 2
 
85
l=l+1;n_adder=l;syst(l)=list('transfer',['1','1']);  //adder
 
86
//
 
87
//Links
 
88
// Inputs  -1 --> input 1
 
89
l=l+1;syst(l)=list('link','U',[-1],[n_adder,1]);
 
90
// Internal 
 
91
l=l+1;syst(l)=list('link',' ',[n_adder,1],[n_s1,1]);
 
92
l=l+1;syst(l)=list('link',' ',[n_s1,1],[n_s2,1]);
 
93
// Outputs // -1 -> output 1
 
94
l=l+1;syst(l)=list('link','Y',[n_s2,1],[-1],[n_adder,2]);
 
95
//Evaluation call
 
96
w=bloc2exp(syst);
 
97
.fi
 
98
The result is the character string:
 
99
\fVw=-(s2*s1-eye())\s2*s1\fR.
 
100
.LP
 
101
Note that invoked with two output arguments,
 
102
\fV[str,names]= blocd(syst)\fR returns in \fVnames\fR the list
 
103
of symbolic names of named links. This is useful to
 
104
set names to inputs and outputs.
 
105
.HR
 
106
[2] second example
 
107
.nf
 
108
//Initialization
 
109
syst=list('blocd'); l=1;
 
110
//
 
111
//System (2x2 blocks plant)
 
112
l=l+1;n_s=l;syst(l)=list('transfer',['P11','P12';'P21','P22']);  
 
113
//
 
114
//Controller
 
115
l=l+1;n_k=l;syst(l)=list('transfer','k'); 
 
116
//
 
117
//Links
 
118
l=l+1;syst(l)=list('link','w',[-1],[n_s,1]);
 
119
l=l+1;syst(l)=list('link','z',[n_s,1],[-1]);
 
120
l=l+1;syst(l)=list('link','u',[n_k,1],[n_s,2]);
 
121
l=l+1;syst(l)=list('link','y',[n_s,2],[n_k,1]);
 
122
//Evaluation call
 
123
w=bloc2exp(syst);
 
124
.fi
 
125
In this case the result is a formula equivalent to the usual one:
 
126
.LP
 
127
\fVP11+P12*invr(eye()-K*P22)*K*P21;\fR
 
128
.SH SEE ALSO
 
129
bloc2ss
 
130
.SH AUTHOR 
 
131
S. S., F. D. (INRIA)