Using machine learning to achieve diffraction-limited performance with x-rays deformable mirrors

In a our last paper, we present the use of machine learning to get the most of x-ray adaptive optics – and it works like magic! This was a great work accomplished by Gautam Gunjala, a grad student from UC Berkeley under a SCGSR grant, together with our wonderful colleagues from the Advanced Photon Source.

X-ray adaptive mirrors are very nice, because they allow to correct the shape of x-ray beams, when the beam gets distorted by mirror deformation or misalignment. That’s why we want to use them in the latest generation of synchrotron light source such as ALS-U or APS-U.

The issue, though, is that they tend to be finicky. They work by adding a piezoelectric material on the surface, and applying a voltage. The piezoelectric material shrinks under that voltage, and causes stress on the substrate, thus bending it locally ever so slightly. That’s all good and well, but these material tend to creep, and have something called hysteresis: when you drive them one way and back, they don’t go to the same position. A solution is to measure the mirror shape or, better, the shape of the beam. However, this is very difficult, because it requires very high accuracy for the former (and therefore costly diagnostics), or to interrupt the beam (for the latter), since we do not have beamsplitters in the x-ray regime.

x-ray adaptive optics (at the Advanced Photon Source)

The other solution is to calibrate the mirror and have a good model to take into account for non-linear piezo-electric material behavior. This is however quite difficult to do, because these non-linear behaviors don’t compound very well: it is difficult to get a closed-form model to work. The idea then is to change the mirror shape at random, measure its shape, and let the machine learn how it goes from one position to the other. Hopefully, the resulting neural network will able to capture the complexity of the mirror behaviour: each neuron will act as a linear model, and compound with the other neurons to make a robust model.

And it works! We showed that using the regular “linear model” (based on so-called “influence function”), the residual error on the surface height tends to be in the order of 4 nm-rms, whereas to achieve optimal performance, we want this to be below 1 nm-rms. And we showed that we were able to predictively achieve this accuracy using the machine-learning method.

Not only the model works, but it is also stable in time (neural network built 6 months ago still perform well, under totally new conditions) and it is pretty simple to implement: all you need to do is to send random actuator commands and measure the mirror shape, much more convenient than painstaking measurement of influence functions. This makes it much easier to use in real-world situation, and can be used on all kinds of deformable mirror technologies (nano-benders, resistive elements, etc.)

Also, being able to precisely reach a position in open-loop (without measuring the wavefront) means that such deformable mirrors can be used in situations where wavefronts cannot be measured, like in the case of dispersed beam, and opens the door to new applications!

Gunjala, G., Wojdyla, A., Goldberg, K. A., Qiao, Z., Shi, X., Assoufid, L., & Waller, L. (2023). Data-driven modeling and control of an x-ray bimorph adaptive mirror. Journal of Synchrotron Radiation, 30.