> 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/rt-lab/simulink-blocks-reference/artemis-library/40q-loss-of-excitation-relay.md).

# 40Q Loss of Excitation Relay

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-3bd0a4a9525e77653b75a5011b84a3194537b1b3%2FArtemis_40Qlossexcitation_relay_block.png?alt=media" alt="" width="128"><figcaption></figcaption></figure>

The **Var-type loss-of-excitation relay (40Q)** block, located in the **ARTEMiS/Tools/Protection Relays** library, detects loss of field excitation in synchronous generators by monitoring the reactive power absorbed from the system. It operates when the measured reactive power exceeds a threshold for longer than a defined time delay. The block processes three-phase stator voltages and currents, computes the positive-sequence components, and evaluates reactive power using a one-cycle running window at the nominal frequency (50 Hz or 60 Hz). A fixed one-cycle start time ensures correct measurement; the relay does not operate during the first cycle of the simulation.

{% hint style="danger" %}
This block requires a valid RT-LAB license on the simulator with the feature ARTEMiS enabled. Refer to[ ARTEMiS Requirements](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/power-systems-with-artemis/artemis-requirements.md) for details.
{% endhint %}

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-8fd8e13c3c49c37e2353b318757678367c974cd0%2FArtemis_40Qlossexcitation_relay_mask.png?alt=media" alt="" width="388"><figcaption></figcaption></figure>

<table><thead><tr><th width="250.800048828125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enable</strong></td><td>Enable or disable relay operation.</td></tr><tr><td><strong>Frequency</strong></td><td>Nominal frequency of the measured signals (Hz). Supports 50 Hz and 60 Hz.</td></tr><tr><td><strong>Q threshold</strong></td><td>Reactive power threshold (Var) supplied from the connected system.</td></tr><tr><td><strong>Time delay</strong></td><td>Definite time delay (s) associated with the threshold.</td></tr><tr><td><strong>Sample Time</strong></td><td>Sampling time (s) for the relay.</td></tr></tbody></table>

## Conservating ports

<table><thead><tr><th width="251.5999755859375">Port</th><th>Description</th></tr></thead><tbody><tr><td><strong>Vabc</strong></td><td>Three-phase voltages: Va, Vb, Vc.</td></tr><tr><td><strong>Iabc</strong></td><td>Three-phase currents: Ia, Ib, Ic.</td></tr><tr><td><strong>Reset</strong></td><td>Relay reset signal. The relay resets when this signal becomes 1.</td></tr><tr><td><strong>Q</strong></td><td>Relay output. Default is 0; becomes 1 when a loss-of-excitation condition is detected.</td></tr></tbody></table>

## Inputs

This bloc has no inputs.

## Outputs

<table><thead><tr><th width="252.4000244140625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>m</strong></td><td>Measured reactive power (Var).</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/rt-lab/simulink-blocks-reference/artemis-library/40q-loss-of-excitation-relay.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.
