Factors determining the stability and productivity of small scale anaerobic digesters