Step
IconStep
Generate step signal.
This component extends from Signal
Usage
Step(start_time=0.0, offset=0.0, height)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
start_time | s | 0 | |
offset | – | 0 | |
height | – |
Connectors
y
- This connector represents a real signal as an output from a component (RealOutput
)
Behavior
\[ \begin{align} y\left( t \right) &= ifelse\left( t \geq \mathtt{start\_time}, \mathtt{height} + \mathtt{offset}, \mathtt{offset} \right) \end{align} \]
Source
# Generate step signal.
component Step
extends Signal
parameter height::Real
relations
y = if time>=start_time then height+offset else offset
metadata {"JuliaSim": {"icons": {"default": "jsml://BlockComponents/Step.svg"}}}
end
Flattened Source
# Generate step signal. component Step y = RealOutput() [{ "JuliaSim": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}} }] parameter start_time::Time = 0.0 parameter offset::Real = 0.0 parameter height::Real relations y = if time>=start_time then height+offset else offset metadata {"JuliaSim": {"icons": {"default": "jsml://BlockComponents/Step.svg"}}} end
Test Cases
Related
- Examples
- Experiments
- Analyses