> 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/get-started-with-sps/dynamic-load-and-programmable-voltage-source.md).

# Dynamic Load and Programmable Voltage Source

This example shows the use of the 3-Phase Dynamic Load and 3-Phase Programmable Voltage Source blocks.

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

## Description

A dynamic load is connected on a 500 kV, 60 Hz power network. The network is simulated by its Thevenin equivalent (voltage source behind an R-L impedance corresponding to a 3-phase short circuit level of 2000 MVA). The source internal voltage is modulated in order to simulate voltage variation during a power swing.

As the dynamic load is a nonlinear model simulated by current sources, it cannot be connected to an inductive network (R-L in series). Therefore, a small resistive load (1 MW) has been added in parallel with the dynamic load.

The dynamic load power is a function of its terminal positive-sequence voltage V. Open the Dynamic Load menu and notice that both exponents np and nq are set to 1 and that the specified minimum voltage Vmin is 0.7 pu. It means that the load active power P and reactive power Q are defined by the following equations:

If V > Vmin P = Po\*(V/Vo); Q = Qo\*(V/Vo)

If V < Vmin P = Po\*(V/Vo)^2; Q = Qo\*(V/Vo)^2

In other words, as long as voltage is higher than 0.7 pu, the load current is constant. When voltage falls below 0.7 pu the load behaves as a constant impedance.

To simulate the variation of P and Q as a function of voltage, the source internal voltage is controlled by the 3-Phase Programmable Voltage Source block. Open the source menu and notice that the specified type of amplitude variation is a sinusoidal modulation (Amplitude of the modulation = 0.5 pu, Frequency of the modulation = 1 Hz). Therefore, the source positive-sequence voltage varies between 0.5 pu and 1.5 pu. The initial source voltage is 1 pu. Modulation starts at t = 0.2 s and stops after 1 cycle at t = 1.2 s.

## Simulation

{% stepper %}
{% step %}

### Initializing the dynamic load

To start the simulation in steady-state you have to specify the correct initial voltage Vo (magnitude and phase) corresponding to desired Po and Qo values.

Use the "Machine Initialization" utility of the Powergui block to find this voltage and initialize the dynamic load:

* Open Powergui and select "Machine Initialization".
* Specify the desired active and reactive powers for the Dynamic Load : Active Power = 50e6, Reactive Power = 25e6
* Press the "Compute and Apply" button.

The phasors of AB and BC machine voltages as well as the currents flowing into phases A and B are updated. The phase-neutral load voltage Uan is displayed: (0.9844 pu - 1.41 degrees). If you now open the Dynamic Load dialog box you will notice that the values of Po, Qo and Vo have been updated.
{% endstep %}

{% step %}

### Simulating the voltage swing

* Start the simulation and observe load voltage, P & Q powers and current on Scope1. Simulation should start in steady state.
* At t = 0.2 s, when voltage modulation is initiated, P and Q start to increase, but since np and nq are set to 1, the load current stays constant.
* When voltage falls below 0.7 pu the load behaves as a constant impedance and the load current follows this voltage variation.
* Observe instantaneous voltages and currents on Scope2.
* Notice that computed P and Q displayed on Scope3 match the P and Q internal signals returned by the Dynamic Load measurement output.
  {% endstep %}
  {% endstepper %}

## Command

Example model name: power\_dynamicload

{% code lineNumbers="true" %}

```matlab
open('power_dynamicload')
```

{% 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/get-started-with-sps/dynamic-load-and-programmable-voltage-source.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.
