> 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/example-models/power-transmission-and-distribution/three-phase-active-harmonic-filter.md).

# Three Phase Active Harmonic Filter

This example shows the use of a shunt active harmonic filter (AHF) to minimize the harmonic content propagated to the source from a non-linear load.

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

## Description

The circuit models a standard shunt AHF with IGBT inverter and series inductor on the AC side and DC capacitor energization. The load consists of two diode rectifiers which are phase-shifted by 30 degrees. The Delta-Y connected rectifier is connected after 10 cycles to change the load from 6-pulse to 12-pulse.

The AHF uses a PLL to generate a reference sinusoidal source current which is in-phase and has the same RMS gain as the load current. The current error between the load current and the reference current is generated by the IGBT Bridge through hysteresis switching. The AHF aims to inject this current error at the point of common coupling in order to match the source current as closely as possible with the reference current.

## Simulation

Start the simulation. You can observe phase A reference and source current on scope 'Iref\_Isource' and phase A source and load current on scope 'Isource\_Iload'. If you look under the mask of the AHF, further responses specific to the operation of the AHF are available.

At t=0s, only the delta/delta connected diode rectifier is in-circuit. The DC current is set at 2000A. Observe from 'Iref\_Isource' that the AHF captures the reference current within 1 cycle.

FFT Analysis tool of Powergui show an FFT analysis of the load and source phase A current on the 3rd cycle. It is seen that the AHF has effectively reduced the THD from 22.41% to 0.69%.

At t=5/60s, the DC current is increased from 2000A to 3000A. Observe that the AHF effectively responds to this change in load and captures the new reference current within one cycle.

At t=10/60s, the delta/wye diode rectifier is connected, thus producing a 12-pulse load. Observe that the AHF again captures the new reference current within one cycle. FFT Analysis tool of Powergui shows the load and source phase A current on the 13th cycle. It is seen that the AHF has effectively reduced the THD from 4.80% to 0.93%.

{% hint style="info" %}
The circuit has been discretized with a 2us time step. This time step may be increased but a decrease in accuracy of the simulation will be observed.
{% endhint %}

## Command

Example model name: power\_active\_filter

{% code lineNumbers="true" %}

```matlab
open('power_active_filter')
```

{% endcode %}


---

# 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/example-models/power-transmission-and-distribution/three-phase-active-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.
