> 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/smart-power-simulation-software-sps/blocks-functions-tools/simulation-and-analysis/measurements-and-states-analyzer.md).

# Measurements and States Analyzer

## Description

The **Measurements and States Analyzer app** computes the initial states and steady-state values of the inductor currents and capacitor voltages (electrical state variables), and the steady-state voltages and currents of measurement blocks, sources, and nonlinear blocks in a model.

The app uses the [power\_initstates](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/simulation-and-analysis/power_initstates.md) function to compute the initial state values, and the [power\_steadystate](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/simulation-and-analysis/power_steadystate.md) function to compute the steady-state values.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-110f9a070b592bc7ffc50d2b77996071c08b5ebe%2Fmeasurement_states_analyser_app_dialogbox.png?alt=media" alt=""><figcaption></figcaption></figure>

## Open the Measurements and States Analyzer App

* powergui Block Parameters dialog box: On the **Tools** tab, click **Measurements and States Analyzer**.
* MATLAB® command prompt where sys is the name of the model :

{% code lineNumbers="true" %}

```matlab
Enter powerStates('sys')
```

{% endcode %}

## Parameters

<table data-header-hidden><thead><tr><th width="249.7777099609375"></th><th></th></tr></thead><tbody><tr><td><strong>Model</strong> — Name of model<br>text</td><td>Enter the name of the model for which you want to compute the initial states and steady-state values.</td></tr><tr><td><strong>Update</strong> — Recompute measurements<br>button</td><td>Recompute and display the steady-state measurements.</td></tr></tbody></table>

### **Steady State**

<table data-header-hidden><thead><tr><th width="249.55560302734375"></th><th></th></tr></thead><tbody><tr><td><strong>Format</strong> — Value formatting<br>112.3 (best of) (default) | 4.503e+004 (floating point) | 2590571.12</td><td><p>Format in which you want your measurements displayed. 4.503e+004 (floating point) displays values in mantissa-exponent form with five significant figures.</p><p>112.3 (best of) displays values with four significant figures and uses mantissa-exponent form only for numbers larger than 9999. 2590571.12 displays in plain numbers with two figures to the right of the decimal point.</p></td></tr><tr><td><strong>Units</strong> — Define displayed units<br>Peak values (default) | RMS values</td><td><p>Set to Peak values to display the peak values of the selected values.</p><p>Set to RMS values to display the root-mean-square (RMS) values of the selected values.</p></td></tr><tr><td><strong>Frequency</strong> — Steady-state frequency<br>positive scalar</td><td><p>Choose the frequency, in hertz (Hz), in which you want to display the voltage and current phasors.</p><p>The <strong>Frequency</strong> parameter lists all the different frequencies of the electrical sources of the model.</p></td></tr><tr><td><strong>States</strong> — Display states<br>off (default) | on</td><td>Select to display the steady-state values of the inductor currents and capacitor voltages.</td></tr><tr><td><strong>Measurements</strong> — Display measurements<br>on (default) | off</td><td>Select to display the steady-state values of the measurement blocks in the circuit.</td></tr><tr><td><strong>Sources</strong> — Display sources<br>off (default) | on</td><td>Select to display the steady-state voltage and currents of the electrical sources of the circuit.</td></tr><tr><td><strong>Nonlinear elements</strong> — Display nonlinear elements<br>off (default) | on</td><td>Select to display the steady-state voltage and currents of the nonlinear blocks of the circuit.</td></tr></tbody></table>

### **Initial States**

<table data-header-hidden><thead><tr><th width="250.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Format</strong> — Value format<br>112.3 (best of) (default) | 4.503e+004 (floating point) | 2590571.12</td><td><p>Format in which you want your measurements displayed. 4.503e+004 (floating point) displays values in mantissa-exponent form with five significant figures.</p><p>112.3 (best of) displays values with four significant figures and uses mantissa-exponent form only for numbers larger than 9999. 2590571.12 displays in plain numbers with two figures to the right of the decimal point.</p></td></tr><tr><td><strong>Sort values by</strong> — Sort values<br>State number (default) | Type</td><td>State number displays the value according to the states ordering in the state-space model. Type displays the values grouped by capacitors and inductors.</td></tr><tr><td><strong>Initialize the model</strong> — Model initialization<br>from steady-state (default) | from zero | from user settings</td><td><p>Select from steady-state to force all initial electrical state values to steady-state values. When this option is selected, the <strong>Value</strong> column of the right pane is disabled because all states are forced to steady-state values. Select from zero to force all initial electrical state values to zero.</p><p>When this option is selected, the <strong>Value</strong> column of the right pane is disabled because all states are forced to zero.</p><p>Select from user settings to enable the <strong>Value</strong> column of the right pane and edit the initial state values to custom values.</p></td></tr><tr><td><strong>Load states from file</strong> — Load from file<br>button</td><td>Load the initial state settings of the model from a file.</td></tr><tr><td><strong>Save states to file</strong> — Save to file<br>button</td><td>Save the initial state settings of the model in a file.</td></tr><tr><td><strong>Apply to Model</strong> — Apply steady-state values to model<br>button</td><td>Apply the current parameter settings to the model.</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/smart-power-simulation-software-sps/blocks-functions-tools/simulation-and-analysis/measurements-and-states-analyzer.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.
