pid controller with 3 diffrent loops