Skip to Main Content Skip to Search
Product Documentation

Signal Basics

About Signals

A signal is a time varying quantity that has values at all points in time. You can specify a wide range of signal attributes, including:

Many blocks can accept or output signals of any data or numeric type and dimensionality. Other blocks impose restrictions on the attributes of the signals that they can handle.

In Simulink, signals are the outputs of dynamic systems represented by blocks in a Simulink diagram and by the diagram itself. The lines in a block diagram represent mathematical relationships among the signals defined by the block diagram. For example, a line connecting the output of block A to the input of block B indicates that the signal output of B depends on the signal output of A.

Simulink block diagrams represent signals with lines that have an arrowhead. The source of the signal corresponds to the block that writes to the signal during evaluation of its block methods (equations). The destinations of the signal are blocks that read the signal during the evaluation of the block methods (equations).

Creating Signals

Create a signal by adding a source block to your model. For example, you can create a signal that varies sinusoidally with time, by dragging an instance of the Sine block from the Simulink Sources library into your model. See Sources for information about blocks that create signals in a model.

You can also use the Signal & Scope Manager to create signals in your model, without using blocks. See Signal and Scope Manager for more information.

Signal Line Styles

A Simulink model can include many different types of signals. For details, see Signal Types.

Simulink uses a variety of line styles to display different types of signals in the model window. Assorted line styles help you to differentiate the signal types.

Signal TypeLine StyleDescription
Scalar and Nonscalar Simulink uses a thin, solid line to represent scalar and nonscalar signals.
Nonscalar (optional) When you enable the Wide nonscalar lines option, Simulink uses a thick, solid line to represent nonscalar signals. For information about line display options, see Displaying Signal Attributes.

Control signal

Simulink uses a thin, dash-dot line to represent control signals.
Virtual Bus Simulink uses a triple line with a solid core to represent virtual signal buses.
Nonvirtual Bus Simulink uses a triple line with a dotted core to represent nonvirtual signal buses.
Array of Buses Simulink uses a heavy triple line with a dotted core to represent array of bus signals.
Variable-Size Simulink uses a solid wide line with a white dotted core to represent a variable-size signal.

Other than using the Wide nonscalar lines option to display nonscalar signals as thick, solid lines, you cannot customize or control the line style of signals. See Wide Nonscalar Lines for more information about this option.

As you construct a block diagram, Simulink uses a thin, solid line to represent all signal types. After you update or start simulation of the block diagram, Simulink redraws the lines, using the specified line styles.

Signal Properties

Specifying Signal Properties

Use the Signal Properties dialog box to specify properties for:

To open the Signal Properties dialog box, right-click a signal and choose Signal Properties.

For details, see Signal Properties Dialog Box.

Displaying Signal Attributes in the Model

Displaying signal attributes in the model diagram can make the model easier to understand at a glance. For example, in the Simulink Model Editor, use the Format > Port/Signals Displays menus to include in the model layout information about signal attributes, such as:

For details, see Displaying Signal Attributes.

Display Signal Source and Destination

To highlight a signal and its source or destination blocks:

For details, seeDisplaying Signal Sources and Destinations.

Testing Signals

You can perform the following kinds of tests on signals:

Minimum and Maximum Values

For many Simulink blocks, you can specify a range of valid values for the output signals. Simulink provides a diagnostic for detecting when blocks generate signals that exceed their specified ranges during simulation. For details, see Signal Ranges.

Connection Validation

Many Simulink blocks have limitations on the types of signals that they accept. Before simulating a model, Simulink checks all blocks to ensure that the blocks can accommodate the types of signals ouput by the ports to which the blocks connect. If any incompatibilities exist, Simulink reports an error and terminates the simulation.

To detect signal compatibility errors before running a simulation, update the diagram. In the Simulink Model Editor, select Edit > Update Diagram.

Signal Groups

The Signal Builder block displays interchangeable groups of signal sources. Use the Signal Builder to create or edit groups of signals and to switch the groups into and out of a model.

Signal groups can greatly facilitate testing a model, especially when you use them in conjunction with Simulink Assertion blocks and the Model Coverage Tool in the Simulink Verification and Validation product.

For details, see Working with Signal Groups.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS