I built a variation of the classic “ball on a beam” fourth order system. The ball’s position is controlled by a PID controller(integral value in the code is set to zero so I guess that makes it a PD controller) implemented through an Ardino Uno. The position of the ball is controlled by a potentiometer that is mapped out from 0 to 24 because the tube is 24 inches long. There is a ultrasonic sensor at one end of the tube sensing the position of the ball.