Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab help >> Elementary Functions > Signal processing > bloc2exp


Conversion of a block-diagram to its symbolic expression

Calling Sequence










given a block-diagram representation of a linear system bloc2exp returns its symbolic evaluation. The first element of the list blocd must be the string 'blocd'. Each other element of this list (blocd(2),blocd(3),...) is itself a list of one the following types :


The strings 'transfer' and 'link' are keywords which indicate the type of element in the block diagram.

Case 1 : the second parameter of the list is a character string which may refer (for a possible further evaluation) to the Scilab name of a linear system given in state-space representation (syslin list) or in transfer form (matrix of rationals).

To each transfer block is associated an integer. To each input and output of a transfer block is also associated its number, an integer (see examples)

Case 2 : the second kind of element in a block-diagram representation is a link. A link links one output of a block represented by the pair [number_of_upstream_box,upstream_box_port], to different inputs of other blocks. Each such input is represented by the pair [downstream_box_i,downstream_box_i_portnumber].

The different elements of a block-diagram can be defined in an arbitrary order.

For example

[1] S1*S2 with unit feedback.

There are 3 transfers S1 (number n_s1=2) , S2 (number n_s2=3) and an adder (number n_add=4) with symbolic transfer function ['1','1'].

There are 4 links. The first one (named 'U') links the input (port 0 of fictitious block -1, omitted) to port 1 of the adder. The second and third one link respectively (output)port 1 of the adder to (input)port 1 of system S1, and (output)port 1 of S1 to (input)port 1 of S2. The fourth link (named 'Y') links (output) port 1 of S2 to the output (port 0 of fictitious block -1, omitted) and to (input)port 2 of the adder.

syst=list('blocd'); l=1;

l=l+1;n_s1=l;syst(l)=list('transfer','S1');  //System 1
l=l+1;n_s2=l;syst(l)=list('transfer','S2');  //System 2
l=l+1;n_adder=l;syst(l)=list('transfer',['1','1']);  //adder


// Inputs  -1 --> input 1
// Internal 
l=l+1;syst(l)=list('link',' ',[n_adder,1],[n_s1,1]);
l=l+1;syst(l)=list('link',' ',[n_s1,1],[n_s2,1]);

// Outputs // -1 -> output 1

//Evaluation call

The result is the character string: w=-(s2*s1-eye())\s2*s1.

Note that invoked with two output arguments, [str,names]= blocd(syst) returns in names the list of symbolic names of named links. This is useful to set names to inputs and outputs.

[2] second example

syst=list('blocd'); l=1;

//System (2x2 blocks plant)



//Evaluation call

In this case the result is a formula equivalent to the usual one:


See Also

  • bloc2ss — block-diagram to state-space conversion
Report an issue
<< Signal processing Signal processing bloc2ss >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:34:42 CEST 2012