PeriodicSampler Icon
PeriodicSampler
Sample a continuous signal y at a periodic interval dt, creating a clocked signal y.
Usage
DiscreteComponents.PeriodicSampler()
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
dt | – | ||
offset | – | 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
"Sample a continuous signal `y` at a periodic interval `dt`, creating a clocked signal `y`."
component PeriodicSampler
u = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
},
"tags": []
}
}
clock = PeriodicClock(dt = dt, offset = offset) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 700, "y1": 290, "x2": 800, "y2": 390, "rot": 0}
},
"tags": []
}
}
sampler = Sampler() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
},
"tags": []
}
}
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
},
"tags": []
}
}
structural dt::Real
structural offset::Real = 0.0
relations
connect(u, sampler.u) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(sampler.y, y, clock.y) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [{"x": 650, "y": 340}], "E": -1}
],
"junctions": [{"x": 650, "y": 500}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"icons": {"default": "dyad://DiscreteComponents/PeriodicSampler.svg"},
"doc": {"behavior": false}
}
}
end
Flattened Source
"Sample a continuous signal `y` at a periodic interval `dt`, creating a clocked signal `y`."
component PeriodicSampler
u = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
},
"tags": []
}
}
clock = PeriodicClock(dt = dt, offset = offset) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 700, "y1": 290, "x2": 800, "y2": 390, "rot": 0}
},
"tags": []
}
}
sampler = Sampler() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
},
"tags": []
}
}
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 960, "y1": 450, "x2": 1060, "y2": 550, "rot": 0}
},
"tags": []
}
}
structural dt::Real
structural offset::Real = 0.0
relations
connect(u, sampler.u) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(sampler.y, y, clock.y) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [{"x": 650, "y": 340}], "E": -1}
],
"junctions": [{"x": 650, "y": 500}],
"renderStyle": "standard"
}
}
metadata {
"Dyad": {
"icons": {"default": "dyad://DiscreteComponents/PeriodicSampler.svg"},
"doc": {"behavior": false}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests