Block to output moving average
This block outputs the mean value of its input signal as
1 t
y = - ∫ u(s) ds
δ t-δ
where δ is a parameter that determines the time window
over which the input is averaged. For t < δ seconds, it
outputs
1 t
y = -------- ∫ u(s) ds
t-t0+10-10 t0
where t0 is the initial time.
This block can for example be used to output the moving average
of a noisy measurement signal.
See IDEAS.Controls.OBC.CDL.Reals.Validation.MovingAverage
and
IDEAS.Controls.OBC.CDL.Reals.Validation.MovingAverage_nonZeroStart
for example.
- January 27, 2022, by Jianjun Hu:
Renamed the block name from MovingMean to MovingAverage.
This is for Buildings,
issue 2865.
- November 12, 2020, by Michael Wetter:
Reformulated to remove dependency to
Modelica.Units.SI.
This is for Buildings,
issue 2243.
- March 2, 2020, by Michael Wetter:
Changed icon to display dynamically the output value.
- October 24, 2017, by Michael Wetter:
Set initial condition for mu.
- October 17, 2017, by Michael Wetter:
Reformulated implementation to avoid direct feedthrough.
- October 16, 2017, by Michael Wetter:
Reformulated implementation to handle division by zero as the
previous implementation caused division by zero in the VAV reheat
model with the Radau solver.
- September 27, 2017, by Thierry S. Nouidui:
Reformulated implementation to handle division by zero. This is for
Buildings,
issue 978.
- September 15, 2017, by Thierry S. Nouidui:
Reformulated implementation to avoid state events.
- July 5, 2017, by Michael Wetter:
Revised implementation to allow non-zero start time.
- June 29, 2017, by Jianjun Hu:
First implementation. This is for Buildings,
issue 825.
Generated at 2026-04-02T18:18:35Z by OpenModelicaOpenModelica 1.26.3 using
GenerateDoc.mos