Constant ​
Provides a constant output signal of value k.
Generates a constant signal that doesn't change over time. The output y is always equal to the parameter k, regardless of simulation time or system state. This is often used as a reference signal, bias term, or fixed input to other components in a control system or simulation.
This component extends from SO
Usage ​
BlockComponents.Constant(k)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
k | The constant value to output | – |
Connectors ​
y- This connector represents a real signal as an output from a component (RealOutput)
Behavior ​
Source ​
dyad
"""
Provides a constant output signal of value k.
Generates a constant signal that doesn't change over time. The output y is always equal
to the parameter k, regardless of simulation time or system state. This is often used
as a reference signal, bias term, or fixed input to other components in a control system or simulation.
"""
component Constant
extends SO
"The constant value to output"
parameter k::Real
relations
y = k
metadata {
"Dyad": {
"labels": [
{"label": "k = $(k)", "x": 500, "y": 1100, "rot": 0},
{"label": "$(instance)", "x": 500, "y": -150, "rot": 0}
],
"icons": {"default": "dyad://BlockComponents/Constant.svg"}
}
}
endFlattened Source
dyad
"""
Provides a constant output signal of value k.
Generates a constant signal that doesn't change over time. The output y is always equal
to the parameter k, regardless of simulation time or system state. This is often used
as a reference signal, bias term, or fixed input to other components in a control system or simulation.
"""
component Constant
"Real-valued output connector for the component"
y = RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0},
"diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
}
}
}
"The constant value to output"
parameter k::Real
relations
y = k
metadata {
"Dyad": {
"labels": [
{"label": "k = $(k)", "x": 500, "y": 1100, "rot": 0},
{"label": "$(instance)", "x": 500, "y": -150, "rot": 0}
],
"icons": {"default": "dyad://BlockComponents/Constant.svg"}
}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses
Tests