A machine learning based grating filter sensing signal conditioning method

By employing a machine learning-based grating filter sensing signal conditioning method, the problem of distinguishing between the measured coordinate offset and the actual offset of the target frequency band during the dynamic control of the grating filter was solved, achieving higher control stability and compensation accuracy, and improving the control effect of the grating filter.

CN122329370APending Publication Date: 2026-07-03成彦臻
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
成彦臻
Filing Date
2026-04-24
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing grating filters have difficulty effectively distinguishing between measured coordinate offset and target frequency band offset during dynamic control, and lack explicit processing of continuous control history and low-confidence output results, resulting in compensation overshoot, compensation undershoot and decreased control stability.

Method used

A machine learning-based approach is adopted to acquire observation response characterization data and conditional constraint state variables, perform spectral axis registration and residual frequency offset decoupling processing, construct residual dynamic state sequences, and use time-series inference models to output voltage compensation and conditioning confidence results. The final control voltage is determined by combining local spectrum scanning verification.

Benefits of technology

It effectively distinguishes between pseudo-offset and true offset, reduces the interference of observation signal fluctuations and environmental changes on the control results, improves the compensation accuracy, control stability and anti-misadjustment capability of grating filters, and balances online conditioning efficiency and result reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122329370A_ABST
    Figure CN122329370A_ABST
Patent Text Reader

Abstract

This application relates to the field of intelligent conditioning technology for grating filter sensing signals, and discloses a grating filter sensing signal conditioning method based on machine learning. The invention acquires observation response characterization data and conditional constraint state quantities, first performs spectral axis registration processing based on a preset reference frequency window to eliminate the influence of measurement coordinate offset, then performs residual frequency offset decoupling processing on the preset target frequency band to extract residual frequency offset characterization quantities, and constructs a residual dynamic state sequence by combining historical control states, further utilizes a preset time-series inference model to output voltage compensation quantity and conditioning reliability results, and finally determines the final control voltage through reliable gating conditioning and local spectrum scanning verification, thereby effectively distinguishing pseudo offset from the preset target frequency band true offset, and reducing the interference of original observation signal fluctuations, environmental changes and uneven internal electric field distribution on the control results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent conditioning technology for grating filter sensing signals, and in particular to a grating filter sensing signal conditioning method based on machine learning. Background Technology

[0002] Grating filter-based sensing and control schemes have high application value in scenarios such as terahertz detection, spectrum selection, state monitoring, and fine measurement. Especially in applications that require dynamic tracking and online adjustment of target frequency bands, it is usually necessary to adjust the driving voltage in a timely manner according to the current observation response to maintain the target characteristic peak position in a preset working state. To address the above requirements, existing technologies have proposed a variety of grating filter signal processing and compensation schemes, such as adjustment schemes that directly detect peak positions based on transmission or reflection spectra, frequency offset correction schemes based on comparison of reference and detection channels, driving voltage correction schemes based on empirical rules or static models, and spectrum response prediction and compensation schemes based on data-driven models. These schemes typically analyze the position and amplitude changes of the target frequency band by acquiring detection signals, reference signals, or spectrum response data, which can achieve filter control and frequency offset correction to a certain extent.

[0003] However, in actual operation, the current observation response of grating filters, especially PDLC grating filters, is not only affected by the actual offset of the target frequency band, but is also easily affected by the combined effects of reference link fluctuations, changes in the starting position of frequency scanning, changes in ambient temperature, material hysteresis response, and non-uniform distribution of internal electric field. For example, in two adjacent control cycles, even if the target working state is theoretically the same, one control cycle may be in the recovery stage after the withdrawal of a high driving voltage, while the other control cycle may be in the equilibrium stage after stable driving. The two often have significant differences in local spectral background and characteristic peak edge positions. In this case, existing technologies generally lack the hierarchical distinction between the measurement coordinate offset and the actual offset of the target frequency band, and also lack explicit processing of continuous control history and low-confidence output results. It is easy to misjudge the background offset as the actual misadjustment, or to submerge the early actual misadjustment in the background changes, which leads to problems such as compensation overshoot, compensation undershoot, decreased control stability, and increased risk of misadjustment. Summary of the Invention

[0004] This application proposes a machine learning-based grating filter sensing signal conditioning method to address the problems mentioned in the background art.

[0005] To achieve the above objectives, this application adopts the following technical solution: a grating filter sensing signal conditioning method based on machine learning, comprising the following steps:

[0006] S1. Obtain the observation response characterization data and condition constraint state quantities corresponding to the current control cycle;

[0007] S2. Based on the preset reference frequency window, perform spectral axis registration processing on the observation response characterization data, and perform residual frequency offset decoupling processing on the preset target frequency band based on the registered observation response characterization data to obtain the residual frequency offset characterization quantity. Combine the condition constraint state quantity and residual frequency offset characterization quantity corresponding to the current control cycle and the historical control cycle to construct the residual dynamic state sequence.

[0008] S3. Input the residual dynamic state sequence into the preset time-series inference model to obtain the voltage compensation amount and conditioning reliability result corresponding to the current control cycle.

[0009] S4. Perform trusted gating conditioning. When the conditioning confidence result reaches the preset confidence threshold, generate the final control voltage based on the voltage compensation amount. When the conditioning confidence result does not reach the preset confidence threshold, perform local spectrum scanning verification on each candidate compensation point in the neighborhood of the predicted compensation point pointed to by the voltage compensation amount to obtain the local characteristic peak position corresponding to each candidate compensation point, and determine the final control voltage based on the deviation between the local characteristic peak position corresponding to each candidate compensation point and the preset target characteristic peak position.

[0010] Furthermore, the observation response characterization data is obtained by performing dimensionless transmission characterization processing on the detection signal, reference signal, and dark field signal corresponding to the current control cycle;

[0011] The conditional constraint state variables include the current driving voltage, the current ambient temperature, and the electric field non-uniformity index.

[0012] Furthermore, the electric field non-uniformity index is determined based on the equivalent field strength and area of ​​the discrete region corresponding to the grating filter, and is used to characterize the uniformity of the electric field distribution inside the grating filter within the current control cycle.

[0013] Dimensionless transmission characterization processing is used to eliminate the influence of dark field noise and reference channel fluctuations on the observation response characterization data.

[0014] Furthermore, the preset reference frequency window is determined by the frequency range in which the fluctuation is less than the preset fluctuation threshold and is not sensitive to regulation in the historical stability test, and the preset target frequency band is the target operating frequency band corresponding to the grating filter.

[0015] Furthermore, the spectral axis registration process includes: extracting the reference window response distribution corresponding to the observation response characterization data and the benchmark observation response characterization data within a preset reference frequency window; performing registration analysis on the correspondence and trend consistency of the responses of the two under different frequency axis offset conditions; determining the frequency axis offset that enables the observation response characterization data and the benchmark observation response characterization data to achieve the best alignment state within the preset reference frequency window; and determining the frequency axis offset as the spectral axis registration amount.

[0016] Among them, the baseline observation response characterization data are the observation response characterization data collected and stored under the baseline control state.

[0017] Furthermore, the residual frequency offset decoupling process includes: performing local spectral shape difference analysis and feature position offset extraction on the registered observation response characterization data within a preset target frequency band based on the spectral axis registration amount. The local spectral shape difference analysis includes determining the local spectral shape difference coefficient based on the amplitude and slope differences between the registered observation response characterization data and the reference observation response characterization data within the preset target frequency band. The feature position offset extraction includes determining the target frequency band feature position and the reference feature position based on the discrete slope amplitude to separate the influence of measurement coordinate offset and the inherent offset component of the target frequency band, thereby obtaining the residual frequency offset characterization amount.

[0018] The residual dynamic state sequence is composed of the conditional constraint state quantities and residual frequency offset characterization quantities corresponding to the current control cycle and multiple historical control cycles, combined in chronological order.

[0019] Furthermore, the preset temporal reasoning model is a gated recurrent unit network pre-trained based on historical training samples;

[0020] Historical training samples include residual dynamic state sequences corresponding to historical control cycles and voltage compensation quantity annotation results corresponding to the residual dynamic state sequences;

[0021] The gated cyclic unit network is used to output voltage compensation and conditioning reliability results based on the residual dynamic state sequence.

[0022] Furthermore, during the training process, the gated recurrent unit network constructs a joint objective function based on the constraint of reducing residual frequency offset after compensation, the boundary constraint of single-cycle voltage change, and the constraint of smoothing voltage change between adjacent control cycles, so that the voltage compensation amount can satisfy the voltage control boundary constraint while reducing residual frequency offset.

[0023] Furthermore, the trusted gating conditioning includes: when the conditioning confidence result reaches a preset confidence threshold, applying a voltage compensation amount to the current driving voltage to obtain the final control voltage;

[0024] When the conditioning confidence result does not reach the preset confidence threshold, the predicted compensation point determined by the current driving voltage and voltage compensation amount is used as the center, and candidate compensation points are constructed in the neighborhood of the predicted compensation point according to the preset compensation step size.

[0025] Furthermore, the local spectrum scanning verification includes: acquiring local spectra under the control conditions corresponding to each candidate compensation point, and extracting the positions of local characteristic peaks from each local spectrum;

[0026] Among them, the preset target feature peak position is the target peak position corresponding to the preset target frequency band;

[0027] The deviations between the local characteristic peak positions corresponding to each candidate compensation point and the preset target characteristic peak positions are compared, and the control voltage corresponding to the candidate compensation point with the smallest deviation is determined as the final control voltage.

[0028] The beneficial effects of this invention are as follows:

[0029] This invention acquires observation response characterization data and conditional constraint state quantities. First, it performs spectral axis registration processing based on a preset reference frequency window to eliminate the influence of measurement coordinate offset. Then, it performs residual frequency offset decoupling processing on a preset target frequency band to extract residual frequency offset characterization quantities. Combined with historical control states, it constructs a residual dynamic state sequence. Furthermore, it uses a preset time-series inference model to output voltage compensation and conditioning reliability results. Finally, it determines the final control voltage through reliable gating conditioning and local spectrum scanning verification. This effectively distinguishes between pseudo offsets and the true offset of the preset target frequency band, reduces the interference of original observation signal fluctuations, environmental changes, and uneven internal electric field distribution on the control results, improves the compensation accuracy, control stability, and anti-misadjustment capability of the grating filter in continuous control processes, and balances online conditioning efficiency and result reliability. Attached Figure Description

[0030] 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort:

[0031] Figure 1 This is a flowchart of the method of the present invention;

[0032] Figure 2 This is a flowchart of the S2 process of the present invention. Detailed Implementation

[0033] 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, and 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.

[0034] Example

[0035] like Figure 1 and Figure 2 As shown, the present invention discloses a grating filter sensing signal conditioning method based on machine learning, including S1, S2, S3 and S4.

[0036] In this embodiment, step S1 is used to obtain the observation response characterization data and condition constraint state quantities corresponding to the current control cycle, providing a unified, stable and comparable data input basis for the spectral axis registration processing and residual frequency offset decoupling processing in the subsequent step S2. This step addresses the following problem: In the dynamic control process of the grating filter, if the original detection signal is directly used as the input for subsequent frequency offset analysis, the detection results under different control cycles are easily affected by factors such as dark field noise, reference channel fluctuations, light source output fluctuations, ambient temperature changes, and uneven electric field distribution inside the filter. This results in a lack of a unified comparison benchmark between different control cycles, which in turn affects the stability of the subsequent residual frequency offset characterization quantity extraction and the reliability of time-series inference. Therefore, in step S1, this invention does not directly use the original detection signal, but first converts the original detection signal into observation response characterization data and simultaneously constructs condition constraint state quantities that can characterize the current controlled state, thereby converting the original test results into a unified input that can be directly used in subsequent steps.

[0037] In a preferred embodiment, the grating filter is a PDLC grating filter. Step S1 is implemented based on a transmission test link. The test link can employ existing continuous wave terahertz sweep frequency test equipment, terahertz detectors, voltage driving devices, and temperature acquisition devices. The continuous wave terahertz sweep frequency test equipment is used to generate incident terahertz signals corresponding to different frequency sampling points within a preset sampling frequency band. The terahertz detector is used to acquire the output of the transmission channel. The voltage driving device is used to apply the current driving voltage to the grating filter. The temperature acquisition device is used to obtain the current ambient temperature. The above-mentioned test equipment and acquisition devices can all be conventional equipment in the field and are supporting conditions for the implementation of this invention. Their main function is to complete signal acquisition and state acquisition. The focus of this invention in step S1 is not on the test equipment itself, but on how to convert the raw signal output by the test equipment into observation response characterization data and condition constraint state quantities that can be used for subsequent spectral axis registration processing, residual frequency offset decoupling processing, and time-series compensation inference processing.

[0038] Specifically, in the current regulatory cycle Within, sampling points at each frequency in the preset sampling frequency band. Collect detection signals separately Reference signal and dark field signals ,in, Indicates the frequency sampling point index. Indicates the first The frequency value corresponding to each frequency sampling point; the preset sampling frequency band at least covers the preset reference frequency window and the preset target frequency band in the subsequent step S2, preferably, the frequency sampling points Scanning step size according to preset frequency Obtained by sequential sampling within a preset sampling frequency band; frequency scan step size. The preferred value is 1 / 50 to 1 / 10 of the target characteristic peak half-width, or preferably 0.1% to 1% of the preset target frequency band bandwidth. The setting is based on the following: when... When the value is too large, local spectral shape changes and characteristic peak position shifts within the target frequency band are difficult to fully resolve; when While a smaller frequency scanning step size improves resolution, it significantly increases the scanning time and data processing overhead of a single control cycle, which is detrimental to real-time performance in dynamic control scenarios. Therefore, by controlling the frequency scanning step size within the aforementioned range, both feature resolution and single-cycle acquisition efficiency can be balanced.

[0039] Among them, detection signal This represents the output signal of the transmission channel modulated by the grating filter under the current driving voltage conditions; reference signal. This represents the output signal under reference channel or standard transmission conditions; dark field signal. This represents the background noise signal acquired by the terahertz detector under conditions of no effective incident radiation. To eliminate data inconsistencies caused by fluctuations in light source output, detector gain fluctuations, and dark field noise between different control cycles, this embodiment does not directly use the amplitude of the detection signal. Instead, it performs dimensionless transmission characterization processing based on the detection signal, reference signal, and dark field signal to obtain the observation response characterization data corresponding to the current control cycle. Preferably, the observation response characterization data in this embodiment is a dimensionless transmission spectrum, which can be determined by the following formula:

[0040]

[0041] In the formula, This indicates the current adjustment cycle is in the [number]th phase. Observational response characterization data corresponding to each frequency sampling point; This represents a stability term in transmission characterization, its function being to prevent abnormal amplification of the dimensionless transmission characterization results due to an excessively small denominator. Preferably, The average amplitude of the reference signal can be used. When the reference channel has high stability and the detector has a large dynamic range, the number of times the reference channel stability is increased. A smaller value can be chosen to reduce the disturbance to the true response; when the reference channel fluctuates significantly or the reference signal amplitude is low in a local frequency range, A larger value can be selected to improve numerical stability.

[0042] The reason for adopting the above-mentioned dimensionless transmission characterization processing is as follows: On the one hand, the original detection signal simultaneously contains filter response information, background noise information, and reference link fluctuation information. Comparing only the original detection signal is difficult to accurately reflect the true transmission changes of the grating filter under different control periods. On the other hand, by introducing reference signals and dark field signals, the influence of dark field noise and reference channel fluctuations can be significantly reduced while maintaining the response morphology characteristics. This makes the observation response characterization data between different control periods have a unified dimension and a unified comparison benchmark. Compared with the existing technology that directly performs migration analysis based on the single-channel original response, this invention can significantly improve the response consistency between different control periods by constructing observation response characterization data, providing a more stable input basis for subsequent spectral axis registration processing and residual frequency offset decoupling processing.

[0043] To ensure the validity of the observed response characterization data, this implementation also preferably sets up a low-confidence sampling point determination mechanism within the current control cycle. Specifically, when a certain frequency sampling point meets the requirements... When the frequency sampling point is below the preset effective threshold of the reference signal, the sampling point is determined to be a low-confidence sampling point.

[0044] Preferably, the preset effective threshold for the reference signal can be set to 2% to 5% of the full-scale output of the terahertz detector; or, in another preferred embodiment, it can also be determined according to the principle that the signal-to-noise ratio of the reference signal at the corresponding frequency sampling point is not less than 10dB. The above threshold is set based on the fact that when the reference signal is too weak, the denominator of the dimensionless transmission characterization processing will be significantly reduced, which easily amplifies dark field noise and random disturbances, thereby distorting the observation response characterization data of the corresponding frequency sampling point. Furthermore, the total number of frequency sampling points in the current control cycle is denoted as... The number of low-confidence sampling points is The proportion of low-confidence sampling points It can be represented as: .

[0045] Preferably, the upper limit of the proportion of low-confidence sampling points This value can be set from 10% to 30%. A smaller value is preferable when the target frequency band is narrow and subsequent steps require high spectral continuity; a larger value is preferable when the test environment noise is relatively high and subsequent steps allow for smooth interpolation. The setting is based on ensuring that a sufficient number of effective frequency sampling points are retained within the preset reference window and the preset target frequency band to support the stable execution of subsequent spectral axis registration and residual frequency offset decoupling processing. When the current control cycle is deemed invalid, a re-acquisition is triggered. This determination mechanism avoids directly transmitting significantly distorted observation response characterization data into subsequent steps, reducing the risk of misjudgment in the calculation results of subsequent spectral axis registration and residual frequency offset characterization.

[0046] While acquiring the observation response characterization data, this step also needs to construct conditional constraint state variables. These include the current driving voltage, current ambient temperature, and electric field non-uniformity index. The current driving voltage can be directly acquired from the output of the voltage driving device and is used to characterize the actual control intensity acting on the grating filter under the current control cycle. The current ambient temperature can be acquired by a temperature acquisition device located near the grating filter. Preferably, the distance between the temperature acquisition device and the effective control area of ​​the grating filter can be set to 1 cm to 5 cm. This setting is based on the fact that when the distance is too small, the temperature acquisition results are easily affected by local heat sources, fixture structures, or electrode thermal conductivity effects. The current ambient temperature cannot stably characterize the temperature of the filter's vicinity. When the distance is too large, the collected temperature may deviate from the actual working environment of the filter, thus weakening the ability to characterize the controlled conditions of the current control cycle. The reason for including the current ambient temperature in the conditional constraint state quantity is that the electro-optic response characteristics of the PDLC grating filter are correlated with the ambient temperature. Under different temperature conditions, the same current driving voltage may correspond to different transmission response modes. If subsequent compensation inference is performed only based on the observed response characterization data without introducing the current ambient temperature, it is easy to misidentify the response difference caused by the change in ambient temperature as the inherent offset of the target frequency band, thus affecting the accuracy of the voltage compensation inference.

[0047] In addition to the current driving voltage and current ambient temperature, this step preferably introduces an electric field non-uniformity index to characterize the uniformity of the electric field distribution inside the grating filter within the current control cycle. The problem to be solved by introducing this index is that even if the current driving voltage is the same, if the equivalent field strength of different regions inside the filter is significantly different, the modulation state of different positions inside the PDLC grating filter may be inconsistent, which will cause the local spectral response and the position of the target characteristic peak to shift. If the subsequent time-series inference model only uses the current driving voltage and current ambient temperature and cannot perceive the consistency difference of the electric field distribution inside the filter, it may misjudge the response shift caused by the non-uniformity of the internal controlled state as a normal frequency shift, thereby reducing the accuracy of compensation inference. Therefore, this embodiment constructs an electric field non-uniformity index based on the equivalent field strength and area of ​​the corresponding discrete region of the grating filter.

[0048] Preferably, the effective control region of the grating filter can be divided into 20 to 500 discrete regions. When the device size is small and the field strength distribution is smooth, fewer discrete regions can be selected to reduce computational overhead; when the electrode structure is complex or the local field strength gradient is large, more discrete regions can be selected to improve the characterization accuracy. A discrete region, whose equivalent field strength is denoted as . The area of ​​the region is denoted as The total area is denoted as Among them, the equivalent field strength The area of ​​the region can be obtained either through a pre-established electric field simulation model or by interpolation of the mapping relationship between the current driving voltage and the equivalent field strength of the discrete region established during the offline calibration phase; The field strength is determined by the geometric partitioning of the corresponding discrete region. Furthermore, the area-weighted average field strength... and electric field non-uniformity index They can be determined by the following formulas respectively:

[0049]

[0050]

[0051] In the formula, This represents the total number of discrete regions. Indicates the total area of ​​the effective control zone. The field strength characterizes the stability term, preferably. Desirable The factor is set at [number] times because: when the area-weighted average electric field strength is low, without introducing a stabilizing term, the electric field non-uniformity index may be overly sensitive to small fluctuations, which is not conducive to subsequent steps. As a dimensionless quantity, the larger its value, the more non-uniform the electric field distribution inside the grating filter is within the current control cycle. The reason for using the above-mentioned area-weighted deviation form to construct the electric field non-uniformity index is that this form can not only reflect the degree of deviation of the local equivalent field strength from the average field strength, but also take into account the difference in the influence of different discrete regions on the overall controlled state. Compared with the existing technology that only uses the current driving voltage or average field strength as the state characterization, the present invention further introduces the electric field non-uniformity index, which can more fully characterize the consistency difference of the controlled state inside the filter under the current control cycle, thereby providing a higher quality state input for the subsequent construction of the residual dynamic state sequence.

[0052] In this embodiment, the conditional constraint state quantity is preferably formed by a combination of the current driving voltage, the current ambient temperature, and the electric field non-uniformity index. That is, the current driving voltage is used to characterize the current control intensity, the current ambient temperature is used to characterize the current external thermal environment conditions, and the electric field non-uniformity index is used to characterize the current internal electric field distribution uniformity. Therefore, the final output of step S1 is not a single spectrum data, but an input set composed of observation response characterization data and conditional constraint state quantity. The observation response characterization data is used to characterize the actual response result of the grating filter under the current control period, and the conditional constraint state quantity is used to characterize the current controlled conditions and internal field distribution state corresponding to the formation of the actual response result. Through this dual-layer input structure, a unified response basis can be provided for the spectral axis registration processing and residual frequency offset decoupling processing in the subsequent step S2, and a clear source of state constraints can also be provided for the timing compensation inference processing in the subsequent step S3.

[0053] In this embodiment, step S2 is used to perform spectral axis registration processing on the observation response characterization data obtained in step S1 based on a preset reference frequency window, and to perform residual frequency offset decoupling processing on the preset target frequency band based on the registered observation response characterization data to obtain the residual frequency offset characterization quantity; then, the residual dynamic state sequence is constructed by combining the condition constraint state quantity and residual frequency offset characterization quantity corresponding to the current control cycle and the historical control cycle, so as to be used by the time series inference model in the subsequent step S3.

[0054] This step mainly addresses the following issues: The observation response characterization data of the current control cycle includes both the overall positional offset caused by measurement coordinate offset, frequency scan start position change, or reference link offset, and the inherent offset component of the preset target frequency band caused by the change of the control state of the grating filter itself. If frequency offset analysis is directly performed on the current observation response characterization data, the time-series inference model is prone to simultaneously learning pseudo-offset and true offset, thereby affecting the accuracy of subsequent voltage compensation and conditioning reliability results. Therefore, in step S2, this invention adopts a two-stage approach of "first performing spectral axis registration processing, then performing residual frequency offset decoupling processing" to first eliminate the influence of measurement coordinate offset and then extract the true offset component of the preset target frequency band.

[0055] In a preferred embodiment, both the preset target frequency band and the preset reference frequency window are predetermined and stored during the offline calibration stage. The preset target frequency band is the target operating interval corresponding to the grating filter, which can be determined by the device design target value, the position of the target characteristic peak under the reference control state and its corresponding bandwidth, or the system operation requirements. Preferably, the target frequency band bandwidth can be 1 to 3 times the half-width at half maximum (WHM) of the target characteristic peak in the reference observation response characterization data. When more attention is paid to the main feature migration near the target characteristic peak position, the value can be taken in the lower half of this range. When it is necessary to consider both the target characteristic peak position migration and the local spectral shape change, the value can be taken in the upper half of this range. The reason for this setting is that when the target frequency band is too narrow, it is difficult to fully reflect the edge of the target characteristic peak and the local spectral shape change; when the target frequency band is too wide, it is easy to introduce side fluctuations that are unrelated to the target control.

[0056] A preset reference frequency window is used to characterize a frequency range that is insensitive to regulation and exhibits small fluctuations in historical stability tests. During the offline calibration phase, repeated tests for 5 to 30 stable regulation cycles can be performed under the baseline regulation state to statistically analyze the fluctuations at each frequency sampling point. Simultaneously, 3 to 20 calibration voltage levels are set between the minimum and maximum calibration voltages to statistically analyze the sensitivity of each frequency sampling point to changes in the driving voltage. For frequency ranges that simultaneously meet the criteria of "historical fluctuation not exceeding a preset fluctuation threshold" and "regulation sensitivity not exceeding a preset sensitivity threshold," this is determined as the preset reference frequency window. Preferably, the preset fluctuation threshold can be between 0.005 and 0.03, and the preset sensitivity threshold can be... The reason for using the above method to determine the reference frequency window is that the observation response characterization data within the frequency window is more suitable as a reference for measuring coordinate offset, and is less likely to be disturbed by preset target frequency band adjustment changes.

[0057] In this embodiment, the historical volatility can be determined based on the response dispersion of each frequency sampling point in repeated tests over multiple stable control cycles, and the control sensitivity can be determined based on the response change amplitude of each frequency sampling point under different calibration voltage levels. Therefore, the preset reference frequency window is preferably selected as a continuous frequency range with small response changes in repeated tests and insensitive to changes in driving voltage. When performing spectral axis registration based on this preset reference frequency window, it is not only comparing the amplitude of a single frequency sampling point, but also comprehensively comparing the overall response correspondence and trend consistency between the observed response characterization data corresponding to the current control cycle and the benchmark observed response characterization data within the reference frequency window. The frequency axis offset that achieves the best alignment between the two is selected from multiple candidate frequency axis offsets as the spectral axis registration amount. The trend consistency is preferably judged based on the response rise and fall direction, edge change position, and local change smoothness between adjacent sampling points within the reference frequency window.

[0058] After spectral axis registration is completed, residual frequency offset decoupling processing is further performed within the preset target frequency band. The residual frequency offset decoupling processing preferably includes: judging the degree of local spectral shape difference in the current control cycle based on the local amplitude difference and edge change difference between the registered observation response characterization data and the benchmark observation response characterization data within the preset target frequency band, and extracting feature position offsets by combining the position change of the region with more obvious edge change within the target frequency band, so that the obtained residual frequency offset characterization can reflect both the true position migration of the target frequency band and the influence of local spectral shape background changes on the true degree of misalignment; when there are situations where local features are too weak, edge changes are not obvious, or there are insufficient effective sampling points after registration within the preset target frequency band, the current control cycle can be determined as a low effective cycle, and preferably the residual frequency offset characterization corresponding to the previous effective control cycle or the smooth transition result between adjacent effective control cycles is used to maintain the continuity of the residual dynamic state sequence.

[0059] After determining the preset reference frequency window and the preset target frequency band, spectral axis registration processing is performed. The purpose of spectral axis registration processing is to align the observation response characterization data of the current control cycle with the benchmark observation response characterization data within the preset reference frequency window, so as to eliminate the influence of measurement coordinate offset. For this purpose, benchmark observation response characterization data is introduced. The baseline observation response characterization data are the observation response characterization data collected and stored under the baseline control state.

[0060] Furthermore, the frequency scan step size in step S1 Based on this, a candidate spectral axis offset set is constructed. Preferably, the maximum offset step size can be 3 to 30 to cover the maximum coordinate offset range obtained from the historical calibration phase. Subsequently, the correspondence and trend consistency of the current observation response characterization data and the benchmark observation response characterization data within the preset reference frequency window are compared, and the spectral axis offset that achieves the best alignment between the two is determined as the spectral axis registration value. Preferably, the spectral axis registration value... It can be determined by the following formula:

[0061]

[0062] In the formula, Represents the set of candidate spectral axis offsets. This indicates the current adjustment cycle at the candidate offset. The comprehensive registration score should ideally consider both the amplitude correspondence between the current observation response characterization data and the baseline observation response characterization data, and the consistency of their trends. The weighting coefficients for these two parts should ideally be between 0.4 and 0.8. A larger value can be used when the amplitude distribution within the preset reference frequency window is more stable, and a smaller value can be used when the trend within the preset reference frequency window is more stable. In actual execution, the comprehensive registration score is calculated only on frequency sampling points that still fall within the effective sampling range after the offset, in order to avoid invalid calculations caused by exceeding the limits.

[0063] After obtaining the spectral axis registration value, residual frequency offset decoupling processing is further performed. The purpose of residual frequency offset decoupling processing is to perform local spectral shape difference analysis and feature position offset extraction on the registered observation response characterization data within the preset target frequency band based on the spectral axis registration value, so as to separate the influence of measurement coordinate offset and the inherent offset component of the preset target frequency band, and obtain the residual frequency offset characterization value. Specifically, the frequency axis can be aligned with the current observation response characterization data according to the spectral axis registration value to obtain the registered observation response characterization data. If there are a small number of boundary overruns after alignment, the boundary truncation method or linear interpolation reconstruction method can be selected according to the proportion of overruns. Preferably, when the number of overruns accounts for no more than 5% of the total number of sampling points in the preset target frequency band, the boundary truncation method is adopted; when the overruns are only located at the two ends of the preset target frequency band and the proportion does not exceed 10%, the linear interpolation reconstruction method is adopted; when it exceeds this range, the current control cycle can be marked as the registration boundary distortion cycle, and re-acquisition or regression to the residual frequency offset characterization value corresponding to the previous effective control cycle can be triggered.

[0064] Within the preset target frequency band, preferably, the following two types of analysis are performed simultaneously:

[0065] First, perform local spectral shape difference analysis to quantify the degree of spectral shape difference between the current control cycle and the baseline control state within a preset target frequency band. This analysis preferably considers both amplitude and slope differences simultaneously, and sets a weight for the spectral shape slope difference. Preferably, The value can be between 0.2 and 1.0; when the peak edge within the preset target frequency band is more sensitive to the control changes, the value can be taken in the upper half of the range; when more attention is paid to amplitude differences, the value can be taken in the lower half of the range.

[0066] Second, feature position offset extraction is performed to extract the target frequency band feature positions and reference feature positions for the current control cycle from the preset target frequency band. Here, it is preferable not to directly take the position of a single peak, but to construct a weighted feature position based on the discrete slope amplitude, so as to avoid being too sensitive to single peak values ​​under conditions of flat peaks, local broadening, or double-shoulder peaks. To ensure the numerical stability of feature position extraction, a feature position extraction stability term is introduced. The preferred method is to take the average absolute value of the benchmark discrete slope. times.

[0067] After obtaining the local spectral shape difference coefficient and the target frequency band characteristic position, the "target frequency band characteristic position offset" and the "local spectral shape difference" can be coupled to obtain the residual frequency offset characterization of the current control cycle. Preferably, the residual frequency offset characterization... It can be determined by the following formula:

[0068]

[0069] In the formula, Indicates the target frequency band characteristic position of the current control cycle. Indicates the location of the reference feature. This represents the local spectral shape difference coefficient within the preset target frequency band during the current control cycle. Represents the modulation coefficients for spectral shape differences, preferably, The value can be taken from 0.1 to 1.0. When the historical mean of the local spectral shape difference coefficient is not greater than the preset first spectral shape difference threshold, the value can be taken in the lower half of the range. When the historical mean of the local spectral shape difference coefficient is greater than the first spectral shape difference threshold but not greater than the preset second spectral shape difference threshold, the value can be taken in the upper half of the range. The reason for adopting the above method is that if only the target frequency band characteristic position offset is used to characterize the residual frequency offset, it is difficult to fully reflect the impact of local spectral shape changes on the true offset. However, by introducing the local spectral shape difference coefficient, the residual frequency offset characterization quantity can simultaneously reflect both position offset and spectral shape change information.

[0070] To avoid distortion of results caused by directly calculating the residual frequency offset characterization when the features within the preset target frequency band are too weak, this embodiment also preferably sets a feature validity judgment condition. It can determine whether the current control period belongs to a weak feature control period based on the total discrete slope amplitude within the preset target frequency band. Preferably, when the total slope is lower than 1% to 5% of the total slope corresponding to the baseline control state, the current control period is marked as a weak feature control period. At this time, the residual frequency offset characterization corresponding to the previous effective control period can be used, or the linear interpolation result of the residual frequency offset characterization corresponding to the two effective control periods adjacent to the current control period can be used as the residual frequency offset characterization of the current control period. Preferably, when there is a most recent effective control period before the current control period and there is no new data after it, the previous effective control period is maintained; when there are effective control periods before and after the current control period, the linear interpolation method is used to ensure the continuity and smoothness of the residual dynamic state sequence.

[0071] After obtaining the residual frequency offset characterization quantity corresponding to the current control cycle, a residual dynamic state sequence is further constructed by combining the conditional constraint state quantities and residual frequency offset characterization quantities corresponding to the current control cycle and historical control cycles. Let the conditional constraint state quantity corresponding to the current control cycle be denoted as... ,in, Indicates the current driving voltage. Indicates the current ambient temperature. Let the electric field non-uniformity index represent the current control cycle. Then, the residual dynamic state vector corresponding to the current control cycle can be expressed as: .

[0072] Furthermore, if the length of the residual dynamic state sequence is set to Then the residual dynamic state sequence corresponding to the current time can be represented as: In the formula, The number of control cycles included in the time-series inference model is preferably between 3 and 10. When the number of recovery cycles corresponding to the hysteresis memory of the grating filter is no more than 3 control cycles, the value can be taken in the lower half of this range; when the number of recovery cycles corresponding to the hysteresis memory of the grating filter is greater than 3 control cycles, the value can be taken in the upper half of this range.

[0073] The reason for constructing the residual dynamic state sequence in the above manner is that the time-series inference model in step S3 does not only output the voltage compensation amount and conditioning confidence result based on the residual frequency offset characterization quantity of the current control cycle, but also needs to combine the conditional constraint state quantity and residual frequency offset characterization quantity under multiple consecutive control cycles to jointly characterize the time-series evolution characteristics of the current control state. Compared with the method of constructing the control input using only the single-cycle frequency offset result, the present invention can more completely retain the dynamic evolution law of the grating filter in the continuous control process by constructing the residual dynamic state sequence, thereby improving the accuracy and robustness of the subsequent voltage compensation amount inference.

[0074] In this embodiment, step S3 is used to input the residual dynamic state sequence obtained in step S2 into a preset time-series inference model to obtain the voltage compensation amount and conditioning confidence result corresponding to the current control cycle. This step mainly solves the following problem: Even if step S2 has performed spectral axis registration and residual frequency offset decoupling processing on the observation response characterization data of the current control cycle to obtain a relatively pure residual frequency offset characterization amount, if the subsequent control action is still determined only based on the single calculation result of the current control cycle, it is difficult to fully utilize the temporal evolution relationship between the condition constraint state quantity and the residual frequency offset characterization amount during continuous control, especially it is difficult to accurately characterize the hysteresis response, recovery delay and state accumulation effect of the grating filter under continuous driving conditions. Therefore, in step S3, the present invention does not adopt a static compensation method based on single-cycle results, but inputs the residual dynamic state sequence corresponding to the current control cycle and the historical control cycle into a preset time-series inference model, and outputs the voltage compensation amount and conditioning confidence result corresponding to the current control cycle by learning the state evolution relationship during continuous control.

[0075] In a preferred embodiment, the preset temporal inference model is a gated recurrent unit network pre-trained based on historical training samples. This is because the object to be processed by the present invention is not a one-time mapping relationship between static features, but a residual dynamic state sequence composed of conditional constraint state quantities and residual frequency offset representation quantities of multiple continuous control cycles. This residual dynamic state sequence naturally contains sequential dependencies: on the one hand, the residual frequency offset representation quantity of the current control cycle is not only related to the current driving voltage, current ambient temperature, and current electric field non-uniformity index, but also to the control actions and recovery states of the previous control cycles; on the other hand, the determination of the voltage compensation quantity is not a simple static mapping of the current residual frequency offset representation quantity, but requires comprehensive consideration of the changing trend of the residual dynamic state sequence over continuous time. Therefore, compared with conventional regression models that are only applicable to static feature mapping, the gated recurrent unit network is more suitable for modeling short-term memory relationships and state accumulation effects in the continuous control process. At the same time, compared with complex temporal models with deeper levels and larger parameter scales, the gated recurrent unit network is easier to train and deploy under small and medium sample conditions, and is more in line with the implementation path of gradually collecting samples and gradually optimizing conditioning strategies based on experimental platforms.

[0076] In this embodiment, the historical training samples include the residual dynamic state sequence corresponding to the historical control cycle and the voltage compensation amount labeling result corresponding to the residual dynamic state sequence. Specifically, during the offline training phase, a training sample set can be constructed based on historical control experimental data. For any training sample, its input is a length of... The residual dynamic state sequence is output as the voltage compensation amount label corresponding to the residual dynamic state sequence. Preferably, the voltage compensation amount label is determined by the compensation voltage increment that minimizes the residual frequency offset in the next control cycle in historical control experiments. In another preferred embodiment, it can also be obtained by reverse calibration from the local spectrum scan verification result in step S4. The reason for determining the voltage compensation amount label in the above manner is that the voltage compensation amount output in step S3 should essentially correspond to the control action that minimizes the residual frequency offset in the subsequent control cycle. Therefore, using the historical optimal compensation voltage increment or the optimal compensation amount confirmed by the local spectrum scan verification as the training label can ensure that the preset time-series inference model learns the compensation rule consistent with the goal of this invention, rather than simply learning the empirical voltage value or the result of manual subjective adjustment.

[0077] The residual dynamic state sequence can be represented as: ,in, In the formula, This indicates the current driving voltage corresponding to the current control cycle. This indicates the current ambient temperature corresponding to the current control cycle. This represents the electric field non-uniformity index corresponding to the current control cycle. This represents the residual frequency offset characteristic quantity corresponding to the current control cycle obtained in step S2, and the length of the residual dynamic state sequence. The preferred value is between 3 and 10. When the grating filter has a weak hysteresis response and a small number of recovery cycles, the value can be taken in the lower half of this range. When the grating filter has significant hysteresis accumulation and recovery delay under continuous driving conditions, the value can be taken in the upper half of this range. The setting is based on the following: if If it is too small, it will be difficult to fully preserve the state evolution relationship in the continuous regulation process; if If the value is too large, it will increase the complexity of model training and may introduce long-term state noise that is not closely related to the current regulation cycle.

[0078] In a preferred embodiment, the gated recurrent unit network includes an input layer, one or more gated recurrent unit hidden layers, and an output layer, wherein the input layer is used to receive the residual dynamic state sequence. The hidden layer is used to learn the state evolution relationship between multiple consecutive control cycles, and the output layer is used to output the voltage compensation amount and conditioning confidence result corresponding to the current control cycle. Preferably, the number of hidden layers can be 1 to 3. When the training sample size is small and the system real-time requirements are high, 1 layer can be used. When the training sample size is large and it is desired to learn more complex temporal dependencies, 2 or 3 layers can be used. Preferably, the number of hidden units in each layer can be 16 to 128. When the dimension of the residual dynamic state sequence is low and the hysteresis effect is relatively simple, a smaller value can be used. When the state evolution relationship is more complex, a larger value can be used. The basis for this setting is that if the size of the hidden layer is too small, it may lead to insufficient temporal feature expression ability, while if the size of the hidden layer is too large, it will increase the training difficulty and the risk of overfitting.

[0079] In this embodiment, the gated cyclic unit network is used to output voltage compensation and conditioning reliability results based on the residual dynamic state sequence. Preferably, the output of the gated cyclic unit network can be expressed as: In the formula, This represents the mapping relationship of the trained gated recurrent unit network. This indicates the voltage compensation amount corresponding to the current control cycle. This indicates the conditioning reliability result corresponding to the current control cycle, and the voltage compensation amount. It is a real number, which can be positive or negative, and its physical meaning is: relative to the current driving voltage. The next adjustment action should be the proposed compensation voltage increment; when When, it indicates a suggestion to increase the drive voltage; when At that time, it indicates a suggestion to reduce the driving voltage and adjust the reliability results. The preferred value is a dimensionless quantity normalized to the range of 0 to 1. The larger the value, the more consistent the current residual dynamic state sequence is with the identifiable patterns in the historical training samples, and the higher the reliability of the model's output result for the current voltage compensation amount. The smaller the value, the more likely the current state is to belong to an extrapolated state, a weak feature state, or a state with insufficient historical sample coverage.

[0080] Furthermore, the conditioning confidence result is used to characterize whether the voltage compensation amount corresponding to the current residual dynamic state sequence has sufficient reliability. Preferably, in the historical training sample construction stage, samples that can significantly reduce the residual frequency offset characterization amount in subsequent control cycles after compensation execution and are verified as effective by local spectrum scanning are identified as high-confidence samples; samples that do not significantly improve the residual frequency offset after compensation execution, whose compensation action exceeds the smooth change boundary, or that still have significant peak position deviation after local spectrum scanning are identified as low-confidence samples. While learning the correspondence between the residual dynamic state sequence and the voltage compensation amount, the gated recurrent unit network also learns the reliability of the compensation result under the current time state, so that the output conditioning confidence result can reflect the consistency between the current residual dynamic state sequence and the historical verified sample pattern. During online operation, when the conditioning confidence result reaches the preset confidence threshold, it indicates that the current state has a high consistency with the historical effective conditioning mode, and the voltage compensation amount can be directly applied to the current driving voltage. When the conditioning confidence result does not reach the preset confidence threshold, it indicates that the current state may be affected by factors such as abnormal fluctuations, weak characteristic response, incomplete material hysteresis recovery, or insufficient historical sample coverage. In this case, the model output is not used directly, but the process is switched to the local spectrum scan verification process corresponding to step S4 to reduce the risk of misconditioning.

[0081] In a preferred embodiment, the conditioning confidence result is directly output by the confidence branch in the output layer, serving as the main implementation path of step S3. In another preferred embodiment, the output result of the confidence branch can also be corrected according to the mapping relationship between the model prediction residual and the historical verification error to obtain the conditioning confidence result. The reason for adopting the above settings is that if the conditioning confidence result is completely dependent on the post-processing estimation, it will increase the instability of the output chain of step S3. By using the confidence branch as the main path, it can ensure that step S3 directly outputs the voltage compensation amount plus the conditioning confidence result in a dual output structure. Then, when needed, it can be auxiliaryly corrected by the historical verification error mapping, thereby balancing the simplicity of implementation and the confidence expression capability.

[0082] To ensure that the voltage compensation output of the gated recurrent unit network not only reduces the residual frequency offset but also meets the requirements of actual control boundaries and smooth operation, this implementation constructs a joint objective function during training based on constraints on reducing residual frequency offset after compensation, single-cycle voltage change boundary constraints, and voltage change smoothness constraints between adjacent control cycles. Preferably, the joint objective function... It can be represented as:

[0083]

[0084] In the formula, This represents the residual frequency offset characteristic quantity corresponding to the next control cycle after applying voltage compensation in the current control cycle; This represents the normalized reference value for frequency offset; Indicates the maximum allowable voltage change in a single cycle; The first term represents the weighting coefficients of the three constraints in the joint objective function, all of which are dimensionless. The first term in the joint objective function is used to constrain the frequency offset of the residual after compensation to tend to decrease. The second term is used to constrain the single-cycle voltage compensation to not exceed the allowable boundary. The third term is used to constrain the change in compensation action between adjacent control cycles, thereby avoiding excessive abrupt changes in control action. To ensure dimensional consistency, the first term is normalized to a reference value using frequency offset. After normalization, the second and third terms are determined by the maximum allowable voltage change per single cycle. Normalize.

[0085] In a preferred embodiment, the frequency offset normalization reference quantity The value can be 0.1 to 1.0 times the preset target frequency band bandwidth under the baseline control state; when the preset target frequency band bandwidth is narrow and the system is more sensitive to the shift in the position of the target characteristic peak, the value can be taken in the lower half of this range; when the preset target frequency band bandwidth is wide and a certain offset tolerance is allowed, the value can be taken in the upper half of this range. The reason for this setting is: If the value is too small, it will amplify the influence of the frequency offset term, causing the model to excessively pursue the rapid elimination of residual frequency offset while ignoring the smoothness of the action; If the value is too large, it will weaken the role of the frequency offset term in the joint objective function; the maximum allowable voltage change per cycle... The rated voltage range can be selected. The value can be taken in the lower half of the range, which is 1% to 20% when the device is sensitive to voltage changes and a single large adjustment may cause overshoot or instability; when the device has a slow response and requires strong adjustment capability, the value can be taken in the upper half of the range.

[0086] In a preferred embodiment, the weighting coefficients of the joint objective function satisfy: And preferably, A value of 0.4 to 0.7 is acceptable. A value of 0.1 to 0.3 is acceptable. A value of 0.1 to 0.4 can be used. When the main objective of the system is to rapidly reduce the residual frequency offset, it can be appropriately increased. When the device is sensitive to voltage surges or the voltage regulation boundary is strict, the voltage can be appropriately increased. When smoothness of action is emphasized during continuous control, the speed can be appropriately increased. The basis for this setting is that the voltage compensation output in step S3 must not only have frequency offset correction capability, but also meet the actual control boundary constraints and continuous control smoothness requirements. Therefore, training with a joint objective function can achieve a balance between correction capability, boundary safety and continuous smoothness in the voltage compensation output of the preset time-series inference model.

[0087] To enhance the generalization ability of the preset temporal inference model under different operating conditions, this embodiment preferably performs normalization processing on historical training samples. Specifically, the current driving voltage, current ambient temperature, electric field non-uniformity index, and residual frequency offset characterization quantity can be standardized according to the mean and standard deviation of historical samples, or normalized according to the minimum-maximum value range. Preferably, when the distribution of each variable is approximately symmetrical and the number of historical samples is large, the standardization method can be used; when the range of each variable is clear and it is desired to uniformly map it to a fixed range, the normalization method can be used. Through the above processing, the influence of different dimensions and different numerical ranges on model training can be reduced, making the gated recurrent unit network more focused on learning the temporal evolution relationship of the residual dynamic state sequence.

[0088] After the model training is complete, step S3 performs online inference for the current regulation cycle. The residual dynamic state sequence obtained in step S2 The input is fed into a preset timing inference model to obtain the voltage compensation amount corresponding to the current control cycle. and the credibility results of conditioning At this time, the voltage compensation amount As the basis for generating the predicted compensation point and the final controlled voltage in the subsequent step S4, the conditioning confidence result As the basis for determining the credible gating conditioning to be performed in the subsequent step S4, in other words, step S3 does not directly output the final regulation voltage, but outputs two types of results: how much voltage to supplement and how credible the suggestion is, thus providing the input basis for the credible gating conditioning in step S4.

[0089] Furthermore, in a preferred embodiment, the current ambient temperature The coverage area of ​​the historical training samples can be determined by the minimum and maximum values ​​of the current ambient temperature in the historical training samples, or by the 2.5% and 97.5% quantiles of the current ambient temperature; electric field non-uniformity index The coverage range of historical training samples can be determined by the minimum and maximum values ​​of the electric field non-uniformity index in the historical training samples, or by the 2.5% and 97.5% quantile values ​​of the electric field non-uniformity index, when the current ambient temperature... Or the current electric field non-uniformity index When the current control period exceeds the corresponding coverage range, it can be marked as the boundary extrapolation control period. The boundary extrapolation control period refers to the control period in which at least one key state component of the current residual dynamic state sequence exceeds the effective coverage range of the historical training samples. In this case, although the preset time series inference model can still output voltage compensation and conditioning confidence results, its conditioning confidence results are usually reduced. The subsequent step S4 can preferentially enter the local spectrum scan verification branch based on the lower conditioning confidence results. The reason for adopting this processing method is that when the current residual dynamic state sequence falls outside the coverage range of the historical training samples, the reliability of the model output results is usually lower than that of the normal coverage condition. Therefore, it is not advisable to directly perform high confidence compensation, but should be guided to a more reliable verification process through a reliable gating mechanism.

[0090] In this embodiment, step S4 is used to perform reliable gating conditioning on the voltage compensation amount based on the conditioning reliability result output in step S3, and output the final control voltage corresponding to the current control cycle. This step mainly solves the following problems: Even though step S3 has already output the voltage compensation amount and conditioning reliability result based on the residual dynamic state sequence, in the actual control process, there may still be situations such as insufficient coverage of historical training samples, the current state being located in the boundary extrapolation region, weakening of local features of the preset target frequency band, or decreased stability of the residual frequency offset characterization quantity in step S2. If the voltage compensation amount and conditioning reliability result are still directly used in the above situations, the voltage compensation amount and conditioning reliability result will be affected. Generating the final control voltage based on the voltage compensation amount output in step S3 can easily lead to overshoot, insufficient compensation, or misadjustment. Therefore, in step S4, this invention does not unconditionally execute the voltage compensation amount output in step S3, but introduces a reliable gating conditioning mechanism: when the conditioning reliability result reaches a preset reliability threshold, the final control voltage is directly generated; when the conditioning reliability result does not reach the preset reliability threshold, a local spectrum scan verification is performed around the predicted compensation point pointed to by the voltage compensation amount, and the model output is verified a second time using the local spectrum verification result, thereby improving the reliability of the final control voltage.

[0091] In a preferred embodiment, the conditioning reliability result is denoted as... Its value ranges from 0 to 1; the preset confidence threshold is denoted as Preferably, a preset confidence threshold is used. A value of 0.6 to 0.9 is acceptable. When the system prioritizes rapid response, a value within the lower half of this range can be used to reduce the number of times the system enters the local spectrum scan verification branch. When the system prioritizes the robustness of the final control voltage and the control of misadjustment risk, a value within the upper half of this range can be used to increase the probability of entering the local spectrum scan verification branch. The setting is based on the following: When the confidence level is too low, the confidence gating effect in step S4 is weakened, which may cause the compensation action under low confidence conditions to be executed directly. When the level is too high, it will trigger local spectrum scanning and verification too frequently, increasing the scanning overhead and response latency of the current control cycle. Therefore, [the following is implied:] By keeping it within the above range, a balance can be achieved between regulation efficiency and regulation reliability.

[0092] When the conditioning confidence result reaches the preset confidence threshold, that is, when the condition is satisfied... In step S4, the final control voltage is generated directly based on the voltage compensation amount output in step S3. Specifically, the current driving voltage corresponding to the current control cycle is denoted as... The voltage compensation amount output in step S3 is The predicted compensation point corresponding to the current adjustment cycle. It can be represented as: Under high confidence conditions, the predicted compensation point is directly used as the final control voltage corresponding to the current control cycle, that is: In the formula, The reason for using the above method to represent the final control voltage is that when the conditioning confidence result reaches the preset confidence threshold, it indicates that the current residual dynamic state sequence has a high consistency with the identifiable state patterns in the historical training samples, and the voltage compensation amount output in step S3 has high availability. Therefore, the voltage compensation amount can be directly applied to the current driving voltage to generate the final control voltage. It should be noted that in the high confidence branch, although the local spectrum scan verification is no longer performed, the voltage boundary verification should still be performed on the final control voltage. Preferably, when At that time, the final control voltage will be cut off to ;when At that time, the final control voltage will be cut off to In the formula, These represent the minimum and maximum control voltages allowed for the grating filter during the online control phase, respectively. Preferably, the voltage range allowed during the online control phase can be consistent with the voltage range used in the offline calibration phase, or a safety boundary range of 5% to 10% can be reserved within the offline calibration voltage range to avoid touching the nonlinear limit region of the device during long-term online operation.

[0093] If the conditioning confidence result does not reach the preset confidence threshold, then it satisfies... In step S4, instead of directly using the voltage compensation amount output in step S3, a local spectrum scan verification is performed. The core purpose of the local spectrum scan verification is to construct several candidate compensation points in a limited neighborhood around the predicted compensation point output in step S3, and compare the deviation between the local characteristic peak position in the local spectrum corresponding to each candidate compensation point and the preset target characteristic peak position, thereby determining the final control voltage corresponding to the current control cycle. In this way, under the condition of low confidence of the model, the actual execution result of the voltage compensation amount can be constrained by the local scan verification mechanism, avoiding misadjustment caused by directly relying on the low confidence output.

[0094] Specifically, under low confidence conditions, the compensation point is predicted. Centered on the preset compensation step size Each candidate compensation point is constructed within its neighborhood. Preferably, the total number of candidate compensation points is denoted as . ,and Preferably, an odd number is chosen to ensure that the predicted compensation point is located at the center of the candidate compensation point set. More preferably, Values ​​of 3, 5, 7, or 9 are acceptable. Smaller values ​​are preferable when the system prioritizes scanning efficiency, while larger values ​​are preferable when the system prioritizes the precision of local verification. If the candidate compensation point index is denoted as... Then the first The control voltage corresponding to each candidate compensation point It can be represented as: In the formula, Preset compensation step size Offline calibration voltage range can be obtained. The value can be 0.2% to 2%. When the device is highly sensitive to voltage changes, the value can be taken in the lower half of this range; when the device response is slow and the local search needs to cover a wider neighborhood, the value can be taken in the upper half of this range. The setting is based on: if If the value is too small, the differentiation between candidate compensation points will be insufficient, and local spectral scanning verification will be unable to effectively correct the low-confidence output of step S3; if... If the value is too large, the local search may deviate from the neighborhood of the predicted compensation point, rendering the local spectrum scan verification meaningless as a "local verification." To ensure that each candidate compensation point remains within the allowable range of online control voltage, boundary checks can be performed simultaneously when constructing each candidate compensation point; when a candidate compensation point exceeds... When necessary, the boundary truncation method can be used to adjust it to the corresponding boundary value, or the candidate compensation points that exceed the boundary can be directly deleted, and only the candidate compensation points that fall within the effective control range can be retained to participate in the subsequent local spectrum scanning verification.

[0095] After constructing each candidate compensation point, a local spectrum scan verification is performed on each candidate compensation point. The local spectrum scan verification is preferably performed within a local frequency range near the preset target characteristic peak position. Specifically, the local frequency range is preferably based on the preset target characteristic peak position. Instead of rescanning across the entire frequency band, the scanning is performed only within a local frequency range because step S2 has already completed the residual frequency offset decoupling processing of the preset target frequency band. Step S4 only needs to verify whether the target characteristic peak position is close to the preset target characteristic peak position under the current low confidence compensation condition. Therefore, local spectrum scanning can meet the verification requirements and significantly reduce the verification overhead. Preferably, the local frequency range can be 0.5 to 2.0 times the preset target frequency band bandwidth. When the target characteristic peak is narrow and the local spectrum is concentrated, the value can be taken in the lower half of the range. When the target characteristic peak is wide or the local spectrum changes significantly, the value can be taken in the upper half of the range.

[0096] For each candidate compensation point, its local spectrum is collected accordingly, and the position of the local characteristic peak is extracted from the local spectrum. To ensure consistency with the definition of the target frequency band characteristic position in step S2, the position of the local characteristic peak is preferably obtained by weighting the discrete slope amplitude within the local frequency range, rather than directly taking the position corresponding to a single point with the largest amplitude. The reason for adopting the above method is that, under low confidence conditions, the local spectrum may still have local flat tops, local broadening, or sharp peak disturbances. If a single peak value is directly taken, it is easily affected by local noise. However, extracting the position of the local characteristic peak based on the weighted discrete slope amplitude can more stably characterize the main migration direction of the local spectrum. Let the first peak be... The local feature peak positions corresponding to each candidate compensation point are: .

[0097] After obtaining the local feature peak positions corresponding to each candidate compensation point, the deviations between each local feature peak position and the preset target feature peak position are further compared. The preset target feature peak position is denoted as... It can be extracted from the benchmark observation response characterization data under the benchmark control state within the preset target frequency band, and pre-stored during the offline calibration stage. For the first... Each candidate compensation point has a peak position deviation. It can be represented as: In the formula, Indicates the first The smaller the deviation between the local characteristic peak position corresponding to each candidate compensation point and the preset target characteristic peak position, the closer the control voltage corresponding to the candidate compensation point can make the target characteristic peak position under the current control cycle closer to the preset target characteristic peak position. Based on this, the control voltage corresponding to the candidate compensation point with the smallest deviation can be determined as the final control voltage. Preferably, the final control voltage corresponding to the current control cycle is... It can be represented as: .

[0098] In summary, in this embodiment, step S4 performs reliable gating conditioning on the voltage compensation amount based on the conditioning reliability result. Under high reliability conditions, the final control voltage is directly generated. Under low reliability conditions, candidate compensation points are constructed around the predicted compensation point and local spectrum scanning is performed for verification. Then, the final control voltage is determined based on the deviation between the local characteristic peak position corresponding to each candidate compensation point and the preset target characteristic peak position. This significantly improves the reliability and stability of the final control result while ensuring control efficiency.

[0099] To avoid situations where the deviations between candidate compensation points are too close during the local spectrum scanning verification process, making it difficult to directly determine the final control voltage, this embodiment preferably sets a deviation judgment rule. Specifically, when the difference between the minimum peak position deviation and the second smallest peak position deviation is greater than a preset deviation discrimination threshold, the candidate compensation point corresponding to the minimum peak position deviation is directly determined as the final control voltage. When the difference is not greater than the preset deviation discrimination threshold, a candidate compensation point closer to the predicted compensation point can be further selected as the final control voltage, so as to take into account both the requirements of "close to the preset target characteristic peak position" and "minimize deviation from the model output in step S3". Preferably, the preset deviation discrimination threshold can be taken as 0.1% of the preset target frequency band bandwidth. The threshold is set to 1%, preferably not less than one frequency scan step. The reason for this setting is that if the preset deviation distinction threshold is less than one frequency scan step, it will be difficult to effectively distinguish the difference in the position of the local characteristic peak corresponding to the two candidate compensation points under discrete frequency sampling conditions. If the preset deviation distinction threshold is too large, it may weaken the ability of the local spectrum scan verification to identify subtle peak position differences. The reason for adopting this judgment rule is also that when the positions of the local characteristic peaks corresponding to multiple candidate compensation points are very close, if the one with the smallest deviation is simply and mechanically selected, the impact of local scan noise on the final control voltage may be amplified. By introducing the deviation distinction threshold and the secondary judgment rule of "closer to the predicted compensation point", the stability of the final control voltage determination process can be improved.

[0100] In a preferred embodiment, if no effective local characteristic peak position is extracted from the local spectrum corresponding to all candidate compensation points, or if the peak position deviation corresponding to all candidate compensation points is greater than the preset maximum allowable deviation threshold, the current control period can be marked as a failed control period, and a conservative control strategy can be adopted. The conservative control strategy is preferably: keeping the current driving voltage unchanged, or using the final control voltage corresponding to the previous effective control period. Preferably, the maximum allowable deviation threshold can be taken as 1% to 10% of the preset target frequency band bandwidth, and preferably not greater than the target characteristic peak position offset tolerance allowed by the system. The basis for setting this is that when all candidate compensation points cannot make the local characteristic peak position enter the allowable deviation range, it indicates that the low confidence state under the current control period has exceeded the local scan correction range. If the local optimal candidate compensation point is still forcibly executed at this time, it may introduce a larger control error. By switching to the conservative control strategy in this case, obvious misadjustment in the current control period can be avoided.

[0101] After determining the final control voltage corresponding to the current control cycle, the final control result, the local spectrum scan verification result, and the marking information of whether the final control voltage comes from the high-confidence direct compensation branch or the low-confidence local verification branch can be further written into the historical sample library for subsequent offline or incremental updates. The reason for adopting the above processing method is that the credible gating conditioning in step S4 is not only an online decision-making step, but also provides a real feedback source for the continuous optimization of the time-series inference model in the subsequent step S3. Especially under low-confidence conditions, the final control voltage determined by the local spectrum scan verification essentially corresponds to an online verified correction result, which can further feed back into the construction of the voltage compensation amount labeling result in step S3, thereby enhancing the generalization ability of the preset time-series inference model under boundary extrapolation conditions and low-confidence conditions.

[0102] In summary, in this embodiment, step S4 performs reliable gating conditioning on the voltage compensation amount based on the conditioning reliability result. Under high reliability conditions, the final control voltage is directly generated. Under low reliability conditions, candidate compensation points are constructed around the predicted compensation point and local spectrum scanning is performed for verification. Then, the final control voltage is determined based on the deviation between the local characteristic peak position corresponding to each candidate compensation point and the preset target characteristic peak position. This significantly improves the reliability and stability of the final control result while ensuring control efficiency.

[0103] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A grating filter sensing signal conditioning method based on machine learning, characterized in that, Includes the following steps: S1. Obtain the observation response characterization data and condition constraint state quantities corresponding to the current control cycle; S2. Based on the preset reference frequency window, perform spectral axis registration processing on the observation response characterization data, and perform residual frequency offset decoupling processing on the preset target frequency band based on the registered observation response characterization data to obtain the residual frequency offset characterization quantity. Combine the condition constraint state quantity and residual frequency offset characterization quantity corresponding to the current control cycle and the historical control cycle to construct the residual dynamic state sequence. S3. Input the residual dynamic state sequence into the preset time-series inference model to obtain the voltage compensation amount and conditioning reliability result corresponding to the current control cycle. S4. Perform trusted gating conditioning. When the conditioning confidence result reaches the preset confidence threshold, generate the final control voltage based on the voltage compensation amount. When the conditioning confidence result does not reach the preset confidence threshold, perform local spectrum scanning verification on each candidate compensation point in the neighborhood of the predicted compensation point pointed to by the voltage compensation amount to obtain the local characteristic peak position corresponding to each candidate compensation point, and determine the final control voltage based on the deviation between the local characteristic peak position corresponding to each candidate compensation point and the preset target characteristic peak position.

2. The grating filter sensing signal conditioning method based on machine learning according to claim 1, characterized in that, The observation response characterization data is obtained by performing dimensionless transmission characterization processing on the detection signal, reference signal, and dark field signal corresponding to the current control cycle. The conditional constraint state variables include the current driving voltage, the current ambient temperature, and the electric field non-uniformity index.

3. The grating filter sensing signal conditioning method based on machine learning according to claim 2, characterized in that, The electric field nonuniformity index is determined based on the equivalent field strength and area of ​​the discrete region corresponding to the grating filter, and is used to characterize the uniformity of the electric field distribution inside the grating filter within the current control cycle. Dimensionless transmission characterization processing is used to eliminate the influence of dark field noise and reference channel fluctuations on the observation response characterization data.

4. The grating filter sensing signal conditioning method based on machine learning according to claim 1, characterized in that, The preset reference frequency window is determined by the frequency range in which the fluctuation is less than the preset fluctuation threshold and is not sensitive to regulation in historical stability tests, and the preset target frequency band is the target operating frequency band corresponding to the grating filter.

5. The grating filter sensing signal conditioning method based on machine learning according to claim 4, characterized in that, The spectral axis registration process includes: extracting the reference window response distribution corresponding to the observation response characterization data and the benchmark observation response characterization data within a preset reference frequency window; performing registration analysis on the correspondence and trend consistency of the responses of the two under different frequency axis offset conditions; determining the frequency axis offset that enables the observation response characterization data and the benchmark observation response characterization data to achieve the best alignment state within the preset reference frequency window; and determining the frequency axis offset as the spectral axis registration amount. Among them, the baseline observation response characterization data are the observation response characterization data collected and stored under the baseline control state.

6. The grating filter sensing signal conditioning method based on machine learning according to claim 5, characterized in that, The residual frequency offset decoupling process includes: performing local spectral shape difference analysis and feature position offset extraction on the registered observation response characterization data within a preset target frequency band based on the spectral axis registration amount. The local spectral shape difference analysis includes determining the local spectral shape difference coefficient based on the amplitude and slope differences between the registered observation response characterization data and the reference observation response characterization data within the preset target frequency band. The feature position offset extraction includes determining the target frequency band feature position and the reference feature position based on the discrete slope amplitude to separate the influence of measurement coordinate offset and the inherent offset component of the target frequency band, thereby obtaining the residual frequency offset characterization amount. The residual dynamic state sequence is composed of the conditional constraint state quantities and residual frequency offset characterization quantities corresponding to the current control cycle and multiple historical control cycles, combined in chronological order.

7. The grating filter sensing signal conditioning method based on machine learning according to claim 1, characterized in that, The preset temporal reasoning model is a gated recurrent unit network pre-trained based on historical training samples; Historical training samples include residual dynamic state sequences corresponding to historical control cycles and voltage compensation quantity annotation results corresponding to the residual dynamic state sequences; The gated cyclic unit network is used to output voltage compensation and conditioning reliability results based on the residual dynamic state sequence.

8. The grating filter sensing signal conditioning method based on machine learning according to claim 7, characterized in that, During training, the gated recurrent unit network constructs a joint objective function based on the constraints of reducing residual frequency offset after compensation, the boundary constraints of single-cycle voltage change, and the smoothing constraints of voltage change between adjacent control cycles, so that the voltage compensation amount can satisfy the voltage control boundary constraints while reducing residual frequency offset.

9. The grating filter sensing signal conditioning method based on machine learning according to claim 1, characterized in that, Trusted gating conditioning includes: when the conditioning confidence result reaches a preset confidence threshold, applying a voltage compensation amount to the current driving voltage to obtain the final control voltage; When the conditioning confidence result does not reach the preset confidence threshold, the predicted compensation point determined by the current driving voltage and voltage compensation amount is used as the center, and candidate compensation points are constructed in the neighborhood of the predicted compensation point according to the preset compensation step size.

10. A grating filter sensing signal conditioning method based on machine learning according to claim 9, characterized in that, Local spectrum scanning verification includes: acquiring local spectra under the control conditions corresponding to each candidate compensation point, and extracting the positions of local characteristic peaks from each local spectrum; Among them, the preset target feature peak position is the target peak position corresponding to the preset target frequency band; The deviations between the local characteristic peak positions corresponding to each candidate compensation point and the preset target characteristic peak positions are compared, and the control voltage corresponding to the candidate compensation point with the smallest deviation is determined as the final control voltage.