On the assessment and control optimisation of demand response programs in residential buildings