Ground unconnected input port




The Ground block connects to blocks whose input ports do not connect to other blocks. If you run a simulation with blocks having unconnected input ports, Simulink® issues warnings. Using a Ground block to ground those unconnected blocks can prevent these warnings.

The Ground block outputs a signal of the same data type as the port to which it connects. For example, consider the following model:

In this example, the output of the Constant block determines the data type (int8) of the port to which the Ground block is connected. That port determines the output data type of the Ground block.

The Ground block outputs a signal with zero value. When the output data type cannot represent zero exactly, the Ground block outputs a nonzero value that is the closest possible value to zero. This behavior applies only to fixed-point data types with nonzero bias. The following expressions are examples of fixed-point data types that cannot represent zero:

  • fixdt(0, 8, 1, 1) — an unsigned 8-bit type with slope of 1 and bias of 1

  • fixdt(1, 8, 6, 3) — a signed 8-bit type with slope of 6 and bias of 3

If the output is an enumerated data type, the Ground block outputs the default value of the enumeration. This behavior applies whether or not:

  • The enumeration can represent zero.

  • The default value of the enumeration is zero.

If the enumerated type does not have a default value, the Ground block outputs the first enumeration value in the type definition.

Data Type Support

The Ground block supports all data types that Simulink supports, including fixed-point and enumerated data types. For more information, see Data Types Supported by Simulink in the Simulink documentation.


The following Simulink examples show how to use the Ground block:


Data Types

Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated | Bus

Sample Time

Constant (inf)

Multidimensional Signals


Variable-Size Signals


Code Generation


Introduced before R2006a

Was this topic helpful?