Predictive control – the basic algorithm