> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-measurements/mean.md).

# Mean

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-e3a88e9c8294c37de5ccbc01ca5305aef76febca%2Fimage%20(925).png?alt=media" alt="" width="210"><figcaption></figcaption></figure>

The **Mean** block, located in the **Control Measurements** library, computes the mean value of the input signal over a running window of one cycle of the specified fundamental frequency.

The output holds the DC component value constant for one cycle of the specified fundamental frequency.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-01b900c19ab0907e13e0b2b07901a4ac28f4d218%2Fimage%20(927).png?alt=media" alt=""><figcaption><p>Internal circuit of the block</p></figcaption></figure>

The following example demonstrates the use of the mean and mean variable frequency block. The upper part of the model applies a single-phase signal with 40 V amplitude, 600 V DC bias, and 720 Hz constant frequency to the Mean block. The block calculates and captures the results correctly.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ab725c8a57726b2ff9535a5eb20318545ceae0c3%2Fimage%20(928).png?alt=media" alt=""><figcaption><p>Example with mean block and mean variable frequency block</p></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-739147dc8c4b8babeec02bdb0649002eda9109d8%2Fimage%20(929).png?alt=media" alt=""><figcaption><p>Simulation results in ScopeView</p></figcaption></figure>

## Mask parameters

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-38381a41b113c97417c919134397f2c2817b6344%2Fimage%20(926).png?alt=media" alt="" width="450"><figcaption></figcaption></figure>

<table><thead><tr><th width="260.85797119140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Use this field to add information about the component.</td></tr><tr><td><strong>Fundamental frequency</strong></td><td><p>Fundamental frequency used to compute the mean value over a one-cycle running window (Hz); Variable [0, 1e12]</p><p>Cannot be modified during the simulation.</p></td></tr><tr><td><strong>Initial input (DC component)</strong></td><td>Initial value of the DC component magnitude applied to the output during the first simulation cycle (pu) InitialOutputValue = [0, 1e12]<br>Cannot be modified during the simulation.</td></tr></tbody></table>

## Inputs

| Input | Description  |
| ----- | ------------ |
| **u** | Input signal |

## Outputs

| Output | Description                                                |
| ------ | ---------------------------------------------------------- |
| **y**  | Averaged signal as a function of the fundamental frequency |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-measurements/mean.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
