> 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/library-specific-guides/power-converters/introducing-power-electronics.md).

# Introducing Power Electronics

## Introduction

In this section you

* Learn how to use power electronics components
* Learn how to use transformers
* Change initial conditions of a circuit

SPS software is designed to simulate power electronic devices. This section uses a simple circuit based on thyristors as the main example.

## Description

Consider the circuit shown below. It represents one phase of a static var compensator (SVC) used on a 735 kV transmission network. On the secondary of the 735 kV/16 kV transformer, two variable susceptance branches are connected in parallel: one thyristor-controlled reactor (TCR) branch, in blue, and one thyristor-switched capacitor (TSC) branch, in red.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-05fa7d6d00104d4fedc9f4c8f4d360243c051065%2F1P_TCR_TSC_staticvar_diagram.png?alt=media" alt=""><figcaption><p>One Phase of a TCR/TSC Static Var Compensator diagram</p></figcaption></figure>

The TCR and TSC branches are both controlled by a valve consisting of two thyristor strings connected in antiparallel. An RC snubber circuit is connected across each valve. The TSC branch is switched on/off, thus providing discrete step variation of the SVC capacitive current. The TCR branch is phase controlled to obtain a continuous variation of the net SVC reactive current.

## Simulation of the TCR Branch

{% stepper %}
{% step %}
Enter power\_new at the command line to open a new model. Save it as power\_TCRTS
{% endstep %}

{% step %}
Add a [Thyristor](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/power-converters/switches/thyristor.md) block from the SPS > Power Electronics library to the model.
{% endstep %}

{% step %}
Open the Thyristor Block Parameters window and set:

| Parameter | Value     |
| --------- | --------- |
| Ron       | `1e-3`    |
| Lon       | `0`       |
| Vf        | `14*0.8`  |
| Rs        | `500`     |
| Cs        | `0.15e-6` |

Notice that the snubber circuit is integral to the Thyristor dialog box.
{% endstep %}

{% step %}
Rename this block TCR 1 and duplicate it. Connect the new thyristor TCR 2 in antiparallel with TCR 1.
{% endstep %}

{% step %}
Connect this new thyristor TCR 2 in antiparallel with TCR 1, as shown in the diagram of the example

As the snubber circuit has already been specified with TCR 1, the snubber of TCR 2 must be eliminated.
{% endstep %}

{% step %}
Open the **TCR 2** dialog box and set the snubber parameters to

| Parameter     | Value |
| ------------- | ----- |
| Rs            | `Inf` |
| Cs            | `0`   |
| {% endstep %} |       |

{% step %}
Add a [Linear Transformer ](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/power-transmission-and-distribution/transformers/linear-transformer.md)block from SPS > Passives. Set nominal power, frequency, and winding parameters (winding 1 = primary; winding 2 = secondary) as shown in the digram of the example.

The **Units** parameter allows you to specify the resistance R and leakage inductance L of each winding as well as the magnetizing branch Rm/Lm, either in SI units (ohms, henries) or in per units (pu). Keep the default pu setting to specify directly R and L in per unit quantities. As there is no tertiary winding, deselect **Three windings transformer**. Winding 3 disappears on the TrA block.

Finally, set the magnetizing branch parameters **Rm** and **Xm** at `[500, 500]`. These values correspond to 0.2% resistive and inductive currents. For more information on the per unit (pu) system, see [Per-Unit System of Units](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/get-started/per-unit-system-of-units.md) page.
{% endstep %}

{% step %}
Add a voltage source, a [Ground ](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/basics/grounds.md)block, and two Series RLC Branch blocks. Set parameters as shown in the figure of the example.
{% endstep %}

{% step %}
Add a [Current Measurement](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/measurement/current-measurement.md) block from SPS > Sensors and Measurements to measure the primary current.
{% endstep %}

{% step %}
Notice that the Thyristor blocks have an output identified by the letter m. This output returns a Simulink® vectorized signal containing the thyristor current (Iak) and voltage (Vak). These outputs are connected to terminators blocks.

Select the signal line connected at the m output of the TCR 1 block and the signal connected at the i output of the i prim block. From the Simulation Data Inspector, select **Log Selected Signals**.
{% endstep %}

{% step %}
Copy two Pulse Generator blocks into your system, name them Pulse1 and Pulse&#x32;*,* and connect them to the gates of the Thyristor blocks.
{% endstep %}

{% step %}
Now you have to define the timing pulses of the two thyristors. At every cycle a pulse has to be sent to each thyristor α degrees after the zero crossing of the thyristor commutation voltage. Set the Pulse1 and Pulse2 block parameters as follows:

| Parameter                 | Value                                                                         |
| ------------------------- | ----------------------------------------------------------------------------- |
| Amplitude                 | `1`                                                                           |
| Period                    | `1/60 s`                                                                      |
| Pulse width (% of period) | `1% (3.6 degrees pulses)`                                                     |
| Phase Delay               | <p><code>1/60+T for Pulse1</code><br><code>1/60+1/120+T for Pulse2</code></p> |
| {% endstep %}             |                                                                               |

{% step %}
The pulses sent to TCR 2 are delayed by 180 degrees with respect to TCR 1. The delay T specifies the firing angle α. To get a 120 degree firing angle, specify T in the workspace:

$$
T = 1/60/3
$$
{% endstep %}

{% step %}
Set the stop time to 0.1, then start the simulation. Observe results in the Simulation Data Inspector.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-35f2c32b785829505b815fa5d73f98a236dbec94%2FTCR_simul_results.png?alt=media" alt=""><figcaption><p>TCR Simulation Results</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Simulation of the TSC Branch

You can now create the TSC branch

{% stepper %}
{% step %}
Duplicate the TCR branch (shown in blue), rename the blocks, and specify resistance and inductance value as shown in the diagram of the example.
{% endstep %}

{% step %}
Connect a capacitor of 308e-6 Farad in series with the TSC 1 and TSC 2 valve.
{% endstep %}

{% step %}
Connect a [Voltage Measurement](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/control-and-measurements/measurement/voltage-measurement.md) block across the capacitor. Connect the output of the block to a terminator block. Select the signal and stream the selected signal to the Simulation Data Inspector.
{% endstep %}

{% step %}
Contrary to the TCR branch, which was fired by a synchronous pulse generator, a continuous firing signal is now applied to the two thyristors. Delete the two pulse generators. Add a Step block and connect its output at both gates of TSC 1 and TSC 2. Set its step time at 1/60/4 (energizing at the first positive peak of the source voltage).
{% endstep %}

{% step %}
Start the simulation

As the capacitor is energized from zero, you can observe in the **Simulation Data Inspector** a low damping transient at 200 Hz, superimposed with the 60 Hz component in the capacitor voltage and primary current. During normal TSC operation, the capacitor has an initial voltage left since the last valve opening. To minimize the closing transient with a charged capacitor, the thyristors of the TSC branch must be fired when the source voltage is at maximum value and with the correct polarity. The initial capacitor voltage corresponds to the steady-state voltage obtained when the thyristor switch is closed. The capacitor voltage is 17.67 kVrms when the valve is conducting. At the closing time, the capacitor must be charged at the peak voltage.

$$
U\_c=17670 \times \sqrt2=24989 \text{ V}
$$
{% endstep %}

{% step %}
Double-click the powergui block, and in the **Tools** tab, click **Initial State**.

A list of all the state variables with their default initial values appears. The value of the initial voltage across the capacitor C (variable Uc\_C) should be -0.3141 V. This voltage is not exactly zero because the snubber allows circulation of a small current when both thyristors are blocked. Now select the Uc\_Cstate variable and enter 24989 in the upper right field. Then click the **Apply** button to make this change effective.
{% endstep %}

{% step %}
Start the simulation. As expected the transient component of capacitor voltage and current has disappeared. The voltages obtained with and without initial voltage are compared in the **Simulation Data Inspector** as shown in the figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-30a4a7f7d3421b39e007d7bfeae98e9685828841%2FTransient_capa_voltage_without_initial_charge.png?alt=media" alt=""><figcaption><p><strong>Transient Capacitor Voltage With and Without Initial Charge</strong></p></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# 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/library-specific-guides/power-converters/introducing-power-electronics.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.
