Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Signal Specification - Specify desired dimensions, sample time, data type, numeric type, and other attributes of signal

Library

Signal Attributes

Description

The Signal Specification block allows you to specify the attributes of the signal connected to its input and output ports. If the specified attributes conflict with the attributes specified by the blocks connected to its ports, Simulink software displays an error when it compiles the model. For example, at the beginning of a simulation. If no conflict exists, Simulink eliminates the Signal Specification block from the compiled model. In other words, the Signal Specification block is a virtual block. It exists only to specify the attributes of a signal and plays no role in the simulation of the model.

You can use the Signal Specification block to ensure that the actual attributes of a signal meet desired attributes. For example, suppose that you and a colleague are working on different parts of the same model. You use Signal Specification blocks to connect your part of the model with your colleague's. If your colleague changes the attributes of a signal without informing you, the attributes entering the corresponding Signal Specification block do not match. When you try to simulate the model, you get an error.

You can also use the Signal Specification block to ensure correct propagation of signal attributes throughout a model. The capability of allowing the Simulink to propagate attributes from block to block is powerful. However, if some blocks have unspecified attributes for the signals they accept or output, the model does not have enough information to propagate attributes correctly. For these cases, the Signal Specification block is a good way of providing the information Simulink needs. Using the Signal Specification block also helps speed up model compilation when blocks are missing signal attributes.

Data Type Support

The Signal Specification block accepts real or complex signals of any data type thatSimulink supports, including fixed-point and enumerated data types. The input data type must match the data type specified by the Data type parameter. For more information, see Data Types Supported by Simulink in the Simulink documentation.

Parameters and Dialog Box

Dimensions (-1 for inherited)

Specify the dimensions of the input and output signals.

Settings

Default: -1

-1

Specifies that signals inherit dimensions.

n

Specifies vector signal of width n.

[m n]

Specifies matrix signal having m rows and n columns.

Command-Line Information

Parameter: Dimensions
Type: string
Value: '-1' | n | [m n |
Default: '-1'

Variable-size signal

Specify a variable-size signal, fixed-size signal, or both.

Settings

Default: Inherit

Inherit

Allows variable-size and fixed-size signals.

No

Does not allow variable-size signals.

Yes

Allows only variable-size signals.

Dependencies

When the signal is a variable-size signal, the Dimensions parameter specifies the maximum dimensions of the signal.

If you specify a bus object, the simulation allows variable-size signals only with a disabled bus object.

Command-Line Information

Parameter: VarSizeSig
Type: string
Value: 'Inherit'| 'No' | 'Yes'
Default: 'Inherit'

See Also

Working with Variable-Size Signals

Sample time (-1 for inherited)

Specify the time interval when the simulation updates the block.

Settings

Default: -1

Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See How to Specify the Sample Time in the online documentation for more information.

Command-Line Information

Parameter: SampleTime
Type: string
Value: Any valid sample time
Default: '-1'

See Also

How to Specify the Sample Time

Lock output data type setting against changes by the fixed-point tools

Select to lock the output data type setting of this block against changes by the Fixed-Point Tool and the Fixed-Point Advisor.

Settings

Default: Off

On

Locks the output data type setting for this block.

Off

Allows the Fixed-Point Tool and the Fixed-Point Advisor to change the output data type setting for this block.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

For more information, see Fixed-Point Tool and Fixed-Point Advisor in the Simulink Fixed Point documentation.

Signal type

Specify the numeric type of the input and output signals.

Settings

Default: auto

auto

Accepts either real or complex as the numeric type.

real

Specifies the numeric type as a real number.

complex

Specifies the numeric type as a complex number.

Command-Line Information

Parameter: SignalType
Type: string
Value: 'auto' | 'real' | 'complex'
Default: 'auto'

Sampling mode

Select the sampling mode for this block.

Settings

Default: auto

auto

Accepts any sampling mode.

Sample based

Specifies the output signal to be sample-based.

Frame based

Specifies the output signal to be frame-based.

Tips

To generate frame-based signals, you must have the Signal Processing Blockset product installed.

Command-Line Information

Parameter: SamplingMode
Type: string
Value: 'auto' | 'Sample based' | 'Frame based'
Default: 'auto'

Minimum

Specify the minimum value for the block output.

Settings

Default: []

The default value, [], is equivalent to -Inf. Simulink uses this value to perform:

Tips

This number must be a double scalar value.

Command-Line Information

Parameter: OutMin
Type: string
Value: Any valid scalar value
Default: '[]'

Maximum

Specify the maximum value for the block output.

Settings

Default: []

The default value, [], is equivalent to Inf. Simulink uses this value to perform:

Tips

This number must be a double scalar value.

Command-Line Information

Parameter: OutMax
Type: string
Value: Any valid double scalar value
Default: '[]'

Data type

Specify the output data type.

Settings

Default: auto

Inherit: auto

Inherits data type

double

Sets data type double.

single

Sets data type single.

int8

Sets data type is int8.

uint8

Sets data type uint8.

int16

Sets data type int16.

uint16

Sets data type uint16.

int32

Sets data type int32.

uint32

Sets data type uint32.

boolean

Sets data type boolean.

fixdt(1,16,0)

Sets data type is fixed point fixdt(1,16,0).

fixdt(1,16,2^0,0)

Sets data type is fixed point fixdt(1,16,2^0,0).

Enum: <class name>

Specifies the data type as enumerated.

<data type expression>

Specifies the name of a data type object, for example,Simulink.NumericType

Dependencies

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Data type parameters.

Command-Line Information

Parameter: OutDataTypeStr
Type: string
Value: 'Inherit: auto' | 'double' | 'single' | 'int8' | 'uint8' | 'int16' | 'uint16' | 'int32' | 'uint32' | 'boolean' | 'fixdt(1,16,0)' | 'fixdt(1,16,2^0,0)' | 'Enum:<class name>' | <data type expression> |
Default: 'Inherit: auto'

See Also

Specifying Block Output Data Types.

Mode

Select the category of data to specify.

Settings

Default: Inherit

Inherit

Specifies inheritance rules for data types. Selecting Inherit enables a list of possible values, which can vary by block:

  • Inherit from 'Constant value' (Constant block default)

  • Inherit via internal rule (Discrete-Time Integrator, Gain, Product, Sum, Switch block default)

  • Inherit via back propogation (Data Type Conversion block default)

  • auto (Inport, Outport block default)

  • Logical (see Configuration Parameters: Optimization)

  • Same as first input

  • Same as input (Saturation block default)

  • Same as accumulator

Built in

Specifies built-in data types. Selecting Built in enables a list of possible values, which can vary by block:

  • double (Constant, Data Type Conversion, Discrete-Time Integrator, Gain, Inport, Outport, Product, Saturation, Sum, Switch block default)

  • single

  • int8

  • uint8

  • int16

  • uint16

  • int32

  • uint32

  • boolean (Logical Operator, Relational Operator block default)

Fixed point

Specifies fixed-point data types.

Enumerated

Specifies enumerated data types. This option is available on some blocks. Selecting Enumerated enables a list of possible values, which can vary by block:

  • <class name>

Expression

Specifies expressions that evaluate to data types. Selecting Expression enables a second menu/text box to the right. Following are the possible values, which can vary by block:

  • <data type expression>

Dependencies

Clicking the Show data type assistant button enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Using the Data Type Assistant in the Simulink User's Guide.

Signedness

Specify whether you want the fixed-point data signed or unsigned.

Settings

Default: Signed

Signed

Specifies fixed-point data as signed.

Unsigned

Specifies the fixed-point data as unsigned.

Dependencies

Selecting Mode > Fixed point enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Word length

Specify the bit size of the word that holds the quantized integer.

Settings

Default: 16

Minimum: 0

Maximum: 32

Large word sizes represent large values with greater precision than small word sizes.

Dependencies

Selecting Mode > Fixed point enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Scaling

Specify the method for scaling your fixed-point data to avoid overflow conditions and minimize quantization errors.

Settings

Default: Binary point

Binary point

Specifies binary point location.

Slope and bias

Enters slope and bias.

Dependencies

Selecting Fixed point from the Mode list enables this parameter.

Selecting Binary point from the Scaling list enables:

Selecting Slope and bias from the Scaling list enables:

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Fraction length

Specify fraction length for fixed-point data type.

Settings

Default: 0

Binary points can be positive or negative integers.

Dependencies

Selecting Scaling > Binary point enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Slope

Specify slope for the fixed-point data type.

Settings

Default: 2^0

Specify any positive real number.

Dependencies

Selecting Scaling > Slope and bias enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Bias

Specify bias for the fixed-point data type.

Dependencies

Selecting Scaling > Slope and bias enables this parameter.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

Specifying a Fixed-Point Data Type in the Simulink User's Guide.

Characteristics

Direct Feedthrough

Yes

Sample Time

Specified by the Sample time parameter

Scalar Expansion

No

Dimensionalized

Yes

Multidimensionalized

Yes

Virtual

Yes

For more information, see Virtual Blocks in the Simulink documentation.

Zero-Crossing Detection

No

  


Related Products & Applications

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

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