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
1-element Vector{Symbolics.Equation}:
y(t) ~ Shift(t, -1)(y(t)) + u(t)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]()
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]()
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