LIBRARY
ZeroOrderHold ​
Zero-order hold block.
Maps the clocked input signal u to the continuous-time output signal y. Between the ticks of the clock of u, y is held constant at the value u took at the most recent tick.
Before the clock of u has ticked, y equals initial_condition.
Usage ​
DiscreteComponents.ZeroOrderHold(initial_condition=0)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
initial_condition | The value of y before the clock of u has ticked | – | 0 |
Connectors ​
u- This connector represents a real signal as an input to a component (RealInput)y- This connector represents a real signal as an output from a component (RealOutput)
Behavior ​
Behavior of this component cannot be rendered because it includes path variables.
Source ​
dyad
"""
Zero-order hold block.
Maps the clocked input signal `u` to the continuous-time output signal `y`. Between the
ticks of the clock of `u`, `y` is held constant at the value `u` took at the most recent
tick.
Before the clock of `u` has ticked, `y` equals `initial_condition`.
"""
component ZeroOrderHold@[input clk]
"The clocked input signal"
u = RealInput@[clk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 550, "rot": 0}
},
"tags": []
}
}
"The held, continuous-time output signal"
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
},
"tags": []
}
}
"The value of `y` before the clock of `u` has ticked"
parameter initial_condition::Real = 0
relations
y = hold(u)
initial hold(u) = initial_condition
metadata {
"Dyad": {
"icons": {"default": "dyad://DiscreteComponents/ZeroOrderHold.svg"},
"doc": {"behavior": false}
}
}
endFlattened Source
dyad
"""
Zero-order hold block.
Maps the clocked input signal `u` to the continuous-time output signal `y`. Between the
ticks of the clock of `u`, `y` is held constant at the value `u` took at the most recent
tick.
Before the clock of `u` has ticked, `y` equals `initial_condition`.
"""
component ZeroOrderHold
"The clocked input signal"
u = RealInput@[clk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 550, "rot": 0}
},
"tags": []
}
}
"The held, continuous-time output signal"
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
},
"tags": []
}
}
"The value of `y` before the clock of `u` has ticked"
parameter initial_condition::Real = 0
relations
y = hold(u)
initial hold(u) = initial_condition
metadata {
"Dyad": {
"icons": {"default": "dyad://DiscreteComponents/ZeroOrderHold.svg"},
"doc": {"behavior": false}
}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses
Tests