Hauptinhalt

watertank Simulink Model

R2026b

The Simulink® model watertank includes the nonlinear Water-Tank System plant and a PI controller in a single-loop feedback system.

Simulink block diagram of the watertank model. A Desired Water Level constant block with value 10 provides the reference input to a summing junction, which computes the error by subtracting the feedback. The error passes through a PID Controller block, which drives the Water-Tank System block. The system output feeds back to the summing junction and also connects to a Scope block.

The Water-Tank System is shown in the following figure.

Simulink block diagram of the Water-Tank System subsystem. The input voltage V passes through a b/A gain block into a summing junction. The output of the summing junction integrates through an integrator block to produce the water height H at the output. A negative feedback path takes H through a square root, then multiplies by the gain a/A, and feeds back into the summing junction.

Water enters the tank from the top at a rate proportional to the voltage, V, applied to the pump. The water leaves through an opening in the tank base at a rate that is proportional to the square root of the water height, H, in the tank. The presence of the square root in the water flow rate results in a nonlinear plant.

Schematic diagram of the water tank system. Water enters the tank from the top at a rate of bV, where V is the voltage applied to the pump. The tank is shown as a rectangular vessel with water height H. Water exits through an opening at the base of the tank at a rate of a times the square root of H.

The following table describes the variables, parameters, differential equations, states, inputs, and outputs of the Water-Tank System.

Variables

H is the height of water in the tank.

Vol is the volume of water in the tank.

V is the voltage applied to the pump.

Parameters

A is the cross-sectional area of the tank.

b is a constant related to the flow rate into the tank.

a is a constant related to the flow rate out of the tank.

Differential equation

ddtVol=AdHdt=bV−aH

StatesH
InputsV
OutputsH