Intelligent control method and system for wavelength-tunable laser

Through the wavelength dimension and channel dimension convolution operation combined with deep learning and adaptive control algorithms, the problems of low efficiency and difficult to ensure accuracy of traditional wavelength adjustable laser control methods are solved, and high accuracy and stable loss calculations are achieved, which significantly improves the testing efficiency.

CN119890904AInactive Publication Date: 2025-04-25SHENZHEN WEIDU TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510302024.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional wavelength adjustable laser control method is inefficient, the accuracy is difficult to ensure, and the existing testing methods are difficult to effectively extract wavelength response characteristics and channel crosstalk characteristics, affecting the accuracy of loss calculation.

Method used

The wavelength-dimensional convolution operation and channel-dimensional convolution operation separation processing are adopted, combined with the long-term memory network and the multi-head attention mechanism, the features are extracted and vector encoding are performed. The parallel calculation of insertion loss and return loss is realized through the dual-loss calculation channel, and the adaptive PID control algorithm and particle swarm optimization are introduced to determine the control parameters.

Benefits of technology

It improves the targeted feature extraction, reduces the crosstalk between wavelength points and channels, improves the accuracy and stability of loss calculation, significantly improves the testing efficiency, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119890904A_ABST
    Figure CN119890904A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of laser control, and discloses an intelligent control method and system for a wavelength-tunable laser. The method comprises the following steps: sequentially inputting an optical signal to each to-be-detected channel of the multi-channel polarity insertion return loss instrument through a wavelength tunable laser, and collecting an output optical power signal and a reflected light power signal; performing wavelength dimension convolution operation and channel dimension convolution operation to obtain wavelength response data and channel crosstalk data; performing feature extraction and vector coding to obtain a wavelength response coding vector and a channel crosstalk coding vector; inputting the wavelength response coding vector into a first calculation channel of the double-path loss calculation channel to perform insertion loss operation, and inputting the channel crosstalk coding vector into a second calculation channel to perform return loss operation to obtain an insertion loss value and a return loss value; and generating a corresponding intelligent loss compensation strategy. The stability of the testing process is guaranteed, the requirement for manual intervention is reduced, and the testing efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of laser control, and in particular to an intelligent control method and system for a wavelength tunable laser. Background Art

[0002] With the rapid development of optical communication networks, optical fiber communication systems have put forward higher requirements for the precise control of wavelength tunable lasers. Traditional wavelength tunable laser control methods mainly rely on manual experience to adjust parameters. In the test process of multi-channel polarity insertion return loss instrument, due to the large number of wavelength points and the large number of channels, manual adjustment is inefficient and difficult to ensure accuracy. Especially when performing insertion loss and return loss tests, the crosstalk effect between wavelength points and the mutual influence between channels affect the accuracy of the test results.

[0003] The current testing methods have the following problems: optical power fluctuations and timing instability during the test process lead to poor repeatability of the measurement results; secondly, traditional signal processing methods are difficult to effectively extract wavelength response characteristics and channel crosstalk characteristics, affecting the accuracy of loss calculations; existing compensation strategies lack adaptive capabilities and cannot dynamically adjust control parameters based on real-time test data. Summary of the invention

[0004] The present invention provides an intelligent control method and system for a wavelength tunable laser, which are used to ensure the stability of a test process, reduce the need for manual intervention, and significantly improve test efficiency.

[0005] In a first aspect, the present invention provides an intelligent control method for a wavelength tunable laser, the intelligent control method for a wavelength tunable laser comprising: Inputting optical signals to each channel to be tested of the multi-channel polarity insertion return loss instrument in sequence through a wavelength tunable laser, and collecting output optical power signals and reflected optical power signals of each channel to be tested; Respectively performing wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal to obtain wavelength response data and channel crosstalk data; Performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; Inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform return loss calculation, to obtain an insertion loss value and a return loss value; According to the insertion loss value and the return loss value, a loss compensation coefficient is calculated and a corresponding intelligent loss compensation strategy is generated.

[0006] In a second aspect, the present invention provides an intelligent control system for a wavelength tunable laser, the intelligent control system for the wavelength tunable laser comprising: The acquisition module is used to sequentially input optical signals to each channel to be measured of the multi-channel polarity insertion return loss instrument through a wavelength tunable laser, and to acquire output optical power signals and reflected optical power signals of each channel to be measured; A convolution operation module, used to perform wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal respectively, to obtain wavelength response data and channel crosstalk data; A feature extraction module, used for performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; A loss calculation module, used for inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform return loss calculation, so as to obtain an insertion loss value and a return loss value; A generation module is used to calculate a loss compensation coefficient and generate a corresponding intelligent loss compensation strategy according to the insertion loss value and the return loss value.

[0007] In the technical solution provided by the present invention, the pertinence of feature extraction is improved by separate processing of wavelength dimension convolution operation and channel dimension convolution operation, and the crosstalk effect between wavelength points and the interference effect between channels are effectively reduced; the combination of long short-term memory network and multi-head attention mechanism is adopted to enhance the ability to capture time series features and improve the accuracy and stability of loss calculation; a dual-path loss calculation channel structure is designed to realize the parallel calculation of insertion loss and return loss, and at the same time, the accuracy of loss value calculation is guaranteed through deep feature extraction of multi-layer neural network; an adaptive PID control algorithm is introduced, and the control parameters are determined by particle swarm optimization, so that the compensation strategy has stronger environmental adaptability and anti-interference ability; based on sliding window data segmentation processing and polynomial curve fitting, accurate modeling of loss characteristics is realized, and the reliability of compensation effect is improved; through a multi-level feedback control mechanism, the stability of the test process is guaranteed, the need for manual intervention is reduced, and the test efficiency is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0009] Figure 1A schematic diagram of a flow chart of an intelligent control method for a wavelength tunable laser provided in an embodiment of the present application; Figure 2 A schematic block diagram of the structure of an intelligent control system for a wavelength tunable laser provided in an embodiment of the present application. DETAILED DESCRIPTION

[0010] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0011] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change based on actual conditions.

[0012] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0013] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0014] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0015] See also Figure 1 , Figure 1 A flow chart of an intelligent control method for a wavelength tunable laser provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the intelligent control method of the wavelength tunable laser provided in the embodiment of the present application includes steps S100 to S600.

[0016] Step S100, inputting optical signals to each channel to be measured of the multi-channel polarity insertion return loss instrument in sequence through a wavelength tunable laser, and collecting output optical power signals and reflected optical power signals of each channel to be measured; It is understandable that the execution subject of the present invention may be an intelligent control system of a wavelength tunable laser, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0017] Specifically, the wavelength range and power parameters of the wavelength tunable laser are initialized, the working wavelength range of the laser and the upper and lower limits of the power output are set, and the index mark is performed according to the predetermined wavelength point interval to form a wavelength power control sequence. The wavelength power control sequence contains all the wavelength points to be used in the test process and their corresponding target power values. According to the wavelength power control sequence, the actual output power value of each wavelength point is collected by an optical power meter, and compared with the set power value to evaluate whether the output power of the laser at each wavelength point is stable near the target power value. If there is a deviation, the power stability control parameter is calculated for correction. The power stability control parameter can be used to feedback and adjust the output power of the laser so that it remains relatively stable within the entire wavelength adjustment range. Based on the power stability control parameter, the optical signal is split. The optical signal output by the laser is distributed to each channel to be tested of the multi-channel polarity insertion return loss instrument through an optical splitter, and is sequentially input into each channel to be tested for testing. In this process, the timing of the optical signal switching is recorded to form a channel switching timing table. The output optical power signal of each channel to be tested of the multi-channel polarity insertion return loss instrument is continuously sampled to obtain the output optical power data stream. At the same time, the reflected optical power signal of each channel to be tested of the multi-channel polarity insertion return loss instrument is continuously sampled to obtain the reflected optical power data stream. According to the channel switching timing table, the output optical power data stream and the reflected optical power data stream are time-aligned and data segmented. The data of each channel is matched with its corresponding laser input time to ensure that the channel corresponding to each data segment can be accurately identified during data analysis. Through data segmentation, the output optical power and reflected optical power signals in the entire test process are accurately segmented and processed to obtain the output optical power signal and reflected optical power signal corresponding to each channel.

[0018] Step S200, performing wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal respectively to obtain wavelength response data and channel crosstalk data; Specifically, the output power data matrix is ​​constructed for the output optical power signal according to the wavelength point and channel number. The rows and columns of the matrix represent the wavelength point and channel number respectively, reflecting the output power of different wavelengths on each channel. Similarly, the reflected power data matrix is ​​constructed for the reflected optical power signal according to the wavelength point and channel number. A convolution kernel of size 3×3 is set for the output power data matrix along the wavelength dimension, and a wavelength dimension convolution operation is performed to extract the features of the data from the wavelength dimension, capture the local features of the output optical power signal changing with the wavelength, and obtain the wavelength dimension feature matrix. A convolution kernel of size 5×5 is set for the reflected power data matrix along the channel dimension, and a channel dimension convolution operation is performed to effectively mine the mutual influence and crosstalk between different channels to form a channel dimension feature matrix. The setting of the convolution kernel enables the convolution operation to capture the relationship between channels from the local area, especially the crosstalk between adjacent channels. The wavelength dimension feature matrix and the channel dimension feature matrix are subjected to nonlinear transformation processing. For the wavelength dimension feature matrix, a nonlinear activation function is applied for transformation to increase the complexity of the feature representation so that the model can learn the nonlinear features in the signal. Then, it is subjected to dimensionality reduction processing through the maximum pooling layer, and the size of the pooling kernel is set to 2×2, which effectively reduces the size of the feature matrix while retaining the most significant features to obtain the wavelength response features. The maximum pooling operation selects the maximum value in the feature area, highlights the most important wavelength response features, and improves the effectiveness of the model. For the channel dimension feature matrix, a nonlinear transformation is performed to reveal the potential nonlinear relationship in the signal, and then it is subjected to dimensionality reduction processing through the average pooling layer. The size of the pooling kernel is set to 2×2. The average pooling operation reduces the dimension by calculating the average value of the local area, so that the crosstalk features between channels are retained, while removing noise to obtain the channel crosstalk features. The wavelength response features are normalized to obtain the wavelength response data. The channel crosstalk features are normalized to obtain the channel crosstalk data, which effectively describes the crosstalk relationship between channels.

[0019] Step S300, performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; Specifically, singular value decomposition is performed on the wavelength response data to decompose it into a set of eigenvalues ​​and corresponding eigenvectors. After decomposition, eigenvectors with eigenvalues ​​greater than 0.1 are selected to form a wavelength response feature set, which represents the most important features in the wavelength response data. The wavelength response feature set is input into the first long short-term memory network to capture the temporal characteristics of the wavelength response data. In order to fully extract the temporal characteristics in the data, the number of hidden layer neurons of the LSTM is set to 128 and the time step is set to 10 to ensure that the model can capture the temporal change law in the wavelength response feature set and obtain the wavelength response deep features. The wavelength response deep features are weighted by the multi-head attention mechanism. The number of attention heads is set to 8 and the output dimension of each attention head is 64, so that the model can weight the wavelength response deep features from different perspectives to obtain the wavelength response attention features. The wavelength response attention features are input into the first fully connected layer for dimensionality reduction encoding, and the high-dimensional feature representation is compressed. At the same time, the ReLU activation function is used to perform nonlinear transformation on them to increase the expression ability of the model and the nonlinearity of the features. Dimensionality reduction and nonlinear transformation operations can effectively reduce the amount of calculation while retaining the most important feature information to obtain the wavelength response encoding vector. Singular value decomposition is performed on the channel crosstalk data to extract feature vectors with eigenvalues ​​greater than 0.1 to form a channel crosstalk feature set to describe the crosstalk characteristics between channels. The channel crosstalk feature set is input into the second long short-term memory network, the number of hidden layer neurons is set to 128, the time step is set to 10, and the temporal features in the channel crosstalk data are deeply encoded through the LSTM network. In this way, the obtained channel crosstalk deep features can reflect the mutual influence between channels and the dynamic changes of this influence. The channel crosstalk deep features are weighted by the multi-head attention mechanism. The number of attention heads is set to 8, and the output dimension of each attention head is 64. Through this setting, the model can analyze and weight the channel crosstalk deep features from multiple angles to obtain the channel crosstalk attention features. The channel crosstalk attention features are input into the second fully connected layer for dimensionality reduction encoding, and nonlinear transformation is performed through the ReLU activation function to obtain the channel crosstalk encoding vector.

[0020] Step S400: Inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform return loss calculation, to obtain an insertion loss value and a return loss value; Specifically, the wavelength response encoding vector is input into the first feature enhancement layer of the first computing channel. The feature enhancement layer consists of four fully connected layers, and the number of neurons in each layer is 512, 256, 128 and 64 respectively. By reducing the number of neurons layer by layer, the feature representation is gradually refined and compressed. In each layer, the ReLU activation function is used to increase the nonlinear expression ability of the model. At the same time, the data is standardized by the batch normalization layer to speed up the training speed of the network and improve the stability of the model. The obtained wavelength response enhancement feature contains a higher-level representation of the wavelength response feature and can better reflect the characteristics of the signal. The wavelength response enhancement feature is input into the first timing analysis layer of the first computing channel. The timing analysis layer consists of three layers of bidirectional long short-term memory network (Bi-LSTM). The number of LSTM units in each layer is 128, and the time step is set to the number of wavelength points. By using bidirectional LSTM, the model simultaneously considers the interdependence between the previous and next moments and captures the timing information in the wavelength response feature. Deep timing analysis can effectively reveal the changing rules in the wavelength response and generate wavelength response timing features. The wavelength response time series features are input into the first attention processing layer of the first computing channel, which contains 8 attention heads. By calculating the correlation coefficient matrix between the wavelength points, the correlation between the wavelength points is analyzed to obtain the wavelength response weighted features. The wavelength response weighted features are input into the first loss calculation layer of the first computing channel, which contains two fully connected layers with 32 and 1 neurons respectively. In the first fully connected layer, the input features are further compressed and processed to reduce the dimension of the features for subsequent calculations. In the last layer, the output is normalized using the Sigmoid activation function to obtain the insertion loss value, which represents the power loss suffered by the laser signal when passing through the optical fiber, and is used to evaluate the transmission performance of the system. For the processing of the channel crosstalk coding vector, it is input into the second feature enhancement layer of the second computing channel. The feature enhancement layer also consists of four fully connected layers, with the number of neurons in each layer being 512, 256, 128 and 64 respectively, and each layer uses the ReLU activation function and batch normalization layer for feature enhancement processing to obtain the channel crosstalk enhanced features. The channel crosstalk enhancement features are input into the second timing analysis layer of the second computing channel. The timing analysis layer consists of three layers of bidirectional LSTM, each layer has 128 LSTM units, and the time step is set to the number of channels. Through timing analysis, the model captures the dynamic interaction between channels and generates channel crosstalk timing features, reflecting the interference and change rules of the signal between channels. The channel crosstalk timing features are input into the second attention processing layer of the second computing channel. The attention processing layer also contains 8 attention heads. By calculating the correlation coefficient matrix between channels, the channel crosstalk weighted features are obtained.The channel crosstalk weighted features are input into the second loss calculation layer of the second calculation channel. The loss calculation layer also contains two fully connected layers with 32 and 1 neurons respectively. The last layer uses the Sigmoid activation function to obtain the return loss value. The return loss value indicates the power loss of the signal reflected back into the system during transmission. By calculating this value, the degree of signal quality degradation caused by reflection in the optical fiber system is evaluated.

[0021] Step S500: Calculate the loss compensation coefficient according to the insertion loss value and the return loss value and generate a corresponding intelligent loss compensation strategy.

[0022] Specifically, a polynomial curve is fitted to the insertion loss value, and the fitting coefficient is calculated by the least square method to establish a mapping function between the insertion loss and the wavelength. Similarly, a polynomial curve is fitted to the return loss value, and the mapping function between the return loss and the channel is calculated by the least square method. Polynomial fitting is to establish a mathematical expression between the insertion loss and the return loss, which is convenient for the subsequent analysis and processing of these relationships, while the least square method is used to ensure that the fitting curve is as close to the original data as possible and reduce the fitting error. The mapping function of the insertion loss and the wavelength is differentiated to calculate the loss change rate of each wavelength point and evaluate the insertion loss change at different wavelength points. When the loss change rate of some wavelength points is greater than 0.1dB / nm, it indicates that the loss change at these wavelength points is more significant. These wavelength points are marked as key compensation points to obtain an insertion loss compensation sequence. The mapping function of the return loss and the channel is differentiated to calculate the loss change rate of each channel. When the change rate of some channels is greater than 0.05dB, these channels are marked as key compensation points to generate a return loss compensation sequence. Through differential analysis of insertion loss and return loss, the wavelength points and channels that need to be compensated and adjusted are effectively identified. The insertion loss compensation sequence and return loss compensation sequence are input into the compensation controller, and the compensation control parameters are calculated by the proportional-integral-differential (PID) control algorithm. The PID control algorithm is a control method that can accurately calculate the control parameters according to the current error, the accumulation of errors, and the trend of error changes, ensuring that the compensation adjustment of the system can quickly and stably achieve the expected effect. Based on the compensation control parameters, the output optical signal of the wavelength tunable laser is compensated online to obtain the compensation adjustment curve. The adjustment process is carried out in real time, and the signal quality degradation caused by the insertion loss and return loss is compensated by adjusting the wavelength and power of the laser. In order to ensure the effect of compensation, the stability analysis of the compensation adjustment curve is carried out, and the loss standard deviation before and after compensation is calculated. If the loss standard deviation after compensation is less than 0.02dB, it means that the compensation effect has achieved sufficient stability. At this time, the loss compensation coefficient is recorded as the final compensation result. Through stability analysis, it is ensured that the performance of the system after compensation fluctuates within an acceptable range to avoid system instability caused by insufficient or excessive compensation. The loss compensation coefficient is converted into specific control instructions for the wavelength tunable laser, including wavelength tuning instructions, power adjustment instructions, and timing control instructions. The wavelength tuning instructions are used to adjust the working wavelength of the laser so that the insertion loss at different wavelength points can be compensated; the power adjustment instructions are used to adjust the output power of the laser to ensure that the power level of the overall optical signal meets expectations; the timing control instructions are used to coordinate the timing relationship between different compensation operations to ensure that each step in the compensation adjustment process can be carried out in an orderly manner.These control instructions together constitute an intelligent loss compensation strategy, ensuring that the system can adaptively adjust according to the real-time loss situation to maximize the quality of signal transmission.

[0023] Proportional control calculation is performed on the insertion loss compensation sequence, and the insertion loss proportional control amount is obtained by setting a suitable proportional coefficient. The role of proportional control is to quickly make corresponding compensation adjustments according to the instantaneous change of insertion loss to ensure that the system can quickly respond to loss fluctuations. Integral control calculation is performed on the insertion loss compensation sequence to obtain the insertion loss integral control amount. Integral control compensates by accumulating the loss change trend to ensure that the system error can be effectively eliminated in the long term. Differential control calculation is performed on the insertion loss compensation sequence. In order to calculate the rate of change of insertion loss, the central difference method is used to calculate the loss change between adjacent sampling points to obtain the loss change rate. The differential time constant is set to 0.01 seconds to ensure that more subtle changes are captured during differential calculation. In the differential calculation, in order to avoid the instability of the differential control amount caused by the high-frequency noise of the signal, the Butterworth filter is used to process the differential result to effectively eliminate the influence of high-frequency noise and obtain the insertion loss differential control amount. Through differential control, the loss change trend of the system is predicted in advance, so that the system can make corresponding adjustments before the loss changes. For the return loss compensation sequence, proportional, integral and differential control calculations are performed respectively to generate a complete return loss PID control quantity. In proportional control, the proportional coefficient range is set to 0.5 to 1.2, and the response speed and amplitude of the system are controlled by adjusting the size of the proportional coefficient; in integral control, the integral time constant is set to 0.1 seconds, and the system deviation is gradually reduced by accumulating errors to ensure that the system can stabilize within a certain period of time; and in differential control, the differential time constant is also set to 0.01 seconds, and the rate of loss change is calculated and compensated to suppress sudden changes in the system. By calculating the proportional, integral and differential control of the return loss compensation sequence, the PID control quantity of the return loss is obtained, so that the system can make full use of the advantages of each control method when processing the return loss, and realize fast and smooth loss adjustment. The insertion loss proportional control quantity, the insertion loss integral control quantity and the insertion loss differential control quantity are weighted and fused to obtain the comprehensive compensation quantity of the insertion loss. In the weighted fusion process, different weights are assigned to different control quantities to achieve the balance and synergy of proportional, integral and differential control, so that the final insertion loss compensation can respond quickly and keep the system loss near the target value stably and permanently. The PID control quantity of the return loss is combined with the comprehensive compensation quantity of the insertion loss to generate a compensation control matrix. In order to improve the accuracy of the compensation control, an adaptive weighted algorithm is used to calculate the final compensation control parameters. The calculation of the control parameters is dynamically adjusted according to the real-time status of the system to ensure that the compensation is optimal at every moment. Through the adaptive weighted fusion of the return loss and insertion loss control quantities, the relationship between the two is effectively balanced to avoid the instability of the system due to the excessive influence of a certain control quantity.

[0024] In the embodiment of the present invention, the wavelength dimension convolution operation and the channel dimension convolution operation are processed separately, so that the pertinence of feature extraction is improved, and the crosstalk effect between wavelength points and the interference effect between channels are effectively reduced; the combination of long short-term memory network and multi-head attention mechanism is adopted to enhance the ability to capture time series features and improve the accuracy and stability of loss calculation; a dual-path loss calculation channel structure is designed to realize the parallel calculation of insertion loss and return loss, and at the same time, the accuracy of loss value calculation is guaranteed through deep feature extraction of multi-layer neural network; an adaptive PID control algorithm is introduced, and the control parameters are determined through particle swarm optimization, so that the compensation strategy has stronger environmental adaptability and anti-interference ability; based on sliding window data segmentation processing and polynomial curve fitting, accurate modeling of loss characteristics is realized, and the reliability of compensation effect is improved; through a multi-level feedback control mechanism, the stability of the test process is guaranteed, the need for manual intervention is reduced, and the test efficiency is significantly improved.

[0025] In a specific embodiment, the process of executing step S100 may specifically include the following steps: Initialize the wavelength range and power parameters of the wavelength tunable laser, and index and mark them according to the wavelength point interval to obtain a wavelength power control sequence; According to the wavelength power control sequence, the actual output power value of each wavelength point is collected by using an optical power meter, and compared with the set power value to obtain the power stability control parameter; Based on the power stability control parameters, the optical signal is split and processed, and the optical signal is sequentially input into each channel to be tested of the multi-channel polarity insertion-return loss instrument, and the optical signal switching timing of each channel is recorded at the same time to obtain a channel switching timing table; Continuously sampling the output optical power signal of each channel to be measured of the multi-channel polarity insertion return loss instrument to obtain an output optical power data stream, and continuously sampling the reflected optical power signal of each channel to be measured of the multi-channel polarity insertion return loss instrument to obtain a reflected optical power data stream; According to the channel switching timing table, the output optical power data stream and the reflected optical power data stream are time-aligned and data segmented to obtain the output optical power signal and the reflected optical power signal.

[0026] Specifically, the wavelength range and power parameters of the wavelength tunable laser are initialized. The wavelength range setting includes determining the minimum wavelength of the laser. and maximum wavelength , and set the wavelength point interval Based on these parameters, the wavelength point intervals are indexed to obtain a discrete value sequence of wavelengths. ,in Through the discrete wavelength point sequence, a wavelength power control sequence is formed to control the output wavelength and power of the laser. When the power is initialized, the output target power value of each wavelength point is set. Based on the set wavelength power control sequence, the actual output power value of each wavelength point is collected using an optical power meter. , the laser outputs an optical signal, and the optical power meter measures the output power Compare the measured actual output power value with the set target power value and calculate the power error Through comparison operation, it is evaluated whether the output of the laser meets the expected requirements, and the power stability control parameters are obtained accordingly. , where each It is used to feedback and adjust the output power of the laser to ensure that the output remains within the target range. The goal of power stabilization control is to minimize the power error so that , that is, try to ensure that the output power of each wavelength point is stable near the set value. Based on the power stability control parameters, the optical signal is split. The optical signal output by the laser is input into each channel to be tested of the multi-channel polarity insertion loss instrument through the optical splitter. When switching channels, the optical signal switching timing of each channel is recorded to form a channel switching timing table ,in Indicates that the optical signal is switched to the channel timestamp, After the optical signal is input into each channel to be tested in turn, the output optical power signal of each channel to be tested of the multi-channel polarity insertion return loss instrument is continuously sampled to obtain the output optical power data stream. At the same time, the reflected light power signal is continuously sampled to obtain the reflected light power data stream . Indicates time, and Respectively represent the time The output optical power and reflected optical power measured at all times. The two collected data streams are continuous signals that change over time, including the changes in the optical power of each channel during the entire test process. According to the channel switching timing table , the collected output optical power data stream and reflected optical power data stream Perform timing alignment and data segmentation. The corresponding output optical power and reflected optical power data belong to the channel By segmenting the data of each time period, the output optical power signal of each channel is obtained. and reflected optical power signal ,in For example, if the wavelength range is set to 1520nm to 1570nm and the wavelength point interval is 1nm, then the number of wavelength points is is 51. For each wavelength point, for example nm, set target power mW, while the actual measured power is mW, the power error is mW. Through feedback control, set the control gain To adjust the laser power so that the next output is closer to the target power. When performing branch processing, assume that the optical signal is input into 4 channels in sequence, and record the switching sequence table as s 5s, s s In the time period [0, 5)s, the corresponding data belongs to channel 1; in the time period [5, 10)s, the corresponding data belongs to channel 2, and so on. and reflected optical power data stream Perform corresponding segment processing to obtain the optical power characteristics of each channel in its corresponding time period.

[0027] In a specific embodiment, the process of executing step S200 may specifically include the following steps: Constructing an output power data matrix for the output optical power signal according to the wavelength point and the channel number, and constructing a reflection power data matrix for the reflection optical power signal according to the wavelength point and the channel number; A convolution kernel of 3×3 is set along the wavelength dimension for the output power data matrix, and a convolution operation of the wavelength dimension is performed to obtain a wavelength dimension feature matrix. A convolution kernel of 5×5 is set along the channel dimension for the reflected power data matrix, and a convolution operation of the channel dimension is performed to obtain a channel dimension feature matrix. The wavelength dimension feature matrix is ​​transformed nonlinearly, and then processed by the maximum pooling layer with the pooling kernel size set to 2×2 to obtain the wavelength response feature. The channel dimension feature matrix is ​​transformed nonlinearly, and then processed by the average pooling layer with the pooling kernel size set to 2×2 to obtain the channel crosstalk feature. The wavelength response characteristics are normalized to obtain wavelength response data, and the channel crosstalk characteristics are normalized to obtain channel crosstalk data.

[0028] Specifically, the output optical power signal is organized into a two-dimensional matrix according to the wavelength point and channel number. ,in represents the index of the wavelength point, Represents the channel number, each element in the matrix Represents the wavelength and Channel Similarly, the reflected optical power signal is constructed as a reflected power data matrix ,in represents the wavelength point, Represents the channel number, each element in the matrix Represents the wavelength and Channel The output power data matrix is ​​convoluted to extract important feature information. , set the size along the wavelength dimension to The convolution operation is performed using the convolution kernel. is a The matrix whose elements are ,in and Represent the index of the convolution kernel in the wavelength and channel dimensions respectively. The result of the convolution operation between the output power data matrix and the convolution kernel is represented as the wavelength dimension feature matrix , the calculation formula for each element is: ; in Represents the wavelength dimension feature matrix at position Elements of is the weight of the convolution kernel, Represents the data value within the convolution window. Through this convolution operation, the local features of the data are extracted from the wavelength direction to form a wavelength dimension feature matrix, which captures the relationship between different wavelength points and the change characteristics of the signal. Perform convolution operations. Set the size along the channel dimension to The convolution kernel To perform the operation, the elements in the convolution kernel are ,in and Represent the index in the wavelength and channel direction respectively. Through the convolution operation, the channel dimension feature matrix is ​​obtained , the calculation formula for each element is ; in Indicates that the channel dimension feature matrix is ​​at position In this way, the convolution operation can capture the relationship between channels and extract the crosstalk characteristics between different channels. Perform nonlinear transformation to enhance the feature expression ability of data. Use ReLU activation function, defined as: ; By applying the ReLU activation function to each element in the matrix, the wavelength dimension feature after nonlinear transformation is obtained. The maximum pooling layer performs dimensionality reduction on the matrix. The pooling operation reduces the dimension of the feature matrix by taking the maximum value within the pooling window while retaining the most significant feature information. Through processing, the wavelength response feature is obtained , represents the important characteristics in the wavelength direction. Similarly, for the channel dimension feature matrix For nonlinear transformation, the ReLU activation function is also applied to enhance the nonlinear expression ability of the data. The average pooling layer performs dimensionality reduction processing on it. Average pooling reduces the dimension of the matrix by calculating the average value within the pooling window to obtain the channel crosstalk feature . Wavelength response characteristics and channel crosstalk characteristics Normalization processing is performed to scale the characteristic data to the same range to facilitate subsequent calculation and analysis, and wavelength response data and channel crosstalk data are obtained.

[0029] In a specific embodiment, the process of executing step S300 may specifically include the following steps: Perform singular value decomposition on the wavelength response data, extract eigenvectors with eigenvalues ​​greater than 0.1, and obtain the wavelength response feature set; The wavelength response feature set is input into the first long short-term memory network, the number of neurons in the hidden layer is set to 128, the time step is set to 10, and the wavelength response time series features are deeply encoded to obtain the wavelength response deep features; The wavelength response depth feature is weighted through the multi-head attention mechanism. The number of attention heads is set to 8 and the output dimension of each attention head is 64 to obtain the wavelength response attention feature. The wavelength response attention feature is input into the first fully connected layer for dimensionality reduction encoding, and a nonlinear transformation is performed through the ReLU activation function to obtain the wavelength response encoding vector; Perform singular value decomposition on the channel crosstalk data, extract eigenvectors with eigenvalues ​​greater than 0.1, and obtain the channel crosstalk feature set; The channel crosstalk feature set is input into the second long short-term memory network, the number of hidden layer neurons is set to 128, the time step is set to 10, and the channel crosstalk temporal features are deeply encoded to obtain the channel crosstalk deep features; The channel crosstalk depth feature is weighted through the multi-head attention mechanism. The number of attention heads is set to 8 and the output dimension of each attention head is 64 to obtain the channel crosstalk attention feature. The channel crosstalk attention feature is input into the second fully connected layer for dimensionality reduction encoding, and a nonlinear transformation is performed through the ReLU activation function to obtain the channel crosstalk encoding vector.

[0030] Specifically, singular value decomposition is performed on the wavelength response data to decompose the data into multiple independent components and extract the most representative feature information. Assume that the wavelength response data matrix is , perform singular value decomposition on it and get: ; in, is the left singular vector matrix, is a diagonal singular value matrix containing the magnitudes of the singular values, is the right singular vector matrix. By observing the singular value matrix , extract the eigenvectors corresponding to the eigenvalues ​​greater than 0.1, and form these eigenvectors into a wavelength response feature set. The wavelength response feature set is input into the first long short-term memory network (LSTM). LSTM is a special recurrent neural network suitable for processing features with temporal dependencies. In order to fully extract the temporal features in the wavelength response data, the number of hidden layer neurons is set to 128 and the time step is set to 10, which means that the model can process a time series of length 10 and extract 128 deep features at each time step. LSTM can effectively capture the temporal correlation in the wavelength response feature set through its unique input gate, forget gate, and output gate mechanism, and generate a wavelength response deep feature matrix. , each element of which Represents the time step The deep encoding result on . The wavelength response deep features are weighted through the multi-head attention mechanism, and the features are analyzed and strengthened from different angles. The multi-head attention mechanism performs independent weighted processing on the input data through multiple attention heads, enhancing the model's ability to capture feature relationships. The number of attention heads is set to 8, and the output dimension of each attention head is 64. Through the parallel calculation of multiple attention heads, the attention mechanism weights the wavelength response deep features and obtains the wavelength response attention feature matrix The formula for attention calculation is expressed as: ; in, , and They are query matrix, key matrix and value matrix respectively. Represents the dimension of the key matrix. Through this formula, the attention mechanism can calculate the correlation weights between each time step, and perform weighted processing on the input features to generate the integrated wavelength response attention features. The wavelength response attention features are input to the first fully connected layer for dimensionality reduction encoding. In this fully connected layer, the dimension of the feature matrix is ​​further compressed through linear transformation to reduce the complexity of the data. At the same time, the ReLU activation function is introduced to perform nonlinear transformation on the output of each node. The expression of ReLU is: ; Through this activation function, nonlinear features are introduced to make the model better fit the complex data distribution. After dimensionality reduction and nonlinear transformation, the wavelength response encoding vector is obtained At the same time, the channel crosstalk data is subjected to singular value decomposition, assuming that the channel crosstalk data matrix is , its singular value decomposition is expressed as: ; In the singular value matrix The eigenvectors corresponding to eigenvalues ​​greater than 0.1 are extracted to obtain the channel crosstalk feature set. These eigenvectors can represent the main crosstalk relationships between channels. The channel crosstalk feature set is input into the second long short-term memory network (LSTM), the number of hidden layer neurons is set to 128, and the time step is 10. The LSTM network extracts time-related deep features from the channel crosstalk feature set to generate a channel crosstalk deep feature matrix . These deep features can capture the long-term dependencies in the channel crosstalk features through the memory mechanism of the LSTM network, thereby more accurately reflecting the interactions and influences between different channels. The channel crosstalk deep features are weighted through the multi-head attention mechanism. The number of attention heads is set to 8, and the output dimension of each attention head is 64. Through the multi-head attention mechanism, the channel crosstalk deep features are weighted and combined from multiple perspectives to obtain the channel crosstalk attention feature matrix. The channel crosstalk attention feature is input into the second fully connected layer for dimensionality reduction encoding, and the nonlinear transformation is also performed through the ReLU activation function to obtain the channel crosstalk encoding vector .

[0031] In a specific embodiment, the process of executing step S400 may specifically include the following steps: The dual-path loss calculation channel includes a first calculation channel and a second calculation channel, the first calculation channel includes a first feature enhancement layer, a first timing analysis layer, a first attention processing layer and a first loss calculation layer; the second calculation channel includes a second feature enhancement layer, a second timing analysis layer, a second attention processing layer and a second loss calculation layer; The wavelength response encoding vector is input into the first feature enhancement layer of the first computing channel. The first feature enhancement layer consists of four fully connected layers. The number of neurons in each fully connected layer is 512, 256, 128, and 64 respectively. Each layer uses a ReLU activation function and a batch normalization layer to obtain wavelength response enhancement features. The wavelength response enhancement feature is input into the first timing analysis layer of the first calculation channel. The first timing analysis layer is composed of three layers of bidirectional LSTM. The number of LSTM units in each layer is 128, and the time step is set to the number of wavelength points to obtain the wavelength response timing feature; The wavelength response time series feature is input into the first attention processing layer of the first calculation channel. The attention processing layer includes 8 attention heads, and the correlation coefficient matrix between the wavelength points is calculated to obtain the wavelength response weighted feature. The wavelength response weighted features are input into the first loss calculation layer of the first calculation channel. The loss calculation layer contains two fully connected layers with 32 and 1 neurons respectively. The last layer uses the Sigmoid activation function to obtain the insertion loss value. The channel crosstalk encoding vector is input into the second feature enhancement layer of the second computing channel. The second feature enhancement layer consists of four fully connected layers. The number of neurons in each fully connected layer is 512, 256, 128, and 64 respectively. Each layer uses the ReLU activation function and the batch normalization layer to obtain the channel crosstalk enhancement feature. The channel crosstalk enhancement feature is input into the second timing analysis layer of the second computing channel. The second timing analysis layer consists of three layers of bidirectional LSTM. The number of LSTM units in each layer is 128, and the time step is set to the number of channels to obtain the channel crosstalk timing feature. The channel crosstalk time series features are input into the second attention processing layer of the second computing channel. The attention processing layer includes 8 attention heads, and the correlation coefficient matrix between channels is calculated to obtain the channel crosstalk weighted features. The channel crosstalk weighted features are input into the second loss calculation layer of the second calculation channel. The loss calculation layer contains two fully connected layers with 32 and 1 neurons respectively. The last layer uses the Sigmoid activation function to obtain the return loss value.

[0032] Specifically, the wavelength response encoding vector is input into the first feature enhancement layer of the first computing channel. The feature enhancement layer consists of four fully connected layers, and the number of neurons is 512, 256, 128 and 64 respectively. Each fully connected layer gradually reduces the dimension of the feature through linear transformation to extract high-level features in the wavelength response step by step. The ReLU activation function is used for nonlinear transformation in each fully connected layer. The definition of the ReLU activation function is: ; in The input value is ReLU, which maps negative values ​​to zero, thereby introducing nonlinearity in the network and enhancing the model's ability to fit complex data. In order to improve the training stability and convergence speed of the model, a batch normalization layer is added after each fully connected layer, which helps to reduce the internal covariate changes, thereby improving the performance and training speed of the model. Through these processes, the wavelength response enhancement feature matrix is ​​finally obtained. , represents a high-level expression of the wavelength response characteristics. The wavelength response enhancement feature matrix The input is sent to the first time series analysis layer, which consists of three layers of bidirectional long short-term memory (Bi-LSTM) networks. The number of units in each LSTM layer is set to 128, and the time step is set to the number of wavelength points, that is, the model can handle the temporal dependency of the input data. The bidirectional LSTM calculates the forward and backward features respectively through the LSTM units in two directions, and merges the results to obtain the wavelength response time series feature matrix. Each element Indicates that at time step The wavelength response time series feature matrix Input to the first attention processing layer. This attention processing layer contains 8 attention heads, which strengthen the understanding of the relationship between wavelength points by calculating the correlation coefficient matrix between wavelength points. The multi-head attention mechanism performs weighted processing on the input through independent attention heads to capture the correlation between inputs in different ways. The formula for attention processing is expressed as: ; in, , and represent the query matrix, key matrix and value matrix respectively, is the dimension of the key matrix. Through this formula, the attention mechanism can calculate the weight matrix between each wavelength point and obtain the wavelength response weighted feature matrix , where each element represents the correlation between two wavelength points. The wavelength response weighted feature matrix Input to the first loss calculation layer for calculation. The loss calculation layer consists of two fully connected layers, with 32 and 1 neurons respectively. The first fully connected layer compresses the input features to reduce the complexity of the data. The second fully connected layer outputs a scalar value representing the insertion loss value. In order to ensure that the output is within a reasonable range, the Sigmoid activation function is used in the last fully connected layer, which is defined as: ; Through the Sigmoid activation function, the output insertion loss value is limited to between 0 and 1, which is convenient for subsequent loss compensation and control. Similar to the first calculation channel, the channel crosstalk encoding vector is input to the second feature enhancement layer of the second calculation channel. The feature enhancement layer consists of four fully connected layers. The number of neurons in each fully connected layer is 512, 256, 128 and 64 respectively. The ReLU activation function and batch normalization layer are also used. Through step-by-step feature enhancement, the channel crosstalk enhancement feature matrix is ​​obtained. , which represents the deep expression of channel crosstalk features. The channel crosstalk enhancement feature matrix is ​​input into the second time series analysis layer, which consists of three layers of bidirectional LSTM. The number of LSTM units in each layer is 128, and the time step is set to the number of channels. Bidirectional LSTM can extract the dependency between channels from the time series, and finally obtain the channel crosstalk time series feature matrix , each element Represents the time step The channel crosstalk time series feature matrix is ​​input into the second attention processing layer, which also contains 8 attention heads. By calculating the correlation coefficient matrix between channels, the channel crosstalk weighted feature matrix is ​​obtained. . This matrix represents the mutual influence relationship between each channel. Through weighted processing, the model can better understand the mutual crosstalk between channels. The channel crosstalk weighted feature matrix is ​​input into the second loss calculation layer, which is also composed of two fully connected layers with 32 and 1 neurons respectively. The Sigmoid activation function is used in the last layer to output the return loss value. The return loss value reflects the loss of the signal caused by reflection and other factors during the optical fiber transmission process, and is an important indicator for measuring the quality of signal transmission.

[0033] In a specific embodiment, the process of executing step S500 may specifically include the following steps: Perform polynomial curve fitting on the insertion loss value, calculate the fitting coefficient by the least square method, and obtain the mapping function between the insertion loss and the wavelength; perform polynomial curve fitting on the return loss value, calculate the fitting coefficient by the least square method, and obtain the mapping function between the return loss and the channel; Differentiate the mapping function of insertion loss and wavelength, calculate the loss change rate of each wavelength point, mark the wavelength point with a change rate greater than 0.1dB / nm as a key compensation point, and obtain an insertion loss compensation sequence; and differentiate the mapping function of return loss and channel, calculate the loss change rate of each channel, mark the channel with a change rate greater than 0.05dB as a key compensation point, and obtain a return loss compensation sequence; Input the insertion loss compensation sequence and the return loss compensation sequence into the compensation controller, and calculate the compensation control parameters through the proportional-integral-differential control algorithm; Based on the compensation control parameters, the output optical signal of the wavelength tunable laser is compensated and adjusted online to obtain a compensation adjustment curve, and the stability of the compensation adjustment curve is analyzed. The loss standard deviation before and after compensation is calculated. When the standard deviation is less than 0.02 dB, the loss compensation coefficient is recorded. The loss compensation coefficient is converted into a control instruction of the wavelength tunable laser, including a wavelength tuning instruction, a power adjustment instruction and a timing control instruction, to obtain an intelligent loss compensation strategy.

[0034] Specifically, polynomial curve fitting is performed on the insertion loss and return loss, and the least square method is used to calculate the fitting coefficients to obtain the mapping function of insertion loss and wavelength, and the mapping function of return loss and channel. Assume that there is a set of wavelength points And the corresponding insertion loss value , the relationship between insertion loss and wavelength is approximated by polynomial fitting. It is expressed as: ; in, is the fitting function of the insertion loss, is the fitting coefficient that needs to be calculated by the least squares method, is the order of the polynomial. The goal of the least squares method is to minimize the sum of the square errors between the fitting curve and the actual measured value. The specific objective function is: ; in, is the actual measured insertion loss value. By solving the minimization problem, the optimal fitting coefficient is obtained. , and obtain the mapping function of insertion loss and wavelength. Similarly, a polynomial fitting is performed on the relationship between the return loss value and the channel number. Assuming the channel number is , the corresponding return loss value is , the relationship between return loss and channel is fitted by the least squares method, which is expressed as: ; in, is the fitting function of the return loss, are the fitting coefficients, is the order of the polynomial. The fitting coefficients are solved by the least square method to obtain the mapping function between return loss and channel. The mapping function between insertion loss and wavelength is differentiated to calculate the loss change rate at each wavelength point. Taking the derivative, we get: ; The derivative represents the rate of change of insertion loss at each wavelength point. If the rate of change of some wavelength points is greater than 0.1dB / nm, it is considered that the loss change of these wavelength points is more significant and needs to be compensated. These wavelength points are marked as key compensation points, and the insertion loss compensation sequence is obtained. Similarly, the mapping function of return loss and channel Performing differentiation operation, we get: ; The derivative represents the rate of change of return loss on each channel. If the rate of change of some channels is greater than 0.05dB, these channels are marked as key compensation points, and the return loss compensation sequence is obtained. These key compensation points represent the parts of the system with large losses and significant changes, so they need to be compensated and adjusted intensively. The insertion loss compensation sequence and the return loss compensation sequence are input into the compensation controller, and the compensation control parameters are calculated by the proportional-integral-differential (PID) control algorithm. The PID control algorithm realizes real-time correction of system errors by combining proportional control, integral control and differential control. The proportional control part adjusts the compensation amount by the size of the current error, the integral control eliminates the deviation by accumulating the error, and the differential control predicts the future change trend according to the rate of change of the error. The output of the PID controller is expressed as: ; in, Indicates the control output, is the current error, , , are proportional, integral and differential coefficients respectively. Through the PID control algorithm, the compensation control parameters of insertion loss and return loss are obtained, and these parameters will be used to perform real-time compensation adjustment on the laser. Based on the calculated compensation control parameters, the output optical signal of the wavelength tunable laser is compensated and adjusted online to generate a compensation adjustment curve. The process of online compensation is to compensate for the signal quality degradation caused by insertion loss and return loss by adjusting the output wavelength and power of the laser in real time. During the compensation process, the stability analysis of the compensation adjustment curve is performed, and the loss standard deviation of the system before and after compensation is calculated. Assume that the loss value before and after compensation is , and its standard deviation is expressed as: ; in, is the mean loss value, Represents the standard deviation of the loss. If the loss standard deviation after compensation is less than 0.02dB, it is considered that the compensation effect meets the required stability standard, and the corresponding loss compensation coefficient is recorded. The recorded loss compensation coefficient is converted into specific control instructions for the wavelength tunable laser, including wavelength tuning instructions, power adjustment instructions, and timing control instructions. The wavelength tuning instruction is used to control the working wavelength of the laser so that it remains stable at different wavelength points; the power adjustment instruction is used to adjust the output optical power to ensure that the power level of the overall signal meets expectations; the timing control instruction is used to coordinate the execution time of the compensation operation to ensure the coordination between all control actions. These control instructions together constitute an intelligent loss compensation strategy, which ensures that the system can be adaptively adjusted according to the real-time loss situation to maximize the transmission quality of the optical signal and the stability of the system.

[0035] In a specific embodiment, the execution step of inputting the insertion loss compensation sequence and the return loss compensation sequence into the compensation controller, and the process of calculating the compensation control parameters by the proportional-integral-differential control algorithm may specifically include the following steps: Performing proportional control calculation on the insertion loss compensation sequence to obtain an insertion loss proportional control amount, and performing integral control calculation on the insertion loss compensation sequence to obtain an insertion loss integral control amount; The insertion loss compensation sequence is subjected to differential control calculation. The loss change rate of adjacent sampling points is calculated using the central difference method. The differential time constant is set to 0.01s. The high-frequency noise is eliminated by the Butterworth filter to obtain the insertion loss differential control value. The return loss compensation sequence is calculated by proportional, integral and differential control respectively, with the proportional coefficient ranging from 0.5 to 1.2, the integral time constant being 0.1s, and the differential time constant being 0.01s, to obtain the return loss PID control amount; The insertion loss proportional control amount, the insertion loss integral control amount and the insertion loss differential control amount are weighted and integrated to obtain the insertion loss comprehensive compensation amount; The return loss PID control quantity and the insertion loss comprehensive compensation quantity are combined into a compensation control matrix, and the compensation control parameters are calculated by an adaptive weighted algorithm.

[0036] Specifically, the insertion loss compensation sequence is proportionally controlled and calculated by introducing the proportional coefficient The error signal is amplified to achieve an immediate response and obtain the insertion loss proportional control amount. Assume that the insertion loss compensation sequence is , the calculation formula of proportional control amount is: ; in, Indicates at time The insertion loss ratio control amount on is the proportional coefficient, by adjusting The size of the control system changes the response speed of the error. The insertion loss compensation sequence is calculated by integral control. The role of integral control is to eliminate the steady-state error of the system by accumulating the error signal over a period of time, thereby ensuring long-term stability. Assuming the insertion loss compensation sequence is , the calculation formula of the integral control amount is: ; in, is the insertion loss integral control quantity, is the integral coefficient, and the degree of influence of the integral on the system is controlled by setting the integral time constant. Set the integral time constant to , to adapt to the loss change characteristics on different channels. In order to refine the control of the insertion loss compensation sequence, differential control calculation is performed. The main function of differential control is to predict future errors in advance according to the rate of loss change, so as to make corresponding compensation adjustments. The central difference method is used to calculate the rate of change between adjacent sampling points in the insertion loss compensation sequence to improve the calculation accuracy and avoid the inaccuracy caused by only using forward or backward differences. The calculation formula for the insertion loss differential control amount is: ; in, Indicates at time The insertion loss differential control quantity on is the sampling time interval, and the time constant is set to control the response speed in the differential process. In the process of calculating the differential control quantity, since the differential operation is very sensitive to high-frequency noise, in order to ensure the stability of the result, a Butterworth filter is used to filter the calculation result to eliminate the interference of high-frequency noise. The Butterworth filter is a low-pass filter with a flat frequency response, which effectively retains useful signal components while eliminating high-frequency noise. When performing proportional, integral and differential control on the return loss compensation sequence, the proportional control part is mainly controlled by the proportional coefficient (the range is 0.5-1.2) to adjust the error signal, and the integral control is controlled by the integral time constant To accumulate the past error signal, the differential control is controlled by the differential time constant Calculate the loss change rate and get the PID control amount of the return loss. The return loss PID control amount is expressed as: ; in, Indicates at time The return loss PID control quantity on is the differential coefficient. By combining proportion, integration and differentiation, PID control can better cope with various dynamic changes in the system. After obtaining the proportional control amount, integral control amount and differential control amount of the insertion loss, they are weighted and fused to form a comprehensive compensation amount of the insertion loss. This process is achieved by setting different weight coefficients for each control amount. The fused comprehensive compensation amount of the insertion loss is expressed as: ; in, , and are the weight coefficients of proportional, integral and differential control quantities, is the comprehensive compensation for insertion loss. By reasonably selecting these weight coefficients, a suitable balance is found between fast response and steady-state accuracy to achieve accurate compensation for insertion loss. The return loss PID control quantity is combined with the comprehensive compensation for insertion loss to form a compensation control matrix. In order to make the compensation control parameters better adapt to the real-time changes of the system, an adaptive weighting algorithm is used to weight the control quantity. The introduction of the adaptive weighting algorithm enables the system to automatically adjust the weight of each control quantity according to the real-time error and change to achieve optimal compensation control. Assume that the compensation control matrix is , expressed as: ; in, and are adaptive weight coefficients, which are used to adjust the proportion of insertion loss and return loss control in comprehensive control. The value of the adaptive weight coefficient will be automatically adjusted as the system status changes to ensure that the system can maintain optimal performance under different working conditions.

[0037] See also Figure 2 , Figure 2 The structure schematic block diagram of the intelligent control system 200 of the wavelength tunable laser provided in the embodiment of the present application is as follows: Figure 2 As shown, the intelligent control system 200 of the wavelength tunable laser includes: The acquisition module 210 is used to sequentially input optical signals to each channel to be measured of the multi-channel polarity insertion return loss instrument through a wavelength tunable laser, and to acquire output optical power signals and reflected optical power signals of each channel to be measured; The convolution operation module 220 is used to perform wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal respectively to obtain wavelength response data and channel crosstalk data; The feature extraction module 230 is used to perform feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; The loss calculation module 240 is used to input the wavelength response coding vector into the first calculation channel of the dual-path loss calculation channel to perform insertion loss calculation, and input the channel crosstalk coding vector into the second calculation channel to perform return loss calculation, so as to obtain an insertion loss value and a return loss value; The generating module 250 is used to calculate the loss compensation coefficient and generate a corresponding intelligent loss compensation strategy according to the insertion loss value and the return loss value.

[0038] Through the coordinated cooperation of the above-mentioned components and the separation of wavelength-dimensional convolution operations and channel-dimensional convolution operations, the pertinence of feature extraction is improved, and the crosstalk between wavelength points and the interference effect between channels are effectively reduced; the combination of long short-term memory network and multi-head attention mechanism is adopted to enhance the ability to capture timing features and improve the accuracy and stability of loss calculation; a dual-path loss calculation channel structure is designed to realize the parallel calculation of insertion loss and return loss, and at the same time, the accuracy of loss value calculation is guaranteed through deep feature extraction of multi-layer neural network; an adaptive PID control algorithm is introduced, and the control parameters are determined through particle swarm optimization, so that the compensation strategy has stronger environmental adaptability and anti-interference ability; based on sliding window data segmentation processing and polynomial curve fitting, accurate modeling of loss characteristics is realized, and the reliability of compensation effect is improved; through multi-level feedback control mechanism, the stability of the test process is guaranteed, the need for manual intervention is reduced, and the test efficiency is significantly improved.

[0039] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0040] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0041] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An intelligent control method for a wavelength tunable laser, characterized in that: include: Inputting optical signals to each channel to be tested of the multi-channel polarity insertion return loss instrument in sequence through a wavelength tunable laser, and collecting output optical power signals and reflected optical power signals of each channel to be tested; Respectively performing wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal to obtain wavelength response data and channel crosstalk data; Performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; Inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform return loss calculation, to obtain an insertion loss value and a return loss value; According to the insertion loss value and the return loss value, a loss compensation coefficient is calculated and a corresponding intelligent loss compensation strategy is generated.

2. The intelligent control method of wavelength tunable laser according to claim 1, characterized in that: The method sequentially inputs optical signals to each channel to be measured of the multi-channel polarity insertion-return loss instrument through a wavelength tunable laser, and collects output optical power signals and reflected optical power signals of each channel to be measured, including: Initialize the wavelength range and power parameters of the wavelength tunable laser, and index and mark them according to the wavelength point interval to obtain a wavelength power control sequence; According to the wavelength power control sequence, an optical power meter is used to collect the actual output power value of each wavelength point, and a comparison operation is performed with the set power value to obtain a power stability control parameter; Based on the power stability control parameter, the optical signal is split and processed, and the optical signal is sequentially input into each channel to be tested of the multi-channel polarity insertion return loss instrument, and the optical signal switching timing of each channel is recorded to obtain a channel switching timing table; Continuously sampling the output optical power signal of each channel to be measured of the multi-channel polarity insertion return loss instrument to obtain an output optical power data stream, and continuously sampling the reflected optical power signal of each channel to be measured of the multi-channel polarity insertion return loss instrument to obtain a reflected optical power data stream; According to the channel switching timing table, the output optical power data stream and the reflected optical power data stream are time-aligned and data segmented to obtain an output optical power signal and a reflected optical power signal.

3. The intelligent control method of wavelength tunable laser according to claim 2, characterized in that: The performing wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal respectively to obtain wavelength response data and channel crosstalk data includes: Constructing an output power data matrix for the output optical power signal according to the wavelength point and the channel number, and constructing a reflection power data matrix for the reflected optical power signal according to the wavelength point and the channel number; A convolution kernel of 3×3 is set along the wavelength dimension for the output power data matrix, and a convolution operation of the wavelength dimension is performed to obtain a wavelength dimension feature matrix; a convolution kernel of 5×5 is set along the channel dimension for the reflection power data matrix, and a convolution operation of the channel dimension is performed to obtain a channel dimension feature matrix; The wavelength dimension feature matrix is ​​subjected to nonlinear transformation, and is subjected to dimensionality reduction processing by a maximum pooling layer, and the pooling kernel size is set to 2×2, so as to obtain a wavelength response feature; the channel dimension feature matrix is ​​subjected to nonlinear transformation, and is subjected to dimensionality reduction processing by an average pooling layer, and the pooling kernel size is set to 2×2, so as to obtain a channel crosstalk feature; The wavelength response characteristics are normalized to obtain wavelength response data, and the channel crosstalk characteristics are normalized to obtain channel crosstalk data.

4. The intelligent control method of wavelength tunable laser according to claim 3, characterized in that: The step of performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector comprises: Performing singular value decomposition on the wavelength response data, extracting eigenvectors with eigenvalues ​​greater than 0.1, and obtaining a wavelength response feature set; Input the wavelength response feature set into a first long short-term memory network, set the number of neurons in the hidden layer to 128, the time step to 10, perform deep encoding on the wavelength response time series features, and obtain wavelength response deep features; The wavelength response depth feature is weightedly processed by a multi-head attention mechanism, the number of attention heads is set to 8, the output dimension of each attention head is set to 64, and the wavelength response attention feature is obtained; Input the wavelength response attention feature into the first fully connected layer for dimensionality reduction encoding, and perform nonlinear transformation through the ReLU activation function to obtain a wavelength response encoding vector; Performing singular value decomposition on the channel crosstalk data, extracting eigenvectors with eigenvalues ​​greater than 0.1, and obtaining a channel crosstalk feature set; Input the channel crosstalk feature set into the second long short-term memory network, set the number of hidden layer neurons to 128, the time step to 10, perform deep encoding on the channel crosstalk temporal features, and obtain the channel crosstalk deep features; The channel crosstalk depth feature is weighted by a multi-head attention mechanism, the number of attention heads is set to 8, the output dimension of each attention head is 64, and the channel crosstalk attention feature is obtained; The channel crosstalk attention feature is input into the second fully connected layer for dimensionality reduction encoding, and a nonlinear transformation is performed through the ReLU activation function to obtain a channel crosstalk encoding vector.

5. The intelligent control method of wavelength tunable laser according to claim 4, characterized in that: The method of inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform an insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform a return loss calculation, to obtain an insertion loss value and a return loss value, comprises: The dual-path loss calculation channel includes a first calculation channel and a second calculation channel, the first calculation channel includes a first feature enhancement layer, a first timing analysis layer, a first attention processing layer and a first loss calculation layer; the second calculation channel includes a second feature enhancement layer, a second timing analysis layer, a second attention processing layer and a second loss calculation layer; Inputting the wavelength response encoding vector into the first feature enhancement layer of the first computing channel, the first feature enhancement layer is composed of four fully connected layers, the number of neurons in each fully connected layer is 512, 256, 128, and 64 respectively, and each layer uses a ReLU activation function and a batch normalization layer to obtain a wavelength response enhancement feature; Inputting the wavelength response enhancement feature into the first timing analysis layer of the first computing channel, the first timing analysis layer is composed of three layers of bidirectional LSTM, the number of LSTM units in each layer is 128, and the time step is set to the number of wavelength points, to obtain the wavelength response timing feature; Inputting the wavelength response time series feature into the first attention processing layer of the first calculation channel, the attention processing layer includes 8 attention heads, calculating the correlation coefficient matrix between the wavelength points, and obtaining the wavelength response weighted feature; Inputting the wavelength response weighted feature into the first loss calculation layer of the first calculation channel, the loss calculation layer includes two fully connected layers, the number of neurons is 32 and 1 respectively, and the last layer uses a Sigmoid activation function to obtain an insertion loss value; Inputting the channel crosstalk encoding vector into the second feature enhancement layer of the second computing channel, the second feature enhancement layer consists of four fully connected layers, the number of neurons in each fully connected layer is 512, 256, 128, and 64 respectively, and each layer uses a ReLU activation function and a batch normalization layer to obtain a channel crosstalk enhancement feature; Input the channel crosstalk enhancement feature into the second timing analysis layer of the second computing channel, where the second timing analysis layer consists of three layers of bidirectional LSTM, each layer has 128 LSTM units, and the time step is set to the number of channels, to obtain the channel crosstalk timing feature; Inputting the channel crosstalk time series feature into the second attention processing layer of the second computing channel, the attention processing layer includes 8 attention heads, calculating the correlation coefficient matrix between channels, and obtaining the channel crosstalk weighted feature; The channel crosstalk weighted feature is input into the second loss calculation layer of the second calculation channel, and the loss calculation layer includes two fully connected layers, the number of neurons is 32 and 1 respectively, and the last layer uses the Sigmoid activation function to obtain the return loss value.

6. The intelligent control method of wavelength tunable laser according to claim 5, characterized in that: The calculating the loss compensation coefficient and generating a corresponding intelligent loss compensation strategy according to the insertion loss value and the return loss value includes: Performing polynomial curve fitting on the insertion loss value, calculating the fitting coefficient by the least square method, and obtaining a mapping function between the insertion loss and the wavelength; performing polynomial curve fitting on the return loss value, calculating the fitting coefficient by the least square method, and obtaining a mapping function between the return loss and the channel; Performing a differential operation on the mapping function of the insertion loss and the wavelength, calculating the loss change rate of each wavelength point, marking the wavelength point with a change rate greater than 0.1 dB / nm as a key compensation point, and obtaining an insertion loss compensation sequence; performing a differential operation on the mapping function of the return loss and the channel, calculating the loss change rate of each channel, marking the channel with a change rate greater than 0.05 dB as a key compensation point, and obtaining a return loss compensation sequence; Inputting the insertion loss compensation sequence and the return loss compensation sequence into a compensation controller, and calculating compensation control parameters through a proportional-integral-differential control algorithm; Based on the compensation control parameter, an output optical signal of the wavelength tunable laser is compensated and adjusted online to obtain a compensation adjustment curve, and a stability analysis is performed on the compensation adjustment curve to calculate the loss standard deviation before and after compensation, and when the standard deviation is less than 0.02 dB, a loss compensation coefficient is recorded; The loss compensation coefficient is converted into a control instruction of the wavelength tunable laser, including a wavelength tuning instruction, a power adjustment instruction and a timing control instruction, to obtain an intelligent loss compensation strategy.

7. The intelligent control method of wavelength tunable laser according to claim 6, characterized in that: The step of inputting the insertion loss compensation sequence and the return loss compensation sequence into a compensation controller and calculating the compensation control parameters by a proportional-integral-differential control algorithm comprises: Performing proportional control calculation on the insertion loss compensation sequence to obtain an insertion loss proportional control amount, and performing integral control calculation on the insertion loss compensation sequence to obtain an insertion loss integral control amount; The insertion loss compensation sequence is subjected to differential control calculation, the loss change rate of adjacent sampling points is calculated by using the central difference method, the differential time constant is set to 0.01s, and the high-frequency noise is eliminated by using a Butterworth filter to obtain the insertion loss differential control amount; The return loss compensation sequence is respectively subjected to proportional, integral and differential control calculations, with a proportional coefficient range of 0.5-1.2, an integral time constant of 0.1s, and a differential time constant of 0.01s, to obtain a return loss PID control amount; The insertion loss proportional control amount, the insertion loss integral control amount and the insertion loss differential control amount are weighted and integrated to obtain a comprehensive insertion loss compensation amount; The return loss PID control amount and the insertion loss comprehensive compensation amount are combined into a compensation control matrix, and the compensation control parameters are calculated by an adaptive weighted algorithm.

8. An intelligent control system for a wavelength tunable laser, characterized in that: The method for intelligently controlling a wavelength tunable laser according to any one of claims 1 to 7 comprises: The acquisition module is used to sequentially input optical signals to each channel to be measured of the multi-channel polarity insertion return loss instrument through a wavelength tunable laser, and to acquire output optical power signals and reflected optical power signals of each channel to be measured; A convolution operation module, used to perform wavelength dimension convolution operation and channel dimension convolution operation on the output optical power signal and the reflected optical power signal respectively, to obtain wavelength response data and channel crosstalk data; A feature extraction module, used for performing feature extraction and vector encoding on the wavelength response data and the channel crosstalk data to obtain a wavelength response encoding vector and a channel crosstalk encoding vector; A loss calculation module, used for inputting a wavelength response coding vector into a first calculation channel of a dual-path loss calculation channel to perform insertion loss calculation, and inputting a channel crosstalk coding vector into a second calculation channel to perform return loss calculation, so as to obtain an insertion loss value and a return loss value; A generation module is used to calculate a loss compensation coefficient and generate a corresponding intelligent loss compensation strategy according to the insertion loss value and the return loss value.

Citation Information

Cited By

  • Optical signal wavelength optimization method and device, storage medium and processor

    CN120474625A