A system for removing undesirable compounds from contaminated airincludes a biofilter having an alkaline material introduction system and afuzzy-logicbased controller. A contaminant, such as hydrogen sulfide, is removed fromcontaminated air by passing the contaminated air through the biofilter.