Laser Beam Pointing Stabilization Control through Disturbance Classification

In laser systems, beam pointing usually drifts as a consequence of various disturbances, e.g., inherent drift, airflow, transmission medium variation, mechanical vibration, and elastic deformation. In this paper, we develop a laser beam pointing control system with Fast Steering Mirrors (FSMs) and Position Sensitive Devices (PSDs), which is capable of stabilizing both the position and angle of a laser beam. Specifically, using the ABCD matrix, we analyze the kinematic model governing the relationship between the rotation angles of two FSMs and the four degree-of-freedom (DOF) beam vector. Then, we design a Jacobian matrix feedback controller, which can be conveniently calibrated. Since disturbances vary significantly in terms of inconsistent physical characteristics and temporal patterns, great challenges are imposed to control strategies. In order to improve beam pointing control performance under a variety of disturbances, we propose a data-driven disturbance classification method by using a Recurrent Neural Network (RNN). The trained RNN model can classify the disturbance type in real time, and the corresponding type can be subsequently used to select suitable control parameters. This approach can realize the universality of the beam stabilization pointing system under various disturbances. Experiments on beam pointing control under several typical external disturbances are carried out to verify the effectiveness of the proposed control system.


Introduction
Lasers have been used in many important fields such as laser processing, laser ranging, and laser communication. The stability of beam pointing is a key feature that impacts manufacturing precision, location accuracy, and communication efficiency. In practice, the drift of a laser beam away from a setting direction could be caused by many disturbance sources, including: (1) inherent drift, which is related to the temperature distribution and micro motion in the laser cavity; (2) air disturbance, such as airflow; (3) transmission medium variation; (4) mechanical vibration, arising from the motion of electric motors and coolers; (5) elastic deformation, which is caused by forces on mechanical components.
Thus, these factors should be mitigated in a beam pointing stabilization control system with steering mirrors and position sensing detectors. A beam can be defined by a four-dimensional vector: positions and angles along two orthogonal directions. Two Fast Steering Mirrors (FSMs) are adopted to stabilize the beam, and two Position Sensitive Devices (PSDs) are used to detect the positions and angles. In [1], the beam stabilization system adopts the matrix decoupling technology, which needs an accurate beam delivery mathematic model. The parameters of the beam delivery mathematic model are achieved by the detailed parameters of the lens and optical path. Wang et al. proposed a beam correction principle by calibrating the beam pointing path and beam position path [2]. Then, the relationship between the rotation angle and the signal of the PSDs can be used to correct the beam drift. In [3], the tracking control of beam pointing was built on the Jacobian matrix, which can be efficiently self-calibrated by active motion. However, we find that its control performance relies on the parameter setting, and the optimal parameter is highly related to the disturbance's feature. As mentioned above, there are many types of disturbances, and thus, a controller with constant parameters can hardly perform well when encountering various external disturbances. Therefore, it is desired to select proper control parameters according to the current disturbance type.
In a beam pointing control system, it is necessary to analyze the characteristics of disturbances and classify disturbance types in order to select suitable control parameters. In recent years, deep learning technologies [4] have been applied to many fields, such as objection recognition [5], speech recognition [6], and natural language processing [7], due to their powerful discriminative ability and data-driven manner. Specifically, in this paper, we consider disturbance classification of the beam pointing stabilization control system using a Recurrent Neural Network (RNN) [8], which shows effective performance in time series tasks [9]. However, the basic RNN suffers from vanishing and exploding gradient problems for long-term dependency tasks [10]. To avoid these limitations, Long Short-Term Memory (LSTM) [11] and the Grated Recurrent Unit (GRU) [12] have been proposed based on grating mechanisms. Beam pointing drift can be regarded as a multi-dimensional temporal signal. However, to the best of our knowledge, the existing works seldom leverage deep neural networks on the disturbance classification task for laser systems.
In this paper, a disturbance classification method based on LSTM and the GRU is proposed to select suitable control parameters for the beam pointing stabilization control system. The key advantages are as follows: the classification model is learned in a data-driven manner without relying on artificial analysis and tuning; the deep learning approach provides good generalization ability; the disturbance classification can realize the universality of the system under various disturbances. In our experiment, we first analyze the kinematic model of the beam pointing stabilization control system based on the beam delivery matrix. In addition, we design a feedback controller based on the Jacobian matrix [3]. The Jacobian matrix is adaptive to the changes on the beam path by self-calibrating and can be calibrated efficiently with active motion and linear least squares optimization. Then, we capture the beam pointing drift data under several types of disturbances and classify disturbances using LSTM/the GRU. Finally, according to the result of the disturbance classification, suitable parameters of the control system can be selected.

Control System Description
A diode laser, with a 650 nm center wavelength and a 5 mW output power, was used as the light source. The diameter of the laser beam is 2 mm. As shown in Figure 1, M1 and M2 are the two highly reflective FSMs. The size of the FSM is 60 × 60 mm. Each mirror was mounted with two micro-stepping motors to turn the reflective angles in both horizontal and vertical directions independently. M3 is a partial reflective mirror. A small part of the laser was transmitted into the PSD1 and PSD2 for positioning. PSD1 and PSD2 are position sensitive detectors (GmbH. TEM Messtechnik) with a sub-micro-rad and a 350 nm to 1100 nm spectral range. The chip sizes of PSD1 and PSD2 are 9 × 9 mm and 4 × 4 mm, respectively. M4 is a beam splitter mirror. The optical distance from M3 to PSD1 is shorter than that from M3 to PSD2. Each PSD measures the x-y position of the laser spot on it. The output beam pointing can be uniquely determined by the two laser spots' positions on the PSDs. The driving and control unit acquires data from the PSDs and generates control signals for the micro-stepper to regulate the beam pointing. Some key parameters are defined as follows: L 1 is the optical distance between the input plane and M1; L 2 is the optical distance between M1 and M2; L 3 is the optical distance from M2 to PSD1'. PSD1' is the image of PSD1 to M4, and L 4 is the optical distance from PSD1' to PSD2, shown as

Optical Model
Each beam has two orthogonal directions. In this section, the horizontal direction is analyzed, which can be easily extended to the vertical direction. In general, a laser beam can be defined by two coordinates: the position r and the angle θ from the optical axis, namely 2 degrees-of-freedom (DOFs). r in and θ in are the position and angle upon entering the optical path. r out and θ out are the position and angle after propagating by a non-negative distance z [13]. Because the displacements and angles are assumed small, we have the approximate relations, Meanwhile, let r 0 and θ 0 be the input beam parameters of the beam pointing control system. According to (1), r 1 and θ 1 on PSD1' can be calculated by the two laser spots' positions on the PSDs, Since θ 1 cannot be achieved by PSD1 directly, it can be calculated by, Because L 4 is constant, we substitute (3) into (2), When α 1 = α 2 = 0, a beam offset vector is defined by: The kinematic model can be deduced by substituting (5) into (4): Due to the beam delivery matrix, we have a linear kinematic model. Once the input beam pointing drifts, the beam pointing control system should regulate both the position r 1 and angle (r 2 − r 1 ) of the laser beam by setting steering angles α 1 and α 2 .

Kinematic Model
According to (6), the kinematic model with a 4-DOF pose of the beam can be given by the local linear approximation: where r 1 and r 3 are the 2D positions on PSD1, which represent the beam's horizontal and vertical position. r 2 and r 4 are the 2D positions on PSD2. Meanwhile, (r 2 − r 1 ) and (r 4 − r 3 ) represent the beam's horizontal and vertical angle. α 1 and α 3 are the steering angles of M1. α 2 and α 4 are the steering angles of M2. J is the Jacobian matrix. Thus, the four actual steering angles coordinately change the laser spots' positions on the two PSDs by the Jacobian matrix.

Active Motion Based Calibration
To build the control system, we re-formulate the kinematic model in (7) using the feedback vector x ∈ R 4×1 and the step-motor order u ∈ R 4×1 , . u i is the discrete order of the ith axis of the two FSMs, instead of the actual steering angle.
In order to calibrate the kinematic model in a short time, a time series of predefined orders is sent to the step-motors to generate active motion; meanwhile, a series of the laser spot positions on the two PSDs is sampled. The length of the time series is n. Thus, we have: Using linear least squares optimization, the explicit solution to (9) is: Then, the Jacobian matrix J can be extracted from A. Thus, given an unknown or changed optical path, the kinematic model can be self-calibrated in a few seconds, making the control system adaptive to different optical paths and free of manual parameter tuning. As the Jacobian matrix can be conveniently calibrated, the static drift error of the optical model can be corrected.

Control Method
The control system is designed to reduce drifts caused by the mentioned disturbances, as shown in Figure 2. The Proportional Integral Differential (PID) feedback controller is adopted as the control law. The raw signals sensed by the PSDs are processed by a low-pass filter. The controller compares the 4D reference beam vector x r ∈ R 4×1 and the feedback beam vector x ∈ R 4×1 . Then, the PID controller is used to calculate the incremental movement of two PSD positions, where k P , k I , and k D are the proportional, integral, and differential gains, respectively. Finally, the incremental movement of two PSD positions dx is transformed to the incremental order du of the two FSMs, using the inverse of the Jacobian matrix, namely, The increment order is sent to the FSM controller, so that the actual steering angles of the two FSMs are adjusted to reduce the error e x .

Disturbance Source Classification Method
In this paper, we assume the five typical disturbances for a pulsed laser system, including the inherent drift, air steam, transmission medium variation, mechanical motion, and elastic deformation. The deep learning methods are used for classification according to the temporal patterns of these disturbances. The pipeline of the proposed method is depicted in Figure 3. At time step t, the current feedback beam vector and its historic states are combined as the input time series data X = {x t+1−T , x t+2−T , · · · , x t } ∈ R 4×T . T is the length of the time series. The raw data X are firstly normalized so that the mean and standard deviation of {x t+1−T , x t+2−T , · · · , x t } are zero and one, respectively, to minimize the influence on the amplitude variation and keep the relative temporal pattern. The normalized X is fed to the deep neural network to extract high-level features o, which can be realized based on the RNN. Then, the multi-dimensional feature vector o is fed to a two-layer fully connected network (FCN), and the output is the 5-dimensional activation vector s = {s 1 , s 2 , · · · , s 5 }, as given by, where w i and b i (i = 1, 2) are the weights and biases of the two layers of the FCN. Then, the index c corresponding to the maximum activation value s c (c = 1, 2, · · · , 5) is regarded as the identified disturbance class, namely, In this work, both LSTM and the GRU are studied for feature extraction, as introduced in the following subsections.

RNN Based Feature Extraction
The Recurrent Neural Network (RNN) is preferred to handle the sequence input. It processes an input sequence in a recurrent manner. The samples in the time series are input to the RNN sequentially, and each time, the RNN unit receives both the new sample and the historical state of the last time step. Finally, the whole time series is processed, and the feature is propagated over time. A two-layer RNN is illustrated in Figure 4a  The LSTM unit [11] solves the long-term dependency problem with three gates: forget gate, input gate, and output gate, as shown in Figure 4b. The three gates mainly determine the status of the unit by the following equations.
where f t , i t , and s t represent the features of the forget gate, input gate, and output gate, respectively.c t is the candidate feature. c t and h t are the cell unit state and hidden feature propagated temporally over the RNN units. w and b are the weights and biases.
The GRU [12] is composed of a reset gate and update gate, as shown in Figure 4c. The computation of the GRU is given by, where x t , h t , z t , and r t respectively represent the input vector, output vector, update gate vector, and reset gate state. w and b are the weights and biases.

Kinematic Model Calibration Based on Active Motion
The four sine signals with different frequencies and amplitude, as shown in Figure 5a Root mean squared error (RMSE) between the actual beam vector observed by the PSDs and the beam vector estimated by the Jacobian matrix is calculated to evaluate the calibration accuracy.
wherex t and x t respectively represent the measured groundtruth beam vector and estimated output beam vector at time t. T represents the entire training sample time. The four values of the RMSE are 11.502,21.198,4.691, and 6.279. Therefore, the proposed calibration method provides an adequate accuracy and can be finished in just a few seconds.

Data Collection
In the disturbance classification experiments, the five types of disturbances were used, which include inherent drift, air disturbance, transmission medium variation, mechanical motion, and elastic deformation. Experiments were conducted in a laboratory at 30% humidity and 22 • C. The disturbance was generated using a transparent box in the laser optical path, as shown in Figure 6. (1) The inherent drift produced by the laser itself was simulated without any external disturbances. (2) The bottom of the box was filled with hot water containing a constant-temperature heater, so that air disturbance in the glass box was generated. (3) A transparent plastic board with uneven thickness was mounted on the side wall of the box, and the box was moved randomly by a motorized platform, so that the transmission medium's thickness was disturbed and the transmission medium variation produced. (4) The transparent box was moved by a motorized platform periodically, and mechanical motion disturbance was produced. (5) The transparent box was pressed by a motorized structure with a slightly varying period and amplitude, so elastic deformation was generated. The sampling frequency was 50 Hz. Thus, the five time series were collected, whose lengths were 8099, 8246, 8091, 8482, and 8219, respectively. The samples X t were obtained from the raw time series with a time step interval of 10. For each time series, the first 70% of the samples were used for training the model, and the remaining 30% of the samples were used for testing classification accuracy. Finally, two-thousand eight-hundred ten training samples and 1206 testing samples were obtained and normalized.

Model Training
The aforementioned GRU based and LSTM based models were trained to classify the disturbance type. The training loss function was the standard multi-class cross-entropy loss. The training optimizer was the Adam optimizer [14]. The learning rate, epoch, and batch size were 0.001, 100, and 32, respectively. An Intel i7-8700K CPU and an NVIDIA RTX2080ti GPU were used as the deep learning environment. The disturbance classification model was implemented with the Pytorch library. Because the model's performance was related to the number of neurons in the RNN, more neurons provided better discriminative ability, but led to a longer computation. To investigate the influence of different neuron numbers, we trained the deep learning models with different settings. The hidden neuron numbers of the GRU and LSTM were set to 64, 128, 256, and 512, respectively.

Classification Evaluation
The classification accuracy metric is the percentage of the number of correctly classified samples among all the testing samples. The accuracy and runtime are reported in Table 1. The accuracy of the GRU-512 model was the best, and the runtime satisfied the real-time requirement. The classification results of GRU-512 are visualized in Figure 7, which shows that only a few samples were misclassified.

Beam Pointing Control with Disturbance Source Classification
Here, we investigate the effectiveness of the beam pointing control system and the influence of using disturbance type classification. Five groups of the target locking experiments were conducted in the disturbances of inherent drifts, air disturbance, transmission medium variations, mechanical motions, and elastic deformations. In each group, three experiments were conducted, which used a disabled controller, a controller with a fixed parameter setting, and a controller with a parameter setting selection. The fixed parameter setting was obtained under the basic disturbance of the inherent drifts. The parameter selection means that beforehand, the five optimal controller parameter settings were tuned under the five disturbance types, respectively, and then, the matched parameter setting was select according to the disturbance type identified by the proposed method when the controller was running. Figure 8 shows the 2D beam pointing (θ x , θ y ) distributions in the presence of five disturbance types, where θ x and θ y respectively represent the beam pointing in the horizontal direction and in the vertical direction. Figure 8 shows that the beam pointing drifts obviously without any control. Beam pointing drift can be reduced using control with fixed parameter setting under some types of disturbance, while beam pointing can not be effectively reduced under some types of disturbance. It is clear that beam pointing drift can be effectively reduced by using the control with the parameter setting selection. Table 2 shows the beam pointing instability under the five disturbance types in the three experiments. A, B, and C represent the experiment of no control, control with a fixed parameter setting, and control with parameter setting selection, respectively. θ 2 is the total RMSE of the horizontal and vertical directions. Beam pointing drift can be effectively reduced with the RMSE under 10 µrad under the four types of disturbance. In addition, the RMSE of beam pointing drift using the proposed method can be reduced to 26.81 µrad from 208.2 µrad under transmission medium variation. From the experiment results, it is shown that the proposed control method can adapt to different types of disturbances. Moreover, the proposed RNN based classification model can identify the disturbance type and then select the best matched control parameter setting automatically.

Discussions
Compared with the kinematic model based on the beam delivery matrix, the kinematic model based on the Jacobian matrix is not only adaptive to the changes of the beam path, but also can be conveniently calibrated by action motions. From the results shown in Section 5.1, it can be seen that the calibration result is adequately accurate. In order to get the kinematic model, it just takes a few seconds using the proposed calibration methods. A classical laser beam control system with fixed control parameters can always perform well when encountering various disturbances. Thus, it is urgent to analyze the characteristics of disturbances and classify the types. To observe the beam pointing drifts under different types of disturbances, we captured the beam pointing drift data under five types of disturbances, which were generated by a transparent box. From the beam pointing drift data, a temporal signal can be obtained by the type of disturbance. As the recurrent neural network is good at time series classification, we propose a disturbance classification method based on the RNN. From the classification results in Section 5.2, the GRU network with 512 hidden neuron numbers has the highest accuracy, and its runtime is 10.1ms, which can satisfy the real-time requirement. Then, we chose the GRU-512 classification model for the laser beam control system. Five groups of target locking experiments were conducted in the mentioned disturbances. The experiments of no control, control with a fixed parameter setting, and control with parameter setting selection were carried out to observe the control performance. Compared with the classical control method with a fixed parameter setting, the RMSE of beam pointing drift can be reduced by 87.12% by the proposed control method. From the experimental results in Section 5.3, the control method with disturbance classification adapts to different types of disturbances. However, some issues should be considered in future work. First, in a practical sense, laser beam control will not experience these five listed disturbances alone. More disturbances need to be studied in future work, so the beam stabilization pointing system can be more universal under various disturbances.Secondly, the proposed beam pointing stabilization methods mainly deal with disturbances under 10Hz because of the limited sampling frequency and hardware bandwidth, so it is necessary to build a high-bandwidth control system with high real-time performance when the frequency of the pulsed laser or disturbances is high. Finally, we will study reinforcement learning by combining classification with parameter adjustment to optimize the control parameters in real-time control.

Conclusions
In this paper, a beam pointing control system is developed with two FSMs and two PSDs, which can regulate both the position and angle of a laser beam. The kinematic model of the optical path is analyzed by the beam delivery matrix. A Jacobian matrix feedback controller is proposed, which is adaptive to the optical path using the active motion based self-calibration. To realize the intelligent identification of the disturbance type, a generic data-driven disturbance classification method is proposed by using an RNN. The trained RNN model can classify the disturbance type in real time, and the controller's parameter setting can be better selected. As the experimental results show, beam pointing drift can be effectively reduced with the RMSE under 10 µrad under the four types of disturbances. In addition, the RMSE of beam pointing drift using the proposed method can be reduced to 26.81 µrad from 208.2 µrad under transmission medium variation. Thanks to the classification of the disturbance type, the control accuracy can be improved when facing various disturbance types.

Conflicts of Interest:
The authors declare no conflict of interest.