> 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/basics/passives/three-phase-harmonic-filter.md).

# Three-Phase Harmonic Filter

## Description

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

The **Three-Phase Harmonic Filter** block, located in the **OPAL-RT SPS Software/Passives** library, models three-phase harmonic filters — shunt elements used in power systems to reduce voltage distortion and for power factor correction. Nonlinear elements (e.g., power electronic converters) generate harmonic currents/voltages injected into the power system. Distorted currents flowing through system impedance produce harmonic voltage distortion. Harmonic filters reduce distortion by diverting harmonic currents into low-impedance paths. Because filters are capacitive at the fundamental frequency, they also supply reactive power required by converters and for power factor correction.

To achieve an acceptable distortion, several banks of filters of different types are connected in parallel. The most commonly used filter types are:

* Band-pass filters, which are used to filter the lowest order harmonics, such as 5th, 7th, 11th, and 13th order harmonics. Band-pass filters can be tuned at a single frequency (single-tuned filter) or at two frequencies (double-tuned filter).
* High-pass filters, which are used to filter high-order harmonics and cover a wide range of frequencies. A special type of high-pass filter, the C-type high-pass filter, is used to provide reactive power and avoid parallel resonances. It also allows filtering of the low-order harmonics (such as 3rd), while keeping zero losses at the fundamental frequency.

The Three-Phase Harmonic Filter block is built of RLC elements. The resistance, inductance, and capacitance values are determined from the filter type and the:

* Reactive power at nominal voltage
* Tuning frequencies
* Quality factor. The quality factor is a measure of the sharpness of the tuning frequency. It is determined by the resistance value.

The four types of filters that can be modeled with the Three-Phase Harmonic Filter block are shown below:

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

The simplest filter type is the single-tuned filter. The following figure gives the definition of the quality factor *Q* and formulae for computing the reactive power *Q*C and losses (active power *P*). The quality factor *Q* of the filter is the quality factor of the reactance at the tuning frequency $$Q=(nX\_L)/R$$. The quality factor determines the bandwidth *B*, which is a measure of the sharpness of the tuning frequency.

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

| Tuned harmonic order         | $$n=f\_n/f\_1=\sqrt{X\_c/X\_L}$$       |
| ---------------------------- | -------------------------------------- |
| Quality factor               | $$Q=nX\_L/R=X\_C/(nR)$$                |
| Bandwidth                    | $$B=f\_n/Q$$                           |
| Reactive power at *f*1       | $$Q\_C=(V^2/X\_C) \cdot n^2/(n^2-1)$$  |
| Active power at *f*1(losses) | $$P \approx (Q\_C/Q) \cdot n/(n^2-1)$$ |

where:

* $$f\_1$$= fundamental frequency
* $$\omega=2\pi f\_1$$ angular frequency
* $$f\_n$$= tuning frequency
* *n* = harmonic order = $$(f\_n/f\_1)$$
* *V* = nominal line-line voltage
* $$X\_L$$= inductor reactance at fundamental frequency =
* $$X\_C$$= capacitor reactance at fundamental frequency = $$1/(C\omega)$$ The double-tuned filter performs the same function as two single-tuned filters, although it has certain advantages: its losses are much lower and the impedance magnitude at the frequency of the parallel resonance that arises between the two tuning frequencies is lower.

The double-tuned filter consists of a series LC circuit and a parallel RLC circuit. If $$f\_1$$ and $$f\_2$$ are the two tuning frequencies, both the series circuit and the parallel circuit are tuned to approximately the mean geometric frequency, $$f\_m=\sqrt{f\_1f\_2}$$

The quality factor Q of the double-tuned filter is defined as the quality factor of the parallel L and R elements at the mean frequency $$f\_m : Q=R/(L \cdot 2\pi f\_m)$$.

The high-pass filter is a single-tuned filter where the L and R elements are connected in parallel instead of series. This connection results in a wide-band filter that has an impedance at high frequencies limited by the resistance R.

The quality factor of the high-pass filter is the quality factor of the parallel RL circuit at the tuning frequency: $$Q=R/(L \cdot 2\pi f\_m)$$.

The C-type high-pass filter is a variation of the high-pass filter, where the inductance L is replaced with a series LC circuit tuned at the fundamental frequency. At fundamental frequency, the resistance is bypassed by the resonant LC circuit and losses are null.

The quality factor of the C-type filter is still given by the ratio: $$Q=R/(L \cdot 2\pi f\_m)$$.

The following figures give values of R, L, and C, and the typical impedance-versus-frequency curves obtained for the four types of filters applied on a 60 Hz network. Each filter is rated 315 kV and 49 MVAr.

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

This figure illustrates a single-tuned filter at 315 kV and 49 MVAr with a 5th order harmonic filter when *Q* is `30`.

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

This figure illustrates a double-tuned filter at 315 kV and 49 MVAr with 11th and 13th order harmonic filters when *Q* is `16`.

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

This figure illustrates a high-pass filter at 315 kV and 49 MVAr with a 24th order harmonic filter when *Q* is `10`.

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

This figure illustrates a C-Type high-pass filter at 315 kV and 49 MVAr with a 3rd order harmonic filter when *Q* is `1.75`.

## Ports

### Conserving

| Port                                                     | Description                                                                     |
| -------------------------------------------------------- | ------------------------------------------------------------------------------- |
| **A** — Phase A electric terminal (SPS electrical)       | SPS electrical conserving port associated with the phase A electrical terminal. |
| **B** — Phase B electric terminal (SPS electrical)       | SPS electrical conserving port associated with the phase B electrical terminal. |
| **C** — Phase C electric terminal (SPS electrical)       | SPS electrical conserving port associated with the phase C electrical terminal. |
| **Port\_4** — Neutral electric terminal (SPS electrical) | SPS electrical conserving port associated with the neutral electrical terminal. |

***

## Parameters

<table><thead><tr><th width="314.60003662109375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Type of filter</strong> — Filter type<br>Double-tuned (default) | Single-tuned | High-pass | C-type High-pass</td><td>Select one of the four filter types.</td></tr><tr><td><strong>Filter connection</strong> — Connection of three filter branches<br>Double-tuned (default) | Single-tuned | High-pass | C-type High-pass</td><td>Select the connection of the three filter branches.<br>Y (grounded) — Neutral is grounded.<br>Y (floating) — Neutral is not accessible.<br>Y (neutral) — Neutral accessible through a fourth connector.<br>Delta — Three phases connected in delta.</td></tr><tr><td><strong>Nominal L-L voltage and frequency [Vn(Vrms) fn(Hz)]:</strong><br>[315e3 60] (default)</td><td>Nominal phase-to-phase voltage in volts RMS and nominal frequency in Hz.</td></tr><tr><td><strong>Nominal reactive power (var):</strong> <code>49e6</code> (default)</td><td>Three-phase capacitive reactive power QC, in vars.</td></tr><tr><td><strong>Tuning frequencies [Fr1 (Hz) Fr2 (Hz)]</strong> [11*60 13*60] (default). Two-element vector</td><td>Two tuning frequencies of the double-tuned filter, in Hz. (Enabled when <strong>Type of filter</strong> = Double-tuned.)</td></tr><tr><td><strong>Tuning frequency (Hz)</strong> [5*60] (default)</td><td>Tuning frequency for single-tuned, high-pass, or C-type high-pass filters, in Hz. (Enabled when <strong>Type of filter</strong> = Single-tuned, High-pass, or C-type High-pass.)</td></tr><tr><td><strong>Quality factor (Q)</strong> — Quality factor of filter 16 (default)</td><td>Quality factor Q (as defined in the Description).</td></tr><tr><td><strong>Measurements</strong> — Internal variables to measure<br>None (default) | Branch voltages | Branch currents | Branch voltages and currents</td><td><p>Specify which internal variables to measure in the model using the Multimeter block.</p><ul><li>None</li><li>Branch voltages –– Select to measure the three voltages across each phase of the Three-Phase Harmonic Filter block terminals. For a Y connection, these voltages are the phase-to-ground or phase-to-neutral voltages. For a delta connection, these voltages are the phase-to-phase voltages.</li><li>Branch currents –– Select to measure the three currents flowing through each phase of the filter. For a delta connection, these currents are the currents flowing in each branch of the delta.</li><li>Branch voltages and currents –– Select to measure the three voltages and the three currents of the Three-Phase Harmonic Filter block.</li></ul></td></tr></tbody></table>

Place a Multimeter block in your model to display the selected measurements during simulation. In the Multimeter’s Available Measurements list, measurements are identified by a label followed by the block name.

| Measurement     |             | Label  |
| --------------- | ----------- | ------ |
| Branch voltages | Y(grounded) | `Uag:` |
| Y(floating)     | `Uan:`      |        |
| Y(neutral)      | `Uan:`      |        |
| Delta           | `Uab:`      |        |
| Branch currents | Y(grounded) | `Iag:` |
| Y(floating)     | `Ian:`      |        |
| Y(neutral)      | `Ian:`      |        |
| Delta           | `Iab:`      |        |


---

# 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/basics/passives/three-phase-harmonic-filter.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.
