Engee documentation

Saturation

Page in progress.

Limiting the input signal at the top and bottom (saturation).

saturation

Description

Block Saturation gives an output signal which is an input signal limited by the upper and lower limits. The upper and lower limits are set by the parameters Upper limit и Lower limit.

Login Exit

Lower limit ≤ Input value ≤ Upper limit

Input value

Input value < Lower limit

Lower limit

Input value > Upper limit

Upper limit

Ports

Input

# IN_1 — input signal
scalar | vector | matrix

Details

Input signal.

Data types

Float64, Float32, Int8, UInt8, UInt16, Int16, Int32, UInt32, Int64, UInt64, Int128, UInt128, Fixed-point.

Complex numbers support

No

Output

# OUT_1 — output signal
scalar | vector | matrix

Details

Output.

Data types

Float64, Float32, Int8, UInt8, UInt16, Int16, Int32, UInt32, Int64, UInt64, Int128, UInt128, Fixed-point.

Complex numbers support

No

Parameters

Main

# Upper limit — input signal saturation upper limit
Scalar / array of real numbers

Details

Sets the upper limit of the input signal. If the input signal exceeds this limit, the output signal is set to this value. Parameters Upper limit is converted to the output data type by usage of rounding to the nearest.

Default value

0.5

Program usage name

UpperLimit

Tunable

Yes

Evaluatable

Yes

# Lower limit — input signal saturation lower limit
Scalar / array of real numbers

Details

Sets the lower limit of the input signal. If the input signal is below this limit, the output signal is set to this value. Parameters Lower limit is converted to the output data type by usage of rounding to the nearest.

Default value

-0.5

Program usage name

LowerLimit

Tunable

Yes

Evaluatable

Yes

# Zero-Crossing Detection — zero crossing detection
Enable | Disable | Expose discontinuities to solver

Details

Zero crossing detections:

  • Enable - zero crossing detection is enabled.

  • Disable - zero crossing detection is off.

  • Expose discontinuities to solver - gap detection with solver.

Values

Enable | Disable | Expose discontinuities to solver

Default value

Expose discontinuities to solver

Program usage name

ZeroCross

Tunable

No

Evaluatable

No

Signal Attributes

# Output data type — output data type
Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Fixed-point

Details

Select the type of data to output. The type can be inherited or specified directly.

Values

Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Fixed-point

Default value

Same as input

Program usage name

OutDataTypeStr

Tunable

No

Evaluatable

No

# Output fixed-point type — output type of fixed-point numbers
Data type

Details

Specify the output type of fixed-point numbers.

Dependencies

To use this parameter, set the parameters to Output data type value Fixed-point.

Default value

fixdt(1, 16, 0)

Program usage name

OutDataTypeStrFixed

Tunable

No

Evaluatable

Yes

# Integer rounding mode — rounding mode for fixed-point operations
Ceiling | Convergent | Floor | Nearest | Round | Zero

Details

Specify the rounding mode for fixed-point operations.

  • Ceiling - rounds both positive and negative numbers to positive infinity.

  • Convergent - rounds a number to the nearest representable value. In case of equality, rounds to the nearest even integer.

  • Floor - rounds positive and negative numbers to negative infinity.

  • Nearest - rounds a number to the nearest representable value. If equal, rounds to positive infinity.

  • Round - rounds a number to the nearest representable value. When equal, rounds positive numbers to positive infinity and rounds negative numbers to negative infinity.

  • Zero - rounds a number towards zero.

Values

Ceiling | Convergent | Floor | Nearest | Round | Zero

Default value

Floor

Program usage name

RndMeth

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes