Genetic algorithm to calculate values of the PID algorithm