Engee 文档

Saturation

限制顶部和底部的输入信号(饱和)。

类型: Saturate

图书馆中的路径:

/Basic/Discontinuities/Saturation

说明

Saturation 程序块产生的输出信号是受上下限限制的输入信号。上限和下限由参数 Upper limitLower limit 设置。

输入 输出

下限 ≤ 输入值 ≤ 上限

输入值

输入值 < 下限

下限

输入值 > 上限

上限

端口

输入

# IN_1 — 输入信号
标量 | 向量 | 矩阵

Details

输入信号

数据类型

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

复数支持

输出

# OUT_1 — 输出信号
标量 | 向量 | 矩阵

Details

输出。

数据类型

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

复数支持

参数

主机

# Upper limit — 输入信号饱和上限
Scalar / array of real numbers

Details

设置输入信号的上限。如果输入信号超过该上限,输出信号将被设置为该值。参数 Upper limit 通过四舍五入转换为输出数据类型。

默认值

0.5

程序使用名称

UpperLimit

可调谐

可计算

# Lower limit — 输入信号饱和下限
Scalar / array of real numbers

Details

设置输入信号的下限。如果输入信号低于该下限,输出信号将设置为该值。参数 Lower limit 通过四舍五入转换为输出数据类型。

默认值

-0.5

程序使用名称

LowerLimit

可调谐

可计算

# Zero-Crossing Detection — 过零检测
Enable | Disable | Expose discontinuities to solver

Details

过零检测

  • Enable- 启用过零检测。

  • Disable- 过零检测关闭。

  • Expose discontinuities to solver- 使用求解器进行间隙检测。

Enable | Disable | Expose discontinuities to solver

默认值

Expose discontinuities to solver

程序使用名称

ZeroCross

可调谐

可计算

信号属性

# Output data type — 输出数据类型
Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Fixed-point

Details

选择要输出的数据类型。类型可以继承或直接指定。

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

默认值

Same as input

程序使用名称

OutDataTypeStr

可调谐

可计算

# Output fixed-point type — 定点输出类型
Data type

Details

指定定点数的输出类型。

依赖关系

要使用该参数,请将参数 Output data typeFixed-point.

默认值

fixdt(1, 16, 0)

程序使用名称

OutDataTypeStrFixed

可调谐

可计算

# Integer rounding mode — 定点操作的四舍五入模式
Ceiling | Convergent | Floor | Nearest | Round | Zero

Details

指定定点运算的舍入模式。

  • Ceiling- 将正数和负数舍入到正无穷大。

  • Convergent- 将数字舍入到最接近的可表示值。在相等的情况下,四舍五入到最接近的偶数整数。

  • Floor- 将正数和负数舍入到负无穷大。

  • Nearest- 将数字舍入到最接近的可表示值。如果相等,则舍入到正无穷大。

  • Round- 将一个数字舍入到最接近的可表示值。如果相等,则将正数舍入为正无穷大,将负数舍入为负无穷大。

  • Zero- 将一个数字向零舍入。

Ceiling | Convergent | Floor | Nearest | Round | Zero

默认值

Floor

程序使用名称

RndMeth

可调谐

可计算

附加选项

C 代码生成: 是