> 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/machines/blocks/machines-control/synchronous-machines-control/hydraulic-turbine-and-governor.md).

# Hydraulic Turbine and Governor

## Description

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

The **Hydraulic Turbine and Governor** block, located in the **OPAL-RT SPS Software/Electrical Machines** library, implements a nonlinear hydraulic turbine model, a PID governor system, and a servomotor.

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

The hydraulic turbine is modeled by the following nonlinear system.

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

The gate servomotor is modeled by a second-order system.

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

## Ports

### Input

<table data-header-hidden><thead><tr><th width="239.60003662109375"></th><th></th></tr></thead><tbody><tr><td><strong>wref</strong> — Reference speed<br>Scalar</td><td>Reference speed, in pu.</td></tr><tr><td><strong>Pref</strong> — Reference mechanical power<br>Scalar</td><td>Reference mechanical power in pu. This input can be left unconnected if you want to use the gate position as input to the feedback loop instead of the power deviation.</td></tr><tr><td><strong>we</strong> — Machine actual speed<br>Scalar</td><td>Machine actual speed, in pu.</td></tr><tr><td><strong>Pe0</strong> — Machine actual electrical power<br>Scalar</td><td>Machine actual electrical power in pu. This input can be left unconnected if you want to use the gate position as input to the feedback loop instead of the power deviation.</td></tr><tr><td><strong>dw</strong> — Speed deviation<br>Scalar</td><td>Speed deviation, in pu.</td></tr></tbody></table>

### Output

<table data-header-hidden><thead><tr><th width="240.4000244140625"></th><th></th></tr></thead><tbody><tr><td><strong>Pm</strong> — Mechanical power<br>Scalar</td><td>Mechanical power Pm for the Synchronous Machine block, in pu.</td></tr><tr><td><strong>gate</strong> — Gate opening<br>Scalar</td><td>Gate opening, in pu.</td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="293.20001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>Servo-motor [ Ka() Ta(sec) ]</strong> — Gain and time constant of first-order system<br>[ 10/3 0.07 ] (default) | vector of two positive elements</td><td>Gain Ka and time constant Ta, in seconds (s), of the first-order system representing the servomotor.</td></tr><tr><td><strong>Gate opening limits [ gmin,gmax(pu) vgmin,vgmax(pu/s) ]</strong> — Gate opening limits<br>[ 0.01 0.97518 -0.1 0.1 ] (default) | vector of four elements</td><td>Limits gmin and gmax (pu) imposed on the gate opening, and vgmin and vgmax (pu/s) imposed on gate speed.</td></tr><tr><td><strong>Permanent droop and regulator [ Rp() Kp() Ki() Kd() Td(s) ]</strong> — Permanent droop and regulator<br>[ 0.05 1.163 0.105 0 0.01 ] (default) | vector of five nonnegative elements</td><td>Static gain of the governor is equal to the inverse of the permanent droop Rp in the feedback loop. The PID regulator has a proportional gain Kp, an integral gain Ki,and a derivative gain Kd. The high-frequency gain of the PID is limited by a first-order low-pass filter with time constant Td (s).</td></tr><tr><td><strong>Hydraulic turbine [ beta() Tw(sec) ]</strong> — Speed deviation damping coefficient and water starting time<br>[ 0 2.67 ] (default) | vector of two nonnegative elements</td><td>Speed deviation damping coefficient β and water starting time Tw (s).</td></tr><tr><td><strong>Droop reference (0=power error, 1=gate opening)</strong> — Input of feedback loop<br>0 (default) | 1</td><td>Input of the feedback loop: gate position (1) or electrical power deviation (0).</td></tr><tr><td><strong>Initial mechanical power (pu)</strong> — Initial mechanical power at machine shaft<br>0.7516 (default) | nonnegative scalar</td><td>Initial mechanical power Pm0 (pu) at the machine shaft. This value is automatically updated by the load flow utility of the Powergui block.</td></tr></tbody></table>

### Examples

The [Synchronous Machine ](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/machines/synchronous-machine.md)(power\_turbine) example illustrates the use of the Synchronous Machine associated with the Hydraulic Turbine and Governor (HTG) and Excitation System blocks.


---

# 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/machines/blocks/machines-control/synchronous-machines-control/hydraulic-turbine-and-governor.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.
