Control system and control algorithm for improving laser direction stability

By combining the bidirectional recurrent neural network and PID control with self-attention mechanism, high-precision and fast response laser beam direction control is achieved, solving the problems of slow response speed, low control accuracy and poor environmental adaptability in the existing technology, significantly improving The overall performance of the system.

CN119472240AActive Publication Date: 2025-02-18SHANGHAI INST OF OPTICS & FINE MECHANICS CHINESE ACAD OF SCI

Patent Information

Application Number
CN202411495014.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-18
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The existing fast mirror control system has slow response speed, low control accuracy and poor environmental adaptability in complex dynamic environments, making it difficult to meet the needs of high-precision optical systems.

Method used

Using a bidirectional recurrent neural network based on self-attention mechanism and an intelligent system of PID control, the laser beam direction control with high precision and fast response is achieved through deep collaborative optimization of neural network prediction and PID control.

Benefits of technology

It significantly improves the accuracy and anti-interference ability of laser beam direction control, shortens the adjustment time, enhances the system's adaptability, and maintains excellent control performance in various complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472240A_ABST
    Figure CN119472240A_ABST
Patent Text Reader

Abstract

The invention relates to a control system and a control algorithm for improving the stability of a laser direction, and discloses a fast reflector control system and algorithm based on a bidirectional recurrent neural network fusing a self-attention mechanism and PID (Proportion Integration Differentiation) control. The core of the invention lies in that neural network prediction and PID control are innovatively combined to form an intelligent prediction-feedback control system. According to the system, a bidirectional recurrent neural network based on a self-attention mechanism is adopted for prediction, a comprehensive error concept is introduced to fuse an actual error and a prediction error, and intelligent self-adaptive adjustment of PID parameters is achieved. The system can significantly improve the precision of laser beam direction control, the anti-interference capability and the dynamic response speed, and has a wide application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a precise control technology of a laser system, and in particular to a technology for controlling a fast-reflecting mirror to improve the directional stability of the laser by combining an advanced adaptive control algorithm with a bidirectional recurrent neural network (Bi-RNN) and an attention mechanism. Background Art

[0002] Precise control of lasers is crucial in many fields such as optical communications, precision manufacturing, and medical surgery. Traditional laser control systems use various feedback control algorithms to adjust the position of the fast mirror to correct the path of the laser beam. However, existing technologies usually rely on traditional control theory. In recent years, studies have also shown that control algorithms based on long short-term memory (LSTM) networks have achieved excellent results in the field of fast mirror control. For example, [1] proposed an adaptive control method based on LSTM, which significantly improved the laser pointing accuracy by learning environmental changes in real time, demonstrating the application prospects of intelligent algorithms in this field.

[0003] References:

[0004] [1] Chang, Hui et al. "Laser Beam Pointing Stabilization Control through Disturbance Classification." Sensors (Basel, Switzerland) 21 (2021): n.

[0005] Although these methods are effective, the existing fast-reflection mirror control system has the following technical problems in complex dynamic environments.

[0006] 1. Slow response speed: Traditional fast-reflection mirror control systems are unable to make timely adjustments when faced with rapidly changing external interference, resulting in a delayed system response and affecting overall performance.

[0007] 2. Low control accuracy: Existing control algorithms are not accurate enough when dealing with nonlinear and time-varying systems, and it is difficult to meet the requirements of high-precision optical systems. Especially in complex environments, control accuracy is often difficult to guarantee.

[0008] 3. Poor environmental adaptability: It is sensitive to environmental changes and requires frequent parameter adjustments under different working conditions. It is difficult to adapt to the changing working environment, which limits the application scope of the system.

[0009] Therefore, a more advanced and adaptive method is needed to monitor and predict the laser path in real time and make high-speed and precise adjustments to maintain the stability of the laser beam. Summary of the invention

[0010] In order to solve the above technical problems, the present invention proposes a control system and control algorithm for a fast-reflection mirror based on a bidirectional recurrent neural network fused with a self-attention mechanism and PID control.

[0011] The hardware system includes: a laser source that provides a stable light source input. The beam shaping module includes an efficient collimator and beam expander to improve the quality of the incident beam and the overall performance of the system. The fast mirror uses a piezoelectric ceramic drive with a high response speed to achieve fast and accurate beam deflection. The imaging sensor uses a CCD camera to capture the spot position information in real time. The computer is used as a high-performance workstation to run the control algorithm and data processing. The NIDAQ board is used to achieve high-speed data acquisition and control signal output to ensure the real-time performance of the system.

[0012] The present invention realizes an intelligent system combining neural network prediction and PID control, which is used to improve the accuracy and anti-interference ability of laser beam direction control. The core technical solution is to innovatively combine neural network prediction with PID control to form an intelligent prediction-feedback control system. The highlight is the realization of deep collaborative optimization of neural network-PID. This collaborative optimization strategy gives full play to the predictive ability of neural network and the reliability of PID control, forming a highly intelligent and adaptive control system. Specifically, collaborative optimization includes the following key aspects:

[0013] 1. Comprehensive error concept: The system introduces the concept of comprehensive error, which improves the foresight of control by fusing the actual error and the future error predicted by the neural network. The fusion formula is: E(t) = α*e(t) + (1-α)*e′(t+1), where α is an adjustable weight. This error fusion mechanism enables the computer to respond to system changes in advance, significantly improving control accuracy and response speed.

[0014] 2. Online learning mechanism: The neural network model can continuously learn from real-time control data and update the network weights, so that the prediction model always maintains an accurate description of the current system characteristics. At the same time, the computer's parameter adjustment strategy will also be optimized according to the results of online learning, forming a closed-loop self-improvement process.

[0015] 3. Multi-model fusion and anomaly detection: The system implements multi-model fusion and anomaly detection mechanisms. By training multiple neural network models for different working conditions and adopting a dynamic weight allocation strategy, the system can adapt to various complex working environments. The anomaly detection mechanism can identify system behaviors that do not conform to historical patterns, adjust the control strategy in a timely manner, and improve the robustness of the system.

[0016] In order to support this deep collaborative optimization, the present invention adopts the following design in the system architecture:

[0017] 1. Neural network prediction: A bidirectional recurrent neural network model based on the self-attention mechanism, which includes an input layer, an embedding layer, a bidirectional RNN layer, a self-attention layer, a fully connected layer, and an output layer.

[0018] 2. Improved PID control: In addition to using the comprehensive error, techniques such as integral separation, variable integral coefficient and incomplete differential are introduced to further improve the control performance.

[0019] 3. Hardware implementation: The invention adopts a real-time control system based on the NIPXIe platform, which realizes data acquisition and control signal output through a CCD camera and a multi-function data acquisition card (PXIe-6363), ensuring the real-time performance of neural network prediction and PID control.

[0020] 4. Software architecture: Based on real-time operating system, it adopts modular design and distributed computing framework to improve the reliability and scalability of the system.

[0021] The specific solution of the present invention is to propose a control system for improving the stability of laser direction, including: a laser source, a beam shaping module, a fast mirror, an imaging sensor, a computer and a NIDAQ board; along the transmission direction of the optical path, the laser source, the beam shaping module, the fast mirror and the imaging sensor need to be arranged in sequence;

[0022] The laser source is used to provide a stable incident light beam input;

[0023] The beam shaping module includes a collimator and a beam expander, and is used to improve the quality of the incident beam;

[0024] The fast reflection mirror is driven by piezoelectric ceramics to achieve light beam deflection;

[0025] The imaging sensor adopts a CCD camera to capture the light spot position information in real time; the imaging sensor is electrically connected to the computer and collects the light spot position information. After the data is collected, the light spot position information data is transmitted to the computer. The computer accepts the light spot position information as input, runs the control algorithm, and generates a control signal as output; the NIDAQ board is electrically connected to the computer and the fast reflex mirror, and the NIDAQ board transmits the control signal generated by the computer to the fast reflex mirror.

[0026] The present invention also proposes a control algorithm for improving the directional stability of the laser. The control algorithm is a bidirectional recurrent neural network based on a self-attention mechanism, which is used to predict the spot position deviation at the next moment. The specific steps are:

[0027] S1. System calibration:

[0028] Start the laser source and maintain it for a preset time to allow it to reach a stable working state;

[0029] Adjust the position of the collimator to achieve the best collimation state of the light beam;

[0030] Adjust the distance between the beam expander groups to make the beam expansion ratio meet the design requirements;

[0031] Control the fast mirror to enter the initial state and record the position of the light spot image collected by the imaging sensor as the basis

[0032] Quasi-position;

[0033] Apply a preset voltage sequence to the fast mirror and record the corresponding change in the position of the light spot;

[0034] Establish the mapping relationship between the fast mirror driving voltage and the angle quantity to obtain the system calibration matrix;

[0035] The linear relationship between the fast mirror angle deflection and the driving voltage is calculated according to the calibration matrix;

[0036] S2. Data acquisition and image preprocessing:

[0037] Set the target coordinates (x1, y1) of the desired position of the light spot;

[0038] Start the imaging sensor, capture the light spot image in real time, and transmit the image data to the computer;

[0039] The computer filters the acquired images to remove noise;

[0040] Improve image contrast using adaptive contrast enhancement technology;

[0041] Convert the grayscale image into a binary image and use operations such as dilation and erosion to optimize the spot shape;

[0042] The center coordinates of the light spot are extracted using the centroid method, and the actual position deviation from the expected coordinates is calculated: e(t);

[0043] S3. Neural network model data processing:

[0044] The position deviation e(t) sequence of the past n moments is used as training samples;

[0045] The preprocessed data is fed into multiple bidirectional recurrent neural network models based on the self-attention mechanism;

[0046] Each neural network model independently calculates and outputs the prediction deviation e'(t+1) at the next moment (t+1);

[0047] Collect the prediction results of all neural network models at time t+1;

[0048] Convert the prediction error into an accuracy score and normalize it to obtain the weight coefficient wi;

[0049] According to the weighted summation of each model weight wi, the fused prediction deviation is obtained: e'(t+1)=Σ(wi*e′i(t+1))

[0050] S4. Calculate the comprehensive error E(t):

[0051] According to the actual deviation e(t) and the predicted deviation e'(t+1), as well as the adjustable weight factor α(<0<α<1), the comprehensive error is calculated: E(t)=α*e(t)+(1-α)*e'(t+1).

[0052] S5. Generate control signal: u(t)

[0053] Generate a control signal u(t), whose mathematical expression is: u(t) = Kp*E(t) + Ki*∫E(τ)dτ + Kd*dE(t) / dt;

[0054] Where E(t) is the comprehensive error calculated in S4; Kp, Ki and Kd are the proportional, integral and differential control parameters respectively;

[0055] S6. Control signal output:

[0056] The control signal u(t) is converted into an angle adjustment that the fast-reflection mirror can understand through the NIDAQ board and sent to the driver of the fast-reflection mirror.

[0057] Define the minimum adjustment unit θmin as 0.005 degrees, the scaling factor k as 0.1, and the maximum adjustment step number Nmax as 10;

[0058] Determine the adjustment direction direction = sign(u(t)). If u(t)>0, sign(u(t)) = 1, indicating adjustment in the positive direction; if u(t)<0, sign(u(t)) = -1, indicating adjustment in the negative direction;

[0059] Calculate the number of adjustment steps, adjustment step number N = min(floor(|u(t)| / k);

[0060] Generate adjustment instructions, adjustment amount θadj = direction*θmin*N;

[0061] According to the linear relationship between the angle deflection of the fast mirror and the driving voltage, the adjustment amount is converted into a voltage signal V;

[0062] The driver of the fast mirror adjusts the angle of the fast mirror according to the received voltage signal V.

[0063] Further, in step S6, the voltage signal V=0.65+0.65*tanh(7.5*θadj+0.8*θadj 3)

[0064] Furthermore, after executing step S6, the system returns to step S2 and starts a new control cycle; at the same time, the online learning process is continuously carried out in parallel to continuously optimize the control algorithm. The online learning process is as follows:

[0065] Maintain a fixed-size circular buffer to store the control data of the recent period;

[0066] At regular intervals, samples are randomly drawn from the buffer to form a small batch training set;

[0067] Adopt the learning rate decay strategy to gradually reduce the learning rate as the training progresses to ensure stable convergence of the model;

[0068] Adopt Adam optimizer to update weights;

[0069] L2 regularization method is used to prevent fitting.

[0070] The beneficial effects of the present invention are remarkable:

[0071] 1. Improved control accuracy: Compared with traditional PID control, this system can reduce the steady-state error of laser beam direction control by about 50%.

[0072] 2. Enhanced anti-interference ability: especially the suppression effect on complex nonlinear and time-varying interference is obvious.

[0073] 3. Improved dynamic response: The system adjustment time is shortened, the dynamic response speed is improved, and it can adapt to rapidly changing control needs.

[0074] 4. Strong adaptability: Through collaborative optimization, the system achieves strong adaptability and can maintain excellent control performance under various working conditions.

[0075] In summary, the present invention creates an intelligent and adaptive laser beam direction control system through deep collaborative optimization of neural network-PID. The system not only excels in control accuracy, anti-interference ability, real-time and adaptability, but also has broad application prospects, providing innovative solutions for high-precision laser technology and other precision control fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 This is a system diagram

[0077] 1-Laser source, 2-Beam shaping module, 3-Fast reflector, 4-Imaging sensor, 5-Computer and 6-NIDAQ board DETAILED DESCRIPTION

[0078] The present invention is further described below in conjunction with implementation examples and drawings, but the scope of protection of the present invention shall not be limited by this. The present invention provides an intelligent system combining neural network prediction and PID control to improve the accuracy and anti-interference ability of laser beam direction control.

[0079] 1. System structure

[0080] The system mainly consists of a laser source 1, a beam shaping module 2, a fast mirror 3, an imaging sensor 4, a computer 5 and a NIDAQ board 6. The laser source provides a stable beam, and the beam shaping module performs beam shaping and beam expansion. The fast mirror is driven by piezoelectric ceramics to achieve rapid beam deflection and accurately adjust the beam direction. The imaging sensor captures the spot image of the target position in real time. The computer executes the control algorithm, processes the data and generates a control signal. The data acquisition board transmits the control signal to the fast mirror driver to adjust the fast mirror angle.

[0081] The initialization and calibration process of the system includes starting the laser source 1 and maintaining it for a preset time (about 5 minutes) to achieve a stable working state, optimizing the beam collimation state by adjusting the position of the collimator in the beam shaping module 2, and adjusting the spacing of the beam expander group so that the beam expansion ratio reaches the design requirement (5 times). Then, the fast mirror 3 is controlled to enter the initial state (0V driving voltage), the reference position of the light spot collected by the imaging sensor 4 is recorded, and a preset voltage sequence (-10V to +10V, step size 0.2V) is applied to the fast mirror, and the corresponding change in the light spot position is recorded. Through these data, a mapping relationship between the fast mirror driving voltage and the angle quantity is established, the system calibration matrix is ​​obtained, and the linear relationship between the fast mirror angle deflection and the driving voltage is calculated accordingly.

[0082] These components work together to achieve precise beam control, real-time image acquisition, and fast-response closed-loop feedback, providing technical support for precision optical applications. Through a strict initialization and calibration process, the system is ensured to have accurate control characteristics and reliable working status.

[0083] 2. System working principle

[0084] When the system is working, the beam emitted by the laser source is first pre-processed by the beam shaping module to improve the beam directivity. The optimized beam is reflected by the fast mirror, and the beam direction can be changed by adjusting the fast mirror angle. The reflected beam forms a light spot on the target and is collected in real time by the imaging sensor. The computer analyzes the image data, extracts the light spot position coordinates, calculates the position deviation, and generates a control signal, which controls the rotation of the fast mirror through the NIDAQ board to form a closed-loop control.

[0085] 3. Intelligent control algorithm process

[0086] 3.1 Data collection and preprocessing

[0087] After setting the desired spot coordinates (x1, y1), the system first collects the spot image through the imaging sensor. The collected original image may contain noise and interference, so a series of preprocessing steps are required: Use filtering to remove random noise in the image. Improve the image contrast through adaptive contrast enhancement technology. Convert the grayscale image to a binary image to facilitate subsequent spot positioning. Use operations such as dilation and erosion to optimize the spot shape and eliminate small interference areas.

[0088] The system then uses the centroid method to extract the center coordinates of the light spot, that is, the current coordinates (x2, y2). This coordinate is compared with the pre-set expected coordinates to calculate the position deviation of the light spot e(t) = (|x1-x2|, |y1-y2|). This deviation vector contains components in both the horizontal and vertical directions, which serves as the basis for subsequent control.

[0089] 3.2 Neural Network Model and Prediction

[0090] 3.2.1 Neural Network Model:

[0091] The present invention uses a bidirectional recurrent neural network model based on a self-attention mechanism for prediction. The network architecture of the model includes the following hierarchical structures from bottom to top:

[0092] The input layer receives the preprocessed position deviation data sequence, each sequence contains the horizontal and vertical deviation components of n time steps.

[0093] The embedding layer maps the input data into a 256-dimensional feature space, capturing the latent feature representation of the data.

[0094] The bidirectional RNN layer adopts a two-layer stacked structure, each layer contains two 128-dimensional RNN units, forward and backward, which process from the beginning and end of the sequence respectively. The two-layer stacked design enables the model to extract time series features layer by layer and form a hierarchical feature representation.

[0095] The self-attention layer calculates the relevance weights of different positions in the sequence through the query vector (Q), key vector (K), and value vector (V), and uses the scaled dot product attention mechanism to adaptively focus on important time steps.

[0096] The fully connected layer contains two hidden layers (128 / 64 neurons) and uses the ReLU activation function for feature combination.

[0097] The output layer uses a linear activation function to predict the horizontal and vertical position deviations at the next moment.

[0098] This structure effectively captures the temporal characteristics of the position deviation sequence through a combination of feature extraction, sequence modeling and attention mechanism, providing predictive support for control decisions.

[0099] 3.2.2 Neural Network Prediction

[0100] The preprocessed data is fed into a bidirectional recurrent neural network based on a self-attention mechanism as input to predict the position deviation at the next moment. This network structure can effectively capture long-term dependencies in time series data and is very suitable for processing data with time continuity such as laser beam position.

[0101] The input of the network is the position deviation sequence of the past n moments, with a value of 20. The deviation data at each moment contains components in both the horizontal and vertical directions. The output of the network is the predicted deviation at the next moment (t+1), which also contains components in both directions. This network structure can better capture the temporal characteristics and long-term and short-term dependencies of the beam position change through multi-level feature extraction and nonlinear mapping, combined with bidirectional information flow and self-attention mechanism, thereby improving the accuracy and robustness of the prediction.

[0102] The network is trained using historical data and the back propagation algorithm is used to optimize the network parameters. When the system is running online, the network can continuously learn and update, constantly adapt to the dynamic changes of the system, and ensure the stability and adaptability of the prediction performance. Compared with the unidirectional RNN network, this bidirectional recurrent neural network prediction method based on the self-attention mechanism can more comprehensively utilize the time series information, provide more accurate prediction results, and provide a more reliable basis for subsequent control decisions.

[0103] 3.3 Anomaly Detection

[0104] After the prediction deviation e'(t+1), in terms of anomaly detection, the system uses moving average and moving standard deviation to identify outliers. Let μt and σt be the moving average and moving standard deviation at time t, respectively. The judgment criteria for anomaly detection can be expressed as:

[0105] |e(t)-μt|>k*σt

[0106] Here, k is a preset threshold constant, which is 2.

[0107] When an anomaly is detected, the system will temporarily adjust the control strategy, such as increasing the reliance on the current actual error and reducing the reliance on the prediction. At the same time, the system will exclude abnormal data points and not add them to the training buffer. If multiple abnormal points are detected continuously, the model retraining process is triggered.

[0108] 3.4 Model Fusion

[0109] First, train multiple neural network models for different working conditions. Use the dynamic weight assignment method to calculate the weight of each model based on its prediction accuracy in the recent period. The final prediction result is the weighted average of the prediction results of each model. The calculation of the weight wi is based on the prediction accuracy of each model:

[0110] wi=exp(-λ*MSEi) / Σ(exp(-λ*MSEj))

[0111] Here, MSEi is the mean square error of the ith model in the most recent period, and λ is a positive constant used to control the sensitivity of weight distribution. After normalization, that is, ∑wi=1, the weight coefficient wi is obtained. The mathematical expression of weighted sum model fusion based on the weight wi of each model is as follows:

[0112] e'(t+1)=Σ(wi*e′i(t+1))

[0113] Among them, e′(t+1) is the prediction deviation at time t+1 after fusion; e'i(t+1) is the prediction deviation of the i-th model at time t+1.

[0114] 3.5 Comprehensive error calculation

[0115] In order to make full use of the actual observed deviation information and the future deviation information predicted by the neural network, the system introduces the concept of comprehensive error. The system calculates the comprehensive error E(t) based on the actual position deviation e(t) at the current moment and the predicted position deviation e'(t+1) at the next moment:

[0116] E(t)=α·e(t)+(1-α)·e′(t+1)

[0117] Among them, α is an adjustable weight factor with a value range of 0 to 1. The value of α determines the importance the system attaches to the current error and the predicted error. A larger α value will make the system pay more attention to the current actual deviation, which is conducive to rapid response; a smaller α value will make the system consider the predicted future deviation more, which is conducive to smooth control and early adjustment.

[0118] The value of α can be adjusted dynamically according to the actual operation of the system. For example, when the system is in a stable state, the value of α can be appropriately reduced to increase the reliance on prediction; when sudden interference is detected, the value of α can be temporarily increased to enhance the system's immediate response capability.

[0119] In order to prevent integral saturation, the algorithm introduces an integral suppression factor f(|E(t)|). When the error is large, this factor automatically reduces the impact of the integral action. In the specific implementation, a function related to the absolute value of the error is defined:

[0120] f(|E(t)|)=1 / (1+β|E(t)|)

[0121] Where β is an adjustable parameter, and the function decreases as the error increases, thereby achieving dynamic adjustment of the integral term.

[0122] Secondly, in order to avoid control signal jumps caused by sudden changes in the error signal, the algorithm performs a differential operation on the controlled quantity y(t) rather than the error signal. This improvement smoothes the differential signal by introducing a low-pass filter:

[0123] D(t)=-Kd*(dy(t) / dt) / (1+τf*s)

[0124] Where τf is the filter time constant and s is the complex frequency variable in the Laplace transform. This process effectively reduces the system's sensitivity to noise.

[0125] Finally, the algorithm dynamically adjusts the PID parameters according to the size of the error to achieve more flexible control. This dynamic adjustment mechanism is achieved by defining an error-related parameter adjustment function:

[0126] g(|E(t)|)=η*|E(t)| / (1+γ|E(t)|)

[0127] Among them, η and γ are adjustable parameters. As the error increases, the function increases the proportional and differential effects, while appropriately reducing the integral effect. The dynamically adjusted PID parameters are:

[0128] Kp(t)=Kp_base+g(|E(t)|)

[0129] Ki(t)=Ki_base-g(|E(t)|)

[0130] Kd(t)=Kd_base+g(|E(t)|)

[0131] 3.6PID control

[0132] The improved PID control algorithm operates based on the comprehensive error E(t) calculated by the system, and introduces a number of optimization measures based on the traditional PID control. First, the system establishes a basic PID controller, whose output u(t) consists of three terms: proportional, integral and differential:

[0133] u(t)=Kp*E(t)+ki*∫E(τ)dτ+Kd*dE(t) / dt

[0134] f(|E(t)|)=1 / (1+β|E(t)|)

[0135] D(t)=-Kd*(dy(t) / dt) / (1+τf*s)

[0136] g(|E(t)|)=η*|E(t)| / (1+γ|E(t)|)

[0137] Kp(t)=Kp base +g(|E(t)|)

[0138] Ki(t)=Ki base -g(|E(t)|)

[0139] Kd(t)=Kd base +g(|E(t)|)

[0140] The final PID controller output is obtained by combining these optimized terms, and the control signal is kept within a reasonable range by limiting the operation:

[0141] u_final(t)=max(min(u(t),umax),umin)

[0142] Through these improvements, the PID controller can better adapt to the characteristics of the laser beam control system and provide more precise and stable control effects under various working conditions.

[0143] 3.7 Execution Control

[0144] The control signal output process is to convert the calculation results of the PID controller into the actual physical adjustment of the fast mirror. This process involves multiple delicate steps and considerations to achieve high-precision angle control. First, based on the calculated PID control signal u(t), the system begins to perform fine-tuning operations. In order to achieve high-precision adjustment, the minimum adjustment unit θmin is defined as 0.005 degrees, and the scaling factor k is introduced as 0.1 and the maximum number of adjustment steps Nmax is 10.

[0145] The determination of adjustment direction and number of steps follows the following logic:

[0146] direction = sign(u(t))

[0147] If u(t)>0, sign(u(t))=1, indicating adjustment in the positive direction; if u(t)<0, sign(u(t))=-1, indicating adjustment in the negative direction;

[0148] N=min(floor(|u(t)| / k),Nmax)

[0149] The actual adjustment amount θadj is calculated as follows:

[0150] θadj=direction*θmin*N

[0151] This method ensures that each adjustment is an integer multiple of the minimum adjustment unit, which helps to improve the accuracy and stability of control.

[0152] Next, the system needs to convert θadj into a specific instruction format that the driver can understand. The driver accepts the voltage signal V as input. According to the linear relationship between the angle deflection of the fast mirror and the driving voltage, the conversion relationship can be expressed as:

[0153] V=0.65+0.65*tanh(7.5*θadj+0.8*θadj^3),

[0154] The system uses the NI-DAQmx API to create analog output tasks and configure the corresponding channels, sampling rates, and buffer sizes. The converted control signals are sent to the driver of the fast mirror through the analog output channels of the NIDAQ data acquisition board. After the driver receives these control signals, the internal control circuit converts them into drive currents or drive voltages suitable for the actuator.

[0155] The fast mirror usually adopts a dual-axis structure, which can make precise angle adjustments in both the x and y directions. In order to achieve high-precision angle control, the drive system of the fast mirror uses a high-response actuator made of piezoelectric ceramics. After the adjustment is performed, the system will wait for a short time to allow the adjustment to complete and stabilize.

[0156] Through this iterative fine-tuning process, the system can gradually adjust the fast mirror to the desired position without relying on the precise angle-control signal mapping relationship. This method is particularly suitable for experimental scenarios that require high-precision control and can effectively deal with nonlinear characteristics and external interference that may exist in the system. Highly responsive actuators can respond to control signals quickly and accurately to achieve small angle adjustments, thereby ensuring high precision and high stability of the entire system.

[0157] 3.8 Online Learning Mechanism

[0158] This system uses an online learning mechanism to enable the neural network model to continuously learn and adapt during the operation of the system. The specific implementation mechanism is as follows:

[0159] Data management mechanism: The system is configured with a circular buffer with a capacity of 10,000 samples to store the latest control data. Each data sample contains input features (historical position deviation sequence) and corresponding labels (actual position deviation). When new control data is generated, the system adds it to the buffer; when the buffer reaches the upper limit of capacity, the first-in-first-out (FIFO) strategy is adopted to automatically delete the earliest data sample to ensure that the buffer always maintains the latest system status information.

[0160] Training strategy: The system uses small batch training, triggering a training process every 100 control cycles. During each training, 256 samples are randomly selected from the circular buffer to form a mini-batch. This random sampling method can reduce the correlation between samples and improve the stability of training. The training process uses the back-propagation algorithm to update the network weights to minimize the prediction error.

[0161] Learning rate adjustment: A hybrid learning rate strategy combining step decay and cosine annealing is adopted. The initial learning rate is set to 0.001. After each 1000 mini-batch trainings, the learning rate is step-decayed with a decay factor of 0.9. In each step cycle, the cosine annealing strategy is applied to make fine-grained adjustments to the learning rate to ensure smooth changes in the learning rate. The lower limit of the learning rate is set to 1e-6 to prevent the learning process from stagnating prematurely. The cycle of the cosine annealing strategy is synchronized with the step decay. This hybrid strategy ensures the stability of learning while maintaining sufficient model plasticity.

[0162] Optimization algorithm: Use the Adam optimizer for weight update, where the momentum parameter β1 is set to 0.9 for first-order moment estimation; the second-order moment estimation parameter β2 is set to 0.999, and the numerical stability constant ε is set to 1e-8. The Adam optimizer can adaptively adjust the learning rate of each parameter, combining the advantages of momentum and RMSprop, and is suitable for online learning scenarios.

[0163] Regularization and anti-overfitting: L2 regularization technology is used, and the regularization coefficient λ is set to 0.0001. By adding the squared weight term to the loss function, the weight value is suppressed from being too large and the generalization ability of the model is improved. At the same time, the early stopping strategy is implemented to monitor the performance of the validation set: if the validation performance does not improve after 50 consecutive trainings, the training is suspended and the current best model is saved; if the performance still does not improve significantly after 500 cumulative trainings, the model re-initialization mechanism is triggered, but 20% of the original weights are retained as prior knowledge. This method not only retains effective learning experience, but also provides the model with an opportunity to re-learn.

[0164] Through the synergy of the above mechanisms, the system can continuously optimize the prediction performance while maintaining stability and adapt to the dynamic changes of system parameters and environment. This adaptive learning capability significantly improves the robustness and reliability of the control system and provides strong support for high-precision beam control.

Claims

1. A control system for improving the directional stability of a laser, characterized in that: include: Laser source (1), beam shaping module (2), fast mirror (3), imaging sensor (4), computer (5) and NIDAQ board (6); Along the transmission direction of the optical path, a laser source (1), a beam shaping module (2), a fast reflection mirror (3) and an imaging sensor (4) are sequentially arranged; The laser source (1) is used to provide a stable incident light beam input; The beam shaping module (2) comprises a collimator and a beam expander, and is used to improve the quality of the incident beam; The fast reflection mirror (3) is driven by piezoelectric ceramics to achieve light beam deflection; The imaging sensor (4) adopts a CCD camera and is used to capture the light spot position information in real time; the imaging sensor (4) is electrically connected to the computer (5) and collects the light spot position information data value and transmits it to the computer (5); the computer (5) receives the light spot position information as input, runs the control algorithm, and generates a control signal as output; The NIDAQ board (6) is electrically connected to the computer (5) and the quick-reflection mirror (3), and the NIDAQ board (6) transmits the control signal generated by the computer (5) to the quick-reflection mirror (3).

2. A control algorithm for improving laser directional stability, characterized in that: The control algorithm is a bidirectional recurrent neural network based on the self-attention mechanism, which is used to predict the spot position deviation at the next moment. The specific steps are: S1. System calibration: Starting the laser source (1) and maintaining it for a preset time to allow it to reach a stable working state; Adjusting the position of the collimator in the beam shaping module (2) so that the light beam reaches an optimal collimation state; Adjusting the spacing between the beam expansion mirror groups in the beam shaping module (2) so that the beam expansion ratio meets the design requirements; Controlling the fast reflection mirror (3) to enter an initial state, and recording the position of the light spot image collected by the imaging sensor as a reference position; Apply a preset voltage sequence to the fast mirror and record the corresponding change in the position of the light spot; Establish the mapping relationship between the fast mirror driving voltage and the angle quantity to obtain the system calibration matrix; The linear relationship between the fast mirror angle deflection and the driving voltage is calculated according to the calibration matrix; S2. Data acquisition and image preprocessing: Starting the imaging sensor (4), capturing the light spot image in real time, and transmitting the image data to the computer (5); The target coordinates (x1, y1) of the desired position of the light spot are set; the computer (5) filters the collected image to remove noise; Improve image contrast using adaptive contrast enhancement technology; Convert the grayscale image into a binary image and use operations such as dilation and erosion to optimize the spot shape; Use the centroid method to extract the center coordinates (x2, y2) of the light spot; Calculate the actual position deviation from the expected coordinates: e(t) is (|x1-x2|,|y1-y2|); S3. Neural network model data processing: The position deviation e(t) sequence of the past n moments is used as training samples; The preprocessed data is fed into multiple bidirectional recurrent neural network models based on the self-attention mechanism; Each neural network model independently calculates and outputs the prediction deviation e'(t+1) at the next moment (t+1); Collect the prediction results of all neural network models at time t+1; Convert the prediction error into an accuracy score and normalize it to obtain the weight coefficient wi; By performing weighted summation according to the weight wi of each model, we can obtain the fused prediction deviation: e'(t+1)=Σ(wi*e′i(t+1)). S4. Calculate the comprehensive error E(t): Based on the actual deviation e(t) and the predicted deviation e'(t+1), as well as the adjustable weight factor, α(<0<α<1), the comprehensive error is calculated: E(t)=α*e(t)+(1-α)xe'(t+1). S5. Generate control signal: u(t) Generate a control signal u(t), whose mathematical expression is: u(t) = Kp*E(t) + Ki*∫E(τ)dτ + Kd*dE(t) / dt; Where E(t) is the comprehensive error calculated in S4; Kp, Ki and Kd are the proportional, integral and differential control parameters respectively; S6. Control signal output: The control signal u(t) is converted into an angle adjustment value that can be understood by the fast-reflecting mirror through the NIDAQ board (6) and sent to the driver of the fast-reflecting mirror (3). Define the minimum adjustment unit θmin as 0.005 degrees, the scaling factor k as 0.1, and the maximum adjustment step number Nmax as 10; Determine the adjustment direction direction = sign(u(t)). If u(t)>0, sign(u(t)) = 1, indicating adjustment in the positive direction; if u(t)<0, sign(u(t)) = -1, indicating adjustment in the negative direction; Calculate the number of adjustment steps, adjustment step number N = min(floor(|u(t)| / k); Generate adjustment instructions, adjustment amount θadj = direction*θmin*N; According to the linear relationship between the angle deflection of the fast mirror and the driving voltage, the adjustment amount is converted into a voltage signal V; The driver of the quick reflection mirror (3) adjusts the angle of the quick reflection mirror (3) according to the received voltage signal V.

3. A control algorithm for improving laser direction stability as claimed in claim 2, characterized in that: In step S3, after predicting the deviation e'(t+1), before collecting the prediction results of all neural network models at time t+1, anomaly detection is performed. The system uses moving average and moving standard deviation to identify outliers. Let μt and σt be the moving average and moving standard deviation at time t, respectively. The judgment criteria for anomaly detection can be expressed as: |e(t)-μt|>k*σt Here, k is a preset threshold constant, which is 2. When an anomaly is detected, the system temporarily adjusts the control strategy and excludes abnormal data points. If multiple anomalies are detected continuously, the model retraining process is triggered.

4. A control algorithm for improving laser direction stability as claimed in claim 2, characterized in that: Step S6 obtains a voltage signal V=0.65+0.65*tanh(7.5*θadj+0.8*θadj 3 ).

5. A control algorithm for improving laser direction stability as claimed in claim 2, characterized in that: After executing step S6, the system returns to step S2 and starts a new control cycle; at the same time, the online learning process continues in parallel to continuously optimize the control algorithm. The online learning process is as follows: Maintain a fixed-size circular buffer to store the control data of the recent period; At regular intervals, samples are randomly drawn from the buffer to form a small batch training set; Adopt the learning rate decay strategy to gradually reduce the learning rate as the training progresses to ensure stable convergence of the model; Adopt Adam optimizer to update weights; L2 regularization method is used to prevent fitting.

Citation Information

Patent Citations

  • Light beam direction control method

    CN105425869A

  • Acquisition method of training sample set, model training method and related device

    CN113780349A

  • Visual laser calibration platform system

    CN114485968A

  • Light beam stabilizing system based on Labview-FPGA

    CN115639777A

  • Laser pointing control method and system based on recurrent neural network

    CN117492363A

Cited By

  • Intelligent laser alignment system

    CN120353039A

  • Accurate spraying control method and device based on combination of laser scanning and neural network

    CN120686582A

  • Optical communication beacon tracking prediction method based on adaptive prediction model

    CN121600070A