Technology for Wastewater Treatment

I need a document to design UASB and MBBR tanks. I would like to know how to calculate COD, BOD content?  Any advise or guidance would be greatly appreciated! Thanks