It is essential but inconvenient to perform high-quality on-line optimization for synchrotron radiation beamlines. Usually, synchrotron radiation beamlines are optimized manually, which is time-consuming and difficult to obtain global optimization for all optical elements of the beamline. In this contribution a general method based on the genetic algorithm for automatic beamline optimization is introduced. This method can optimize all optical components of any beamline simultaneously and efficiently. To test this method, a program developed using LabVIEW is examined at the XAFCA beamline of the Singapore Synchrotron Light Source to optimize the beam flux at the sample position. The results demonstrate that the beamline can be optimized within 17 generations even when the initial flux is as low as 4% of its maximum value.
Keywords: beamline optimization; genetic algorithm.