This model demonstrates the use of Proportional Integral Derivative (PID) controller used to set the discharge rate from a reservoir. During the simulation, the water level of the reservoir is compared to a target level and the difference is calculated. This difference in water level is used to calculate 3 terms: the proportional, integral, and derivative errors. These errors are factored using gain constants Kp, Ki, and Kd. Adjust these gain constants to tune the response to the changing water surface elevation and resulting discharge rate.

The Proportional Integral Derivative (PID) controller is used to set the discharge rate from a reservoir. During the simulation, the water level of the reservoir is compared to a target level and the difference is calculated. This difference in water level is used to calculate 3 terms: the proportional, integral, and derivative errors. These errors are factored using gain constants Kp, Ki, and Kd. Adjust these gain constants to tune the response to the changing water surface elevation and resulting discharge rate.

**Proportional term**

The proportional term (or output) is calculated in direct proportion of the instantaneous error amount then scaled with the constant "Kp".

**Integral term**

The integral term is based on the accumulated error over time and therefore allows you to correct the error at steady state. This term is adjusted (or tuned) using the gain constant "Ki".

**Derivative term**

The derivative term is based on the incremental change of the error and is tuned using the gain constant "Kd".

Below is a time history chart showing the water level compared to the target and the resulting inflow and reservoir discharges.

## Comments

0 comments

Please sign in to leave a comment.