# Optimal Control of an Ultraviolet Water Disinfection System
## 2 A Disinfection UV System
### The Dynamic Model of the UV Disinfection System  
The modeling of the UV system as a dynamic system is subject to the control objective. Our work's main objective was to study the possibility of controlling the process to ensure freshwater quality (a given disinfection degree) and, eventually, to minimize the energy consumed by the UV irradiation. Essentially, this model is used in the following sections to state and solve optimization problems to obtain the setpoints of the control inputs. Hence, we adopt a simple and easy to use dynamic model. For our control objective, we chose the UV dose delivered by the source and the bacterial abatement as output variables, denoted respectively by \(D\) and \(A\). These variables are dependent on several physical parameters, such as the intensity of UV light, the freshwater's UV transmittance, the freshwater's temperature, pH, and the hydraulic characteristics of the disinfection unit (see Figure 2). Figure 1: Schematic representation of the UV disinfection system. Figure 2: Input and output variables of the UV disinfection system’ model. In this study, only UV intensity and the freshwater flow rate were considered to be control inputs because they solely achieve the control action. Thus, the disinfection unit was precisely designed to facilitate the modification of \(I\) and \(Q\). The other input variables will be regarded as parameters of the system's dynamic model, particularly because their values may be considered to be constant during the control horizon. The desired model has two control inputs, \(I(t)\) and \(Q(t)\), and two output variables, \(D(t)\) and \(A(t)\). This model has to be appropriate for the simulation of the UVDS over the simulation horizon:  
\[t\in[0,\ t_{f}],\ t_{f}:\ \text{the final time}. \tag{1}\]  
Taking into account the needs of the optimization problems stated in the following sections, the dynamic model of the UVDS has a simplified task. It should calculate the output variables \(D\) and \(A\) for control inputs with constant values \(I(t)=I_{0}\) and \(Q(t)=Q_{0}\) over the simulation interval. Calculation of the UV Dose Delivered by the Discharge Lamp  
We are interested in calculating the UV dose delivered by the UV lamp during only one passage through the irradiation room. Its value will be used in the sequel when we try to minimize energy consumption. Let us note that the delivered UV dose (\(D\)) is different from the Received Radiation Dose (denoted by UVD in [7]). The latter is the UV dose received (absorbed) by the mass of the fluid elements (including microorganisms). The greater the UVD, the more efficient the UV system. Its calculus is a complex problem presented in [7]. The initial time \(t=0\) corresponds to the moment when the freshwater enters the irradiation room with the volume \(V\). The moment when it exits the disinfection room depends on the flow rate \(Q\) and the volume \(V\). This is called exposure time (\(t_{\text{exp}}\)) and has the following value:  
\[t_{\text{exp}}\ =\ \frac{V}{Q}, \tag{2}\]  
supposing that \(Q\) is constant. Even for this flow reactor, the dose delivered by the UV lamp depends on the radiation intensity of the source \(I_{0}\) and the exposure time, as follows:  
\[D\ =\ I_{0}\cdot t_{\text{exp}}, \tag{3}\]  
where \(I_{0}\) has a constant value. For example, \(D\) and \(I_{0}\) are expressed respectively in \(\text{mW}\cdot\text{s}/\text{cm}^{2}\) and \(\text{mW}/\text{cm}^{2}\). If \(I_{0}\) and \(Q=Q_{0}\) have constant values, Equations (2) and (3) allow the delivered UV dose to be calculated as:  
\[D(I_{0},Q_{0})\ =\ I_{0}\cdot\frac{V}{Q_{0}}. \tag{4}\]  
Equation (4) shows that the output variable \(D(t)\) has a nonlinear dependence on \(Q(t)\). This represents an integral action with saturation that occurs in a moment that depends on \(Q_{0}\). Generally speaking, the nonlinear systems have the property that their responses depend not only on the shape but also on the amplitude of the input variables.