Skip to content

Simulated quadcopter pid tuning with a genetic algorithm

Notifications You must be signed in to change notification settings

tkanarsky/pid-genetic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pid-genetic

Pid tuning with a genetic algorithm

After the quadcopter pid thing about a month ago, I decided to try a genetic algorithm to tune the pid settings. This implementation is hella inefficient, I assume there is a better way to do it out there. It doesn't always converge to the same minimum, but, hey, variety is the spice of life.

Basically: Creates a number of possible pid settings through mutation and crossing over, then runs them against a quadcopter simulation, rated by time to stabilize and accuracy. Top two performers get bred together, repeating the cycle. If a particular pid setting fails to converge or takes too long, it is eliminated from the gene pool. If the population faces extinction, then a new population is created.

Feel free to tinker with the values in config.py.

About

Simulated quadcopter pid tuning with a genetic algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages