Development, analysis and application of a predictive controller to a small-scale district heating system