AccumulatorSyntactic Icon
Examples.AccumulatorSyntactic
An accumulator written using clock syntax directly.
This component accumulates (sums) its input over time at each clock tick. The output y[n] = y[n-1] + u[n], which is the discrete-time equivalent of integration.
Usage
DiscreteComponents.Examples.AccumulatorSyntactic()
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
\[ \begin{align} y\left( t \right) &= Shift(t, -1)\left( y\left( t \right) \right) + u\left( t \right) \\ \frac{\mathrm{d} \mathtt{dummy.dummy}\left( t \right)}{\mathrm{d}t} &= 0 \end{align} \]
Source
"""
An accumulator written using clock syntax directly.
This component accumulates (sums) its input over time at each clock tick.
The output y[n] = y[n-1] + u[n], which is the discrete-time equivalent of integration.
"""
component AccumulatorSyntactic@[input clk extends Discrete]
"Input signal to accumulate"
u = RealInput@[clk]()
"Accumulated output"
y = RealOutput@[clk]()
dummy = DiscreteComponents.DummyDynamics()
relations
y@clk = y@(clk-1) + u@clk
initial y@(clk-1) = 0.0
end
Flattened Source
"""
An accumulator written using clock syntax directly.
This component accumulates (sums) its input over time at each clock tick.
The output y[n] = y[n-1] + u[n], which is the discrete-time equivalent of integration.
"""
component AccumulatorSyntactic
"Input signal to accumulate"
u = RealInput@[clk]()
"Accumulated output"
y = RealOutput@[clk]()
dummy = DiscreteComponents.DummyDynamics()
relations
y@clk = y@(clk-1) + u@clk
initial y@(clk-1) = 0.0
metadata {}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses