Genetic algorithm is a optimization method involving selection, crossover and mutation steps to evolve the individuals to adapt in given environment.
genetic algorithm-based PID controller is adapted to optimize the response of a simple mass-spring-damper system.It is based upon the principle of natural evolution aiming at minimizing the integral of time-weighted absolute error(ITAE) as the fitness function to improve the system response. Fitness function needs to be reduces over a time to get optimal result.
- matlab or octave
Run this command on command prompt to clone the repository
git clone https://github.com/love481/genetic_algorithm_based_pid_controller.git
To simulate the response, run on command line
geneticMain.m
geneticMain.m--> initialize the total population, gene size, ellite_size and iteratation involving evolution processGeneticAlgorithm.m--> Class implementation of algorithm contains fitness function, binary to float conversion and pid controllergetBestChromo.m--> select chromosome having smallest fitness valueselctTournament.m--> Involves game tournament between two or more chromosomes to find the fittest individualscrossover.m--> Crossing between two chromosomes.mutation.m--> mutation process seen on the gene of the chromosomes to ensure diversitysingleIteration--> single iteration of evolution(selection, crossover, mutation)
Please feel free to contact me if any help needed

