Solve for d C=pid for d