blockTriggeredMovingMean
Triggered discrete moving mean of an input signal
Information
Block that outputs the triggered moving mean value of an input signal.
At the start of the simulation, and whenever the trigger signal is rising
(i.e., the trigger changes to true), the block samples
the input, computes the moving mean value over the past n samples,
and produces this value at its output y.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | n | Number of samples over which the input is averaged |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | u | Input signal to be sampled | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | trigger | Input for trigger that causes u to be sampled | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | y | Moving mean of input signal over all trigger instants |
Revisions
-
March 30, 2022, by Michael Wetter:
Addeddiscretekeyword to sampled variable.
This is for Buildings, issue 2942. -
October 19, 2020, by Michael Wetter:
Removed non-needed protected parametert0. -
March 2, 2020, by Michael Wetter:
Changed icon to display dynamically the output value. -
November 7, 2019, by Michael Wetter:
Reformulated model to use anequationrather than analgorithmsection. -
October 16, 2019, by Kun Zhang:
First implementation. This is for Buildings, issue 1588.