partialThresholdComparison Icon
Compare.partialThresholdComparison
partialThresholdComparison()Defines the structure for a threshold comparison.
Variables
u: Real input signaly: Real output (either 1.0 or 0.0)threshold: Threshold value to compare against
Description
This partial component accepts a real-valued input signal (u) and includes a real-valued parameter (threshold) that represents the reference value for comparison.
Usage
PrimitiveComponents.Compare.partialThresholdComparison(threshold)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
threshold | – |
Connectors
y- This connector represents a real signal as an output from a component (RealOutput)u- This connector represents a real signal as an input to a component (RealInput)
Source
"""
partialThresholdComparison()
Defines the structure for a threshold comparison.
# Variables
- `u`: Real input signal
- `y`: Real output (either 1.0 or 0.0)
- `threshold`: Threshold value to compare against
# Description
This partial component accepts a real-valued input signal (u) and includes a real-valued parameter (threshold)
that represents the reference value for comparison.
"""
partial component partialThresholdComparison
# Real output(either 1.0 or 0.0)
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# Real input
u = Dyad.RealInput() {
"Dyad": {
"placement": {
"diagram": {"x1": -40, "x2": 0, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": -40, "x2": 0, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# threshold to compare against
parameter threshold::Real()
relations
end
Flattened Source
"""
partialThresholdComparison()
Defines the structure for a threshold comparison.
# Variables
- `u`: Real input signal
- `y`: Real output (either 1.0 or 0.0)
- `threshold`: Threshold value to compare against
# Description
This partial component accepts a real-valued input signal (u) and includes a real-valued parameter (threshold)
that represents the reference value for comparison.
"""
partial component partialThresholdComparison
# Real output(either 1.0 or 0.0)
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"diagram": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": 1000, "x2": 1040, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# Real input
u = Dyad.RealInput() {
"Dyad": {
"placement": {
"diagram": {"x1": -40, "x2": 0, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0},
"icon": {"x1": -40, "x2": 0, "y1": 480, "y2": 520, "sh": 1, "sw": 1, "rot": 0}
}
}
}
# threshold to compare against
parameter threshold::Real()
relations
metadata {}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses