Two-stage hysteresis and coupling compensation method and device for fast mirror

By constructing a full-stroke hysteresis loop dataset for fast-reflecting mirrors and performing segmented processing, combined with a linear coefficient lookup table and an LSTM neural network, the problem of poor hysteresis compensation accuracy of fast-reflecting mirrors was solved, achieving accurate compensation for irregular nonlinear errors and improving the pointing accuracy and stability of the system.

CN121763559BActive Publication Date: 2026-05-12SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2026-03-05
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing fast-reflection mirror hysteresis compensation methods cannot effectively offset irregular nonlinear errors, resulting in poor compensation accuracy. They are particularly unsuitable for complex, asymmetric hysteresis scenarios, affecting high-precision pointing performance.

Method used

A dataset of hysteresis loops throughout the entire stroke of a fast-reflecting mirror is constructed and segmented. A lookup table of linear coefficients for the rising and falling hysteresis segments is established. Hysteresis and coupling compensation are performed by combining an LSTM neural network and a Bayesian optimization algorithm. The final compensation angle is output through segmented linear compensation and neural network training.

Benefits of technology

It significantly improves the accuracy of fast-reflecting mirror hysteresis and coupling compensation, reduces compensation error, and improves the pointing accuracy and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121763559B_ABST
    Figure CN121763559B_ABST
Patent Text Reader

Abstract

The application discloses a two-stage hysteresis and coupling compensation method and device for a fast mirror, and solves the technical problem that the existing hysteresis compensation method for the fast mirror cannot offset irregular nonlinear errors during compensation, thereby causing poor compensation accuracy. The method comprises the following steps: when hysteresis compensation is needed for the fast mirror, a full-stroke hysteresis loop data set of the fast mirror is constructed and segmented to obtain a plurality of ascending and descending hysteresis segmented intervals; a corresponding linear coefficient lookup table is constructed based on the intervals; parameters such as a current pointing error and a target trajectory angle are determined, and target local linear coefficients are extracted according to a voltage working state; a first-stage compensation voltage is calculated, a compensation angle is measured, and LSTM training data are constructed; the LSTM is trained based on a Bayesian optimization algorithm, the fast mirror is tested by combining the first-stage compensation voltage through the trained model, and a final compensation angle is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of control science and engineering technology, and in particular to a two-stage hysteresis and coupling compensation method and apparatus for a fast-reflecting mirror. Background Technology

[0002] High-precision beam pointing and tracking technology is a core technology of modern precision optical measurement systems, playing an indispensable role in laser detection fields such as space laser communication, inter-satellite laser communication, adaptive optics, and lidar. Fast-reflecting mirrors, with their advantages of fast response speed, high resolution, and compact size, have become the preferred actuator for precise beam pointing and tracking in these systems.

[0003] However, the inherent hysteresis nonlinearity of piezoelectric ceramic materials caused by the ferroelectric effect, along with the complex coupling motion of the two axes, results in a complex nonlinear mapping relationship between the output angle of a fast steering mirror (FSM) and the driving voltage. Specifically, the hysteresis nonlinearity manifests as the driver output being related not only to the current input voltage but also to historical inputs, causing the input-output relationship of the piezoelectric driver to exhibit a circular nonlinear graph with inconsistent voltage rise and fall paths. The cross-coupling error between the two axes manifests as the motion of one axis irregularly affecting the output angle of the other axis. In high-precision pointing applications, this characteristic can cause significant pointing tracking errors, exceeding 10% of the full stroke angle, severely impacting the system's pointing performance and becoming a key factor in achieving high-precision pointing with an FSM.

[0004] Existing hysteresis compensation methods for fast-reflecting mirrors primarily model hysteresis curves corresponding to specific periodic input signals, making them suitable for systems with regular trajectories. However, the modeling logic of these methods heavily relies on the regularity of the periodic input. When applied to complex, asymmetric hysteresis scenarios, the input signals of complex trajectories are often non-periodic and randomly changing. The hysteresis behavior no longer exhibits fixed, symmetrical circular characteristics but instead includes high-order nonlinear dynamic changes and irregular historical input path dependencies. This makes it difficult for the model to adapt to the hysteresis characteristics under complex scenarios, and it cannot offset irregular nonlinear errors during compensation, resulting in poor compensation accuracy. Summary of the Invention

[0005] This invention provides a two-stage hysteresis and coupling compensation method and apparatus for fast-reflecting mirrors, which solves the technical problem that existing hysteresis compensation methods for fast-reflecting mirrors cannot offset irregular nonlinear errors, resulting in poor compensation accuracy.

[0006] The first aspect of this invention provides a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror, comprising:

[0007] In response to the compensation request, construct the full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals;

[0008] Based on the multiple rising hysteresis segment intervals and the multiple falling hysteresis segment intervals, a lookup table for the linear coefficients of the rising process and a lookup table for the linear coefficients of the falling process are constructed.

[0009] Determine the current pointing error and the target trajectory angle corresponding to the fast-reflection mirror, the current input voltage and the current input voltage operating state, and extract the target local linear coefficients from the linear coefficient lookup table of the rising process or the linear coefficient lookup table of the falling process based on the current input voltage operating state;

[0010] The first-stage piecewise linear compensation voltage is calculated based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient. The fast-reflecting mirror is measured to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, LSTM neural network training data is constructed.

[0011] The LSTM neural network is trained using the Bayesian optimization algorithm based on the training data to obtain a trained LSTM neural network. The trained LSTM neural network is then used to test the fast-reflecting mirror based on the first-stage piecewise linear compensation voltage, and the final compensation angle is output.

[0012] Optionally, the step of constructing a fast-reflection mirror full-stroke hysteresis loop dataset and performing segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals includes:

[0013] A periodic voltage signal is applied to the fast-reflecting mirror to obtain an input voltage sequence;

[0014] The fast-reflecting mirror is measured for each input voltage in the input voltage sequence, and each input voltage and its corresponding output angle are paired to form a data pair.

[0015] The dataset consists of multiple data pairs representing the entire hysteresis loop.

[0016] Based on the voltage change trend in the full-stroke hysteresis loop dataset, the full-stroke hysteresis loop dataset is split into rising hysteresis dataset and falling hysteresis dataset.

[0017] Based on a preset fixed voltage interval, the voltage ranges in the rising hysteresis dataset and the falling hysteresis dataset are uniformly segmented to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0018] Optionally, the step of constructing a lookup table for the linear coefficients of the rising process and a lookup table for the linear coefficients of the falling process based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals includes:

[0019] Extract the input voltage value and output angle value corresponding to the beginning and end of each of the rising hysteresis segment intervals;

[0020] Based on the input voltage value and output angle value corresponding to each of the rising hysteresis segment intervals, calculate the local linearity coefficient corresponding to each of the rising hysteresis segment intervals;

[0021] Extract the input voltage value and output angle value corresponding to the beginning and end of each of the falling hysteresis segment intervals;

[0022] Based on the input voltage value and output angle value corresponding to each of the falling hysteresis segment intervals, calculate the local linearity coefficient corresponding to each of the falling hysteresis segment intervals;

[0023] Based on the local linear coefficients corresponding to the multiple rising hysteresis segment intervals and the multiple falling hysteresis segment intervals, a lookup table for the linear coefficients of the rising process and a lookup table for the linear coefficients of the falling process are constructed respectively.

[0024] Optionally, determining the current pointing error and the target trajectory angle corresponding to the fast-reflection mirror, the current input voltage, and the current input voltage operating state, and extracting the target local linear coefficient based on the current input voltage operating state from the linear coefficient lookup table for the rising process or the linear coefficient lookup table for the falling process, includes:

[0025] The target trajectory corresponding to the fast-reflecting mirror is tested to obtain the target trajectory angle, the current input voltage corresponding to the target trajectory angle, and the measured angle corresponding to the current input voltage;

[0026] The pointing error at the current moment is obtained by subtracting the measured angle from the target trajectory angle.

[0027] Real-time monitoring of the current input voltage's changing trend to determine the current input voltage's operating status:

[0028] If the current input voltage is greater than the input voltage at a historical time, the current input voltage operating state is determined to be a voltage rising state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the rising process.

[0029] If the current input voltage is less than or equal to the input voltage at a historical time, the current input voltage operating state is determined to be a voltage drop state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the drop process.

[0030] Optionally, the step of calculating the first-stage piecewise linear compensation voltage based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linearity coefficient, measuring the fast-reflection mirror to obtain the first-stage compensation angle, and constructing LSTM neural network training data based on the first-stage compensation angle and the current input voltage operating state includes:

[0031] The required linear pre-compensation voltage at the current moment is calculated by using the ratio of the current pointing error to the target local linearity coefficient.

[0032] The current input voltage is superimposed with the linear pre-compensation voltage required at the current moment to obtain the first-stage piecewise linear compensation voltage.

[0033] The first-stage segmented linear compensation voltage is input to the fast-reflecting mirror, and the output angle of the fast-reflecting mirror under the first-stage segmented linear compensation voltage is measured to obtain the first-stage compensation angle.

[0034] The residual error after the first stage compensation is obtained by subtracting the first stage compensation angle from the target trajectory angle.

[0035] Based on the residual error after the first stage compensation and the current input voltage operating state, an input feature vector is constructed, and the first stage piecewise linear compensation voltage is used as the output feature vector to form the training data for the LSTM neural network.

[0036] Optionally, the Bayesian optimization algorithm trains the LSTM neural network using the training data to obtain a trained LSTM neural network. The trained LSTM neural network is then used to perform testing of the fast-reflection mirror based on the first-stage piecewise linear compensation voltage, outputting the final compensation angle, including:

[0037] The Bayesian optimization algorithm is used to iteratively train the LSTM neural network based on the training data of the LSTM neural network to obtain the trained LSTM neural network.

[0038] The trained LSTM neural network outputs the second-stage fine compensation voltage.

[0039] The first-stage piecewise linear compensation voltage is superimposed with the second-stage fine compensation voltage to obtain the final compensation voltage;

[0040] The final compensation voltage is input into the fast-reflecting mirror for testing to obtain the final compensation angle.

[0041] A second aspect of the present invention provides a two-stage hysteresis and coupling compensation device for a fast-reflecting mirror, comprising:

[0042] The response module is used to respond to compensation requests, construct the full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror, and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0043] The construction module is used to construct a linear coefficient lookup table for the rising process and a linear coefficient lookup table for the falling process based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0044] The extraction module is used to determine the pointing error at the current moment and the target trajectory angle, current input voltage and current input voltage operating state corresponding to the fast-reflection mirror, and extract the target local linear coefficients based on the current input voltage operating state in the linear coefficient lookup table of the rising process or the linear coefficient lookup table of the falling process;

[0045] The measurement module is used to calculate the first-stage piecewise linear compensation voltage based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient, and to measure the fast-reflecting mirror to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, it constructs LSTM neural network training data.

[0046] The output module is used to train the LSTM neural network based on the training data of the LSTM neural network using the Bayesian optimization algorithm, to obtain a trained LSTM neural network, and to complete the test of the fast-reflecting mirror using the trained LSTM neural network according to the first stage piecewise linear compensation voltage, and output the final compensation angle.

[0047] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the two-stage hysteresis and coupling compensation method for fast mirrors as described above.

[0048] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the two-stage hysteresis and coupling compensation method for fast mirrors as described above.

[0049] The fifth aspect of the present invention provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the two-stage hysteresis and coupling compensation method for fast mirrors as described above.

[0050] As can be seen from the above technical solutions, the present invention has the following advantages:

[0051] The present invention provides a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror. When hysteresis compensation is required for the fast-reflecting mirror, a full-stroke hysteresis loop dataset corresponding to the fast-reflecting mirror is constructed and segmented to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals. Based on the multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals, a linear coefficient lookup table for the rising process and a linear coefficient lookup table for the falling process are constructed. The current pointing error, the target trajectory angle corresponding to the fast-reflecting mirror, the current input voltage, and the current input voltage operating state are determined, and the target local linear coefficient is extracted from the rising process linear coefficient lookup table or the falling process linear coefficient lookup table based on the current input voltage operating state. The first-stage segmented linear compensation voltage is calculated based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient, and the fast-reflecting mirror is measured to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, LSTM neural network training data is constructed. Based on the Bayesian optimization algorithm, the LST is calculated. The M-neural network training data is used to train the LSTM neural network, resulting in a trained LSTM neural network. This trained LSTM neural network is then used to test the fast-reflecting mirror based on the first-stage piecewise linear compensation voltage, outputting the final compensation angle. Based on this approach, this invention segments the fast-reflecting mirror's full-stroke hysteresis loop dataset and constructs a corresponding linear coefficient lookup table, achieving a segmented and accurate representation of the fast-reflecting mirror's hysteresis characteristics. Then, by combining the target trajectory angle, current input voltage, and operating state, suitable local linear coefficients are extracted to calculate the first-stage piecewise linear compensation voltage, completing the initial compensation of the basic hysteresis error. Simultaneously, LSTM neural network training data is constructed based on the first-stage compensation angle and voltage operating state. A Bayesian optimization algorithm is used to improve the LSTM neural network training effect, enabling the network to accurately capture irregular nonlinear changes and historical input path dependence features in the fast-reflecting mirror's hysteresis behavior. This allows the second-stage compensation to offset the irregular nonlinear errors not eliminated in the first stage, significantly improving the accuracy of fast-reflecting mirror hysteresis and coupling compensation. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 The flowchart illustrates the steps of a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror provided in Embodiment 1 of the present invention.

[0054] Figure 2 This is a schematic diagram of the compensation error for a single-axis full-stroke test provided in Embodiment 1 of the present invention. Before compensation, the original error accounts for 2.79% of the full stroke, and after compensation, the error accounts for 0.04% of the full stroke.

[0055] Figure 3 This is a schematic diagram of error compensation for a single-axis random test provided in Embodiment 1 of the present invention. Before compensation, the original error accounts for 2.14% of the total stroke, and after compensation, the error accounts for 0.03% of the total stroke.

[0056] Figure 4 This is a schematic diagram of error compensation for two-dimensional scanning testing provided in Embodiment 1 of the present invention. The original error before compensation accounts for 3.21% of the total stroke, and the error after compensation accounts for 0.14% of the total stroke.

[0057] Figure 5 This is a two-dimensional scanning result image of a two-dimensional scanning test provided in Embodiment 1 of the present invention;

[0058] Figure 6 This is a flowchart illustrating a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror provided in Embodiment 1 of the present invention.

[0059] Figure 7 This is a structural block diagram of a two-stage hysteresis and coupling compensation device for a fast-reflecting mirror provided in Embodiment 2 of the present invention. Detailed Implementation

[0060] This invention provides a two-stage hysteresis and coupling compensation method and apparatus for fast-reflecting mirrors, which solves the technical problem that existing hysteresis compensation methods for fast-reflecting mirrors cannot offset irregular nonlinear errors, resulting in poor compensation accuracy.

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that in the optional embodiments of the present invention, the object information and other related data involved require the permission or consent of the object when the embodiments of the present invention are applied to specific products or technologies, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. That is to say, if the embodiments of the present invention involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations, and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required, and the embodiments also need to be implemented with the authorization and consent of the object.

[0062] Terminology Explanation:

[0063] 1. Fast Steering Mirror (FSM): An optical actuator that uses a piezoelectric ceramic actuator to precisely and quickly adjust the angle or position of a mirror. It is a core component for achieving high-precision beam pointing, tracking, and stabilization.

[0064] 2. Piezoelectric ceramics: A type of precision actuator that utilizes the piezoelectric effect (i.e., the physical dimensions of a dielectric change when a voltage is applied). It has advantages such as fast response speed, extremely high resolution, and large output force, but it also has the significant disadvantage of "hysteresis nonlinearity".

[0065] 3. Hysteresis Nonlinearity / Hysteresis Effect: A nonlinear phenomenon unique to materials such as piezoelectric ceramics. This manifests as the output (such as displacement or angle) depending not only on the current input (voltage) but also heavily on the historical input path. In the input-output diagram, it presents as a "ring-shaped" curve where the rising and falling curves do not overlap, resulting in multiple output values ​​for the same input voltage and causing significant control errors.

[0066] 4. Cross-coupling error: In multi-axis motion systems such as fast-reflecting mirrors, the movement of one axis (e.g., the X-axis) can unintentionally and non-linearly affect the output of another axis (e.g., the Y-axis), impacting output accuracy. This stems from the mutual interference between mechanical structures and drivers, which, combined with hysteresis, makes the two-dimensional pointing error extremely complex.

[0067] 5. Feedforward Compensation: An open-loop control strategy. It does not rely on real-time output feedback, but instead pre-establishes an "inverse model" describing the inverse characteristics of the system. During control, the desired output is directly input into this inverse model to calculate the required drive signal. Its advantages are fast response and no change in system stability, but it is entirely dependent on the accuracy of the inverse model.

[0068] 6. Long Short-Term Memory Network (LSTM): A special type of recurrent neural network (RNN). Through its ingenious structure of input gates, forget gates, and output gates, it can effectively learn and remember long-term dependencies in time-series data. This invention utilizes its characteristics to learn and compensate for the time-memory-related parts of residual errors (such as the dynamic effects of higher-order hysteresis and coupling).

[0069] 7. Bayesian Optimization: An intelligent global optimization algorithm for optimizing black-box functions (functions with complex computations and unknown expressions). It intelligently selects the next set of parameters to be evaluated by constructing a probabilistic model of the objective function (such as a Gaussian process), thereby finding the optimal solution with as few attempts as possible. This invention uses it to automatically find the optimal hyperparameter combination for LSTM networks.

[0070] 8. Hyperparameters: In neural network learning models, these are parameters that need to be manually preset or selected through optimization algorithms. Examples include the number of layers in an LSTM network, the number of neurons per layer, the learning rate, and the number of training epochs. The setting of hyperparameters directly affects the model's performance and convergence speed.

[0071] 9. Prandtl-Ishlinskii Model (PI Model): A classic operator-based hysteresis phenomenological mathematical model. It simulates hysteresis loops through a weighted superposition of multiple "Play" or "Stop" operators with different thresholds. Its advantage is that it has an analytical inverse model, which facilitates feedforward compensation. However, traditional PI models can usually only describe symmetric hysteresis loops.

[0072] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror provided in Embodiment 1 of the present invention.

[0073] This invention provides a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror, comprising:

[0074] Step 101: Respond to the compensation request, construct the full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0075] It should be noted that after responding to the compensation request, the full-stroke hysteresis loop dataset is constructed by collecting the input and output data of the fast-reflecting mirror under the specified excitation. Then, the dataset is split according to the voltage change trend, and a uniform segmentation operation is performed according to the preset rules. Finally, multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals are obtained, which lays the data foundation for the subsequent construction of the linear coefficient lookup table.

[0076] Further, step 101 may include the following sub-steps:

[0077] S11. Apply a periodic voltage signal to the fast-reflecting mirror to obtain the input voltage sequence;

[0078] S12. Measure the output angle of the fast-reflecting mirror for each input voltage in the input voltage sequence, and form a data pair between each input voltage and its corresponding output angle.

[0079] S13. Construct a full-stroke hysteresis loop dataset based on multiple data pairs;

[0080] S14. Based on the voltage change trend in the full-stroke hysteresis loop dataset, the full-stroke hysteresis loop dataset is split into rising hysteresis dataset and falling hysteresis dataset.

[0081] S15. Based on a preset fixed voltage interval, the voltage ranges in the rising hysteresis dataset and the falling hysteresis dataset are uniformly segmented to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0082] The fast-reflecting mirror full-stroke hysteresis loop dataset is a dataset formed by collecting the output angle data corresponding to the fast-reflecting mirror within the full-stroke voltage input range, which fully records the hysteresis characteristics of the fast-reflecting mirror throughout its entire stroke.

[0083] A periodic voltage signal is a voltage excitation signal that changes according to a fixed periodic pattern. It is used to drive a fast-reflecting mirror to complete the voltage change throughout its entire stroke, so as to collect complete hysteresis characteristic data.

[0084] The input voltage sequence is a set of discrete voltage values ​​generated by a periodic voltage signal, covering the entire voltage range of the fast mirror, and serves as the input basis for acquiring hysteresis data.

[0085] The output angle is the actual reflection angle generated by the fast reflector under the corresponding input voltage drive, and is used to characterize the output response characteristics of the fast reflector.

[0086] The rising hysteresis dataset is a set of all data pairs corresponding to the voltage rise stage in the full-stroke hysteresis loop dataset, recording the hysteresis characteristics of the fast mirror during the voltage rise process.

[0087] The hysteresis dataset is a set of all data pairs corresponding to the voltage drop phase in the full-stroke hysteresis loop dataset, recording the hysteresis characteristics of the fast mirror during the voltage drop process.

[0088] The preset fixed voltage interval is a pre-set fixed voltage difference used to divide the voltage range, and is a reference parameter for achieving uniform segmentation of the voltage range.

[0089] It should be noted that the input and output of the fast-reflecting mirror (FSM) are initialized and calibrated by applying a periodic voltage signal (such as a triangular wave) covering its entire stroke to the FSM and simultaneously measuring its output angle. The full-stroke hysteresis loop dataset obtained from experimental testing is as follows: ,in The i-th input voltage (usually a triangular or sine wave signal covering the entire path). This corresponds to the measured angle.

[0090] Furthermore, based on the different output angles corresponding to the rising and falling curves in the full-stroke hysteresis loop dataset D, the data is divided into rising hysteresis datasets for the voltage rising and falling processes respectively. and hysteresis dataset For each subset, at fixed voltage intervals... (Here, we take 0.01V; the smaller the better.) Divide the voltage into uniform segments, and for the m-th segment interval... .in, For rising hysteresis dataset The j-th data pair corresponds to the input voltage value; For rising hysteresis dataset The output angle value corresponding to the j-th data pair; For descent hysteresis dataset The input voltage value corresponding to the k-th data pair; For descent hysteresis dataset The output angle value corresponding to the k-th data pair; The starting input voltage value for the m-th voltage segment interval (including the rising hysteresis segment interval and the falling hysteresis segment interval); This is the final input voltage value for the m-th voltage segment interval.

[0091] In this embodiment, a periodic voltage signal is applied to the fast-reflecting mirror to drive it to complete the voltage change throughout its entire stroke, thereby obtaining an input voltage sequence covering the entire stroke. For each input voltage in the input voltage sequence, the corresponding output angle of the fast-reflecting mirror is measured. Each input voltage and output angle are matched to form a data pair. All data pairs are integrated to completely record the correspondence between voltage and angle throughout the entire stroke, forming a full-stroke hysteresis loop dataset. Based on the rising and falling trends of the voltage in the dataset, the dataset is split into rising hysteresis datasets and falling hysteresis datasets to distinguish the hysteresis characteristics under different voltage change trends. According to a preset fixed voltage interval, the voltage range of the two types of datasets is divided into equal intervals to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals. This process decomposes the complex full-stroke hysteresis characteristics into segmented simple characteristics, reducing the complexity of subsequent hysteresis compensation modeling and providing a data foundation for accurately capturing irregular nonlinear errors.

[0092] Step 102: Based on multiple upward hysteresis segment intervals and multiple downward hysteresis segment intervals, construct a lookup table for the linear coefficients of the upward process and a lookup table for the linear coefficients of the downward process.

[0093] It should be noted that, based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals, the input voltage and output angle data at the beginning and end of each segment interval are extracted, the local linear coefficients corresponding to each segment interval are calculated, and then the local linear coefficients of each segment interval are arranged in the order of voltage segmentation to construct a linear coefficient lookup table for the rising process and a linear coefficient lookup table for the falling process, providing data support for quickly matching the corresponding linear coefficients according to the voltage operating state in the future.

[0094] Furthermore, step 102 may include the following sub-steps:

[0095] S21. Extract the input voltage value and output angle value corresponding to the beginning and end of each rising hysteresis segment interval;

[0096] S22. Based on the input voltage value and output angle value corresponding to each rising hysteresis segment interval, calculate the local linearity coefficient corresponding to each rising hysteresis segment interval.

[0097] S23. Extract the input voltage value and output angle value corresponding to the beginning and end of each hysteresis segment interval;

[0098] S24. Based on the input voltage value and output angle value corresponding to each hysteresis segment interval, calculate the local linearity coefficient corresponding to each hysteresis segment interval.

[0099] S25. Based on the local linear coefficients corresponding to multiple upward hysteresis segment intervals and multiple downward hysteresis segment intervals, construct lookup tables for linear coefficients during the upward process and for linear coefficients during the downward process, respectively.

[0100] The local linearity coefficient is the ratio calculated by the difference between the input voltage and the output angle at the beginning and end of each hysteresis segment interval. It is used to characterize the approximate linear relationship between the input voltage and the output angle of the fast-reflecting mirror within that segment interval.

[0101] The linear coefficient lookup table for the rising process is a lookup table formed by organizing the local linear coefficients corresponding to the rising hysteresis segment intervals in the order of voltage segments. It is used to quickly extract the local linear coefficients of the corresponding segment intervals when the voltage is rising.

[0102] The linear coefficient lookup table for the voltage drop process is a lookup table formed by organizing the local linear coefficients corresponding to the voltage drop hysteresis segment intervals in the order of voltage segments. It is used to quickly extract the local linear coefficients of the corresponding segment intervals when the voltage drops.

[0103] It should be noted that the local linearity coefficients are calculated by using the corresponding angles and voltages at the beginning and end of the interval. By calculating for all segments, the voltage-angle linearity coefficients (i.e., local linearity coefficients) for the rising and falling processes can be obtained separately. That is, the lookup table of linear coefficients for the rising process. Lookup table of linear coefficients for the descent process This lookup table contains local linear approximation coefficients of the hysteresis curve at different voltages. Its accuracy depends on the input voltage resolution, and theoretically, it can approximate the actual curve coefficients infinitely. This is the end output angle value of the m-th voltage segment interval; This represents the starting output angle value for the m-th voltage segment interval.

[0104] In this embodiment, for each rising hysteresis segment interval, the input voltage value and output angle value corresponding to its beginning and end are extracted. Based on the input voltage difference and output angle difference between the beginning and end of the interval, the local linear coefficient corresponding to the rising hysteresis segment interval is calculated. Similarly, for each falling hysteresis segment interval, the input voltage value and output angle value corresponding to its beginning and end are extracted. Based on the input voltage difference and output angle difference between the beginning and end of the interval, the local linear coefficient corresponding to the falling hysteresis segment interval is calculated. Subsequently, the local linear coefficients corresponding to all rising hysteresis segment intervals are integrated and arranged according to the voltage segment order to form a rising process linear coefficient lookup table, and the local linear coefficients corresponding to all falling hysteresis segment intervals are integrated and arranged according to the voltage segment order to form a falling process linear coefficient lookup table. This process decomposes the complex hysteresis nonlinear characteristics into quantifiable local linear relationships through segmentation processing, so that the hysteresis characteristics under different voltage change trends can be accurately characterized, effectively improving the accuracy of coefficient matching in the subsequent hysteresis compensation process.

[0105] Step 103: Determine the current pointing error and the target trajectory angle corresponding to the fast-reflection mirror, the current input voltage, and the current input voltage operating state, and extract the target local linear coefficients from the linear coefficient lookup table for the rising process or the linear coefficient lookup table for the falling process based on the current input voltage operating state.

[0106] The target trajectory angle refers to the ideal reflection angle that the fast-reflecting mirror needs to achieve at the current moment, and it is the target reference for the pointing control of the fast-reflecting mirror.

[0107] The current input voltage refers to the driving voltage applied to the fast reflector at the current moment, which is used to drive the fast reflector to generate the corresponding reflection angle.

[0108] The current input voltage operating state refers to the trend of the current input voltage (input voltage at time t) relative to the historical input voltage (input voltage at time t-1). It is divided into voltage rising state and voltage falling state, which are used to distinguish compensation scenarios under different hysteresis characteristics.

[0109] The target local linear coefficient refers to the local linear coefficient extracted from the corresponding linear coefficient lookup table based on the current input voltage operating state, which is suitable for the current segmented interval. It is the core parameter of the first stage compensation calculation.

[0110] The target trajectory refers to the sequence of ideal reflection angles that the fast-reflecting mirror needs to follow over time when performing pointing control tasks. It is the core target reference for the pointing control of the fast-reflecting mirror, used to measure the deviation between the actual pointing and the ideal pointing, and to provide a basis for hysteresis and coupling compensation.

[0111] It should be noted that, firstly, the target trajectory corresponding to the fast-reflecting mirror is tested to obtain the target trajectory angle, the current input voltage corresponding to that angle, and the measured angle under the current input voltage. The pointing error at the current moment is obtained by subtracting the measured angle from the target trajectory angle. Then, the changing trend of the current input voltage is monitored in real time to determine whether its working state is voltage rise or fall. Finally, based on the determined working state, the segment interval where the current input voltage is located is matched in the corresponding linear coefficient lookup table for the rising process or the linear coefficient lookup table for the falling process, and the corresponding local linear coefficient is extracted as the target local linear coefficient, providing an accurate coefficient basis for the subsequent first-stage compensation calculation.

[0112] Furthermore, step 103 may include the following sub-steps:

[0113] S31. Test the target trajectory corresponding to the fast-reflecting mirror to obtain the target trajectory angle, the current input voltage corresponding to the target trajectory angle, and the measured angle corresponding to the current input voltage;

[0114] S32. Subtract the measured angle from the target trajectory angle to obtain the pointing error at the current moment;

[0115] S33. Monitor the current input voltage change trend in real time and determine the current input voltage operating status:

[0116] S34. If the current input voltage is greater than the input voltage at a historical time, the current input voltage operating state is determined to be a voltage rising state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the rising process.

[0117] S35. If the current input voltage is less than or equal to the input voltage at a historical time, the current input voltage operating state is determined to be a voltage drop state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the drop process.

[0118] It should be noted that the target trajectory angle at time t is obtained by testing the target trajectory corresponding to the fast-reflection mirror. The initial input voltage (i.e., the current input voltage) corresponding to the target trajectory. The measured angle corresponding to this input voltage This allows us to obtain the error between the measured angle and the target trajectory (i.e., the pointing error at the current moment). .

[0119] Furthermore, the current input voltage value is collected in real time and compared with the input voltage value at a historical moment (usually the immediately preceding moment). The trend of the current input voltage is determined based on the relationship between the two values: if the current input voltage is greater than the input voltage at a historical moment, the current input voltage is determined to be in a voltage rising state. At this time, the voltage segment interval to which the current input voltage belongs is located in the linear coefficient lookup table for the rising process, and the local linear coefficient corresponding to this interval is extracted as the target local linear coefficient. If the current input voltage is less than or equal to the input voltage at a historical moment, the current input voltage is determined to be in a voltage falling state. At this time, the voltage segment interval to which the current input voltage belongs is located in the linear coefficient lookup table for the falling process, and the local linear coefficient corresponding to this interval is extracted as the target local linear coefficient. The above process accurately matches the corresponding linear coefficient by distinguishing the voltage change trend, avoiding the problem of mismatch of hysteresis characteristics under a unified model, and effectively improving the accuracy of local linear coefficient extraction.

[0120] Step 104: Calculate the first-stage piecewise linear compensation voltage based on the target trajectory angle, current input voltage, current pointing error, and target local linear coefficient, and measure the fast-reflecting mirror to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, construct LSTM neural network training data.

[0121] It should be noted that by combining the target trajectory angle, the current input voltage, the current pointing error, and the target local linearity coefficient, the first-stage piecewise linear compensation voltage is calculated. This compensation voltage is then input into the fast-reflecting mirror for measurement to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, relevant feature data is organized to construct LSTM neural network training data, laying the data foundation for subsequent model training.

[0122] Furthermore, step 104 may include the following sub-steps:

[0123] S41. Calculate the required linear pre-compensation voltage at the current moment by using the ratio of the pointing error at the current moment to the local linear coefficient of the target.

[0124] S42. Superimpose the current input voltage with the linear pre-compensation voltage required at the current moment to obtain the first-stage piecewise linear compensation voltage.

[0125] S43. Input the first-stage segmented linear compensation voltage into the fast reflector, measure the output angle of the fast reflector under the first-stage segmented linear compensation voltage, and obtain the first-stage compensation angle.

[0126] S44. Subtract the first-stage compensation angle from the target trajectory angle to obtain the residual error after the first-stage compensation.

[0127] S45. Based on the residual error after the first stage compensation and the current input voltage operating state, construct the input feature vector, and use the first stage piecewise linear compensation voltage as the output feature vector to form the LSTM neural network training data.

[0128] The input feature vector is a combination of features constructed based on the residual error after the first stage compensation and the current input voltage operating state, and is used as the input data for training the LSTM neural network.

[0129] The output feature vector refers to the output data used when training the LSTM neural network with the piecewise linear compensation voltage of the first stage, which is used to establish the mapping relationship between the input features and the compensation voltage.

[0130] It should be noted that determining the current input voltage work status The ascending interval S=1 or the descending interval S=2, and the coefficient lookup table is used. and Get the current input voltage Corresponding angle-voltage coefficient (i.e., target local linearity coefficient) Combined with error The required compensation voltage is calculated and added to the initial voltage to generate the piecewise linear compensation voltage for the first stage. By inputting the segmented linear compensation voltage to the fast-reflecting mirror, the first-stage compensation angle was obtained through testing. At this point, the hysteresis nonlinearity of the FSM has been significantly suppressed, and it can almost be regarded as a linear one-to-one mapping relationship. The advantage of this stage is that the computational complexity is extremely low, no iteration or solution of complex inverse models is required, making it very suitable for the initial feedforward control of FSM. However, it can only be tested for the full stroke of a single axis, and the coupling error between two axes cannot be eliminated. In addition, there is a certain linear approximation, which limits the accuracy.

[0131] Furthermore, the pointing error of the fast-reflecting mirror is now... The error is significantly reduced, and the remaining error mainly consists of uncompensated higher-order nonlinear errors and two-axis coupling errors. To accurately compensate for these memory-based residual errors, the first-stage compensation angle is used. Input vector, piecewise linear compensation voltage An LSTM neural network is trained for the output. The goal is to learn from the compensation perspective of the first stage. and segmented linear compensation voltage The one-to-one mapping relationship, considering the memory of residual error and the direction change of input voltage, the input feature vector X(t) of the grid is composed of the output angle of the current time series and the corresponding input voltage direction sequence. The output feature vector Y(t) is derived from the input voltage values ​​of the current time series. The structure is as follows: (where n is the selected historical step size (3 in this invention). This design enables the network to be trained based on the current voltage direction change sequence and angle sequence to obtain an accurate FSM angle-voltage inverse model, thereby accurately predicting the second-stage compensation voltage.) ).

[0132] Among them, the LSTM (Long Short-Term Memory) neural network is a special type of recurrent neural network (RNN) that excels at handling long-term time series dependencies due to its unique gating mechanism. The LSTM unit structure consists of forget gates. Memory gate Output gate Composition. The specific calculation formula is as follows:

[0133] ;

[0134] in, , , , These are the forgetting gate, the memory gate, the output gate, and the candidate cell state with respect to the input signal. The weight matrix, , , , These are the forget gate, memory gate, output gate, and the hidden state of the candidate cell relative to the previous time step. The weight matrix, , , , These are the bias matrices for the forget gate, memory gate, output gate, and candidate cell states, respectively. This represents the sigmoid non-linear activation function, with a range of [0,1]. is the hyperbolic tangent activation function with a range of [-1, 1]; ⊙ is the Hadamard product of the matrix (element-wise multiplication).

[0135] Furthermore, the network employs a stacked LSTM layer structure to enhance training capability. The input layer receives a two-dimensional feature vector of length n+1, which passes through two LSTM hidden layers, with each layer containing a certain number of units. Subsequent Bayesian optimization can be performed, with each layer followed by a Dropout layer (dropout rate of 0.5), and finally three fully connected layers, each with 64 neurons. Training is performed by minimizing the mean squared error between the predicted and actual voltages. (The number of hidden layers, the number of units per layer, the dropout rate, and the number of fully connected layers in the LSTM are not fixed and can be set according to the optimal solution for the actual situation.)

[0136] It is worth mentioning that in the first stage (linear pre-compensation), besides using lookup table interpolation, alternative solutions include: modeling the rising and falling curves separately using polynomial fitting or classical compensation methods (e.g., Prandtl-lshliskii (PI) hysteresis model, Preisach model, Bouc-Wen model, Duhem model, etc., which can describe the hysteresis curve), and calculating the compensation voltage online. Furthermore, in addition to using LSTM neural networks, other network structures with learning capabilities, such as recurrent neural networks (RNNs) and feedforward neural networks (FNNs), can also be used.

[0137] In this embodiment, the linear pre-compensation voltage used to offset the basic hysteresis error at the current moment is accurately calculated based on the ratio of the pointing error at the current moment to the local linear coefficient of the target. Then, the current input voltage is superimposed with the linear pre-compensation voltage to obtain the first-stage piecewise linear compensation voltage adapted to the current piecewise hysteresis characteristics. This compensation voltage is connected to the drive circuit of the fast-reflecting mirror, and the actual output angle of the fast-reflecting mirror under this voltage drive is measured in real time by the angle detection module, which is used as the first-stage compensation angle. The first-stage compensation angle is further subtracted from the target trajectory angle to quantify the residual error after the first-stage linear compensation that has not been offset. Finally, the residual error after the first-stage compensation is numerically normalized and combined with the characterization parameters of the current input voltage working state (such as rising / falling state indicators) to construct an input feature vector. At the same time, the first-stage piecewise linear compensation voltage is used as the output feature vector. Multiple sets of input and output feature vectors are paired and organized to form complete LSTM neural network training data. This process initially offsets quantifiable hysteresis errors through linear pre-compensation, and then extracts residual errors and voltage operating state features to construct training data, laying the foundation for subsequent LSTM neural networks to accurately learn the irregular nonlinear error patterns. This effectively makes up for the shortcomings of existing compensation methods that rely on only a single model and cannot adapt to complex nonlinear characteristics.

[0138] Step 105: Based on the Bayesian optimization algorithm, train the LSTM neural network model using the training data to obtain the trained LSTM neural network. Then, use the trained LSTM neural network to complete the test of the fast-reflection mirror based on the first-stage piecewise linear compensation voltage and output the final compensation angle.

[0139] It should be noted that the hyperparameters of the LSTM neural network are adjusted based on the Bayesian optimization algorithm, and iterative training is performed using the constructed LSTM neural network training data to obtain a trained LSTM neural network adapted to the hysteresis compensation scenario of the fast-reflecting mirror. The first-stage piecewise linear compensation voltage is input into the trained model, and combined with the actual test process of the fast-reflecting mirror, the final compensation angle is output through model calculation and actual measurement feedback to complete the second-stage fine compensation.

[0140] It is worth mentioning that, in addition to using Bayesian optimization algorithms, intelligent algorithms such as Grid Search (GS), Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Random Search (RS) can also be used for hyperparameter tuning.

[0141] Furthermore, step 105 may include the following sub-steps:

[0142] S51. The Bayesian optimization algorithm is used to iteratively train the LSTM neural network based on the training data of the LSTM neural network to obtain a trained LSTM neural network.

[0143] S52. Output the second-stage fine compensation voltage through the trained LSTM neural network;

[0144] S53. The first-stage segmented linear compensation voltage and the second-stage fine compensation voltage are superimposed to obtain the final compensation voltage.

[0145] S54. Input the final compensation voltage into the fast-reflecting mirror for testing to obtain the final compensation angle.

[0146] It should be noted that the Bayesian optimization algorithm is used to automatically and globally optimize the key hyperparameters of the LSTM network (the number of output units, initial learning rate, number of training epochs, and batch size selected in this invention). The Bayesian optimization algorithm intelligently guides the hyperparameter search process by constructing a probabilistic model of the objective function, thereby efficiently finding the optimal solution.

[0147] Furthermore, after training the neural network with optimal hyperparameters, the first-stage pointing error is input. Calculate the corresponding compensation voltage In addition to the segmented linear compensation voltage in the first stage The final compensation voltage is obtained. Input the fast-reflection mirror to test and obtain the final compensation angle. Compensation is then completed, and the effect after compensation is as follows: Figure 2 and Figure 3 As shown, the residual error after the first stage compensation, the current input voltage operating state, and the temporal features such as the residual error and voltage operating state at previous time steps are used as the input sequence of the trained LSTM neural network. The LSTM neural network filters and memorizes the input temporal features through its internal forget gate, input gate, and output gate, focusing on retaining historical dependency information related to irregular nonlinear errors (such as the changing trend of residual errors and the switching rules of voltage operating states). Subsequently, the network inputs the encoded temporal features into the fully connected output layer, mapping the high-dimensional temporal features into a one-dimensional voltage compensation amount, and finally outputs the second-stage fine compensation voltage amount that specifically offsets the residual irregular nonlinear error at the current time step.

[0148] Furthermore, in the two-dimensional scanning test, Figure 4 The figure visually demonstrates the change in compensation error of the hysteresis compensation method of the present invention: the figure includes the curves of the change of compensation angle, target angle and original angle over time under the hybrid compensation method. The original error before compensation accounts for 3.21% of the total stroke, and the error after compensation by the method of the present invention accounts for 0.14% of the total stroke, which clearly shows the significant suppression effect of compensation on error. Figure 5 The two-dimensional scanning results of the method are presented. Through the two-dimensional trajectories of the compensation angle, target angle and original angle under the hybrid compensation method, the high degree of fit between the compensation fast-reflection mirror angle output and the target angle is intuitively shown, further verifying the effectiveness of the hysteresis compensation method of the present invention in improving pointing accuracy.

[0149] In this embodiment, a Bayesian optimization algorithm is used to intelligently iteratively optimize the hyperparameters (such as the number of hidden layer nodes and the learning rate) of the LSTM neural network. Multiple rounds of iterative training are conducted using the LSTM neural network training data. The model's fitting effect under different hyperparameter combinations is predicted using a probabilistic model, efficiently selecting the optimal hyperparameters that best fit the residual error characteristics of the fast-reflecting mirror. This results in a well-trained LSTM neural network capable of accurately capturing irregular nonlinear error features. Subsequently, the residual error after the first-stage compensation and the current input voltage operating state are input into the trained LSTM neural network. The model outputs a targeted second-stage fine compensation voltage based on the learned error patterns. This second-stage fine compensation voltage is then superimposed with the first-stage piecewise linear compensation voltage to obtain the final compensation voltage, which integrates linear pre-compensation and intelligent fine compensation. The final compensation voltage is input into the fast-reflecting mirror's drive system, and the actual output angle of the fast-reflecting mirror is measured using a high-precision angle detection module to obtain the final compensation angle. This process improves the fitting accuracy of the LSTM neural network through Bayesian optimization, and then further offsets the irregular nonlinear errors that were not eliminated in the first stage through a second-stage fine compensation, reducing the compensation error from 3.21% before compensation to 0.14%. This effectively solves the problem that the existing fast-reflecting mirror hysteresis compensation method cannot offset irregular nonlinear errors, resulting in poor compensation accuracy, and significantly improves the pointing control accuracy of the fast-reflecting mirror.

[0150] As a comparison of technical effects, existing technologies can be used as a reference. To address the impact of hysteresis nonlinearity on the pointing accuracy of FSMs, many researchers have conducted studies on the modeling and compensation of piezoelectric hysteresis. The main research approaches include closed-loop feedback control requiring additional sensor configuration and feedforward compensation based on inverse models. Among them, feedforward compensation is more convenient for engineering as it does not require additional hardware. Its performance depends on the accuracy of modeling the hysteresis inverse model. Existing inverse model construction methods can be roughly divided into two categories according to different modeling principles: physical models based on microscopic mechanisms and phenomenological models based on mathematical relationships between input and output (V. Hassani, T. Tjahjowidodo, and TN Do, “A surveyon hysteresis modeling, identification and control,” Mech. Syst. SignalProcess., vol. 49, no. 1C2, pp. 209–233, 2014.).

[0151] Physical models based on microscopic mechanisms derive physical formulas describing hysteresis characteristics from the physical properties of piezoelectric ceramics using first-principles calculations. The most typical example is the Jiles-Atherton model, proposed to solve the ferromagnetic hysteresis problem, which explains and describes the hysteresis phenomenon with clear physical principles. Building upon this, a domain wall model was proposed based on the correlation between polarization and domain wall motion in piezoelectric materials, expressed using ordinary differential equations. However, physical models suffer from drawbacks such as complex modeling processes, difficulty in identifying material parameters, and poor portability, thus limiting their widespread application.

[0152] Phenomenological models, on the other hand, focus on modeling hysteresis characteristics through mathematical formulas without involving specific physical mechanisms. They describe complex phenomena using simple mathematical functions or statistical methods, and have advantages such as concise structure and convenient application. Typical examples include operator-based models, such as the Preisach model, which fits the hysteresis curve through a weighted superposition of operators. However, the difficulty lies in the complexity of integral calculation and the fact that the analysis is not invertible (F. Preisach, “ ̈Uber die magnetische nachwirkung,”Zeitschrift fu ̈r Physik, vol. 94, pp. 277–302, 1935.). As a subclass of the Preisach model, the Prandtl-lshliskii (PI) model controls the fitting accuracy of the operator by introducing threshold variables and density functions, reducing modeling complexity and possessing an analytical inverse model. Therefore, it is widely used for hysteresis compensation. However, the classic Prandtl-lshliskii (PI) model can only effectively describe symmetric hysteresis characteristics and cannot directly characterize asymmetric hysteresis behavior (Modeling and Inverse Compensation for Coupled Hysteresis in Piezo-Actuated Fabry–Perot Spectrometer.). There are also models based on differential equations, such as the Bouc-Wen model and the Duhem model, which are composed of nonlinear differential equations. However, parameter identification for this nonlinear differential form is relatively difficult. The above models mainly model hysteresis curves corresponding to specific periodic input signals and are suitable for systems with regular trajectories. However, in some special applications, such as inter-satellite laser interferometry, in order to track the jitter of the opposite satellite in real time, FSM needs to achieve arbitrary random pointing and rapid scanning within a certain angular range. In this case, the input signal has asymmetric, random, and non-periodic characteristics, making the hysteresis behavior more complex.

[0153] Based on the aforementioned classic hysteresis model, in order to compensate for the limitations of the phenomenological model, researchers have gradually introduced methods such as intelligent algorithms to improve the model's shortcomings. In particular, machine learning techniques represented by neural networks. Neural networks (NNs) do not presuppose a model structure, but only learn the nonlinear mapping of hysteresis from the input and output data. They can approximate any mapping function with arbitrary precision and have achieved excellent performance in many fields. Yanfang Liu et al. designed a Long Short-Term Memory (LSTM) network to fit the complex hysteresis dynamics in piezoelectric actuators (Y. Liu, R. Zhou, M. Huo, Long short termmemory network is capable of capturing complex hysteretic dynamics inpiezoelectric actuators, Electron. Lett. 55 (2) (2018) 80–82.). Cheng et al. proposed a nonlinear autoregressive moving average hysteresis (NAEMAX) model with multi-layer neural networks and combined it with a model predictive controller (NMPC) to solve the displacement tracking problem of PEAS (L. Cheng, W. Liu, Z.-G. Hou, J. Yu, M. Tan, Neural-network-based nonlinear model predictive control for piezoelectric actuators, IEEE Trans. Ind. Electron. 62 (12) (2015) 7717–7727.). However, pure black-box modeling heavily relies on the completeness of training data, which is unreliable in practical applications. Furthermore, its performance is highly sensitive to grid hyperparameters, and traditional manual parameter tuning is insufficient to obtain stable optimal performance.

[0154] In two-dimensional beam pointing applications, FSMs also face the problem of cross-coupling between the x and y axes. The mutual interference of the nonlinear hysteresis between the two axes significantly reduces the performance of single-dimensional compensation strategies in two-dimensional applications. Although reported decoupling mechanisms can reduce cross-axis coupling to a few percent, they cannot completely eliminate it (Modeling and across-coupling compensation control methodology of a large range 3-DOF micropositioner with low parasitic motions). Therefore, even for decoupling systems, achieving high-precision two-dimensional positioning remains challenging. Micky Rakotondrabe proposed using an improved multivariable PI model to reduce the hysteresis and cross-coupling of two-dimensional piezoelectrics, achieving a two-dimensional tracking error of less than 2% (Multivariable classical Prandtl–Ishlinskii hysteresis modeling and compensation and sensorless control of a nonlinear 2-DOF piezoactuator). Gan et al. designed a closed-loop controller for a 3-DOF mechanism using an improved PI model, with a closed-loop tracking error of less than 5.7% (Full closed-loop controls of micro / nano positioning system with nonlinear hysteresis using micro-vision system).

[0155] Based on the above, the shortcomings of existing hysteresis compensation methods for fast-reflection mirrors can be roughly divided into three parts:

[0156] 1. Existing classical hysteresis compensation methods primarily model hysteresis curves corresponding to specific periodic input signals, suitable for systems with regular trajectories. Their accuracy is limited when compensating for complex, asymmetric hysteresis applications. In existing intelligent compensation algorithms, pure black-box modeling heavily relies on the completeness of training data, resulting in insufficient reliability in practical applications. Furthermore, the model's effectiveness depends on the degree of hyperparameter tuning. The method of this invention can be applied with high precision to any irregular test scenario.

[0157] 2. Most existing compensation methods mainly focus on single hysteresis nonlinearity problems, lacking synchronous compensation for the two-axis cross-coupling error in piezoelectric fast reflectors. The best reported compensation error is currently 2% over the entire stroke. The method of this invention can accurately compensate for both the hysteresis and two-axis coupling problems of the fast reflector simultaneously, with a compensation error of less than 0.14%.

[0158] 3. Existing technologies all require parameter configuration, but traditional manual parameter tuning is inefficient and it is difficult to guarantee finding the optimal solution.

[0159] In summary, piezoelectric fast mirrors (FSMs) are key components for achieving high-precision beam pointing. However, their inherent hysteresis nonlinearity and multi-axis coupling errors severely affect the tracking accuracy and pointing performance of FSMs. Existing methods for compensating hysteresis nonlinearity are mainly applied to scenarios with regular trajectory signals, and their accuracy is insufficient in complex and irregular scenarios. In addition, when the two axes of a fast mirror are driven simultaneously, there is a cross-coupling error between the two axes, which, combined with the hysteresis error, increases the pointing error and makes it more complex. The performance of compensation methods is limited by the effectiveness of parameter tuning; traditional manual tuning is too inefficient and cannot guarantee optimal results. To address the above problems, this invention provides a two-stage hysteresis and coupling compensation method for fast mirrors. It solves the technical problems of insufficient accuracy and difficult parameter tuning in existing piezoelectric fast mirror hysteresis compensation methods when dealing with complex and irregular inputs and multi-axis coupling. It can provide high-precision compensation for vertical nonlinearity and two-axis coupling errors under any complex trajectory, and integrates a Bayesian optimization algorithm to achieve automated and efficient global optimization of the compensation model hyperparameters, making it easy to implement in engineering. Furthermore, this invention is not only applicable to fast piezoelectric mirrors (FSM), but also to other multi-axis piezoelectric actuators with hysteresis and coupling characteristics, such as nanostages and adaptive optical deformable mirrors.

[0160] like Figure 6 As shown, the complex hysteresis compensation task is decomposed hierarchically. The first stage (linear pre-compensation stage): Utilizing a high-resolution piecewise linearization method, the main components of the hysteresis nonlinearity are compensated quickly and with low complexity, approximating the FSM system as a "quasi-linear" system. The second stage (intelligent fine compensation stage): For the residual errors after the first stage compensation (including higher-order nonlinearities, memory effects, and two-axis coupling errors), a Long Short-Term Memory (LSTM) neural network model characterized by the sequence of angle and voltage change directions is constructed. A Bayesian optimization algorithm is used to automatically search for the optimal hyperparameters of the network, thereby learning and accurately compensating for the residual complex nonlinear mapping relationships.

[0161] Furthermore, the first stage of this invention employs computationally efficient piecewise linear pre-compensation to achieve rapid and coarse linearization of the main hysteresis loop; the second stage employs intelligent fine compensation based on a Long Short-Term Memory (LSTM) network to specifically handle residual high-order nonlinearities and coupling errors. This architecture ensures ultra-high compensation accuracy while also considering the system's real-time response and computational efficiency. The core technology of the first stage is to separate the hysteresis curve into rising and falling directions, and then perform voltage segmentation for each direction to obtain a linear voltage-angle coefficient lookup table for the entire path. Its innovation lies in: firstly, separating the hysteresis data according to the voltage change direction (rising / falling); then, constructing local linear voltage-angle coefficient lookup tables for the rising and falling paths respectively at extremely high voltage resolution; during compensation, linearization compensation is achieved by judging the operating voltage state and interpolating through the lookup tables. This method achieves effective linearization compensation of the hysteresis main loop with extremely low computational complexity. The key to achieving high-precision modeling in the second stage lies in the LSTM neural network input construction method for modeling high-order nonlinearity and two-axis coupling errors. Its innovation lies in the fact that neural networks struggle to recognize one-to-many mapping relationships like hysteresis curves. Therefore, this invention fuses the system output angle sequence after compensation in the first stage with the original driving voltage change direction sequence, using them together as input features for the LSTM network. This transforms the one-to-many mapping relationship into a one-to-one mapping relationship, enabling it to accurately learn complex residual error models including coupling effects. Furthermore, this invention employs an automatic hyperparameter optimization method for neural networks based on Bayesian optimization, effectively improving efficiency and engineering applicability. Its innovation lies in modeling the optimization process of LSTM network structural hyperparameters (such as the number of layers and units) and training hyperparameters (such as the learning rate) as a black-box optimization problem, and using a Bayesian optimization algorithm for automated, high-efficiency global search, thereby replacing the traditional inefficient manual search and ensuring stable and optimal compensator performance.

[0162] Compared with existing technologies, classical hysteresis compensation methods mainly model hysteresis curves corresponding to specific periodic input signals, which are suitable for systems with regular trajectories. However, their accuracy is limited when compensating for complex and asymmetric hysteresis applications. Furthermore, in existing intelligent compensation algorithms, pure black-box modeling heavily relies on the completeness of training data, resulting in insufficient reliability in practical applications. The model performance also depends on the degree of hyperparameter tuning. In contrast, this invention can be applied with high precision to any irregular test scenario. Existing compensation methods mainly target piezoelectric hysteresis problems, while research on the hysteresis of fast-reflecting mirrors and two-axis coupling errors is limited, and the error after compensation is less than 2%. This invention can accurately compensate for both the hysteresis and two-axis coupling problems of fast-reflecting mirrors simultaneously, with a compensation error of less than 0.14%. In addition, the parameter settings in existing technologies directly affect the model's performance and prediction results. Traditional manual parameter tuning or grid search is not only inefficient but also difficult to guarantee finding the optimal solution. This invention uses a Bayesian optimization algorithm applied to neural network parameter tuning, achieving intelligent and efficient global optimization of the compensation model.

[0163] In this embodiment of the invention, a two-stage hysteresis and coupling compensation method for a fast-reflecting mirror is provided. When hysteresis compensation is required for the fast-reflecting mirror, a full-stroke hysteresis loop dataset corresponding to the fast-reflecting mirror is constructed and segmented to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals. Based on the multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals, a linear coefficient lookup table for the rising process and a linear coefficient lookup table for the falling process are constructed. The current pointing error, the target trajectory angle corresponding to the fast-reflecting mirror, the current input voltage, and the current input voltage operating state are determined, and the target local linear coefficient is extracted from the rising process linear coefficient lookup table or the falling process linear coefficient lookup table based on the current input voltage operating state. The first-stage segmented linear compensation voltage is calculated based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient, and the fast-reflecting mirror is measured to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, LSTM neural network training data is constructed. Based on the Bayesian optimization algorithm... The LSTM neural network training data is used to train the LSTM neural network model, resulting in a trained LSTM neural network. This trained LSTM neural network is then used to test the fast-reflecting mirror based on the first-stage piecewise linear compensation voltage, outputting the final compensation angle. Based on this approach, this invention achieves a segmented and accurate representation of the fast-reflecting mirror's hysteresis characteristics by segmenting the full-stroke hysteresis loop dataset and constructing a corresponding linear coefficient lookup table. Then, by combining the target trajectory angle, current input voltage, and operating state, suitable local linear coefficients are extracted to calculate the first-stage piecewise linear compensation voltage, completing the initial compensation of the basic hysteresis error. Simultaneously, LSTM neural network training data is constructed based on the first-stage compensation angle and voltage operating state. A Bayesian optimization algorithm is used to improve the LSTM neural network training effect, enabling the network to accurately capture irregular nonlinear changes and historical input path dependence features in the fast-reflecting mirror's hysteresis behavior. This allows the second-stage compensation to offset the irregular nonlinear errors not eliminated in the first stage, significantly improving the accuracy of fast-reflecting mirror hysteresis and coupling compensation.

[0164] Please see Figure 7 , Figure 7 This is a structural block diagram of a two-stage hysteresis and coupling compensation device for a fast-reflecting mirror provided in Embodiment 2 of the present invention.

[0165] This invention provides a two-stage hysteresis and coupling compensation device for a fast-reflecting mirror, comprising:

[0166] The response module 701 is used to respond to compensation requests, construct the fast-reflection mirror full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0167] Module 702 is used to construct a lookup table of linear coefficients for the rising process and a lookup table of linear coefficients for the falling process based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

[0168] The extraction module 703 is used to determine the current pointing error and the target trajectory angle corresponding to the fast-reflection mirror, the current input voltage and the current input voltage operating state, and extract the target local linear coefficients from the linear coefficient lookup table of the rising process or the linear coefficient lookup table of the falling process based on the current input voltage operating state.

[0169] The measurement module 704 is used to calculate the first-stage piecewise linear compensation voltage based on the target trajectory angle, the current input voltage, the current pointing error and the target local linear coefficient, and to measure the fast-reflection mirror to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, it constructs LSTM neural network training data.

[0170] The output module 705 is used to train the LSTM neural network model based on the training data of the LSTM neural network using the Bayesian optimization algorithm, obtain the trained LSTM neural network, and complete the test of the fast-reflection mirror through the trained LSTM neural network according to the first-stage piecewise linear compensation voltage, and output the final compensation angle.

[0171] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0172] This invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program; when the computer program is executed by the processor, the processor performs the steps of the two-stage hysteresis and coupling compensation method for fast-reflecting mirrors as described in the above embodiments.

[0173] This invention also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the two-stage hysteresis and coupling compensation method for the fast-reflecting mirror as described in the above embodiments.

[0174] This invention also provides a computer program product, including a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the two-stage hysteresis and coupling compensation method for a fast-reflecting mirror as described in the above embodiments.

[0175] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0176] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0177] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0178] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0179] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A two-stage hysteresis and coupling compensation method for a fast-reflecting mirror, characterized in that, include: In response to the compensation request, construct the full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals; Based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals, a lookup table for the linear coefficients of the rising process and a lookup table for the linear coefficients of the falling process are constructed, including: Extract the input voltage value and output angle value corresponding to the beginning and end of each of the rising hysteresis segment intervals; Based on the input voltage value and output angle value corresponding to each of the rising hysteresis segment intervals, calculate the local linearity coefficient corresponding to each of the rising hysteresis segment intervals; Extract the input voltage value and output angle value corresponding to the beginning and end of each of the falling hysteresis segment intervals; Based on the input voltage value and output angle value corresponding to each of the falling hysteresis segment intervals, calculate the local linearity coefficient corresponding to each of the falling hysteresis segment intervals; Based on the local linear coefficients corresponding to the multiple rising hysteresis segment intervals and the multiple falling hysteresis segment intervals, a lookup table for the linear coefficients of the rising process and a lookup table for the linear coefficients of the falling process are constructed respectively. Determine the current pointing error and the target trajectory angle corresponding to the fast-reflection mirror, the current input voltage, and the current input voltage operating state. Based on the current input voltage operating state, extract the target local linear coefficient from the linear coefficient lookup table for the rising process or the linear coefficient lookup table for the falling process, including: The target trajectory corresponding to the fast-reflecting mirror is tested to obtain the target trajectory angle, the current input voltage corresponding to the target trajectory angle, and the measured angle corresponding to the current input voltage; The pointing error at the current moment is obtained by subtracting the measured angle from the target trajectory angle. Real-time monitoring of the current input voltage's changing trend to determine the current input voltage's operating status: If the current input voltage is greater than the input voltage at a historical time, the current input voltage operating state is determined to be a voltage rising state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the rising process. If the current input voltage is less than or equal to the input voltage at a historical time, the current input voltage operating state is determined to be a voltage drop state, and the local linear coefficient corresponding to the current input voltage is selected as the target local linear coefficient from the linear coefficient lookup table of the drop process. The first-stage piecewise linear compensation voltage is calculated based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient. The fast-reflecting mirror is measured to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, LSTM neural network training data is constructed. The LSTM neural network is trained using the Bayesian optimization algorithm based on the training data to obtain a trained LSTM neural network. The trained LSTM neural network is then used to test the fast-reflecting mirror based on the first-stage piecewise linear compensation voltage, and the final compensation angle is output.

2. The two-stage hysteresis and coupling compensation method for fast-reflecting mirrors according to claim 1, characterized in that, The process involves constructing a full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror and performing segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals, including: A periodic voltage signal is applied to the fast-reflecting mirror to obtain an input voltage sequence; The fast-reflecting mirror is measured for each input voltage in the input voltage sequence, and each input voltage and its corresponding output angle are paired to form a data pair. The dataset consists of multiple data pairs representing the entire hysteresis loop. Based on the voltage change trend in the full-stroke hysteresis loop dataset, the full-stroke hysteresis loop dataset is split into rising hysteresis dataset and falling hysteresis dataset. Based on a preset fixed voltage interval, the voltage ranges in the rising hysteresis dataset and the falling hysteresis dataset are uniformly segmented to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals.

3. The two-stage hysteresis and coupling compensation method for a fast-reflecting mirror according to claim 1, characterized in that, The first-stage piecewise linear compensation voltage is calculated based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linearity coefficient. The fast-reflecting mirror is measured to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, LSTM neural network training data is constructed, including: The required linear pre-compensation voltage at the current moment is calculated by using the ratio of the current pointing error to the target local linearity coefficient. The current input voltage is superimposed with the linear pre-compensation voltage required at the current moment to obtain the first-stage piecewise linear compensation voltage. The first-stage segmented linear compensation voltage is input to the fast-reflecting mirror, and the output angle of the fast-reflecting mirror under the first-stage segmented linear compensation voltage is measured to obtain the first-stage compensation angle. The residual error after the first stage compensation is obtained by subtracting the first stage compensation angle from the target trajectory angle. Based on the residual error after the first stage compensation and the current input voltage operating state, an input feature vector is constructed, and the first stage piecewise linear compensation voltage is used as the output feature vector to form the training data for the LSTM neural network.

4. The two-stage hysteresis and coupling compensation method for a fast-reflecting mirror according to claim 1, characterized in that, The Bayesian optimization algorithm trains the LSTM neural network using the training data to obtain a trained LSTM neural network. This trained LSTM neural network is then used to test the fast-reflection mirror based on the first-stage piecewise linear compensation voltage, outputting the final compensation angle, including: The Bayesian optimization algorithm is used to iteratively train the LSTM neural network based on the training data of the LSTM neural network to obtain the trained LSTM neural network. The trained LSTM neural network outputs the second-stage fine compensation voltage. The first-stage piecewise linear compensation voltage is superimposed with the second-stage fine compensation voltage to obtain the final compensation voltage; The final compensation voltage is input into the fast-reflecting mirror for testing to obtain the final compensation angle.

5. A two-stage hysteresis and coupling compensation device for a fast-reflecting mirror, applied to the two-stage hysteresis and coupling compensation method for a fast-reflecting mirror as described in claim 1, characterized in that, include: The response module is used to respond to compensation requests, construct the full-stroke hysteresis loop dataset corresponding to the fast-reflection mirror, and perform segmentation processing to obtain multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals. The construction module is used to construct a linear coefficient lookup table for the rising process and a linear coefficient lookup table for the falling process based on multiple rising hysteresis segment intervals and multiple falling hysteresis segment intervals. The extraction module is used to determine the pointing error at the current moment and the target trajectory angle, current input voltage and current input voltage operating state corresponding to the fast-reflection mirror, and extract the target local linear coefficients based on the current input voltage operating state in the linear coefficient lookup table of the rising process or the linear coefficient lookup table of the falling process; The measurement module is used to calculate the first-stage piecewise linear compensation voltage based on the target trajectory angle, the current input voltage, the current pointing error, and the target local linear coefficient, and to measure the fast-reflecting mirror to obtain the first-stage compensation angle. Based on the first-stage compensation angle and the current input voltage operating state, it constructs LSTM neural network training data. The output module is used to train the LSTM neural network based on the training data of the LSTM neural network using the Bayesian optimization algorithm, to obtain a trained LSTM neural network, and to complete the test of the fast-reflecting mirror using the trained LSTM neural network according to the first stage piecewise linear compensation voltage, and output the final compensation angle.

6. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the two-stage hysteresis and coupling compensation method for a fast-reflecting mirror as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the two-stage hysteresis and coupling compensation method for the fast-reflecting mirror as described in any one of claims 1-4.

8. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the two-stage hysteresis and coupling compensation method for a fast-reflecting mirror as described in any one of claims 1-4.