Main Content

Dead Zone

Provide region of zero output

  • 库:
  • Simulink / Discontinuities

    HDL Coder / Discontinuities

  • Dead Zone block

Description

TheDead Zoneblock generates zero output within a specified region, called its dead zone. You specify the lower limit (LL) and upper limit (UL) of the dead zone as theStart of dead zoneandEnd of dead zoneparameters. The block output depends on the input (U) and the values for the lower and upper limits.

Input Output
U >= LLandU <= UL Zero
U > UL UUL
U < LL ULL

Ports

Input

expand all

Input signal to the dead-zone algorithm.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|fixed point

Output

expand all

Output signal after the dead-zone algorithm is applied to the input signal.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|fixed point

Parameters

expand all

Specify dead zone lower limit. Set the value forStart of dead zoneless than or equal toEnd of dead zone. When the input value is less thanStart of dead zone, then the block shifts the output value down by theStart of dead zonevalue.

Programmatic Use

Block Parameter:LowerValue
Type: character vector
Value: scalar or vector less than or equal toUpperValue.
Default:'-0.5'

Specify dead zone upper limit. Set the value forEnd of dead zonegreater than or equal toStart of dead zone. When the input value is greater thanEnd of dead zone, then the block shifts the output value down by theEnd of dead zonevalue.

Programmatic Use

Block Parameter:UpperValue
Type: character vector
Value: scalar or vector greater than or equal toLowerValue.
Default:'0.5'

Action Reasons for Taking This Action What Happens for Overflows Example

Select this check box.

Your model has possible overflow, and you want explicit saturation protection in the generated code.

Overflows saturate to either the minimum or maximum value that the data type can represent.

The maximum value that theint8(signed, 8-bit integer) data type can represent is 127. Any block operation result greater than this maximum value causes overflow of the 8-bit integer. With the check box selected, the block output saturates at 127. Similarly, the block output saturates at a minimum output value of -128.

Do not select this check box.

You want to optimize efficiency of your generated code.

You want to avoid overspecifying how a block handles out-of-range signals. For more information, seeTroubleshoot Signal Range Errors.

Overflows wrap to the appropriate value that is representable by the data type.

The maximum value that theint8(signed, 8-bit integer) data type can represent is 127. Any block operation result greater than this maximum value causes overflow of the 8-bit integer. With the check box cleared, the software interprets the overflow-causing value asint8, which can produce an unintended result. For example, a block result of 130 (binary 1000 0010) expressed asint8, is -126.

When you select this check box, saturation applies to every internal operation on the block, not just the output or result. Usually, the code generation process can detect when overflow is not possible. In this case, the code generator does not produce saturation code.

Programmatic Use

Block Parameter:DoSatur
Type: character vector
Value:'off'|'on'
Default:'off'

The linearization commands in Simulink®software treat this block as a gain in state space. Select this check box to cause the commands to treat the gain as 1. Clear the box to have the commands treat the gain as 0.

Programmatic Use

Block Parameter:LinearizeAsGain
Type: character vector
Value:'off'|'on'
Default:'on'

Select to enable zero-crossing detection. For more information, seeZero-Crossing Detection.

Programmatic Use

Block Parameter:ZeroCross
Type: character vector, string
Values:'off'|'on'
Default:'on'

Specify the sample time as a value other than -1. For more information, seeSpecify Sample Time.

Dependencies

This parameter is not visible unless it is explicitly set to a value other than-1. To learn more, seeBlocks for Which Sample Time Is Not Recommended.

Programmatic Use

Block Parameter:SampleTime
Type:character vector
Values:scalar or vector
Default:'-1'

Block Characteristics

Data Types

double|fixed point|integer|single

Direct Feedthrough

yes

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

yes

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Introduced before R2006a