Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

AutoFocus: AI-driven alignment of nanofocusing X-ray mirror systems

Open Access Open Access

Abstract

We describe the application of an AI-driven system to autonomously align complex x-ray-focusing mirror systems, including mirrors systems with variable focus spot sizes. The system has been developed and studied on a digital twin of nanofocusing X-ray beamlines, built using advanced optical simulation tools calibrated with wavefront sensing data collected at the beamline.We experimentally demonstrated that the system is reliably capable of positioning a focused beam on the sample, both by simulating the variation of a beamline with random perturbations due to typical changes in the light source and optical elements over time, and by conducting similar tests on an actual focusing mirror system.

© 2023 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. Introduction

The fourth-generation synchrotron radiation facility represents a significant advancement in X-ray brightness, offering exciting possibilities for enhanced speed and resolution in X-ray characterization. For example, these sources will enable extremely high resolution imaging studies of materials and devices in near real-time, unlocking new applications like the analysis of defects in solar materials and batteries and tracking catalytic activity within individual catalyst particles. However, fully realizing this potential necessitates highly focused hard X-ray beams with minimal wavefront distortion, exceptional stability, and, in some applications, adjustable focal spot sizes. Preserving the wavefront and coherence of the beam is vital for applications like tomography and coherent X-ray scattering experiments [1,2]. Wavefront distortions can lead to a deterioration of the sample speckle contrast, which could hinder data interpretation [3] and render phase retrieval challenging or impossible.

To fulfill the above-mentioned rigorous demands, beamline optical elements must be manufactured to exact specifications [4,5], be able to automatically and repeatably self-align and provide real-time correction to wavefront deformations to focus the beam to the desired spot size [6]. A possible solution to these challenges is the implementation of adaptive optics (AO), a system that dynamically corrects wavefront aberrations using modulating devices such as deformable mirrors [7]. Successful implementation of such an optic requires high-precision components and a sophisticated control system, such as those needed for a nanofocusing AO mirror system that integrates deformable mirrors, in-situ surface profilers, specialized wavefront sensors, and an advanced feedback control system [8,9].

The performance of AOs relies on the linearity, dynamics, and repeatability of the optics response to various actuator formats, including mechanical bending, piezoelectric bimorph, and thermal loading [8,9]. The traditional iterative control method based on linear response models is often slow to converge, taking significant time [10,11]. Faster shape control has bean achieved by means of a complex, closed-loop feedback systems based on an array of interferometric sensors [12]. We have recently demonstrated the possibility of controlling a new-generation bimorph mirror using machine learning (ML) [13], with a single-measurement wavefront sensor based on a coded-mask technique [14,15]. A neural network (NN) based controller was trained with the measured one-dimensional wavefront differential phase and achieved (with a response time of a few seconds) the desired wavefront shapes with sub-wavelength (λ) accuracy at 20 keV, a significant improvement compared with the traditional linear model. However, the success of such an ML system relies heavily on the stability and repeatability of the conditions under which the training data are collected. We concluded that the control system could be enhanced by coupling with an auto-alignment system that rapidly responds to beam property changes and restores the optimal conditions.

Furthermore, an auto-alignment/focusing system can be fundamental for future beamline operations, especially for beamlines with numerous degrees of freedom. Manual alignment and optimization, even when limited to a few degrees of freedom, often fail to achieve an optimal configuration, and stability may be affected by changes in electron beam conditions or environmental fluctuations. Given the complex and demanding nature of the fourth-generation synchrotron beamlines, manual approaches may be inefficient and, in many cases, nearly impossible. Instead, emerging AI-driven auto-alignment control methods using ML [16,17] and optimization algorithms [18] are being developed. They aim to reduce alignment time, allow dynamic adjustments to the coherent focal spot size, and conserve valuable experimental time, marking a promising direction for the next generation of synchrotron radiation facility operations.

In this study, advanced and ultra-realistic OASYS simulations [1921] of two beamlines at the Advanced Photon Source (APS) of Argonne National Laboratory (ANL) were utilized to demonstrate that Bayesian optimization (BO) with Gaussian processes (GPs) is a robust and efficient approach for auto-aligning X-ray focusing systems. The BO-GP method allowed for an unbiased exploration of large parameter spaces, finding globally optimal solutions even in noisy situations. It is data-efficient and overcomes the issues of methods like reinforcement learning that need large data volumes and lack robustness to significant upstream drifts in the beam structure [2224].

The approach was developed through the creation of a precise digital twin of the station C of the 34-ID beamline at the APS, fine-tuned using actual calibration measurements from the beamline. Virtual alignments were studied on the digital twin of 34-ID-C before being experimentally tested using a similar digital twin of station B of the 28-ID Instrumentation Development, Evaluation, & Analysis Beamline (IDEA) beamline at the APS. The entire control software was integrated into an object-oriented framework allowing dynamic and transparent switching between real and simulated hardware.

2. Focusing optical systems

This section describes the two focusing optical systems employed to create and test the automatic AI-driven controller. The 34-ID-C station focusing system was first fully characterized to develop an accurate digital twin to study and identify the optimal strategy for AI implementation. We assembled a similar system at the 28-ID-B station for experimental validation and comprehensively characterized its digital twin. This allowed us to simulate the experiments, assess potential limitations, identify possible issues, and predict outcomes.

2.1 34-ID beamline

The 34-ID beamline at the APS hosts two experimental stations: the Laue diffraction microscopy instrument (34-ID-E) and the Coherent Diffraction Imaging instrument (34-ID-C) [25]. The characteristics of the undulator source and the beamline layout can be found in the Supplemental Document, Section S1.1. The monochromator was tuned to an energy of 10 keV ($\lambda $ = 0.124 nm) using the 1st harmonic of the undulator.

Station 34-ID-C uses a bendable Kirkpatrick–Baez (KB) mirrors system as the final focusing optics [26] shown in Fig. 1(a). A set of slits is employed upstream of the KB mirrors to select the coherent fraction of the monochromatic beam.

 figure: Fig. 1.

Fig. 1. (a) Photograph of the KB-mirror system at the 34-ID-C station and (b) schematic of the four-bar bender design.

Download Full Size | PDF

The typical spot size is ∼500 × 500 nm2 at the sample position, ∼70 mm downstream of the end of the horizontally focusing mirror of the KB pair. A layer of Au nanoparticles (100-200 nm) deposited on a Si substrate is placed at the sample position to determine the focal spot size. The diffraction signal of the 111-family planes of an individual Au nanoparticle is captured by an area detector and integrated. Motors on the sample holder allow scanning in the transverse plane to provide the horizontal and vertical beam profiles.

Each mirror is equipped with four motors, as shown in Fig. 1(b). Motors 1 and 2 control upstream and downstream bending forces of the four-bar bender, respectively, while motor 3 adjusts the mirror incidence angle, and motor 4 moves the mirror position in the direction normal to its surface.

2.2 28-ID beamline

The 28-ID beamline was designed to characterize the performance of state-of-the-art X-ray optics and devices planned for the APS Upgrade (APS-U) project. Additionally, this beamline serves as a testing ground to validate, optimize, and refine new optical concepts and control strategies proposed for APS-U beamlines. The source parameters and beamline layout is reported in the supplemental document, Section S1.2. The monochromator was tuned to an energy of 20 keV ($\lambda $ = 0.062 nm) using the 5th harmonic of the undulator.

In station 28-ID-B, we assembled a KB mirror focusing system consisting of an outboard-reflecting, horizontally focusing bendable mirror using an in-house flexure bender design [27] (Fig. 2(c) and 2(d)) and an upward-reflecting PZT (lead zirconate titanate) bimorph mirror manufactured by JTEC Corporation (Osaka, Japan) for vertical focusing (Fig. 2(a)).

The bender mirror is Pt-coated on a silicon substrate shaped in a trapezoidal form with dimensions measuring 300 mm in length, 36.28 mm at the wide end, 19.32 mm at the narrow end, and 12 mm in thickness. Bending moments are applied to both ends of the mirror through a flexure mechanism, with a piezo linear actuator on each side providing the force. To guarantee bending reproducibility, the positions of the bending arms are continually monitored by two capacitive sensors.

As shown in Fig. 2(b), the bimorph mirror is Pt-coated with an active area of 150 mm (length) × 8 mm (width) on a silicon substrate with a dimension of 160 mm (length) × 50 mm (width) × 10 mm (thickness). Two piezoelectric strips, with 18 separate electrodes on each stripe, are glued on the top surface of the mirror, sandwiching the active area. Each pair of electrodes, at the same position along the strips, forms one actuator capable of modifying the local surface shape, thus forming a total of 18 local surface actuator channels (ch1-ch18). Two long piezo strips are glued to the bottom surface of the mirror, forming a single global bender actuator (ch20) capable of shaping the entire optical surface. A grounded channel (ch19) is on the backside of all piezo stripes. In this study, we only utilized the global bender, keeping the surface actuators in a rest position by setting their channel voltages to 500 V.

Both mirrors were operated at a grazing angle of 3 mrad. A scintillator-based X-ray detector was placed at the focal plane of the KB mirror, providing 2D images of the transverse profile of the beam. The focal spot was set at ∼2.3 m from the vertical mirror center (∼3.1 m from the horizontal one), with a typical size of around 10 × 2 µm2.

3. Software driver for the optical systems and their digital twins

As a simulation engine, we adopted the kernel libraries of OASYS [19], to create the ultra-realistic digital twin of the two beamlines. The architecture has a command interface consistent across the real hardware drivers and the simulated digital twin. Figure 3 shows the class diagram of the software for the focusing system of the 34-ID beamline, a schematic that was also adapted for the 28-ID beamline.

 figure: Fig. 2.

Fig. 2. KB-mirror system at 28-ID-B station: upward-reflective, vertically focusing bimorph mirror, with visible 18 electrode pairs for the local shaping actuators and the optical surface sandwiched between the electrodes (a), schematic for substrate dimensions and the piezo electrode channels (b); outward-reflecting, horizontally focusing bendable mirror (c) and detail of the flexure bender (d).

Download Full Size | PDF

 figure: Fig. 3.

Fig. 3. UML diagram of the software to drive the focusing system of 34-ID. The interface (34IDAbstractFocusingOptics) is implemented by both the hardware driver (right side of the diagram) and the digital twins (left side of the diagram, with different implementation corresponding to different simulation strategies).

Download Full Size | PDF

Both the simulated digital twins and the real hardware controller, implemented using Experimental Physics and Industrial Control System (EPICS) [28], share a common interface for controlling the motors. From a software engineering perspective, the architecture follows a Facade design pattern [29] that allows one to choose the specific implementation. Once the controller instance is obtained, with initial parameters varying between the digital twin and real beamline, it is used by the AI-driven controller without regard for the chosen implementation. The complete code is available in the public online repository [30].

Within the OASYS suite, we used the ray-tracing program ShadowOui [31] as the main tool to design and prepare the software framework. In addition, several advanced tools have been used to provide the necessary level of realism to the simulations, such as the Hybrid method [31], the wave optics program Synchrotron Radiation Workshop (SRW) [32], the DABAM online metrology database tools [33] and analytical models to generate surface profiles created by the different bender designs at the two beamlines [26,34]. In addition, we needed to represent the behavior of the bendable mirrors under operating conditions, taking into account that not only the upstream and downstream bender motors can be activated separately, but real controllers often operate on different units, such as voltages or distances, depending on the type of motors (e.g., piezometric or stepper motors) that drive the bending mechanism.

Details on the our simulation strategies and calibrations with real data can be found in supplemental document, Section S2.

Figure 4 illustrates the comparison between the measured signal and the simulated one at the 34-ID-C station, with identical motor setup, in both at-focus and out-of-focus conditions. All the combined features provided by OASYS lead to an excellent agreement between the simulation and measurements, ensuring that any conclusions drawn from studies on simulated data will be valid and applicable to the real beamline.

 figure: Fig. 4.

Fig. 4. Comparison of simulated beam profiles (red line) with measured data collected at the 34-ID-C station (blue dotted line): at focus - horizontal (a) and vertical (b) profiles, out of focus (bender motors position +5 µm) - horizontal (c) and vertical (d) profiles.

Download Full Size | PDF

Figure 5 shows a comparison between the measured and simulated focal spots at the 28-ID-B station: whilst an overall very good agreement is achieved with regard to central focused spot size, the features in the vertical direction (coma, tails), are not present because of missing information on the vertical mirror surface profile (see supplemental document, Section S2 for details).

 figure: Fig. 5.

Fig. 5. Measured (a) and simulated (b) beam images at the 28-ID-B station.

Download Full Size | PDF

4. AI-driven auto-alignment

In this work we adopted Multi-Objective Bayesian Optimization (MOBO) as the AI tool to drive the optics towards optimal beam properties. Definitions and extensive, detailed description of this technology and our approach are provided in the Supplemental Document, Section S3.

In pursuing the goal of auto-alignment, we need to consider both the position of the beam maximum and the intensity distribution around this maximum. To capture these aspects, we define three optimization objectives related to the full width at half-maximum ($FWHM$) of the beam, the location of the peak ($PL$), and the negative logarithm of the peak intensity ($NLPI$), given by,

$$\begin{aligned} FWHM &= \sqrt {FWH{M_H}^2 + FWH{M_V}^2} \\ PL &= \sqrt {{P_H}^2 + {P_V}^2} \\ NLPI &={-} \textrm{log}{P_{int}} \end{aligned}$$

Here, $FWH{M_H}$ and $FWH{M_V}$ denote the full width at half-maximum along the horizontal (or $x$) and vertical (or $y$) directions, respectively, ${P_H}$ and ${P_V}$ represent the horizontal and vertical distances of the beam peak from the desired peak location, respectively, and ${P_{int}}$ indicates the peak intensity of the beam.

4.1 Development of the AI-driven controller on 34-ID-C digital twin

We first developed and tested the MOBO autofocusing routine on the focusing optics setup in the 34-ID-C digital twin. In the KB-mirror setup (described in Section 1.1), each mirror is tuned using four motors to adjust the upstream and downstream bending forces, the incident angle (or pitch), and the position (or translation) of the mirror. This results in a total of eight optimization parameters. The collected data consists of 1D vertical and horizontal beam profiles obtained using the diffractometer scan. Given the complexity of defining a single peak intensity value for the data, the optimization was conducted using only the $FWHM$ and $PL$ objectives.

For the 34-ID-C numerical experiments, we started with a manually tuned structure obtained using $1,000,000$ source rays and no background (Figs. 6(a), 6(b), 6(d)). A random shift was applied to the mirror motors to obtain the initial misaligned structure for the optimization (Figs. 6(a), 6(b), 6(e)). The MOBO routine was configured with the objective values of the initial structure as the hypervolume reference point and with a constraint of $\ge 6,000$ rays on the integral rays count to ensure that the beam did not drift out of bounds. We started with 10 steps of Sobol sampling followed by 140 steps of the GP-based acquisition and sampling for the full parameter set.

 figure: Fig. 6.

Fig. 6. MOBO auto-alignment for the 34-ID-C digital twin.(a) and (b) show the 1D x and y beam profiles, respectively, obtained as data for the manually optimized reference structure (M), the initial structure (I), and the Nash solution (NS) structure. (c) The scatter plot for the optimization objectives (FWHM and PL) with the colors indicating the trial number. (d-i) show the actual 2D profiles (not used for the optimization) of the beam at the diffractometer position: (d) reference, (e) initial, (f) NS solution, and (g-i) other Pareto optimal beam profiles. The number at the lower right in (e-i) indicate the number of trial at which we sample these structures, and the text box contains the calculated FWHM $({\mu m} )$ in the horizontal (fH) and vertical (fV) directions and the distance of the calculated peak ($\mu m)$ in the horizontal (pH) and vertical (pV) directions.

Download Full Size | PDF

The results of the numerical experiment are shown in Fig. 6, with Figs. 6(a)–6(b) displaying the collected data for the reference optimized structure, the initial misaligned structure, and the Nash solution, while Figs. 6(d)–6(i) show the 2D beam profiles at the diffractometer position. Note that these 2D profiles were not available and not used for the optimization during a beamline experiment but are provided here for reference and analysis. The results indicate that the MOBO routine produces a highly compact structure comparable to the reference structure. The motor parameter values for the reference, random, and PF structures are listed in Table 1. Differences in such parameter values, between the reference and optimized structures, are consistent with the expected dynamic and behavior of the optical system.

Tables Icon

Table 1. Parameter values for the reference, random, NS, and candidate solution structures for the 34-ID-C digital twin. The columns contain the parameter values for benders (Hb1 and Hb2), pitch (Hb_pitch) and translation (Hb_trans) for the horizontal KB mirror and corresponding parameters for the vertical one.

4.2 Test of the AI-driven controller on 28-ID-B digital twin

After refining the MOBO routine through the 34-ID-C digital twin experiment, we adapted the procedure for application to the 28-ID beamline. Since the data collected in this setting are 2D images, we can define the $NLPI $ objective. We determined using the digital twin that the use of full set of objectives objectives $({FWHM,PL,NLPI} )$ is most effective for the beam optimization.

We initiated the numerical experiment with $50,000$ source rays, excluding background noise. Again, a manually tuned structure was used as a starting point (Fig. 7(a)), followed by a random shift to the parameters to obtain the initial misaligned structure (Fig. 7(b)). For this experiment, the objective value of the initial structure served as the hypervolume reference. Additionally, a constraint was imposed to maintain the integral rays count at $\ge 1,000$ rays, which helped guide the sampling away from the out-of-bounds region. The optimization procedure was launched with 10 steps of Sobol sampling followed by 140 steps of GP-based sampling.

 figure: Fig. 7.

Fig. 7. MOBO auto-alignment for the 28-ID-B digital twin. (a) The manually tuned (M) focused structure. (b) The initial structure obtained by randomly shifting the parameters. (c) The Nash solution (NS) structure selected after the optimization. (d-e) Other structures in the Pareto front. Subplots (b-e) are similar to the corresponding subplots in Fig. 8, only with the addition of the peak intensity count (pI) information in the text boxes. (f-h) 2D projections of the 3D scatter plot of the optimization objectives with the colors indicating the trial number.

Download Full Size | PDF

The optimization results are illustrated in Fig. 7, with the NS beam structure (Fig. 7(c)) selected as a posteriori, the remaining PF structures (Figs. 7(d)–7(e)), and scatter plots (Figs. 7(f)–7 h) showing the spread and the history of the sampled objective values. The structures in the Pareto front form an envelope in the lower-left region (the desirable region) of the scatter plots, with each structure being an optimal solution based on different tradeoffs among the objectives. The optimal parameter values, the initial settings, and the values associated with the PF structures are compiled in Table 2.

Tables Icon

Table 2. Parameter values for the reference, random, NS, and candidate solution structures for the 28-ID-B digital twin. The columns contain the parameter values for benders (Hb1 and Hb2), pitch (Hb_pitch) and translation (Hb_trans) for the horizontal bender mirror and corresponding parameters for the vertical bimorph mirror.

A noteworthy observation is that the candidate solution in Fig. 7(d) contains a long tail in the horizontal direction but has a low $FWHM$ value. This uncovers the limitation of using the FWHM metric: it does not adequately account for non-Gaussian structures with long tails. As a consequence, the NS structure has lower FWHM than the reference structure, but is not as compact and also has a lower peak intensity count.

5. AI-driven controller in operating conditions

After the numerical validation through the digital twin, we tested the auto-alignment procedure in a real-world setting at the 28-ID-B station. We conducted two key experiments: i) the alignment of an unfocused structure into a compact, focused structure, and ii) the alignment towards a specific predefined structure.

5.1 Obtaining a compact, focused structure

To evaluate this fundamental auto-alignment routine, we started from a significantly misaligned structure, as shown in Fig. 8(a). Since this was a proof-of-concept exercise conducted in a real, noisy environment, we used looser criteria for the hypervolume reference point, setting them to the suboptimal values of $FWH{M_{HR}} = 40\; \mu \textrm{m}$, $P{L_{HR}} = 50\; \mu \textrm{m}$, $NLP{I_{HR}} = \infty $, and did not apply any constraints on the integral rays counts. We again performed 10 steps of Sobol sampling across the full parameter space to initialize the MOBO calculation, followed by 100 optimization steps involving all parameters. The experiment was conducted using the same search space as in the numerical experiment with the digital twin.

 figure: Fig. 8.

Fig. 8. MOBO auto-alignment experimental validation at the 28-ID-B station. (A) The initial structure, (B) the Nash solution, and (C-E) the 2D projections of the 3D scatter plot of the optimization objectives, with the colors indicating the trial number and the circled points indicating the structures in the Pareto front.

Download Full Size | PDF

The results shown in Fig. 8 confirm that the MOBO procedure succeeded in producing a compact structure. However, the aberration and background in the experimental data led to the acquisition of structures with a range of FWHM values but similar peak locations and intensities. The PF structures also showed the same trend (see Supplemental Document, Fig. S3). Furthermore, Figs. 8(c)–8(e) reveal that the first few optimization iterations were sufficient to discover the central region with favorable candidate structures; the subsequent iterations attempted to find the optimal parameter settings within this favorable region.

5.2 Obtaining a structure with specific desired properties

In practical applications, we often desire a structure with a specific shape or level of defocus rather than the most compact focused structure. To emulate this type of alignment challenge, we used the arbitrarily chosen horizontal and vertical $FWHM$ values, $FWH{M_{H,R}} = 18\; \mathrm{\mu}\textrm{m}$, $FWH{M_{V,R}}\; = \; 7\; \mathrm{\mu}\textrm{m}$ respectively, as the reference or desired beam properties. We then modified the $FWHM $ objective in Eq. (1) to

$$ FWH{M_{ref}} = \sqrt {{{({FWH{M_H} - FWH{M_{H,R}}} )}^2} + {{({FWH{M_V} - FWH{M_{V,R}}} )}^2}} $$
We used the starting structure shown in Fig. 9(a) and performed a two-step optimization routine with 10 steps of Sobol and 40 steps of GP-based sampling for translation and pitch parameter subset, followed by 100 sampling steps for the entire parameter set. We note that the efficacy of this two-step method over a one-step optimization for this experimental setup remains undetermined. We used the same hypervolume reference point (excluding the $NLPI$ term) from Section 5.1 for the modified objectives. The results in Fig. 9 show that the MOBO procedure produced a structure with properties close to the reference values.

 figure: Fig. 9.

Fig. 9. Alignment to a reference structure. (a) The random initial structure, (b) the Nash solution, and (c) the remaining structure in the Pareto front. (d) The change in the optimization objective through the optimization trials.

Download Full Size | PDF

5.3 Challenges and considerations

Among the optimization objectives we employed, peak location and peak intensity consistently perform well under all scenarios. However, using FWHM as an optimization objective presents challenges, as it does not consider the presence of long tails or other non-Gaussian features in the beam structure. Moreover, defining the precise shape and location of the beam can become difficult in the presence of background interference and noise. A partial solution could be to use more generic measures for the beam width, such as the root mean square (rms) of the beam distribution, for the optimization of non-Gaussian beam profiles, as it happens for highly coherent beams, that have diffraction fringes and/or diffused scattering features/halos around the focused peak. More accurate denoising and beam characterization criteria would be hardware-specific and require careful consideration for each particular experiment setting.

A different challenge arises when aiming to align to more complex beam profiles that cannot be simply characterized by the width and peak location. In such cases, we would need to consider one of two approaches: either use a more sophisticated metric like the Wasserstein distance to characterize the structural differences between two beam profiles, or apply numerical inversion techniques [15] or neural network approaches [13] for the precise beam alignment. Specifically for the latter approach, it can still be beneficial to perform a fast and rough alignment using the procedure described in this work before fine-tuning it with another technique.

Furthermore, we believe it is feasible to enhance the robustness and efficiency of the proposed auto-alignment approach through further research in several directions. Firstly, careful consideration and potential dynamic tuning of constraints, the hypervolume reference point, and even the search space could significantly improve the efficiency of the auto-alignment routine. Secondly, if the overall goal of the experiment is to maintain a stable optical system through multiple runs of the autofocusing routine, then reusing the information acquired in one auto-alignment run could accelerate future auto-alignments on the same optical system. Alternatively, in a more sophisticated approach, we could exploit the idea of multi-fidelity optimization to create and dynamically update a complex GP-based (or NN-based) model of the optical system, then exploit this extra surrogate for accelerated optimization. Future work might also include designing a reinforcement learning procedure that utilizes the GP-based surrogate model for data-efficient real-time beam stabilization and control [24].

In addition, directly measuring the focal spot using a 2D detector, especially when the spot size is below 100 nm, is exceptionally challenging. Presently, no detector system can provide the necessary spatial resolution for this task. Potential measurement methods include fluorescence edge scans, ptychography, and wavefront sensing. Among these, wavefront sensing emerges as the only single-shot option. In this approach, the wavefront downstream of the focal plane is captured and then backpropagated to pinpoint the focal plane and determine its associated size and position.

6. Conclusions

This paper reports on an AI-driven system to achieve auto-alignment of nanofocusing KB-mirror systems within next-generation synchrotron radiation beamlines. Through the intricate development and comprehensive study of an ultra-realistic digital twin representing two distinct beamlines, we have systematically explored and refined the control system, verifying its applicability in real-world scenarios. Our successful experimental demonstration at a X-ray beamline using real focusing KB mirrors highlights the system's capability to create a focused beam and mold beam structures into specific shapes.

Marking one of the pioneering steps towards complete automation of future beamline operation and optimization, this work aligns seamlessly with our previous studies that employed ML-based control systems for multi-variable adaptive mirror control. Together, these advancements forecast a significant breakthrough in beamline automation, unlocking scientific research avenues previously out of reach.

This study not only confirms the feasibility of the new method but also establishes a robust foundation for anticipated future enhancements. We expect diligent refinement and continued testing, particularly in cutting-edge research domains such as Bayesian optimization and reinforcement learning, will unveil even more capabilities. These developments will serve as crucial elements in the toolkit of modern technological innovation, with potential impacts that could reshape our understanding of optics and automation.

This work represents a significant step towards more complex applications, such as autonomous mirror-based zoom optics systems that can dynamically change focal spot sizes [8] for in-situ experiments, such as electrochemical dissolution and growth, vital in fields like electrocatalysis, synthesis, and corrosion. Such dynamic control, adapting to sample sizes changing on a minute scale, demands optimization of many parameters – an almost impossible task manually. The algorithm developed here not only guides the optics to an optimal setup but maintains it, offering potential gains in accuracy and reliability for ML-driven controllers of Adaptive Optics (AOs) in correcting residual aberrations [13]. This research paves the way for new capabilities in coherent nanoprobe beamlines, enabling experiments that track sub-nanometer structural evolution for various applications

Funding

Department of Energy, Office of Science, Office of Basic Energy Sciences (DE-AC02-06CH11357).

Disclosures

The authors declare no conflicts of interest in this paper.

Data availability

Data underlying the results presented in this paper are not publicly available at this time, but may be obtained from the authors upon reasonable request.

Supplemental document

See Supplement 1 for supporting content.

References

1. M. Yabashi, K. Tono, H. Mimura, et al., “Optics for coherent X-ray applications,” J. Synchrotron Radiat. 21(5), 976–985 (2014). [CrossRef]  

2. A. Rack, T. Weitkamp, L. Assoufid, et al., “Protocol to study wavefront preservation capabilities of reflective X-ray optics with coherent synchrotron light,” Nucl. Instrum. Methods Phys. Res., Sect. A 710, 101–105 (2013). [CrossRef]  

3. A. Zozulya, A. Shabalin, H. Schulte-Schrepping, et al., “Wavefront preserving channel-cut optics for coherent x-ray scattering experiments at the P10 beamline at PETRAIII,” J. Phys.: Conf. Ser. 499, 012003 (2014). [CrossRef]  

4. S. Matsuyama, H. Mimura, H. Yumoto, et al., “Diffraction-limited two-dimensional hard-x-ray focusing at the 100 nm level using a Kirkpatrick-Baez mirror arrangement,” Rev. Sci. Instrum. 76(8), 083114 (2005). [CrossRef]  

5. T. Kolodziej, S. Stoupin, W. Grizolli, et al., “Efficiency and coherence preservation studies of Be refractive lenses for XFELO application,” J. Synchrotron Radiat. 25(2), 354–360 (2018). DOI: [CrossRef]  

6. D. Cocco, G. Cutler, M. Sanchez del Rio, et al., “Wavefront preserving X-ray optics for Synchrotron and Free Electron Laser photon beam transport systems,” Phys. Rep. 974, 1–40 (2022). [CrossRef]  

7. I.-T. Nistea, S. G. Alcock, V. Badami, et al., “Controlling an active bimorph deformable mirror with sub-nanometre resolution,” Proc. SPIE 11109, 13 (2019). [CrossRef]  

8. X. Shi, Z. Qiao, S. Mashrafi, et al., “Prototype design and experimental tests of a zoom mirror system for the APS upgrade,” Proc. SPIE 11491, 34 (2020). [CrossRef]  

9. S. Mashrafi, R. Harder, X. Shi, et al., “Machine learning control of an elliptically bent hard X-ray mirror,” Proc. SPIE 11491, 28 (2020). [CrossRef]  

10. D. Cocco, C. Hardin, D. Morton, et al., “Adaptive shape control of wavefront-preserving X-ray mirrors with active cooling and heating,” Opt. Express 28(13), 19242–19254 (2020). [CrossRef]  

11. H. Wang, K. Sawhney, S. Berujon, et al., “Fast optimization of a bimorph mirror using x-ray grating interferometry,” Opt. Lett. 39(8), 2518–2521 (2014). [CrossRef]  

12. S. G. Alcock, I.-T. Nistea, V. G. Badami, et al., “Fast shaping control of x ray beams using a closed-loop adaptive bimorph deformable mirror,” Optica 10(2), 172–182 (2023). [CrossRef]  

13. L. Rebuffi, X. Shi, Z. Qiao, et al., “Real-time machine-learning-driven control system of a deformable mirror for achieving aberration-free X-ray wavefronts,” Opt. Express 31(13), 21264 (2023). [CrossRef]  

14. Z. Qiao, X. Shi, M. J. Wojcik, et al., “Single-shot x-ray phase-contrast and dark-field imaging based on coded binary phase mask,” Appl. Phys. Lett. 119(1), 011105 (2021). [CrossRef]  

15. Z. Qiao, X. Shi, R. Celestre, et al., “Wavelet-transform-based speckle vector tracking method for X-ray phase imaging,” Opt. Express 28(22), 33053 (2020). [CrossRef]  

16. T. W. Morris, M. Rakitin, A. Giles, et al., “On-the-fly optimization of synchrotron beamlines using machine learning,” Proc. SPIE 12222, 22 (2022). [CrossRef]  

17. B. Nash, D. T. Abell, R. Nagler, et al., “Combining diagnostics, modeling, and control systems for automated alignment of the TES beamline,” J. Phys.: Conf. Ser. 2380(1), 012103 (2022). [CrossRef]  

18. J. Zhang, P. Qi, and J. Wang, “Multi-objective genetic algorithm for synchrotron radiation beamline optimization,” J. Synchrotron Radiat. 30(1), 51–56 (2023). [CrossRef]  

19. L. Rebuffi and X. Shi, “Advanced simulation tools in the OASYS suite and their applications to the APS-U optical design,” Proc. SPIE 11493, 1 (2020). [CrossRef]  

20. L. Rebuffi, X. Shi, M. Sanchez del Rio, et al., “A ray-tracing algorithm for ab-initio calculation of thermal load in undulator-based synchrotron beamlines,” J. Synchrotron Radiat. 27(5), 1108–1120 (2020). [CrossRef]  

21. M. Sanchez del Rio, R. Celestre, M. Glass, et al., “A hierarchical approach for modeling X-ray beamlines: application to a coherent beamline,” J. Synchrotron Radiat. 26(6), 1887–1901 (2019). [CrossRef]  

22. P. I. Frazier, “A Tutorial on Bayesian Optimization,” arXiv, arXiv:1807.02811v1 (2018). [CrossRef]  

23. R. Garnett, Bayesian Optimization, (Cambridge University Press, 2023).

24. G. Dulac-Arnold, N. Levine, D. J. Mankowitz, et al., “An empirical investigation of the challenges of real-world reinforcement learning,” arXiv, arXiv:2003.11881 (2021). [CrossRef]  

25. A. Pateras, R. Harder, W. Cha, et al., “Combining Laue diffraction with Bragg coherent diffraction imaging at 34-ID-C,” J. Synchrotron Radiat. 27(5), 1430–1437 (2020). [CrossRef]  

26. P. J. Eng, M. Newville, M. L. Rivers, et al., “Dynamically figured Kirkpatrick Baez x-ray microfocusing optics,” Proc. SPIE 3449, 145–156 (1998). [CrossRef]  

27. D. Shu, V. De Andrade, J. Anton, et al., “Mechanical design of a flexural nanopositioning stage system for hard x-ray nanofocusing at the Advanced Photon Source 32-ID-C station,” Proc. SPIE 11112, 22 (2019). [CrossRef]  

28. http://www.aps.anl.gov/epics/.

29. E. Gamma, R. Helm, R. Johnson, et al., Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., USA (1995).

30. https://github.com/AI-ML-at-APS/AI-ML_Control_System.

31. L. Rebuffi and M. Sanchez del Rio, “ShadowOui: a new visual environment for X-ray optics and synchrotron beamline simulations,” J. Synchrotron Radiat. 23(6), 1357–1367 (2016). [CrossRef]  

32. O. Chubar, A. Fluerasu, L. Berman, et al., “Wavefront propagation simulations for beamlines and experiments with “Synchrotron Radiation Workshop”,” J. Phys.: Conf. Ser. 425(16), 162001 (2013). [CrossRef]  

33. M. Sanchez del Rio, D. Bianchi, D. Cocco, et al., “DABAM: an open-source database of X-ray mirrors metrology,” J. Synchrotron Radiat. 23(3), 665–678 (2016). [CrossRef]  

34. M. R. Howells, D. Cambie, R. M. Duarte, et al., “Exact revision of the elliptically bent mirror theory,” Opt. Eng. 39(10), 2748 (2000). [CrossRef]  

Supplementary Material (1)

NameDescription
Supplement 1       Technical Details

Data availability

Data underlying the results presented in this paper are not publicly available at this time, but may be obtained from the authors upon reasonable request.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (9)

Fig. 1.
Fig. 1. (a) Photograph of the KB-mirror system at the 34-ID-C station and (b) schematic of the four-bar bender design.
Fig. 2.
Fig. 2. KB-mirror system at 28-ID-B station: upward-reflective, vertically focusing bimorph mirror, with visible 18 electrode pairs for the local shaping actuators and the optical surface sandwiched between the electrodes (a), schematic for substrate dimensions and the piezo electrode channels (b); outward-reflecting, horizontally focusing bendable mirror (c) and detail of the flexure bender (d).
Fig. 3.
Fig. 3. UML diagram of the software to drive the focusing system of 34-ID. The interface (34IDAbstractFocusingOptics) is implemented by both the hardware driver (right side of the diagram) and the digital twins (left side of the diagram, with different implementation corresponding to different simulation strategies).
Fig. 4.
Fig. 4. Comparison of simulated beam profiles (red line) with measured data collected at the 34-ID-C station (blue dotted line): at focus - horizontal (a) and vertical (b) profiles, out of focus (bender motors position +5 µm) - horizontal (c) and vertical (d) profiles.
Fig. 5.
Fig. 5. Measured (a) and simulated (b) beam images at the 28-ID-B station.
Fig. 6.
Fig. 6. MOBO auto-alignment for the 34-ID-C digital twin.(a) and (b) show the 1D x and y beam profiles, respectively, obtained as data for the manually optimized reference structure (M), the initial structure (I), and the Nash solution (NS) structure. (c) The scatter plot for the optimization objectives (FWHM and PL) with the colors indicating the trial number. (d-i) show the actual 2D profiles (not used for the optimization) of the beam at the diffractometer position: (d) reference, (e) initial, (f) NS solution, and (g-i) other Pareto optimal beam profiles. The number at the lower right in (e-i) indicate the number of trial at which we sample these structures, and the text box contains the calculated FWHM $({\mu m} )$ in the horizontal (fH) and vertical (fV) directions and the distance of the calculated peak ($\mu m)$ in the horizontal (pH) and vertical (pV) directions.
Fig. 7.
Fig. 7. MOBO auto-alignment for the 28-ID-B digital twin. (a) The manually tuned (M) focused structure. (b) The initial structure obtained by randomly shifting the parameters. (c) The Nash solution (NS) structure selected after the optimization. (d-e) Other structures in the Pareto front. Subplots (b-e) are similar to the corresponding subplots in Fig. 8, only with the addition of the peak intensity count (pI) information in the text boxes. (f-h) 2D projections of the 3D scatter plot of the optimization objectives with the colors indicating the trial number.
Fig. 8.
Fig. 8. MOBO auto-alignment experimental validation at the 28-ID-B station. (A) The initial structure, (B) the Nash solution, and (C-E) the 2D projections of the 3D scatter plot of the optimization objectives, with the colors indicating the trial number and the circled points indicating the structures in the Pareto front.
Fig. 9.
Fig. 9. Alignment to a reference structure. (a) The random initial structure, (b) the Nash solution, and (c) the remaining structure in the Pareto front. (d) The change in the optimization objective through the optimization trials.

Tables (2)

Tables Icon

Table 1. Parameter values for the reference, random, NS, and candidate solution structures for the 34-ID-C digital twin. The columns contain the parameter values for benders (Hb1 and Hb2), pitch (Hb_pitch) and translation (Hb_trans) for the horizontal KB mirror and corresponding parameters for the vertical one.

Tables Icon

Table 2. Parameter values for the reference, random, NS, and candidate solution structures for the 28-ID-B digital twin. The columns contain the parameter values for benders (Hb1 and Hb2), pitch (Hb_pitch) and translation (Hb_trans) for the horizontal bender mirror and corresponding parameters for the vertical bimorph mirror.

Equations (2)

Equations on this page are rendered with MathJax. Learn more.

F W H M = F W H M H 2 + F W H M V 2 P L = P H 2 + P V 2 N L P I = log P i n t
F W H M r e f = ( F W H M H F W H M H , R ) 2 + ( F W H M V F W H M V , R ) 2
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.