## 2 Materials and Methods  
### Activated Sludge Process (ASP) and Benchmark Simulation Model No. 1 (BSM1)  
Activated sludge model No. 1 (ASM1) is a mathematical model that is widely accepted and applied in the research and application of activated sludge process (ASP) used in biological wastewater treatment systems. The typical ASP is shown in Figure 1, which includes two parts, the biological (more accurately biochemical) reaction tanks (or aeration tanks) and the secondary settler [27; 28]. In the aeration tanks, the microorganisms are divided into active heterotrophic and autotrophic bacteria. The 13 reaction components and 8 reaction processes of the organic matter present in the influent are incorporated into the ASM1 [28; 29; 30]. In each process, all the organic substances and microorganisms have their own reaction rates and stoichiometry. Since the model has been published, researchers have been using the ASM1 model to verify their new proposed control algorithms of the DO concentration of ASP. The activated sludge process aims to achieve, at minimum cost, sufficiently low concentrations of biodegradable matter and nutrients in the effluent together with minimal sludge production. In order to achieve this, the process has to be controlled [28]. However, it is difficult to predict the performance of the proposed or applied control strategy based on existing reference, process or location. Figure 1: Typical biological (or biochemical) ASP to treat wastewater. ASP: Activated Sludge Process. To enhance the acceptance of innovative control strategies the performance evaluation should be based on a rigorous methodology that includes a simulation model, plant layout, controllers, performance criteria and test procedures. The first Benchmark Simulation Layout (BSM1), which was based on the ASM1, is relatively a simple layout and is shown in Figure 2. Similar to ASM1, the first part of BSM1 is also a biological (or biochemical) activated sludge reactor, which is comprised of five-compartments, two of them are anoxic tanks and the following three are aerobic tanks; the second part of BSM1 is a secondary settler. Reactors 1 and 2 are unaerated in open-loop, but fully mixed; reactors 3, 4 and 5 are aerated. For the open-loop case, the oxygen transfer coefficients (\(K_{L}a\)) are fixed; for reactors 3 and 4 the coefficient (\(K_{L}a_{3}\) and \(K_{L}a_{4}\)) is set to a constant at 240 d\({}^{-1}\) (10 h\({}^{-1}\)), which means the air flow rate of the blower is constant; for reactor 5, the coefficient (\(K_{L}a\)s) is selected as the control variable (or operational variable) in this paper to be manipulated for maintaining the DO concentration at a level of 2 mg/L. Thus, the system can achieve biological nitrogen removal through nitrification in the aeration tanks and pre-denitrification in the anoxic tanks. The model equations to be implemented for the proposed layout, the procedure to test the implementation and the performance criteria to be used are described below along with the description of sensors and control handles [28]. For more information, it can be seen in literature [28; 29]. The ASM1 [27] has been selected to describe the biological phenomena taking place in the biological reactor and a double-exponential settling velocity function [31] has been selected to describe the secondary settler which is modeled as a 10 layers non-reactive unit (i.e., no biological reaction). In the activated sludge wastewater treatment system, the concentration of DO in the aeration tank is the most important parameter in the process of nitrogen removal [32]. Actually, the DO concentration has a direct impact on the effluent quality with respect to total nitrogen (\(N_{\text{tot}}\)), nitrate nitrogen (\(S_{\text{NO}}\)) and ammonia (\(S_{\text{NH}}\)). Therefore, the study of DO control has its important practical significance and prospect for application. According to the mass balance of the system, the biochemical reactions that take place in each compartment (reactor) can be described as the follows.