The Activated Sludge Model No. 2d (ASM2d) was implemented in Matlab for the modelling of an anaerobic/anoxic/oxic (A2/O) wastewater treatment pilot plant (WWTPP). Experiments with three different influent ammonia concentrations and two internal recycling ratios were used in this study. These experiments were modelled, calibrated and validated. A cost function (CF) was established for ammonia and phosphorus concentrations. A structural sensitivity analysis of 55 ASM2d parameters was performed in order to study the correlation between most sensible parameters. An identifiability analysis is also proposed to accurately calibrate the ASM2d model. and the contour plot graphics were plotted. Suitable parameters the maximum growth rate of autortopfic microorganisms (μA), rate constant for storage of polyhydroxyalcanoate particulated fraction (qPHA), maximum growth rate of phosphorus accumulating organisms (μPAO) and polyphosphate requirement for polyhydroxyalcanoate stored (YPO4) were selected and calibrated. Furthermore, the maximum settling velocity was also calibrated. Three different types of calibration were proposed, providing results in good agreement with the experimental data.