0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <p><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 <h2>Data handling in Simulink</h2><hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 Since SIMULINK can only send among blocks a limited set of object types (that is, inside Simulink lines can only travel numbers,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 vectors or Simulink defined signals), <b>the main concept about LTPDA GUI and LTPDA Simulink models is that what's passed among
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 blocks is not a true LTPDA object (an AO, a filter, a specwin or so), but rather a pure number, intended as an index inside a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 given array of objects.</b><br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 Every analysis block in a LTPDA model produces the output of its calculation, then stores this output into a global array - which will be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 accessible by all following functions/blocks - and send back to Simulink just the index of this newly added object inside the array.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 <br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 For example:</p><br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 <img src="images/model_2.png" alt="A simple analysis" border="1">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 <b>The first block</b> load create an AO from a file on disk. This AO is saved in a global array: assuming the array was empty, this is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 the 1st object, so '1' is the number sent by the first block into Simulink.<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 <b>The second block</b> receives this '1': the corresponding (1st) object is retrieved from the array, then the analysis function (<tt>pwelch</tt>) is applied.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 The output is appended back into the array, as 2nd element. So, '2' is the content of the signal leaving the second block.<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 <b>The third block</b> receives '2', retrieves the corresponding (2nd) object from the array and produces a plot of it.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 <br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 Thus, during the analysis cycle the array of objects becomes populated: unless differently set, all the temporary objects created
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 during the analysis will be canceled at the end of the analisys itself.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 <br><br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 The LTPDA GUI is based on two global arrays:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 <li> The aforementioned '<b>Input array</b>', which encloses all the LTPDA objects created by the user (for example,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 loading from file) and the objects generated during the analysis.<br>This is shown into the main panel of the LTPDA GUI.<br></li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 <li> The '<b>Output array</b>', meant as a way to separate primary objectives of the analysis from the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 other - working - objects, contained in the Input array.<br>This is shown into its own panel, the Output panel.</li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 The only way to save an object into the Output array is using the proper 'Send to Output' block, which will copy the object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 passed from the Input to the Output array.<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 <br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 <h2>Parameters</h2><hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 In order to enclose all the parameters of each block together with the Simulink model file, each parameters list is converted
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 into a string and saved into the Block Description, a specific field of every block in Simulink.<br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 Every time the user selects a block inside a valid LTPDA model the LTPDA GUI will automatically read this description to convert
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 it back to a proper plist. 'Valid' LTPDA models are those created by the GUI, thus containing the short annotation with the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 author's name, time and date of creation and so on.<br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 For more information on parameters handling, see the paragraph regarding the Parameters panel. <br><br><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50
|