# LSTM Network for the Oxygen Concentration Modeling of a Wastewater Treatment Plant
## 3 Materials and Methods
### Plant Description  
The considered WWTP is an industrial plant that is actually used to treat both municipal and industrial wastewater. The plant is composed of two different units (see [20]) dedicated to the two stages of treatment, called primary and secondary.  
The industrial wastewater needs to be pre-treated before being accepted in municipal WWTP: it passes through Unit I to remove the solid part of the waste, exploiting chemical reactions. Firstly, the flow goes into a storage-equalization tank, with the goal of transforming a variable flow into a steady-state one that is then input to the treatment plant, optimizing the process in this way. The flow is then divided into two chemical-physical treatment lines: one dedicated to the light-strength aqueous wastes, and the second for the high-strength ones. The light-strength wastes are subjected to a chemical-physical treatment with classic procedures such as flocculation, coagulation and sedimentation. The wastes are put in sedimentation tanks, where the solid part is separated out by gravity; chemicals can be added to help coagulation, while with flocculation, the small colloidal particles are separated from the wastes and settle in the form of flocks. The high-strength aqueous wastes are instead fed into a Thermophilic Aerobic Membrane Reactor (TAMR). The plant has recently been equipped with this innovative reactor, built ad hoc to treat high-strength wastes. The advantage of the TAMR technology is the exploitation of biological reactions even during the pre-treating phase, considering that biological solutions are more affordable and sustainable than chemical ones. In practice, the waste undergoes aerobic reactions in thermophilic conditions, exploiting oxygen with temperatures greater than 45 \({}^{\circ}\)C [21; 22].  
After this phase, the pre-treated industrial wastewater is mixed with the municipal wastewater and flows into the biological reactor (Unit II), where the CAS process performs denitrification (DEN), oxidation and nitrification (OX-NIT). This paper focuses on the modeling of this part of the plant. The biological reactor is filled with oxygen, where aerobic micro-organisms are introduced to react with wastewater and to reduce its organic compounds. The overall flow goes to a settling tank (final settler), where the activated sludge settles because the micro-organisms create a biological flock, producing a liquid mostly free from suspended solids. The sludge is separated from the clarified water; the majority of the sludge is reintroduced into the CAS to treat the new wastewater, the remaining part is removed, while the cleared water is released into the environment. In the biological reactor, the wastewater is also subjected to the denitrification and nitrification processes to remove the nitrogen components from the wastewater. This is done before releasing the water back into the environment, because these components are dangerous for aquatic organisms and plants. Nitrification occurs in aerobic conditions and is the oxidation of ammonia into nitrite and nitrate by nitrifying autotrophic bacteria; denitrification happens in anaerobic conditions instead, reducing nitrite to nitrogen [23]. For this reason, nitrate recirculates from OX-NIT to DEN.