Automatic Feedback System for X-ray Flux at BL08U1A Soft X-ray Spectromicroscopy Beamline of Shanghai Synchrotron Radiation Facility

: An online automatic feedback system has been successfully installed and commissioned at the BL08U1A Soft X-ray Spectromicroscopy Beamline of Shanghai Synchrotron Radiation Facility, which can monitor the incident X-ray beam in real time by measuring the blade-edge signals of the exit slit and automatically adjust the elliptical cylindrical mirror parameters to achieve beam calibration and maintain the optimal X-ray ﬂux of the sample. This work provides a comprehensive description of the hardware composition, system implementation, feedback logic, function and software design, system optimization and commission, as well as the online experimental results supported by the system. The experimental results demonstrated that the online automatic feedback system is capable of eﬀectively maintaining the optimal X-ray beam ﬂux for X-ray absorption spectroscopy experiments. Its success can provide valuable technique assistance for the design, construction and optimization of similar systems at various beamlines in synchrotron sources in the future.


Introduction
The Shanghai Synchrotron Radiation Facility (SSRF) is a state-of-the-art third-generation synchrotron radiation light source built in 2009.It is composed of a 150 MeV electron linear accelerator, a booster to increase the electron energy to 3.5 GeV, a 3.5 GeV electron storage ring, and dozens of beamlines and end stations that cover multiple disciplines.In 2016, the SSRF launched the largest follow-up beamline construction project, the SSRF Phase-II Beamline Project, which is anticipated to be completed by July 2023.In addition to the three beamlines currently being constructed with investment from Sinopec, by 2025, the SSRF will have 35 beamlines and 50 end stations in operation, which will greatly expand the experimental capacity of the SSRF, making the resolution of time, space, energy and momentum in the SSRF almost reach the limit of the third-generation synchrotron radiation light source [1].
The ability to provide high-quality X-ray is the greatest irreplaceable advantage that synchrotron radiation light sources offer.The benefits of the synchrotron radiation X-ray light source include a high brightness, large and continuously tunable energy span, high collimation, high polarization, narrow pulse, and so on.For most scientific research using synchrotron radiation, a high X-ray flux is one of the most significant advantages among all the aforementioned benefits, as it leads to a be er resolution in terms of space, energy, and time, as well as a higher experimental efficiency.Additionally, it serves as the most representative indicator for the development of diffraction-limited storage ring (DLSR) light sources and free electron lasers (FEL).Similarly, maintaining optimal X-ray flux is critical for beamline operation and achieving high-quality experimental results in synchrotron light sources.However, when the beamline operates continuously throughout the day to support different experiments, a large number of experimental conditions change, which leads to varying degrees of disruption to the final X-ray flux at the experimental end station.For example, different users and experiments may need the beamline mirror position, undulator or other insertion device (ID) gap value, or monochromator and grating parameters to be adjusted in order to achieve the requested X-ray energy, which may cause a decrease in the light flux.For example, the energy range of the Fe element XAFS is about 690-740 eV, and the X-ray flux at 735 eV is about 22% lower than the maximum flux at 690 eV based on real experimental measurements at the BL08U1A beamline of the SSRF.Furthermore, an upgrade in the insertion devices, an unstable electron beam orbit, and beam injection in the storage ring can also impact the beam flux [2].Since most synchrotron sources operate 24 h a day, the thermal expansion and contraction of optical components and the 24 h day/night temperature cycle [3] may cause the photon beams to drift.Sometimes, due to an unstable beam current, operators may need to enlarge the exit slit to achieve a high X-ray flux in imaging experiments, despite the cost of reduced spatial resolution.Therefore, it is crucial to maintain optimal X-ray flux before and during the experiments automatically.
To automatically align the beam position and maintain maximum light flux, plenty of beamlines have developed stabilization systems, including orbit correction and optical correction systems.Orbit correction systems [4][5][6][7][8] typically use beam position monitors (BPMs) [9] and corrector magnets to constrain the beam to its working position, while optical correction systems usually use vertical and horizontal plane mirrors, monochromators [10,11] and detectors to stabilize and maximize light flux.Both orbit and optical correction systems can be implemented as feed forwards (FFs) or feedbacks (FBs).FF correction depends on the physics model of the beamlines or on records of the relationship between the beam property and beamline se ings for every ID gap [12].The National Institute of General Medical Sciences and the National Cancer Institute (GM/CA) MX beamlines at the Advanced Photon Source (APS) perform vertical and horizontal scans to recenter the beam under certain conditions [13].However, such a record takes a long time to measure and cannot be frequently recalibrated after machine drift due to the limited machine study time in light sources.The deviation of FF algorithms increases over time and requires a feedback system to compensate for such deviations.The micro-focusing frontier macromolecular crystallography (FMX) beamline at the National Synchrotron Light Source II (NSLS-II) implements three feedback loops for beam position correction [3].Some automatic tasks have been considered at the X-ray absorption spectrum (XAS) beamline of the Karlsruhe Institute of Technology (KIT) synchrotron [14].The macromolecular crystallography beamline (MX2) at the Australian Synchrotron uses a neodymiumdoped y rium aluminum garnet (YAG) crystal and a CCD camera to record the beam and move the focusing mirrors as feedback [15].Although these feedback systems are widely used, few implementation details, such as the controlled devices, algorithms and feedback results, have been provided.
In this paper, we present a fully automatic online feedback system for X-ray flux optimization before and during experiments in the SSRF BL08U1A beamline.The beamline provides photon beams ranging from 200 eV to 2000 eV, with energy resolutions of 16,000 at 244 eV and 12,700 at 401 eV when the Slit 2 size is set to 50 µm (horizontal) and 20 µm (vertical), respectively.The photon flux downstream to the exit slit is about 5 × 10 11 phs/s at 244 eV and E/ΔE = 6440, with a Slit 2 size of 50µm (horizontal) and 50 µm (vertical).The decrease in photon flux might be a ributed to the photon energy adjustment, the EPU gap variation, and the mirror deformation that originates from the heterogeneity of the heating load distribution.In XAS experiments and long-time imaging experiments, beamline operators have to adjust the mirror positions and the exit slit size manually and frequently in order to obtain a higher X-ray flux, which favors improvements in the experimental quality.Based on this feedback system, the position of the elliptical cylindrical mirror can be adjusted automatically in the horizontal direction by simultaneously calculating the feedback signal of the blade-edge signals on the exit slit, thus contributing to maintaining the stability of photon flux.The hardware composition, system implementation, feedback logic, function and software design, system optimization and commission, as well as the online experimental results supported by the system, will be described in detail.The results of the experiments on the XAS conducted at the BL08U1A beamline of the SSRF show that the system meets the demand of the stable and automatic light flux adjustment.

System Design
2.1.1.Layout of the BL08U1A Beamline at the SSRF The BL08U1A beamline at the SSRF is a soft X-ray spectromicroscopy beamline with a 250-2000 eV energy range [16,17], as shown in Figure 1.An elliptically polarized undulator (EPU) was used to produce soft X-ray photons.Slit 1 was set at a distance of 20 m downstream from the EPU to ensure that the acceptance angle was within ±0.04 mrad in both horizontal and vertical directions.Then, an elliptical cylindrical mirror (M1), set at a distance of 30 m downstream from the EPU, was used to collimate the photon beam and suppress high-order harmonics using a water-cooling scheme that absorbed the heat load.The plane grating monochromator (PGM) set at 32 m consists of two Au-coated gratings including an 800 line/mm for 250-750 eV and a 1200 line/mm for 275-2000 eV.The last optical element, an elliptical cylindrical mirror (M2), was used to focus the photon beam both in the horizontal and vertical directions at Slit 2. The BL08U1A beamline began operating in 2009 with a scanning transmission X-ray microscopy (STXM) end station (End station 1 in Figure 1).An independent in situ spectroscopic end station was first installed in 2014 and then updated in 2018 [18], and a state-of-the-art ptychography-STXM end station (End station 2 in Figure 1) was installed in 2019.These three end stations have proven to be extremely useful for studies in environmental science [19,20], physics [21], chemical, materials, and energy sciences [22,23].The BL08U1A beamline is capable of a variety of experimental methods, including imaging methods such as STXM [24,25], nano-CT [26][27][28], and ptychography [29,30], as well as XAS methods such as total electron yield (TEY), X-ray Magnetic Circular Dichroism (XMCD), X-ray Magnetic Linear Dichroism (XMLD), and X-ray-Excited Optical Luminescence (XEOL) [31,32].In order to obtain satisfactory experimental results, XAS methods require the incident X-ray flux to be measured for data normalization, and all XAS and imaging methods require a high and stable incident X-ray light flux to improve the signal-to-noise ratio.BL08U1A beamline operators typically need to manually adjust the M2 position before the experiment to achieve optimal flux.However, it is impossible to observe the flux variation in real time and make corrections during the experiment, which may lead to a decrease in the experimental data quality and even lead to experimental failure in long-time imaging methods.Therefore, it is imperative to develop an automatic feedback system that aligns the beamline and maintains the optimal X-ray light flux in order to achieve enhanced experimental efficiency and results.

Hardware Composition
The hardware of the automatic feedback system mainly includes the elliptical cylindrical mirror M2 and the four-blade exit slit, Slit 2, of the beamline, a current-voltage (I-V) convertor developed by the SSRF, a MOXA ioLogik E2240 controller, a picoammeter, a gold mesh in the spectroscopic end station, and a photodiode (PD) detector in the STXM end station.
The exit slit, Slit 2, of the beamline acts as a secondary light source, which is a critical device used to control the X-ray beam energy resolution and coherence in the downstream optical path to the end stations.Composed of four independently moving blades, Slit 2 can adjust the size and shape of the slit, as shown in Figure 2. From the beam incident direction, the left and right blades are installed in front of the up and down blades.The monochromator grating, placed horizontally at the upstream of the beamline, generates a vertical-strip-shaped X-ray beam that illuminates Slit 2, as shown in the embedded diagram in Figure 2. The M2 mirror placed vertically causes the beam spot on Slit 2 to move horizontally.Since the size of Slit 2 is usually set to tens of micrometers during experiments, and the current signal of the blade is proportional to the area illuminated by the incident X-ray, the horizontal blade edge current signals are usually bigger than the vertical blade edge currents.To achieve high precision readout, an I-V convertor with 8 channels made by the SSRF control group is installed to convert current signals to voltage signals.A MOXA ioLogik E2240 controller is connected for signal acquisition and range switching.When the incident X-ray beam center deviates from the center of Slit 2, the left and right blade edge current signals are different, which can be used as a reference index for the automatic feedback system.The gold mesh installed in the spectroscopic end station and the PD installed in the STXM end station are used to directly measure the intensity of X-ray beam.The signals from the gold mesh and PD can be read out using a picoammeter.
All digital signals and control access of the hardware are connected and controlled by the control software through a local area network (LAN), as shown in Figure 2. The control software has access to the converted Slit 2 blade edge voltage signals, gold mesh current signal, PD current signal, and motor signals of M2.In addition, the software controls the movement of M2 position based on a suitable logic criterion to maintain the optimal X-ray flux of the sample.

Feedback Logic
The automatic feedback system is optimized under the condition that all beamline devices on the optical path are optically aligned and the EPU gap and PGM angle are selected.Figure 3   Figure 4 illustrates that the gold mesh current signal reaches its optimal value along with the change of the position of M2.When the M2 position parameter is smaller, the right blade-edge signal is larger than the left, indicating that the X-ray beam at Slit 2 is deviated to the right direction.The difference between the left and right blade-edge signal decreases as the M2 position increases.At a specific M2 position value, the left and right blade-edge signals become the same, and the gold mesh signal almost reaches its maximum value.Therefore, the first logic feedback criterion can be defined as follows: If SRL is positive, it needs to increase the M2 position parameter and reduce the signal difference between the left and right blade edges.Conversely, if SRL is negative, it needs to reduce the M2 position parameter and reduce the signal difference between the left and right blade edges.

Function Design and Software Design
The motor position of M2, and the current of the gold mesh and PD can be accessed through the Experimental Physics and Industrial Control System (EPICS) [33].EPICS is an open-source, distributed software framework that is widely used in the control of large-scale scientific facilities in order to access and control devices through networks.EPICS provides a standardized, extensible interface that enables different types of devices and control systems to communicate and work together, and it also provides a rich set of tools and libraries, such as Channel Access, Database Access, Alarm Handler, Archive Engine, etc., to facilitate development and management.Voltage signals of SL and SR, collected by Moxa ioLogik E2240 controller, can be read out through a MXIO library provided by Moxa.
The software of the automatic feedback system was developed in Browser/Server (B/S) architecture with Flask (h ps://flask.palletsprojects.com,accessed on 30 December 2022) and React (h ps://reactjs.org,accessed on 30 December 2022).Flask is a micro web framework wri en in Python.It is designed to be lightweight and easy to use, making it a popular choice for building web applications and APIs.Flask provides a simple and flexible interface for developers to create web applications, with features such as URL routing, template rendering, and support for extensions.React is an open-source JavaScript library for building user interfaces.It is designed to be declarative and efficient, allowing developers to build complex user interfaces with ease.React uses a virtual DOM (document object model) to optimize the rendering performance, and supports serverside rendering and mobile development.
As the control software for the spectroscopic end station and STXM end stations are separated on different computers, the B/S architecture is more convenient for operating across multiple computers and control systems.Users can easily download the data of all signals in CSV format from the browser for further research.Additionally, all signals will be recorded in seconds and stored in a local SQLite database after the server starts.This ensures that all data are safely stored and easily accessible for future analysis.
During the implementation of the feedback logic, a threshold value limitation was added to prevent M2 from vibrating around its optimal position and reducing the motor return difference.Additionally, an offset for SRL was added as a calibration of light flux since the signal of the mesh grid may not be accurate based on the incident position at the mesh structure.The details of these two improvements and some tests are discussed in Section 2.2.In order to avoid errors in the operation of the automatic dimming program, an alarm signal output is set in the program.An error signal is activated and sent to the imaging or XAS end stations when the SV exceeds 30%.
Figure 5 illustrates the procedure of the tunning loop.The user can set the step of the M2 motor, offset and V0 in the browser user interface and operate the feedback system.When the system is turned on, a feedback request with the parameters of the step, offset and V0 is sent to the server.The server then immediately reads out all signals and checks the threshold value limitation.If the SV is greater than V0, M2 must move one step accordingly and finishes one feedback request.As long as the system is on, this procedure is repeated every three seconds, taking into consideration the motor's moving speed and signal latency.When the server gets a tunning request with threshold and offset values, it will try to read out SL, SR, SU and SD and calculate Sv.If Sv is bigger than the threshold, the M2 motor will move one step (200 nm); otherwise, it will jump directly to the end of this tunning and waiting for the next tunning call.

X-ray Light Flux Calibration
The maximum X-ray beam flux in the downstream optical path of Slit 2 is not an exact correspondence with the minimum signal difference between the left and right blade-edge voltage signals, as shown in Figure 4.This is because the signal of the gold mesh may not accurately represent the X-ray beam flux at the sample position, depending on its mesh structure and the illuminated position.Therefore, a PD detector was installed in the STXM end station, which directly measures the X-ray intensity; this was used to determine the difference between the maximum flux and the flux when SRL = 0, and to calibrate SRL through offset if the difference was big enough.Several calibration experiments were performed at energies of 540 eV (shown in Figure 6), 700 eV and 920 eV, and the offset values of SRL for the maximum PD light flux were calculated as −2.677%, −9.356%, and −13.5%, respectively.When the offset was set to zero, the light flux values of SRL = 0 at 540 eV, 700 eV and 920 eV were 99.12%, 96.88%, and 98.50% of the maximum PD flux, respectively.The maximum light flux deviation was smaller than 3%.Therefore, although the offset may be bigger than 10%, the flux of offset = 0 was almost the max flux on the sample, and the offset was to zero in the automatic feedback procedure.For the second position, SRL is calculated to be −2.677%.However, the light flux of the first position is 99.12% of the second position.Considering that the M2 stepping motor with a 200 nm minimum step size cannot distinguish between the two positions, the difference in the two light fluxes can be ignored; thus, the offset value is set to 0 in practical applications.

Threshold Value Limitation
At the BL08U1A beamline of the SSRF, M2 is the main beamline mirror that affects the beam center during the Slit 2 during experiment, which is driven by a step motor with a minimum moving precision of 200 nm.Additionally, the return difference of the M2 motor also needs to be considered during it movement.In order to prevent the M2 position from vibrating around the optimal position due to return difference, a threshold value limitation is defined as follows: where the offset is a correcting value according to the gold mesh optimal signal value.A suitable threshold value V0, which measures the deviation in the slight signals due to M2 movement, should be tested so that the feedback system is only activated when SV > V0.
Figure 7 shows the change in the position of SRL as the M2 moves in steps of 200 nm at an incident X-ray energy of 920 eV.The (SR − SL)/(SR + SL) is collected with the M2 change before the experiment and these data are fi ed with a straight line (see Figure 7).The slope of the fi ed straight line represents the percentage change of (SR − SL)/(SR + SL) after 1000 nm, and multiplying the slope by 0.2 gives the percent change of (SR − SL)/(SR + SL) after 200 nm.It can be observed that the relative change in the position of SRL in each motor step is approximately 0.0475; this is obtained by calculating the slope in the central linear area around the optimal M2 position.For the BL08U1A beamline, the incident X-ray energy ranges from 250 eV to 2000 eV.Therefore, we systematically tested the entire energy range and calculated the threshold values, which are listed in Table 1.In real experiments, V0 is set to 0.05 for simplicity and the automatic feedback procedure works very well.

Tunning for Optimal Light Flux
The browser user interface for the online automatic feedback system is shown in  configuration with a running bu on and data export components; the Chart Area on the right side displays all signals with a maximum time span of 12 h.The automatic feedback system was tested for approximately 15 min via an energy scan from 690 eV to 730 eV.Various parameters, including an M2 step of 0.2 um, an offset of 0, and a threshold of 0.05, were set in the Config panel and the feedback system was started by pressing the start running bu on.Energy changes were recorded in the chart of E, along with the M2 position in the chart of M2, and the SRL was calculated in the chart of (SR − SL)/(SR + SL).During the energy change, SRL gradually decreased to −0.05 when M2 started moving step by step to make SRL larger.The automatic feedback procedure was thus proven to work well since SRL was maintained between ±0.05 in the whole test.

Tunning for XAS
XAS is a widely used experimental technique that is performed at synchrotron radiation facilities for research in material science, chemistry, and biology [34].The XAS experiment uses TEY measurements, which measure the absorption of X-rays by considering a sample as a function of energy.During the experiment, along with the incident energy changes, the intensity of the X-ray before and after the sample are recorded and normalized to obtain the absorption coefficient.The absorption spectrum provides information about the electronic and atomic structure of the sample, including oxidation state, coordination number, and bond length.
The normalized absorption spectrums of an Fe sample holder with and without the online automatic feedback system are shown in Figure 9.The intensity of the X-ray before the sample position during the experiment, which is collected by the gold mesh, is displayed at the top right of Figure 9.
Data acquisition for each spectrum takes about 10 min.Without the feedback system, the intensity of the feedback from the data (top right subfigure of Figure 9) drops quickly during the energy scan.However, with the feedback system, the intensity drops much slower and smoother.The normalized absorption coefficient in the feedback on the spectrum is also consistently higher than the feedback from the data across the entire energy range with a higher signal quality.We conducted signal-to-noise ratio (SNR) calculations on the normalized data within the energy range of 724 eV to 730 eV, where the feedback system had optimized the M2 position.The SNR for the feedback from the data is 55.390 dB, whereas the SNR for the feedback from the data is 57.351 dB, resulting in an improvement of nearly 2 dB in the SNR.These results demonstrate the effectiveness of the feedback system in improving the quality of the XAS data by maintaining a stable X-ray intensity during the experiment.The improved data quality can lead to more accurate and reliable results, making it an essential tool for XAS experiments.XAS experiments using TEY measurement in the absence and presence of the feedback system.The normalized absorption coefficient has a higher signal quality when the feedback system is on.The top right figure shows that the X-ray flux with the feedback system on drops much slower and smoother.

Discussion
The online automatic feedback system has been proven to be effective in ensuring the quality of the XAS experiments carried out under the optimal X-ray flux for an extended period of time at the BL08U1A beamline of the SSRF.This has been achieved via the online monitoring of the four blade-edge voltage signals of Slit 2 of the beamline and by adjusting the M2 motor in real-time.The feedback system significantly improves the data quality and does not interrupt user experiments.Therefore, it has been running online at the BL08U1A beamline in order to assist users.For the special case of BL08U1A, M2 is the core optical device with the highest adjustment frequency during the beamline operation and user experiments.The optimization logic is also relatively simple and clear.
However, for other beamlines, the optical devices and control parameters that affect the maximum X-ray flux may be more complex and diverse, resulting in an oversized parameter optimization space.Additionally, if the optical devices and control parameters are coupled with each other, the development of an automatic feedback system becomes ever more challenging, but also more valuable.The development concept of such a system should be consistent with that of this work, which aims to include all devices and control parameters that affect the X-ray flux in a unified framework, and rely on the experience of senior beamline scientists or artificial intelligence/machine learning algorithms to quickly optimize the system in a large parameter space.Moreover, it should be noted that artificial intelligence methods, which are represented by deep neural networks, have great applicative potential regarding the online automatic optimization of complex beamlines.We believe that in the next few years, breakthroughs will continue to emerge.
The detailed demonstrations of hardware composition, system implementation, feedback logic, function and software design, system optimization and commission presented in this work will be beneficial for similar studies on various beamlines in synchrotron sources in the future.

Figure 1 .
Figure 1.Layout of the BL08U1A beamline at the SSRF.The M1 elliptical cylindrical mirror collimates the X-ray and suppresses high-order harmonics.The M2 elliptical cylindrical mirror focuses the X-ray in both directions through Slit 2. The tunable X-ray energy is 200-2000 eV.A spectroscopic end station and two STXM end stations are located downstream of the beamline.

Figure 2 .
Figure 2. Layout of hardware connection by the local area network (LAN).The monochromatized X-ray was horizontally focused to the exit slit (Slit 2) by an elliptical cylindrical mirror.The four blade signals of Slit 2 were read out by an I-V convertor.The photon flux after Slit 2 was detected by a gold mesh and PD detector, and the signals were read out by a picoammeter.The signals of M2, Slit 2, gold mesh and PD are all connected into LAN and can be read out for control.
shows the change in the four blade-edge voltage signals along with the position changes of M2, where the incident X-ray energy is 920 eV and the Slit 2 size is 50 µm × 50 µm.SL, SR, SU and SD represent the left, right, up, and down blade-edge signals.The change in the horizontal signals is an order of magnitude larger than the change in the vertical signals, indicating that the deviation in the light spot in the horizontal direction is much larger than that in the vertical direction.Therefore, only horizontal deviation is considered in the feedback system, and the horizontal blade-edge signals are used to assess the position of the X-ray light flux in the downstream optical path of Slit 2.

Figure 3 .
Figure 3.The measurement results of the Slit 2 blade-edge signals with M2 position changes at 920 eV.SL, SR, SU and SD represent the left, right, up and down blade-edge signals, respectively.The horizontal axis represents the M2 position, with a minimum moving step size of 200 nm.The left coordinate system is for SL and SR, while the right coordinate system is for SU and SD.The horizontal blades are illuminated over a larger range than the vertical blades, resulting in the horizontal blade signals that is nearly 10 times stronger than the vertical blade signals.

Figure 4 .
Figure 4.The measurement results of the left and right blade voltage signals and gold mesh current signal I0, along with M2 position changes at 920 eV.When the signals of the left and right blade are equal, the corresponding gold mesh signal is almost at the maximum value.

Figure 5 .
Figure 5.The logic of each tunning procedure.When the server gets a tunning request with threshold and offset values, it will try to read out SL, SR, SU and SD and calculate Sv.If Sv is bigger than the threshold, the M2 motor will move one step (200 nm); otherwise, it will jump directly to the end of this tunning and waiting for the next tunning call.

Figure 6 .
Figure 6.Calibrate slit signals using PD at 540 eV.The left do ed vertical line marks the first M2 position of SL = SR.The right dashed vertical line marks the second M2 position of the maximum PD value.For the second position, SRL is calculated to be −2.677%.However, the light flux of the first position is 99.12% of the second position.Considering that the M2 stepping motor with a 200 nm minimum step size cannot distinguish between the two positions, the difference in the two light fluxes can be ignored; thus, the offset value is set to 0 in practical applications.

Figure 7 .
Figure 7.The measurement result of the left and right blade-edge signals, along with the M2 position changes at 920 eV.The minimum moving precision of the M2 motor is 200 nm.The experimental data were fi ed with a straight line, and the linear area slope shows the position changes of SRL changes as M2 moves per 200 nm.It is found that the threshold value is less than 0.05.
Figure 8.The "Beamline Monitor" panel in the top left corner provides current readings of E (energy), M2, SL, SR, SU, SD, SV and I0.The "Config" panel in the bo om-left corner has inputs of M2 step, offset and V0, as well as a running bu on and export data function components.The main part of the interface on the right side is the chart area, which displays all signals with a maximum of 12 h of data.Each chart has a slider on the x-axis for observing smaller time scales.The signals in the chart area and in the Beamline Monitor panel are updated by the server every second.

Figure 8 .
Figure 8. Operation interface of the online automatic feedback system.Beamline Monitor panel displays energy, M2 position, SL, SR, SU, SD, SV and I0; Config Panel is used to input M2 step, offset, V0

Figure 9 .
Figure 9. XAS experiments using TEY measurement in the absence and presence of the feedback system.The normalized absorption coefficient has a higher signal quality when the feedback system is on.The top right figure shows that the X-ray flux with the feedback system on drops much slower and smoother.

Table 1 .
The minimum threshold value for different incident X-ray energy.