This appendix presents brief descriptions of al blocks in the
‘useful blocks may be foun
Aduitior
Block Reference
nd
in the Simulink Extras block library a
block libraries associated with toolboxes.
A.1 CONTINUOUS BLOCK LIBRARY
“Block Teon
te}
Compute the time rate of change of the input.
Compute the time integral of the input signal.
Model a linear time-invariant multiple-input, multiple-output sys-
‘tem or subsystem using state-space notation.
Implement a continuous transfer function.
he input delayed by aspecified
Simulate a variable time delay. ‘The frst input is the signal to be
delayed, The second input is the length of the delay. Thus, the
length of the delay can change during a simulation.
Implement a continuous transfer function using zero-pole notation.
Section A2 — Discontinuities Block Libr
A.2_ DISCONTINUITIES BLOCK LIBRARY
‘TABLE A2: Discontinuities Block Library
Block leon Purpose
[Ap Wnplementabacieh nontineniy. 7;
LZ} Implement a simple model of Coulomb ana viscous ret
iB Model a dead zone, which is a region in which the oul
‘The upper and lower limits of the dead zone are 6
nesi7iee parameters. If the input is below the dead zone, the oul
input minus the lower limit, nd if the input is above
the output is the input minus the upper limit.
Compare input Signal to a preset value. Output a
AY except during the step the signal passes through the
Gig temains atthe preset value after reaching it
A Model an analog to digital conve
z qua terval, which i a block configuration p
A Limit the rate of change of the output signal. When
ia changing, the rate of change of the output will be th
rate of change of the input, as long.as the rate of change:
is less than a setable limit, Ifthe rate of change of the
the limit, the rate of change of the output will be the Sif
imi. 7
‘Simulate a relay. ‘The output is one of two specified d
‘depending on the value of the input.
Implement a ssturation nonlinearity. The upper a
the output signal are configuration parameters. If
input signal is between the limits, the value of the
same as the value of the input,350 Appendix A Block Reference Section A — Lookup Tables Block Ui
DISCRETE BLOCK LIBRARY A4 LOOKUP TABLES BLOCK LIBRARY
TABLE A3: Discrete Block Library
Purpose
Implement a discrete transfer function using the nota-
tion (polynomials of :) frequently associated with control
systems.
‘Model a discrete transfer function using zero-pole notation.
Implement a discrete transfer function using the nota-
tion (polynomials of =~") frequently associated with digital
filtering.
Model a linear time-invariant multiple-input, multiple-
‘output discrete system using state-space notation,
Compute a discrete approximation to a continuous inte~
sgrator.
Provide @ piecewise linear approximation of the block
input. At an offset time 4 since the last sample [x(A)) the
ouput is (8) + fx) — x(k — 1) where Tis the sample
period.
uiput the value of the block input at the beginning of
the previous time step. Note that with variable-step size
solvers, the duration of the delay will vary as the simulation
progresses. If a constant memory delay is needed, use a
‘Transport Delay block.
‘Ourput the input signal delayed by one sample time,
‘Output the input at the most recent sample time.
TABLE A4: Lookup Tables Block Library "|
Purpene
Perform table lookup,
Work with the Prelookup Index Search Block
dimensional interpolation.
Linearly interpolate in a one-dimensional table with
at both ends,
Map two inputs to a single output.
Map n inputs to a single output,
Find the index of the value of the input signal ina
“This block ean produce appropriate input for
(nD) Using Prelookup block.352 Appendix. A
Block Reference
AS MATH OPERATIONS BLOCK LIBRARY
TABLE AS: Math Operations Block Library
Block Icon
Purpose
‘Compute the absolute value of cach component of the
input signal, which may be scalar or vector.
Enable a Simulink model to solve algebraic equations.
‘The model must be configured such that the input to the
Algebraic Constraint block is dependent upon the value of
the output. A model containing an Algebraic Constraint
‘block will attempt to adjust the value of the block output
such that the value of the block input is 0.
Assign values to selected elements of the input signal.
‘Perform bitwise logical operations (AND, OR, XOR, ete.)
‘on integer input signal with a specified operand.
‘Look up the elements of the input vector in a truth table
Accept a complex input signal. Output can be configured
as the phase angle, magnitude, or both.
Accept a complex input signal. Output can be configured
a the real part, the imaginary part, or both.
Accept two vector signals of the same dimension, The
‘output is the dot product of the current input vectors.
‘Multiply the block input by a constant. The Gain block will
‘work with scalar or vector signals, and the value of gain
may be a scalar or vector compatible with the input signal,
Implement a number of logical operations such as AND
and OR.
Section AS Math Operations Block ti
‘TABLE A.S: Math Operations Block Library (Cont)
Block leon Purpose
‘Accept magnitude. phase angle. or both as input
‘corresponding complex signal.
esas
a Perform a variety of mathematical functions such
ic Jog, and square root.
Coneatenate matrix signals. :
> Multiply the block input veetor by a compati6l]
The input vector is treated as a column vector, TY
fg the gain matrix must have the same number of,
as there are elements in the input vector. The fil)
outputs is the same as the number of rows if
matrix, which does not have to be square.
{ = ‘Compute the minimum or maximum value of
block inputs. The number of input ports can be
a block dialog box.
{
Implement MATLAB function polyval.
Gh ‘The Product block can be configured with
inputs. If there is one input, the output is the
elements of the input vector. If there are mult
the output isthe element-by-clement product of
at each input port.
‘Accept real and imaginary components and out
signal.
ek ge vee
tome
Implement a number of relational opera
than or equal. greater than, etc.
‘Change the dimensions of the input matrix.
ment MATLAB function reshape.354 Appendix A Block Reference
‘TABLE A: Math Operations Block Library (Cont)
TBlosk leon Purpose
Perform a variely of rounding operations including round,
round up (€642), round down (f200r), and round to the
nearest integer toward zero (Fix).
Implement the signum nonlinearity. ‘The output is 1 i
input is positive, 0 if the input is 0, and —1 if the input is,
negative.
Allow the user to set a gain using a slider control. Ope
slider control by double-clicking the block, The slider ean
‘be moved during a simulation, thus providing a variable
input device.
Q Compute the algebraiesum ofthe block inputs. The number
of inputs and the sign applied to each input can be set in
the block dialog box.
& Implement standard trigonometric functions such as sine
and cosine
AG PORTS & SUBSYSTEMS BLOCK LIBRARY
TABLE A: Ports & Subyystems Block Library
Block leon Purpose
Place ina block library to produce a cor
block.
Tae
fe sah Template for atomie subsystem.
in| Convert a subsystem into an enabled subsystem.
—= ; ‘Template-cnabled subsystem.
sie
Section A.6 Ports & Subsystems Bloc
Ports & Subsystems Block Library (Cont)
Purpose
¥ ‘Template-enabled and triggered subsystem,
int on
Taattta
Angered Sten
‘Template subsystem with For Iterator block,
Fee eior
Subsystem |
Co} Execute a function call subsystem, 7
reese |
‘Template subsystem with winger Bock conti
_
Tamer
aro An If block controls one or more If Action §)
. a +}
. :
am ‘Conditional subsystem executed —
Create an input for a subsystem. An Inport
‘be used to reecive an external input (for
sim command) to a model. Ei
Create an output port for a subsystem, J
‘ean also be used to produce mode!
‘example, by the linearizati ori com
@
ae
mp “Template subsystem.
=
cxtup A Switch Case block is the decisi
controls Switch Case Action subsystems,356 Appendix A
TABLE AS: Ports & Subsystems Block Libra
Block leon
ip
[4]
Block Reference
(Cont)
Purpose
Used in conjunction with Switch Case block. Each Switch
Case output controls one Switch Case subsystem.
Convert asubsystem intoa triggered subsystem. Convert an
‘enabled subsystem into a trigger when enabled subsystem,
7 Template triggered subsystem,
>is om
Tare
semen
f= ‘Template subsystem containing a While Iterator block,
ite -1 0
a |
SIGNAL ATTRIBUTES BLOCK LIBRARY
TABLE A7: Signal Attributes Block Library
Block leon Purpose
Ls Convert input signal to a specified data type.
Danipe Comer
pain Set the initial condition of its output to a specified value. After
= the simulation begins. the block output isthe same as its input
This block is useful in algebraic loops, ay it can provide an
initial guess to the algebraic loop solver for the first time step.
Display a variety of useful information about the block input
Synchronizes transfer of data from block of one data rate toa
block of different data rate.
Implements crror checking on input signal. If no errors are
found, the signal is transmitted to the output unchanged. If an
efor is found, the simulation is forced to stop.
Ceitout the auimbar of alamante io the innwt wactae Thi if
As
Section A.B Signal Routing Block Library
‘SIGNAL ROUTING BLOCK LIBRARY
Block Toon
}
TABLE A.8: Signal Routing Block Library
Purpose FI
Groups multiple signa lines into a single data bus.
Create a new signal containing a specified subset of the
‘of a data bus produced using a Mux block or Bus Creator!
A Data Store Memory is a named memory location
Data Store Write blocks and read from by Data Store
A simulation can save data in a Data Store Memory.
that data later.
Output the current value of the contents of the:
Store,
Write to a specified Data Store Memory block. More than
Store Write block can write to a particular Data Store
but if two of more Data Store Write blocks attempt to
same Data Store Memory on the same simulation step, the
are unpredictable.
Split vector input signal into a configurable number
output signals
A From block works with a Goto block. The output of a
is the same as the input to the corresponding Goto block.
‘block can receive input from only one Goto block, but a
can send a signal to any number of From blocks.
‘Send the block input to all corresponding From blocks.
The Goto Tag Visibility determines which subsystems
From blocks corresponding to a particular Goto block,
‘Switch between the (wo inputs when the block is.chr
358 Appendix A Block Reference
TABLE AB: Si
“Block con Purpose __
Fon} Ouiputisthe most cently updated vac of inputs Most ommmaly
AP driven by subsystems that execute alternately,
fa Accept a specified number of inputs. A control signal determines
EDP whlch inputs passed to the output.
“
Combines a configurable numberof scalar input signals to produce
& Vector output signal.
Accept a vector input, and proxtuce a vector output that consists of
selected elements of the input vector in a selected order,
Switch between two input signals based on the value of a control
signal,
-9 SINKS BLOCK LIBRARY
Display the current value of the input signal,
Display scalar or vector signals in a method analogous to an
oxilloscope. A Floating Scope r its input signal from
any signal line selected during model execution,
Create an output port for a subsystem. An Outport block
can also be used to produce model outputs, to be used, for
‘example, by the linearization or trim commands,
Display scalar or vector signals in a method analogous to an
oxcillowope,
‘Cause the simulation to stop when the input signal is nonzero,
Section A10 Sources Block Liby
TABLE A: Sinks Block Library (Cont)
“Block Keon Purpose
Connect unused block outputs to Terminator blocks!
Simulink from producing error messages. For exai
use a Demux block to split a vector signal but only
tse one component ofthe vector signal, connect the
ouiput ports of the Demux block to Terminator
Save the input signal to a file in MATLAB.mat
signal may be sealar oF vector.
Store the input signal in a MATLAB matrix
MATLAB workspace after the simulation stops.
may be scalar or vector.
JT] Proxtuce a graph using two scalar inputs. The signal
XO | the top pat port ste Independencia
ome the signal connected to the lower input port is the
arial
€ (y-axis),
AAO SOURCES BLOCK LIBRARY
TABLE A.10: Sources Block Library
Purpose
Generate a signal containing band-limited white nole ol
Power specral dcmsity (PSD),
ry ‘Generate a sinusoidal signal of continuously increasing |
Generate a signal consisting of the current sim
: Generate a constant value. The constant can be a
‘Generate a signal consisting ofthe current simulation
Dyscne, — Alstspeciied period. Equivalent toa combination of a
sand Zoran Werte “360 Appendix A — wlock Kererence
(A117 USER-DEFINED FUNCTIONS BLOCK LIBRARY
TABLE A.10: Sources Block Library (Cont)
= TABLE A.11: User-Defined Functions Block Library
“Generate a signal by interpolating in a table defined by variables in Purpose 79
the MATLAB workspace. — -
{mo} Sete Tunction using a C language syntax,
Generate a signal by interpolating ina MATLAB matrix stored in 7 accep vecorinpat bul producesa salar niet
file, perform matrix: however,
3 is ; Fen block, and is therefore preferable when matrix
Connect Ground blocks to unused inputs to prevent Simulink from Seadedl
producing error messages. For example, if a State ‘Space block is
used to model the unforced behavior of a system, connect a Ground Implement a function using MATLAB syntax. It
block to its input port: Pez} inputs and produce vector outputs.
Create an input for a subsystem. An Inport block can also be used bres
to receive an external input (for example, using the sim command) : tea block written in MATLAB or C.
scan! eS =
Generate a rectangular wave. Configuration parameters are period, eae
amplitude, duty cycle, and start time. TS) Open a graphical mer interface that helps
CS-Funetions.
Generate a signal for which the time derivative is a constant,
Generate a signal containing normally distributed random numbers.
Generate an arbitrary periodic signal. The signal is defined by a
table of time points and amplitudes.
(Sree) 6 rile]
Generate a periodic signal (sine wave, square wave, or sawtooth.
wave) or random noise. Configuration parameters are signal ampli-
tude and frequency.
Produce a signal defined by using a graphical user interface. Double-
click the block to open a graphical signal editor.
it
Generate a sine wave. Amplitude, phase, and frequency can be set.
Generate a step function. Configuration parameters are step time,
initial value, and final value.
Generate a signal containing uniformly distributed random num-
bers.