Background: We're operating a small betatron which makes use of a vacuum tube where electrons are accelerated circularly. First, they get injected (like inserted) and contracted (like squeezed). After a while, these electrons exit the tube and hit a target and convert (hopefully) into photons which will be used as x-rays:
The amount of x-rays correspond to a deposited energy: The more x-rays, the higher the energy.
input parameters: injection time, injection length, contraction time, contraction length, current
output parameter: energy
Now the thing is, that these vacuum tubes don't last so long (some dozens up to hundreds of hours). The problem arises when such a tube is replaced as the individual operational parameters change as each of these tubes are some kind of unique: Their manufacture differs very slightly. And this causes a lot of effort on our side each time a tube is replaced. These tubes are operated by means of five parameters which are mostly electronic features (injection time, injection length, contraction time, contraction length, current). At the moment, we run a sloppy, greedy algorithm which was okish to get back to work but meanwhile it's clearly too much effort needed all the time. That's why we are looking to optimize this procedure. Do you have an idea how to figure out a promising algorithm (and for which an usable code exists)? I'm aware of some algorithms in general (evolutionary, salesman, gradient descent and stuff) but I totally lack any feeling or even a real broad and depth knowledge about this topic. I guess, in the end, it is located in control engineering. The algorithm needs to be run on a micro-controller and it should finish within some minutes but the faster, the better. The goal of the algorithm would be to find the highest deposited energy dose by checking these five parameters. The dose can be measured within/by the machine.
The tubes are operated via five parameters (injection time, injection length, contraction time, contraction length, current) which result in a certain amount of deposited energy, which is measured. So, the device should be able to control itself by varying those five parameters and, thus, maximizing the measured energy. I don't think there is any knowledge required about how betatrons work, as it's ultimately searching a landscape spanned by six parameters, of which five can be varied, and discovering the maximum. A difficulty might be, that there are several maxima. For sure, the global maximum is sought. The five control parameters are controlled electronically, so there shouldn't be any uncertainty about them.
edit: The calculations run on a UPD703103 NEC, which is a 32 bit single controller and the machine itself is controlled by a FPGA of which we don't have specs. One single parameter constellation is observed within 10-30 seconds. The whole process shouldn't last more than around 3 minutes. The point now is, the regions of all parameters are free (you can decide whether you wanna' scan current from 0 to 10 Ampere or within 5 to 15 Ampere or even only 7 to 10 Ampere and so on) as well as the step sizes. Ultimately, we wanna' maximize this here:
Ideally, there would be a single sharp peak at 100 but due to pulse-to-pulse variations, it's not that sharp. But the goal would be to come as close as possible to such a peak.