Biomedical Engineering Reference
In-Depth Information
FIGURE A.9
SIMULINK workspace used to create the model.
another window where parameters are specified. The block size can be changed by select-
ing the block with the mouse pointer, and then, while the left mouse button is held down
on the handle, drag the handle to its new size. To remove a block, simply select and delete
it. For convenience, one can use the copy and paste commands to reproduce a block.
Blocks are connected together with line segments. To connect two blocks, move the
mouse pointer to the angle bracket (
) on the output of one block, hold the left mouse but-
ton down, and then drag the pointer to the input
>
of another block. If the line segment is
drawn incorrectly, use the mouse to select, and then delete it. The line segment can be
manipulated by selecting it, and while the left mouse button is held down, drag the line
segment to its desired shape. One can also break into a line segment by holding the mouse
pointer over the line segment with the “CTRL” key pressed down, clicking the left mouse
button, and dragging the pointer to the desired location.
Shown in Figure A.11 (Top) is the workspace that consists of a sine wave, integrator, and
scope, connected together as the output of the sine wave to the input of the integrator to the
output of the integrator to the input of the scope. Double-clicking on the sine wave reveals
its properties as shown in Figure A.11 (Middle). Double-clicking on the scope block results
in a graph shown in Figure A.11 (Bottom). The scope is an excellent debugging tool to ver-
ify all simulation outputs are correct, but other graphing capabilities in MATLAB and
EXCEL provide far superior plots for professional reports.
Once a SIMULINK model is defined, a simulation of the model is run whereby all out-
puts and inputs are computed from the simulation start time to the end time for each time
period. Before running the simulation, the simulation parameters need to be specified
by clicking “Simulation” on the menu and then selecting the pull down “Simulation
Parameters”. Shown in Figure A.12 is the “Simulation Parameter” window with default
parameters. The default values are usually acceptable for many simple applications. Obvi-
ously, the “Stop time” should be set to be at least 5 time constants (dominant time constant).
<
Search WWH ::




Custom Search