4.9 Artificial Neural Networks
During the past two decades, a series of sophisticated models such as ASM1, ASM2 (Guyer et al., 1994), ASM2D (Henze et al., 1999), and ASM3 (Guyer et al., 1999) were introduced that simulate BOD and chemical oxygen demand removal, nitrification, denitrification, and biological phosphate removal. These newer models are highly accurate and useful for design, research, and other offline activities. However, they are seldom used for online process control, mainly because several of their inputs cannot be measured in real time. Models used for real-time control must use inputs that are practical to measure online and in real time, relatively accurate, and easy to calibrate. Artificial neural network (ANN) models meet these requirements. Advantages and disadvantages of ANN models are listed in Table 7.2 (Hill, 2010).
4.9.1 Artificial Neural Network Models
Artificial neural network models are nonlinear statistical data modeling tools loosely based on biological neural networks. They can model real world systems by tuning a set of parameters. These parameters, known as weights, describe a model that maps from a set of given inputs to an associated set of outputs. The process of tuning the weights to the best values is called training. In simple terms, an ANN is a data-driven empirical model.
Artificial neural networks come in several different structures that are each most suitable for specific types of tasks. Table 7.3 lists common types of ANNs and their applications.
Figure 7.6 shows the structure and components of a back propagation ANN model. Inputs are shown on the left of the figure and outputs are shown on the far right. The hidden layer is a sequence of nodes. The arrows between the inputs and the nodes each represent a model weight that is multiplied by the input value.
TABLE 7.2 Advantages and disadvantages of ANN models (Hill, 2010).
TABLE 7.3 Types of ANNs and their application areas.
Each node in the hidden layer and the output layer has a structure and functions as shown in Figure 7.7. The first function is a summation of the inputs multiplied by their respective weights. The activation function can take any form, but is most commonly monotonic. Typical activation functions include linear, hyperbolic tangent, sigmoid, step, and exponential.
FIGURE 7.6 Components of a back propagation ANN model.
FIGURE 7.7 Functions of a neural network node.
The weights of an ANN model must be calibrated. This process is called training and involves running an input and output data set through the model and incrementally improving the estimate of the weights. Training is computationally intensive, but is typically one of the easier steps in model identification. There are many software packages available with this capability.
4.9.2 Artificial Neural Network Models Used for Process Modeling
Artificial neural network models, both with and without feedback, can be used for process simulation. Figure 7.8 presents a schematic of the structure of the model without feedback. The input, u(t–n), is a vector of parameters at one or more past times. These parameters might include influent conditions such as flowrate and ammonia concentration and other measured values such as dissolved oxygen concentration and mixed liquor suspended solids concentration. The output, ŷ(t), is a vector of parameters at time, t, and might include ammonia and nitrate concentrations. Thus, the ANN model takes the inputs from past times and calculates the outputs for one time step ahead.
FIGURE 7.8 Artificial neural network model without feedback.
FIGURE 7.9 Artificial neural network model with feedback.
Figure 7.9 presents a schematic of the ANN model with feedback. In addition to the input vector, u, the model uses the value of the measured outputs at the past time period, y(t–1), as an input. The overall effect is that this type of model only needs to calculate the change in output parameters because it is constantly being updated with the most recent measured output information.
Determining what input parameters and what past time steps to use is part of model design. Some ANN packages include functionality to help determine which input parameters are significant. Insignificant inputs may be removed during the calibration procedure, which often leads to better forecasts.
4.9.3 Artificial Neural Network Models Used for Process Control
Artificial neural network models are typically used as the predictive model in model predictive control (Section 4.8). In some instances, the inverse of the ANN model can be directly used for control. However, such use is not common in the environmental utilities’ field and, therefore, is beyond the scope of this document.
4.10 Control Strategies
Several control strategies that are common in wastewater treatment are discussed here; these are referenced in later sections of this chapter.
4.10.1 Lead–Lag Control
Lead–lag control is used when there are two or more devices performing the same function. By staging these devices, they can be used for a wider range of variation of demand. As the device is first needed, the lead device is started. When the first device is not sufficient to meet demand, the lag device is started. If demand is reduced, the lag device is stopped, leaving only the lead device operating. If demand is reduced with only the lead device operating, that may also be stopped.
Lead–lag control can be used with any number of devices (Figure 7.10). For example, if there are three devices available for operation, one will be the lead device, one will be the first lag, or Lag1, and the last will be the second lag, or Lag2. If both the lead and Lag1 devices are in operation and demand is not met, then the Lag2 device will be started. Likewise, if all three devices are in operation and demand is reduced, the Lag2 device will be stopped first, leaving the lead and Lag1 devices operating. There is no limit to the number of lag devices that can be used in lead–lag control, although two or three devices operated together are the most common.
FIGURE 7.10 Lead-lag control.
Lead–lag control has traditionally been used for constant-speed devices, most