Skip to content

Control Structure for water distribution

In this page, the constraints and model dynamics that define the model predictive controller behaviour, is discussed. The previous page discussed how program constraints differ as equality constraints or inequality constraints. In this page, the details on each type of constraint is given in how they contribute to define a relevant optimisation program.

The constraints are divided in two sections:

  • System dynamics constraints. Defines various properties of the system, derived from the network layout.
  • System control constraints. Defines properties that are relevant to the intended control strategy.

System dynamics constraints

Pressure loss

Each pipe (or connection) in the network model represents a flow, and therefore a pressure loss. A modification of the general expression is given here:

\Delta p = \alpha |q|q +\Delta h

where \Delta p is the pressure loss, \alpha is a generalised parameter for the resistance in the pipe. |q|q is a product of the flow, where the apriori sign of the value is preserved, which determines the flow direction in these types of model. \Delta h is the difference in elevation, from the start of the pipe to the end.

Note that in the case of 'reverse flow' the \Delta h should swap from and to definitions.

In the model both pressure and flow are states, which makes the expression non-linear. A number of modifications are made to the expression to fit in the mpc program.

\textbf{p}_{from} - \textbf{p}_{to} - k\textbf{q} = \textbf{0}
  • Measurements for pressure loss are generally not available, but we assert that pressure at each node can be estimated.
  • It is a requirement for the data pre-processing (for a number of reasons) that elevation is added to the pressure measurement. So the p_{from} - p_{to} expression integrates the \Delta h.
  • |q|q is a quadratic term, which is problematic for the optimisation algorithm. Therefore a linearisation strategy is used where k = \alpha|q_0|, where 0 is the first instance in the optimisation, corresponding to the currently measured flow.

Massbalance

Each junction (or node) in the network model must satisfy a massbalance equation:

q_{in}-q_{out}-q_{demand} = 0

This is a well-known form, stating that no water can be stored in a junction. A special distinction for flows are made:

  • q_{out}, assumes water leaving the junction, but entering another. I.e. it stays in the model.
  • q_{demand}, assumes water leaving the entire system, because it is consumed.

For the purposes of controller optimisation it is required that water demand is forecasted before the control program. This is described in the demand forecast page.

Elevated storage

The storage tanks and reservoirs in the model has capacity, which puts different properties to the massbalance. In the basic form the accumulating term is volume:

V_{t+1} = V_t + q_t^{in} - q_t^{out}

where t is any position in time, and t+1 is the next step in a discretised form. The continuous form is:

\frac{dV}{dt} = q_{in}-q_{out}

Note that the q_{demand} was omitted, since consumption is not attributed to the reservoirs directly. This is changed in the next form, where new abstractions are introduced.

In the mpc the following form is used:

L_t - L_{t+1} + \frac{T_s}{a_{tank}} q_t^{in} = \frac{T_s}{a_{tank}} q_t^{demand}

There are no volume measurements available, but the equation is readily converted with a factor \frac{1}{a_{tank}} to the level, L. a is the cross-sectional area, assuming the reservoir is homogenous inside the controllable volume. The factor T_s is a time dimension constant and relates to the sampling interval chosen for the program.

Note that in the mpc form, q^{demand} replaces q^{out}. q^{demand} is in the network model a stream leaving the model (for whichever reason). There are streams to other sections, which are outside the controller scope. Likewise, we have a design with a single pipe connection to the 'interior' of the model. So for the model purpose q_{in} is sufficient; let it go negative to drain the tank or reservoir.

Pump system characteristics

When a pump is in operation, it applies work to the water by an impeller of some kind, increasing the work by doing more rotations per minute. The work translates to a certain discharge, which is realised by the water building a head pressure. The discharge and head quantities have a complex relationship in the physical enviroment, and varies depending on many effects; impeller rotations, water demand, counter pressure from the transmission network, upstream water level (most pumps draw from a tank). To name a few.

In the control program, the goal is to predict a correlation, while not breaking the linear requirement. A suitable function, turned out to be a simple linear form:

\textbf{p}_{pump} = a \textbf{q}_{pump} + b

Here the factors are abstracted as gain and intercept, they have no tangible physical representation. The case study pages provide the experiment that validates this equation.

System control constraints

Elevated storage water level

Any storage tank or reservoir is limited by dimension, so the relevant level state (volume proxy) L, is bound within upper and lower limits. $$ L_{min} \le L \le L_{max} $$

Pressure control

The pressure states can be formulated with a minimal pressure, that must be satisfied. This equation is mostly an operational concern, in that there is a service requirement, even if it is more abstract than the physical barriers of a tank.

p \ge p_{service} + p_{elevation}

Water works pump control

The pumps will have a specific service range of discharge, they can operate in. This is defined here. $$ Q_{min} \le Q \le Q_{max} $$