Response of anaerobic systems to long-term periodic substrate perturbations