blockMovingAverage
Output is the continuous moving average of the input
Extends from Modelica_Requirements.Interfaces.PartialTriggeredMovingWindow (Icon and equationns for a block with a trigger signal and a moving time window).
Information
Syntax
u_filt = MovingAverage(u=..., active=...).y;
Description
Real output y is the moving average over the input u as long as Boolean input active is true. If active = true, the output is computed as:
Example
This block is demonstrated with the following example:
results in
![]() |
|
| simulation result |
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | T (from PartialTriggeredMovingWindow) | Length of sliding time window |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | u (from PartialTriggeredMovingWindow) | Real input signal | |
| Modelica.Blocks.Interfaces.RealOutput | y (from PartialTriggeredMovingWindow) | Real output signal | |
| Modelica.Blocks.Interfaces.BooleanInput | active (from PartialTriggeredMovingWindow) | Boolean input signal |
