> 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-variable-frequency.md).

# Mean, variable frequency

## Description

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

The **Mean variable frequency** block, located in the **Control Measurements** library, computes the mean value of the input signal over a running window of one cycle of the frequency signal connected to input f. The output holds the DC component 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-2358c0a6074a1cceed24e9d3195e2af84bb2f9ed%2Fimage%20(931).png?alt=media" alt=""><figcaption><p>Internal circuit of the block</p></figcaption></figure>

An example demonstrates the Mean and Mean, variable frequency blocks. The lower model uses a 1-phase input with 200 V amplitude and 30 V DC bias at variable frequency applied to the Mean, variable frequency 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

<table><thead><tr><th width="260.0986328125">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>Initial frequency</strong></td><td>Initial frequency for the first simulation cycle (Hz) Finit = [0, 1e12].<br>Cannot be modified during the simulation.</td></tr><tr><td><strong>Minimum frequency</strong></td><td>Minimum expected frequency of the input signal (Hz) Fmin = [0, 1e12] .<br>Cannot be modified during the simulation.</td></tr><tr><td><strong>Initial input (DC component)</strong></td><td>Initial value of the DC component magnitude of the output signal for the first simulation cycle InitialOutputValue = [0, 1e12].<br>Cannot be modified during the simulation.</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="259.60003662109375">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>u</strong></td><td>Input signal.</td></tr><tr><td><strong>f</strong></td><td>Frequency signal (Hz) used to calculate the average value of the input signal u.</td></tr></tbody></table>

{% hint style="info" %}
The frequency input has to be an integer multiple of the input signal.
{% endhint %}

## Outputs

<table><thead><tr><th width="260.4000244140625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>y</strong></td><td>Signal averaged as a function of the frequency signal f.</td></tr></tbody></table>


---

# 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-variable-frequency.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.
