Optimal Mobile Sensing and Actuation Policies in Cyber-physical Systems