The PhD thesis is focused on the creation of an applicative protocol to optimize the WWTP anaerobic digesters up-grade and the project of new ones, basing the design on biochemical process equations rather than on classical empirical methods. To reach this purpose, a complete analysis of the whole anaerobic digestion process is designed, scaling up from micro to macro parameters