Data-driven rule-based control of a heat pump system to provide grid services