I've been doing some experiments to evolve PID control values in X-plane using a genetic algorithm, with some success. I posted a description about the experiment on my blog. I didn't want to reproduce the entire post here, but thought I would link it and post a video of the experiment:
Blog post:
http://www.1011ltd.com/web/blog/post/evolving_pid
Enjoy!
Benjamin
Comments
If you are interested in non-GA algorithms for control development, check Google Scholar for the following terms:
Fictitious Reference Iterative Tuning (FRIT)
Virtual Reference Feedback Tuning (VRFT)
Iterative feedback tuning (IFT)
- Roy
"How do you know that you have generated sufficiently diverse "children" such that they have explored a large enough region of the solution space?"
That is a very good question. I am not an expert in GAs, but enjoy experimenting with them, so don't take this as expert opinion. The answer can be that you don't know. There may be very good solutions that a GA will not find. But that is the tradeoff - computing resources vs. globally optimised results.
Yes, it may very well be more efficient to use other optimization techniques, I make no claim on efficiency.
More importantly, I think it could be better to not use PID control at all, since it is a method used when you don't have knowledge of the underlying process. Simulation might provide sufficient knowledge of the underlying system.
Thanks for the ideas, I hope that I can explore them at some point!
- Ben
Thanks for the interesting post.
I am not that familiar with genetic algorithms. How do you know that you have generated sufficiently diverse "children" such that they have explored a large enough region of the solution space? Wouldn't it be more efficient to just use least squares or other optimization algorithm to generate the PID values directly from simulation data?
- Roy
Bravo.
That is the Y dollar question. To apply this practically, the target aeroplane must be described accurately enough in X-plane so the simulation gives a usable result that can be tested in the real world. I would only test the high fitness results in a real aeroplane.
It could be that this method of determining PID values is not practical. In that case I can still develop the higher-order autopilot functions with a simulator, and substitute PID values derived by some other means into the control system. Hopefully...