IntegratorFEwInitial Icon
DiscretePrimitives.IntegratorFEwInitial
IntegratorFEwInitial(; name, initial_condition = 0.0)A discrete-time forward Euler integrator with reset capability.
Arguments
name: Component nameinitial_condition: Initial value of the integrator output (default: 0.0)
Variables
u(t): Input signal to integratereset(t): Reset signal (when > 0, output is reset)y(t): Integrated output signalreset_value(t): Internal state for tracking reset value
Description
Implements forward Euler integration: y[k] = y[k-1] + u[k] * dt where dt is the sample time. When reset signal is active, output is set to reset_value.
Usage
PrimitiveComponents.DiscretePrimitives.IntegratorFEwInitial()
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
initial_condition | – | 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)reset- This connector represents a real signal as an input to a component (RealInput)
Behavior
\[ \begin{align} y\left( t \right) &= ifelse\left( \mathtt{reset}\left( t \right) > 0, \mathtt{reset\_value}\left( t \right), Shift(t, -1)\left( y\left( t \right) \right) + u\left( t \right) ModelingToolkit.SampleTime \right) \\ \mathtt{reset\_value}\left( t \right) &= ifelse\left( isnan\_wrapper\left( Shift(t, -1)\left( \mathtt{reset\_value}\left( t \right) \right) \right), 0, Shift(t, -1)\left( \mathtt{reset\_value}\left( t \right) \right) \right) \\ \frac{\mathrm{d} \mathtt{dummy.l}\left( t \right)}{\mathrm{d}t} &= 0 \end{align} \]
Source
"""
IntegratorFEwInitial(; name, initial_condition = 0.0)
A discrete-time forward Euler integrator with reset capability.
# Arguments
- `name`: Component name
- `initial_condition`: Initial value of the integrator output (default: 0.0)
# Variables
- `u(t)`: Input signal to integrate
- `reset(t)`: Reset signal (when > 0, output is reset)
- `y(t)`: Integrated output signal
- `reset_value(t)`: Internal state for tracking reset value
# Description
Implements forward Euler integration: y[k] = y[k-1] + u[k] * dt
where dt is the sample time. When reset signal is active, output is set to reset_value.
"""
external component IntegratorFEwInitial@[input inclk, input outclk]
u = RealInput@[inclk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 450, "x2": 100, "y2": 550, "rot": 0}
},
"tags": []
}
}
y = RealOutput@[outclk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
},
"tags": []
}
}
reset = Dyad.RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 60, "x2": 100, "y2": 160, "rot": 0}
},
"tags": []
}
}
structural initial_condition::Real = 0.0
relations
metadata {"Dyad": {"icons": {"default": "dyad://PrimitiveComponents/IntegratorFE.svg"}}}
end
Flattened Source
"""
IntegratorFEwInitial(; name, initial_condition = 0.0)
A discrete-time forward Euler integrator with reset capability.
# Arguments
- `name`: Component name
- `initial_condition`: Initial value of the integrator output (default: 0.0)
# Variables
- `u(t)`: Input signal to integrate
- `reset(t)`: Reset signal (when > 0, output is reset)
- `y(t)`: Integrated output signal
- `reset_value(t)`: Internal state for tracking reset value
# Description
Implements forward Euler integration: y[k] = y[k-1] + u[k] * dt
where dt is the sample time. When reset signal is active, output is set to reset_value.
"""
external component IntegratorFEwInitial
u = RealInput@[inclk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 450, "x2": 100, "y2": 550, "rot": 0}
},
"tags": []
}
}
y = RealOutput@[outclk]() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
},
"tags": []
}
}
reset = Dyad.RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 60, "x2": 100, "y2": 160, "rot": 0}
},
"tags": []
}
}
structural initial_condition::Real = 0.0
relations
metadata {"Dyad": {"icons": {"default": "dyad://PrimitiveComponents/IntegratorFE.svg"}}}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests