Slowly biodegradable substrates (Xs) form an important part of the total chemical oxygen demand (COD) of municipal and industrial wastewaters entering the activated sludge (AS) unit. Using an effective configuration of activated sludge and optimization of operating parameters are two methods to improve removal efficiency of Xs. The main objective of this work is dynamic simulation of AS with different configurations to investigate the effect of these two methods on removal efficiency of Xs. First, a procedure is developed to simulate AS using the activated sludge model No.3 (ASM3). Then, seven configurations of AS with three different aeration tanks including continuous stirred-tank reactor (CSTR), plug flow reactor (PFR) and sequencing batch reactors (SBR) are simulated in Mathematica under identical operating conditions and total volume. The results indicate that configuration with two series AS and CSTR as aeration tank (AS-CSTR5) presents the best performance for Xs removal. Moreover, this configuration presents superior performance for denitrification and nitrification. Then, operating parameters of AS-CSTR5 are optimized using the Taguchi method and Minitab to maximize the removal efficiency of Xs. To simplify simulation of AS, usually biochemical reactions in clarifier of AS are ignored. The results of this work, however, indicate that this can lead to predict inaccurate results for some parameters such as removal efficiency of XS. The results of this work can be used to construct new AS units and improve the overall performance of available units.