A pool cleaner is provided including a top housing, a chassis and a computing system. The computing system can include a PID control module for maintaining a process variable at a setpoint value. The PID control module can receive the setpoint value for the process variable and can monitor the process variable to calculate the phase difference between the setpoint value of the process variable and the present state of the process variable. The PID control module can automatically tune the PID control module to account for the pool surface the pool cleaner is cleaning by using the phase difference previously calculated.