Home    Bloggers    Messages    Resources
Tw  |  Fb  |  In  |  Rss
Brian Carrigan

Evolve Better Control Solutions With Genetic Algorithms

Brian Carrigan
Newest First   Oldest First   Threaded View
Page 1 / 2   >   >>
Davidmicro
Davidmicro
12/15/2012 1:16:12 PM
User Rank
Program Manager
Re: What Hardware is Best?

I did not recalled for my background, but I remembered that I studied on Neural Network/Genetic algorithm (GA) traditional control algorithm long time ago. I wish I find some information covered by dust.  So many simulations including my study had been published in conference. Result was very attractive. Also, other engineer/researcher (I think Motorola engineer before Freescale is built) had done for hardware approach, which means that contents of memory can be mutated in initial stage. If exploring for Motorola  App Note,  a good information may be found for hardware approach. In the mean time, I might dig my shabby bookshelf.  

50%
50%
embd_dragon
embd_dragon
11/24/2012 11:38:36 PM
User Rank
System supervisor
Re: Optimization
A CAD system might use genetic algorithms in order to get a better autorouter and to get thick and lenght for tracks that are optimum for a given task, e.g. analog or hi-speed tracks.

50%
50%
carrigan
carrigan
11/23/2012 7:46:37 AM
User Rank
Blogger
Re: Realtime systems issues
I agree, I will not be buying a car with genetic algorithms implemented into the steering wheel anytime soon!

And you are correct that the generated code would not be the same, but you could still select the best candidate and test that code.

I love the harvesting device idea- I've seen genetic algorithms used on "travelling salesman" type problems before and it performs beautifully. Like I mentioned in my last post though, if you run genetic algorithms on the actual hardware itself as opposed to a simulation, you risk damage to your equipment.

50%
50%
carrigan
carrigan
11/23/2012 7:41:09 AM
User Rank
Blogger
Re: Optimization
Yes- you can do this without running a simulation, but you risk harming the device it is being run on. In this example if I evolved a strain that achieved temperatures up in the 600 degree range and was testing the strain in a real oven, I would most likely fry whatever was in the oven. The first few generations had errors of over 18000 degree seconds- the achieved profile looked nothing like the desired.

If your application doesn't mind getting incorrect outputs for the first few thousand times it runs, then you could absolutely skip the simulation and run this on your target. I think this would be interesting to try with robotics as long as they are in a sae environment.

50%
50%
northstar
northstar
11/22/2012 11:10:17 PM
User Rank
Program Manager
Realtime systems issues
For sure, I wouldn't put genetic algorithms in the car steering system. It might happens that the timing to be essential and genetic algorithms are not very good in being deterministic.

Regarding compiler optimizations, it is an interesting idea. One issue is that the generated code is not the same: compile 3 times the same code and get 3 different results (it is a possibility). So, no more saftey checkings could be made and a lot of testing is invalidated. But it might be interesting to use those algorithms in audio/video applications that are not real-time demanding and no safety involved. This could be a very good approach.

It might be also a good candidate for harvesting devices, that could benefit from an optimized solution, rather not optimal.\, but for sure saving a lot of energy.

50%
50%
BitBucket
BitBucket
11/22/2012 1:23:13 PM
User Rank
Blogger
Re: Optimization
This is a very cool idea. Extend the design cycle for the lifetime of the product. It could continually get better and better by using spare cycles to look for better results. If you had a dual core you could dedicate one to the application and one to evolution. In a single core system just time slice between the two of them. I guess the trick is figuring out when you have a better result. Can you do this without running a simulation or some other cycle intensive test? Not sure...

50%
50%
Curt Carpenter
Curt Carpenter
11/22/2012 10:38:45 AM
User Rank
Blogger
Re: What Hardware is Best?
I think the trick there is going to be defining "best."

50%
50%
Curt Carpenter
Curt Carpenter
11/22/2012 10:26:47 AM
User Rank
Blogger
Optimization
What a great experiment!  

I'd take a look at trying to find optimal taps for a digital filter using this approach.  That way, you'd be able to compare your results to the "standard" flter solutions and use the comparison data to help refine your algorithms.(*)

With techniques like this, you're always left wondering if another 10,000 iterations wouldn't have discovered a solution that's twice as good.   So I'd offer three ideas to extend the PID example.

1)  Continue to generate mutations throughout the life of the oven (perhaps using a seperate MCU core in the controller).   Iterations are, after all, cheap -- and you never know when you might get lucky.

2)  Let all of the ovens dial each other up via IoT and compare results, thus multiplying the rate of mutation within the population.

3)  As the oven ages, the fan and heating element will degrade.  "Close the loop" from the physical oven back into the genetic algorithm with some measurements, and you should have a system that not only endlessly seeks a better solution -- but also one that adapts to an aging system!

(*)  And filters enjoy a very wide range of application, so your experiments would have practical as well as theoretical value.

50%
50%
carrigan
carrigan
11/20/2012 8:34:23 PM
User Rank
Blogger
Re: What Hardware is Best?
BitBucket-

This kind of approach is perfect for multiple processors- Each child of a given generation does not depend on it's peers, and so it can run independant of whatever else is going on. I'm not sure that these algorithms would be good for some audio or video applications, but I think they could have excellent implications for certain areas. I'm sure that a genetic algorithm could be used to optimize things such as image recognition, audio learning, and video analysis. I would expect that the developer would use evolutionary algorithms to optimize the algorithms that the product uses and not implement the evolutionary algorithms into the products themselves.

I would love to see this kind of algorithm implemented in audio/visual applications.

50%
50%
BitBucket
BitBucket
11/20/2012 5:31:30 PM
User Rank
Blogger
What Hardware is Best?
I guess the question that comes to mind for me is what hardware would be best to run these types of algorithms? Would it be best to have many simple processors that can run in parallel and then 'vote' on what results are best? The winners would then be 'mutated' back into all the processors for another run. If we had 1,000 simple processors this could execute very fast- maybe even fast enough for audio or video data streams? Sounds like an FPGA might be a good approach.

Guess I need to study up on the info Rich left in his links. Anyone else have ideas on the best hardware implementation?

50%
50%
Page 1 / 2   >   >>
More Blogs from Brian Carrigan
Some day, someone (maybe you) will have to go back to an old project of yours and try to figure out how it worked and how to change it. Planning for project maintenance will pay off handsomely.
Programming video-game actions and using a Raspberry Pi with such games can inspire students to pursue careers in computer science or electrical engineering.
Brian Carrigan tests the assertion that C++ is a bloated stepchild of C.
As developers move to more powerful MCUs, they should consider moving to a more powerful programming language.
flash poll
MC on twitter
like us on facebook
Microcontroller Central    About Us     Contact Us     Help     Register     Twitter     Facebook     RSS