Closed-loop sensing for control