Using Simulink    

About Signals

Signals are the streams of values that appear at the outputs of Simulink blocks when a model is simulated. It is useful to think of signals as traveling along the lines that connect the blocks in a model diagram. But note that the lines in a Simulink model represent logical, not physical, connections among blocks. Thus, the analogy between Simulink signals and electrical signals is not complete. Electrical signals, for example, take time to cross a wire. The output of a Simulink block, by contrast, appears instantaneously at the input of the block to which it is connected.

Signal Dimensions

Simulink blocks can output one- or two-dimensional signals. A one-dimensional (1-D) signal consists of a stream of one-dimensional arrays output at a frequency of one array (vector) per simulation time step. A two-dimensional (2-D) signal consists of a stream of two-dimensional arrays emitted at a frequency of one 2-D array (matrix) per block sample time. The Simulink user interface and documentation generally refer to 1-D signals as vectors and 2-D signals as matrices. A one-element array is frequently referred to as a scalar. A row vector is a 2-D array that has one row. A column vector is a 2-D array that has one column.

Simulink blocks vary in the dimensionality of the signals they can accept or output during simulation. Some blocks can accept or output signals of any dimensions. Some can accept or output only scalar or vector signals. To determine the signal dimensionality of a particular block, see the block's description in Simulink Blocks in the online Simulink help. See Determining Output Signal Dimensions for information on what determines the dimensions of output signals for blocks that can output nonscalar signals.

Signal Data Types

Data type refers to the format used to represent signal values internally. The data type of Simulink signals is double by default. However, you can create signals of other data types. Simulink supports the same range of data types as MATLAB. See Working with Data Types for more information.

Complex Signals

The values of Simulink signals can be complex numbers. A signal whose values are complex numbers is called a complex signal. See Working with Complex Signals for information on creating and manipulating complex signals.

Virtual Signals

A virtual signal is a signal that represents another signal graphically. Virtual blocks, such as a Bus Creator or Subsystem block (see Virtual Blocks), generate virtual signals. Like virtual blocks, virtual signals allow you to simplify your model graphically. For example, using a Bus Creator block, you can reduce a large number of nonvirtual signals (i.e., signals originating from nonvirtual blocks) to a single virtual signal, thereby making your model easier to understand. You can think of a virtual signal as a tie wrap that bundles together a number of signals.

Virtual signals are purely graphical entities. They have no mathematical or physical significance. Simulink ignores them when simulating a model.

Whenever you run or update a model, Simulink determines the nonvirtual signal(s) represented by the model's virtual signal(s), using a procedure known as signal propagation. When running the model, Simulink uses the corresponding nonvirtual signal(s), determined via signal propagation, to drive the blocks to which the virtual signals are connected. Consider, for example, the following model.

The signals driving Gain blocks G1 and G2 are virtual signals corresponding to signals s2 and s1, respectively. Simulink determines this automatically whenever you update or simulate the model.

The Show Propagated Signals option (see Signal Properties Dialog Box) displays the nonvirtual signals represented by virtual signals in the labels of the virtual signals.

Control Signals

A control signal is a signal used by one block to initiate execution of another block, e.g., a function-call or action subsystem. When you update or start simulation of a block diagram, Simulink uses a dash-dot pattern to redraw lines representing the diagram's control signals as illustrated in the following example.

Signal Buses

You can use Bus Creator and Bus Selector blocks to create signal buses.

A signal bus is a virtual signal that represents a set of signals. It is analogous to a bundle of wires held together by tie wraps. Simulink uses a special line style to display signal buses. If you select Signal Dimensions from the Format menu, Simulink displays the number of signal components carried by the bus.


  Signal Basics Signal Glossary