In this thesis, models of pollution fluxes in the inlet to 2 Danish wastewater treatment plants (WWTPs) as well as of suspended solids (SS) concentrations in the aeration tanks of an alternating WWTP and in the effluent from the aeration tanks are developed. The latter model is furthermore used to analyze and quantify the effect of the Aeration Tank Settling (ATS) operating mode, which is used during rain events. Furthermore, the model is used to propose a control algorithm for the phase lengths during ATS operation. The models are mainly formulated as state space model in continuous time with discrete-time observation equations. The state equations are thus expressed in stochastic differential equations. Hereby it is possible to use the maximum likelihood estimation method to estimate the parameters of the models. A Kalman filter is used to estimate the one-step ahead predictions that are used in the evaluation of the likelihood function. The proposed models are of the grey-box type, where the most important physical relations are combined with stochastic terms to describe the deviations between model and reality as well as measurement errors. The pollution flux models are models of the COD (Chemical Oxygen Demand) flux and SS flux in the inlet to the WWTP. COD is measured by means of a UV absorption sensor while SS is measured by a turbidity sensor. These models include a description of the deposit of COD and SS amounts, respectively, in the sewer system, and the models can thus be used to quantify these amounts as well as to describe possible first flush effects. The buildup and flush out of the deposits are modelled by differential equations, thus the models are dynamic models. The dynamic models are furthermore compared to simpler static models and it is found that the dynamic models are better at modelling the fluxes in terms of the multiple correlation coefficient R2. The model of the SS concentrations in the aeration tanks of an alternating WWTP as well as in the effluent from the aeration tanks is a mass balance model based on measurements of SS in one aeration tank and in the common outlet of all the aeration tanks, respectively. This model is a state space model with the SS concentrations and the sludge blanket depths in the aeration tanks as state variables and with the SS concentrations in one aeration tank and in the common outlet as observations. The SS concentration model is used to quantify the benefits of ATS operation in terms of increased hydraulic capacity. The model is furthermore used to propose a control algorithm for the phase lengths during ATS operation. The quantification of the benefits of ATS operation as well as the proposal for a control algorithm is based on the assumption that if the SS concentration in the secondary clarifier increases beyond a plant and situation specific amount above the normal dry weather level, the SS concentration in the effluent increases to an unacceptable level. It was found that ATS increases the hydraulic capacity of the WWTP considered by more than 167%, while the proposed control algorithm is yet to be implemented in full scale.