Robust and energy-efficient PPG-based heart-rate monitoring