Training method of offset compensation model of optical module, offset compensation method and device

CN122475769BActive Publication Date: 2026-09-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610936841.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-08
Estimated Expiration
2046-06-26

AI Technical Summary

Technical Problem

[0004]本申请提供了一种光模块的偏移补偿模型的训练方法、偏移补偿方法及设备,以至少解决相关技术中补偿效果不准确、硬件适配性差、抗干扰能力弱等部分技术问题

Benefits of technology

[0012]By utilizing the differences in physical optical paths and optical power loss that conform to physical laws for model training, the trained offset compensation model can output reliable compensation information that is unaffected by interference factors under the constraints of physical laws. This solves technical problems such as inaccurate compensation effect, poor hardware adaptability, and weak anti-interference ability, and achieves the technical effect of improving compensation effect, hardware adaptability, and anti-interference ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122475769B_ABST
    Figure CN122475769B_ABST
Patent Text Reader

Abstract

The application discloses a training method and a compensation method of an offset compensation model of an optical module, and equipment, and relates to the technical fields of optical communication and artificial intelligence. The training method comprises the following steps: acquiring optical path offset information, inputting the optical path offset information into a physical information neural network to be trained to output first compensation information; and training the physical information neural network by using physical optical path differences between the first compensation information and second compensation information and optical power loss differences for the optical path offset information to obtain an offset compensation model. By using the physical optical path differences and the optical power loss differences conforming to physical laws for model training, the offset compensation model obtained through training can output reliable compensation information which is not affected by interference factors under the constraint of physical laws, so as to solve technical problems such as inaccurate compensation effect, poor hardware adaptability and weak anti-interference capability, and achieve the technical effects of improving the compensation effect, the hardware adaptability and the anti-interference capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of optical communication and artificial intelligence technology, and in particular to a training method, offset compensation method and device for an offset compensation model of an optical module. Background Technology

[0002] With the continuous development of communication technology, optical communication based on precision optical systems has gradually become a core support for fields such as fiber optic communication, integrated photonic chips, and free-space optical interconnects. As the core component for realizing optical communication, the alignment accuracy and disturbance resistance of the optical module and the coupled optical fiber affect the transmission efficiency and equipment stability of the entire data link.

[0003] Related technologies can compensate for optical path offset between optical modules and coupled optical fibers based on the Ray Transfer Matrix (RTM). However, this method relies on fixed optical parameters in the RTM, making it difficult to handle compensation scenarios with unknown optical parameters or complex disturbances. While neural network-based compensation methods do not rely on optical parameters, they may output compensation results that do not conform to physical laws, leading to incompatibility with compensation equipment and significant deviations in compensation effectiveness. Therefore, related optical path offset compensation methods suffer from technical problems such as inaccurate compensation effects, poor hardware adaptability, and weak anti-interference capabilities. Summary of the Invention

[0004] This application provides a training method, offset compensation method and device for an optical module offset compensation model, so as to at least solve some technical problems in related technologies such as inaccurate compensation effect, poor hardware adaptability and weak anti-interference ability.

[0005] This application provides a training method for an offset compensation model of an optical module, comprising: acquiring optical path offset information, wherein the optical path offset information includes optical path offset between the optical module and the coupled optical fiber at multiple time points, and the optical path offset characterizes the offset of the photosensitive end face of the optical module relative to the end face of the optical fiber; inputting the optical path offset information into a physical information neural network to be trained to output first compensation information, wherein the first compensation information is used to compensate for the optical path offset information; and training the physical information neural network using the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, to obtain an offset compensation model.

[0006] This application also provides an offset compensation method for an optical module, comprising: acquiring target optical path offset information between the optical module and the optical fiber; inputting the target optical path offset information into an offset compensation model to obtain target compensation information, wherein the offset compensation model is trained using the above-mentioned training method for the offset compensation model of the optical module; and controlling a displacement device to adjust the position of the optical module based on the target compensation information to compensate for the target optical path offset information.

[0007] This application also provides a training device for an offset compensation model of an optical module, comprising: a first acquisition module for acquiring optical path offset information, wherein the optical path offset information includes optical path offset between the optical module and the coupled optical fiber at multiple time points, and the optical path offset characterizes the offset of the photosensitive end face of the optical module relative to the end face of the optical fiber; a first input module for inputting the optical path offset information into a physical information neural network to be trained to output first compensation information, wherein the first compensation information is used to compensate for the optical path offset information; and a training module for training the physical information neural network using the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, to obtain an offset compensation model.

[0008] This application also provides an offset compensation device for an optical module, comprising: a second acquisition module for acquiring target optical path offset information between the optical module and the optical fiber; a second input module for inputting the target optical path offset information into an offset compensation model to obtain target compensation information, wherein the offset compensation model is trained using the above-mentioned training method for the offset compensation model of the optical module; and a compensation module for controlling a displacement device to adjust the position of the optical module based on the target compensation information to compensate for the target optical path offset information.

[0009] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the training method and offset compensation method steps of the offset compensation model of the optical module described above.

[0010] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the training method and the offset compensation method of the offset compensation model of the above-mentioned optical module.

[0011] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements the training method and offset compensation method steps of the offset compensation model of the above-mentioned optical module.

[0012] By utilizing the differences in physical optical paths and optical power loss that conform to physical laws for model training, the trained offset compensation model can output reliable compensation information that is unaffected by interference factors under the constraints of physical laws. This solves technical problems such as inaccurate compensation effect, poor hardware adaptability, and weak anti-interference ability, and achieves the technical effect of improving compensation effect, hardware adaptability, and anti-interference ability. Attached Figure Description

[0013] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 An exemplary system architecture is shown, which illustrates a training method and an offset compensation method for an optical module offset compensation model applicable according to embodiments of this application.

[0015] Figure 2 A flowchart illustrating a training method for an offset compensation model of an optical module according to an embodiment of this application is shown.

[0016] Figure 3 A flowchart illustrating the updating of a physical information neural network using the target loss function value according to an embodiment of this application is shown.

[0017] Figure 4 A data flow diagram is shown for determining physical optical path differences according to an embodiment of this application.

[0018] Figure 5 A data flow diagram showing the determination of the position of the second beam according to an embodiment of this application is shown.

[0019] Figure 6 A data flow diagram illustrating the determination of optical path offset information according to an embodiment of this application is shown.

[0020] Figure 7 A data flow diagram showing the first compensation information obtained according to an embodiment of this application is shown.

[0021] Figure 8 A flowchart of an offset compensation method for an optical module according to an embodiment of this application is shown.

[0022] Figure 9 A flowchart illustrating optical path compensation using target compensation information output by an offset compensation model according to an embodiment of this application is shown.

[0023] Figure 10 A flowchart is shown to illustrate the offset compensation model obtained by training a physical information neural network according to an embodiment of this application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0025] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0026] With the rapid development of technologies such as 5G communication, quantum optics, and wearable medical devices, higher requirements are placed on the alignment accuracy and dynamic adaptability between optical modules and coupled optical fibers. For example, it is necessary to deal with submicron-level optical path offsets caused by factors such as mechanical vibration, thermal expansion, and assembly tolerances during packaging, in order to reduce coupling loss and ensure stable system operation.

[0027] Optical path compensation technology, as a core means to solve packaging offset problems, has undergone an evolution from traditional analytical models to data-driven methods. Early methods relied on analytical models based on geometric optics theory (such as RTM) to achieve static compensation. Subsequently, with the rise of machine learning technology, data-driven neural network methods began to be used for fitting and predicting complex offsets. However, both types of methods have insurmountable technical bottlenecks and cannot meet the demands of dynamic, high-precision, and high-reliability industrial applications.

[0028] The RTM method uses geometric optics theory to abstract the optical parameters (focal length, refractive index, spacing, etc.) of each optical element (such as lens, mirror, etc.) in an optical system into matrix parameters. The matrix parameters of each element are multiplied together to obtain the overall transmission matrix of the system. The adjustment amount corresponding to the optical path offset is calculated by solving the transmission matrix, and then the actuator is driven to complete the optical path calibration. However, this method is suitable for static optical systems with known parameters and no complex disturbances, and has the following defects: (1) Poor adaptability and strong dependence on optical parameters. The parameters of all optical elements need to be accurately measured in advance to establish a fixed matrix model. In actual applications, nonlinear disturbances such as thermal deformation and mechanical stress will cause dynamic changes in the element parameters, which cannot be covered by the fixed matrix model, thus producing significant prediction deviations. (2) Lack of dynamic compensation capability: The model is based on the static geometric optics assumption and is only suitable for scenarios without dynamic offsets. It cannot respond to high-frequency disturbances in real time, such as kHz-level mechanical vibrations. (3) Nonlinear disturbances cannot be modeled: For complex nonlinear offsets generated during the packaging process, linear operations of matrix multiplication alone cannot accurately describe them, and the compensation accuracy is limited.

[0029] The compensation method based on neural networks collects a large amount of sample data, trains deep neural networks (such as fully connected networks and convolutional neural networks), learns the nonlinear mapping relationship between the two, and outputs compensation information. However, this method has the following defects: (1) Physical unreliability: The network training only takes the data fitting error as the target and does not incorporate the constraints of optical propagation laws. The prediction results may violate physical laws such as the law of conservation of energy and the law of beam propagation. Especially when the training data is insufficient or the data is abnormal, the compensation results will have serious deviations. (2) Poor generalization ability: It is highly dependent on the distribution of training data. When the actual disturbance exceeds the coverage of the training data, the compensation accuracy drops sharply and cannot adapt to the complex and ever-changing industrial environment. (3) Insufficient real-time performance: Most of them adopt a fully connected network architecture, which has high model complexity and slow inference speed, making it difficult to meet the dynamic compensation requirements of microsecond-level response.

[0030] In addition, related technologies can compensate through iterative feedback. This method collects coupling loss signals in real time through photodetectors and compares them with preset thresholds. If the threshold is exceeded, the actuator is driven to make small step adjustments, collect signals again, and judge. The iteration cycle continues until the coupling loss is reduced to the allowable range. This method achieves dynamic compensation through closed-loop iteration, without the need for complex modeling, and is suitable for simple offset scenarios. However, this method has the following drawbacks: (1) Slow response speed: The iterative process relies on a cycle of detection, adjustment, and re-detection. The response speed is limited by the bandwidth of the mechanical actuator and the detection cycle, making it difficult to cope with kHz-level high-frequency disturbances. (2) Limited compensation accuracy: In order to avoid iterative oscillation, the adjustment step size is usually set to be large, which cannot achieve nanometer-level high-precision alignment. (3) Weak anti-interference ability: In scenarios with multiple sources of disturbance (such as simultaneous vibration and thermal drift), the iterative direction is easily disturbed, resulting in slow convergence or even divergence of the compensation process.

[0031] Therefore, this application provides a training method for an offset compensation model of an optical module and an offset compensation method. In this embodiment, by employing a physical information neural network and using optical path offset information as input to train the physical information neural network, the dependence on precise optical parameters during actual compensation is overcome, achieving effective compensation for nonlinear disturbances such as thermal deformation and mechanical stress, and solving the problem of insufficient adaptability of traditional RTM analytical models. During training, physical constraints such as differences in physical optical paths and differences in optical power loss based on optical path offset information are utilized. This not only solves the problems of insufficient fusion of physical constraints and poor hardware adaptability in dynamic optical path compensation of existing physical information neural network technologies, but also ensures that the output results of the physical information neural network conform to the laws of beam propagation and energy conservation, solving the problem of physical unreliability of pure data-driven methods; even when training data is insufficient or abnormal, the output results can still remain stable and reliable. In addition, since the optical path offset information used is a time-series optical offset, the trained offset compensation model can also achieve kilohertz-level closed-loop control, meeting the microsecond-level response requirements of high-frequency disturbances, and solving the problem of insufficient real-time performance in dynamic compensation.

[0032] In summary, this application utilizes the differences in physical optical paths and optical power loss that conform to physical laws for model training, enabling the trained offset compensation model to output reliable compensation information that is unaffected by interference factors under the constraints of physical laws. This solves the technical problems of inaccurate compensation effect, poor hardware adaptability, and weak anti-interference ability, and achieves the technical effect of improving compensation effect, hardware adaptability, and anti-interference ability.

[0033] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. The specific application environment architecture or specific hardware architecture on which the training method of the optical module offset compensation model and the execution of the offset compensation method depend will be described here.

[0034] Figure 1 An exemplary system architecture is shown, illustrating a training method and an offset compensation method for an optical module that can be applied according to embodiments of this application. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this application, in order to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.

[0035] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software, etc. (for example only).

[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0039] It should be noted that the training method and offset compensation method of the optical module offset compensation model provided in this application embodiment can generally be executed by server 105. Correspondingly, the training device and offset compensation device of the optical module offset compensation model provided in this application embodiment can generally be set up in server 105 and / or a server or server cluster communicating with server 105. Correspondingly, the training device and offset compensation device of the optical module offset compensation model provided in this application embodiment can also be set up in a server or server cluster different from server 105 and / or server 105 communicating with it. Alternatively, the training method and offset compensation method of the optical module offset compensation model provided in this application embodiment can also be executed by the first terminal device 101, the second terminal device 102, and the third terminal device 103. Correspondingly, the training device and offset compensation device of the optical module offset compensation model provided in this application embodiment can also be set up in the first terminal device 101, the second terminal device 102, and the third terminal device 103.

[0040] For example, a user can input optical path offset information through any one of the first terminal device 101, the second terminal device 102, or the third terminal device 103 (e.g., the first terminal device 101, but not limited thereto). The server 105 obtains the optical path offset information through communication with the terminal devices and trains the model to obtain a trained offset compensation model. Alternatively, the user can directly obtain the optical path offset information and train the model through any one of the first terminal device 101, the second terminal device 102, or the third terminal device 103 to obtain a trained offset compensation model.

[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0042] The embodiments of this application provide a training method and an offset compensation method for an optical module offset compensation model. The methods are described in detail below, taking into account the execution flow of the training method and the offset compensation method for the optical module offset compensation model.

[0043] Figure 2 A flowchart illustrating a training method for an offset compensation model of an optical module according to an embodiment of this application is shown. Figure 2 As shown, the method includes operations S210~S230.

[0044] In operation S210, optical path offset information is acquired. The optical path offset information includes the optical path offset between the optical module and the coupled optical fiber at multiple time points. The optical path offset characterizes the offset of the photosensitive end face of the optical module relative to the end face of the optical fiber.

[0045] In operation S220, the optical path offset information is input into the physical information neural network to be trained and the first compensation information is output, wherein the first compensation information is used to compensate for the optical path offset information.

[0046] In operation S230, the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information are used to train the physical information neural network to obtain the offset compensation model.

[0047] An optical module refers to a module within an electronic device that performs photoelectric signal conversion. For example, an optical module can be an internal module of a server that performs high-speed electrical signal to optical signal conversion, used to complete large-volume data exchange between the server and a switch, or between servers. Optical fiber is a transmission path used to guide optical signals into the optical module or to transmit the optical signals output by the optical module to external devices. These external devices can be devices located outside the optical module, other modules within the server, or other devices outside the server.

[0048] The effective light-emitting and photosensitive areas inside the optical module are extremely small; these areas can be collectively referred to as the photosensitive end face of the optical module. The fiber end face refers to the vertical cross-section of the optical fiber after it has been cut and polished, that is, the flat cut surfaces at both ends of the fiber. Optical path offset can be understood as the physical offset between the photosensitive end face and the fiber end face. For example, optical path offset can include lateral positional offset, such as offset along the x and y axes, and can also include angular offset. In other embodiments, optical path offset can also include optical power loss due to physical offset. For example, optical path offset information can include physical offset information and optical power loss information at multiple moments.

[0049] To ensure that the optical signal emitted by the optical module is coupled into the optical fiber to the maximum extent, or that all the optical signal transmitted from the optical fiber falls on the photosensitive area of ​​the optical module, the end face of the optical fiber and the photosensitive end face of the optical module need to be precisely aligned. However, in the actual production, assembly, and application of equipment, due to various factors such as the accumulated stress of inserting and removing the optical module, fiber tension, and ambient temperature, optical path misalignment may occur between the optical module and the optical fiber. To ensure the normal operation of electronic devices such as servers, this optical path misalignment needs to be compensated for during server packaging or daily use.

[0050] In the embodiments of this application, the optical path offset between the photosensitive end face and the optical fiber end face of the optical module is typically not a fixed value. For example, factors such as temperature, stress, and adhesive aging drift slowly over time, causing the aforementioned optical path offset to change over time. Furthermore, in complex environments, the aforementioned optical path offset will also differ depending on the disturbances such as vibration and temperature at different times. Therefore, the optical path offset information used for training the model includes the optical path drift at multiple time points.

[0051] For example, for perturbations at the kilohertz (kHz) level, optical path offset information can be obtained by sampling at a perturbation frequency of 1 kHz. Alternatively, optical path offset information can be obtained by sampling at a perturbation frequency of 1 megahertz (MHz) to meet the timing acquisition requirements at multiple time points. Then, kilohertz-level data is used for calculation. For instance, optical path drift information includes optical path offsets at 100 time points acquired within a 100 ms sliding window.

[0052] Physics-Informed Neural Network (PINN) is a type of deep learning method that embeds physical laws into the neural network training process, enabling the model to satisfy physical laws while fitting data.

[0053] The first compensation information can be physical offset compensation corresponding to the optical path offset information. For example, the first compensation information can be position compensation, such as offset compensation along the x, y, and z axes, or offset compensation along the x, y, and angle axes. Optical path offset information, indicating what kind of optical path offset exists between the current optical module and the optical fiber, can be input into the physical information neural network to be trained. This allows the physical information neural network to learn how to compensate for various optical path offsets and output the first compensation information, thus compensating for the optical path offset information.

[0054] In this process, a target loss function based on physical constraints can be constructed, and PINN can be trained using the target loss function until the training is completed to obtain a trained offset compensation model. The trained offset compensation module can output the first compensation information for compensation based on the optical path offset information in various scenarios.

[0055] In this embodiment, the physical constraints upon which the target loss function is based include physical optical path differences and optical power loss differences. Optical power loss difference refers to the difference between the actual measured optical power loss during transmission of the optical signal in the optical path before and after compensation and the theoretically calculated optical power loss (also known as predicted optical power loss). Physical optical path differences are the deviation between the physical offset of the actual optical path after compensation and the physical offset under ideal alignment. Introducing these two physical constraints into the target loss function ensures that PINN consistently conforms to the actual beam propagation law and energy conservation law of the optical module and fiber coupling during training. For the physical offset of the actual optical path, it can be obtained by compensating for the optical path offset information using the first compensation information; for the physical offset under ideal alignment, it can be calculated using a method conforming to the beam propagation law.

[0056] For example, the second compensation information can be determined based on the optical parameters of the optical module, and the second compensation information can be used to obtain the optical characteristics of the optical module, which may include focal length, refractive index, spacing, etc.

[0057] In this embodiment, by employing a physical information neural network (PIMNN) and using optical path offset information as input to train the PIMNN, the dependence on precise optical parameters during actual compensation is overcome, achieving effective compensation for nonlinear disturbances such as thermal deformation and mechanical stress, thus solving the problem of insufficient adaptability of traditional RTM analytical models. During training, physical constraints such as differences in physical optical paths and differences in optical power loss based on optical path offset information are utilized. This not only solves the problems of insufficient fusion of physical constraints and poor hardware adaptability in dynamic optical path compensation of existing PIMNN technologies, but also ensures that the output results of the PIMNN conform to the laws of beam propagation and energy conservation, solving the problem of physical unreliability of pure data-driven methods; even when training data is insufficient or abnormal, the output results remain stable and reliable. Furthermore, since the optical path offset information used is a time-series optical offset, the trained offset compensation model can also achieve kilohertz-level closed-loop control, meeting the microsecond-level response requirements of high-frequency disturbances and solving the problem of insufficient real-time performance in dynamic compensation.

[0058] According to an embodiment of this application, a physical information neural network is trained using the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, to obtain an offset compensation model. This includes: weighted summing of the physical optical path difference and the optical power loss difference for the optical path offset information to obtain a target loss function value; using the target loss function value to iteratively update the parameters of the physical information neural network for at least one round until the updated physical information neural network meets the training stopping condition, and using the updated physical information neural network as the offset compensation model.

[0059] In some embodiments, the target loss function of PINN can be the sum of the physical optical path difference and the optical power loss difference for optical path offset information, that is, the weights of both are 0.5 or 1, and the weights of the two are equal.

[0060] In other embodiments, the weights of the physical optical path differences and optical power loss differences can be determined according to the actual situation. For example, the target loss function of PINN can be expressed by the following formula (1):

[0061] (1)

[0062] Where L represents the objective loss function, This indicates the difference in optical power loss. Represents the difference in physical optical paths, weights and These represent the weights corresponding to differences in optical power loss and physical optical path, respectively. For example, the weights... and The weights can be predetermined based on the actual situation, which is called static weights. Alternatively, the weights... and It can also be a dynamic weight, where the weight value changes with the actual values ​​of physical optical path differences and optical power loss differences.

[0063] Since the optical path offset information includes the optical path offset at multiple moments, it can be considered a function related to time t, such as... ,but, and These are all functions related to time t; correspondingly, the target loss function L can also be considered a function related to time t. In summary, the target loss function can be considered a function related to t, and the target loss function value at each time point can be obtained by weighted summation of the physical optical path differences and optical power loss differences. In other embodiments, if the values ​​of the weights change with the actual values ​​of the physical optical path differences and optical power loss differences, since... and All are related to time t, so the weights and It can also change with time t. In this case, the target loss function is still a function related to t, and the target loss function value at each time step can be obtained by weighting and summing the differences in physical optical path and optical power loss at each time step using dynamic weights at each time step.

[0064] After obtaining the target loss function value, various optimization algorithms can be used to calculate the gradient of the target loss function value relative to the parameters in PINN, and the PINN parameters can be updated based on the gradient. This updated PINN parameter is then used to obtain an updated PINN. The PINN parameters can refer to the network parameters of each module layer in the PINN architecture.

[0065] In this embodiment, the training stopping condition may include at least one of the following: the target loss function value is lower than a set threshold, the target loss function value converges, or the maximum number of training rounds is reached. Typically, multiple rounds of updates (i.e., multiple rounds of training on the PINN) are used, and the updated PINN satisfies at least one of the above training stopping conditions. The PINN obtained in the last round of updates can be used as a trained offset compensation model for subsequent actual optical path offset compensation.

[0066] It is understandable that, since the optical path offset information includes multiple moments, multiple iterations can be achieved by using the optical path offset at different moments. For example, the optical path offset information collected in multiple sliding windows can be regarded as training data in different batches, so as to use different training data to achieve multiple rounds of training for PINN.

[0067] In the embodiments of this application, the target loss function value is obtained by weighted summation of the physical optical path difference and the optical power loss difference, and the offset compensation model is trained using the target loss function value. This allows the trained offset compensation model to simultaneously take into account the optical path propagation at the physical level and the power attenuation characteristics of the actual acquired signal, avoiding model bias caused by a single loss constraint, improving the accuracy of the offset compensation model in predicting the actual optical path offset, and improving the accuracy of the offset compensation model in compensating for the actual optical path offset information.

[0068] As stated above, the weights corresponding to the differences in optical power loss and physical optical path in the target loss function are... and Both can be dynamic weights. According to one embodiment of this application, the target loss function of the physical information neural network includes a first dynamic weight corresponding to the difference in physical optical path and a second dynamic weight corresponding to the difference in optical power loss. In this embodiment, It can be the first dynamic weight. It can be a second dynamic weight.

[0069] The target loss function value is obtained by weighted summation of the physical optical path difference and the optical power loss difference based on the optical path offset information. This includes: determining the first weight value of the first dynamic weight and the second weight value of the second dynamic weight based on the physical optical path difference and the optical power loss difference at multiple time points; and determining the target loss function value by using the product between the first weight value and the physical optical path difference, and the product between the second weight value and the optical power loss difference.

[0070] Considering that the optical signal transmitted between the optical module and the coupled optical fiber may be subject to real-time disturbances—for example, a sudden mechanical vibration of the optical module at a certain moment may cause a significant difference in the target loss function value at that moment compared to the target loss function value at other moments—a first weight value for the first dynamic weight and a second weight value for the second dynamic weight can be determined based on the differences in physical optical path and optical power loss at multiple moments. This allows the random fluctuations in the magnitude of the error caused by the input optical path offset information at a single moment to be smoothed out by utilizing the differences in physical optical path and optical power loss at multiple moments.

[0071] For example, multiple moments can be 100 moments within a 100ms sliding window, so as to use optical path offset information at a level greater than 1kHz (data is collected once every 1ms) to balance the disturbance at a single moment, thereby enabling the trained offset compensation model to achieve dynamic disturbance rejection at the 1kHz level.

[0072] For example, given the first weight value of the first dynamic weight and the second weight value of the second dynamic weight, the target loss function value can be calculated according to the above formula (1).

[0073] In the embodiments of this application, by employing a first dynamic weight and a second dynamic weight, and by using a weighted summation of the first dynamic weight and the second dynamic weight, the target loss function value is obtained. This allows the target loss function value to dynamically adjust the weights of the two based on the real-time physical optical path differences and optical power loss performance, thereby achieving a dynamic balance between the two. This results in an offset compensation model that can balance the beam propagation law and the energy conservation law, and improves the robustness of the offset compensation model.

[0074] According to an embodiment of this application, determining a first weight value of a first dynamic weight and a second weight value of a second dynamic weight based on the physical optical path differences and optical power loss differences at multiple times includes: determining an average physical optical path difference and an average optical power loss difference based on the physical optical path differences and optical power loss differences at multiple times; when the average physical optical path difference is greater than a target dynamic threshold, increasing the current weight value of the first dynamic weight to the first weight value and decreasing the current weight value of the second dynamic weight to the second weight value; wherein the target dynamic threshold is determined based on the average optical power loss difference.

[0075] To address physical optical path differences, the differences at multiple time points can be summed, and then the total physical optical path difference can be divided by the number of differences to obtain the average physical optical path difference. Similarly, to address optical power loss differences, the differences at multiple time points can be summed, and then the total optical power loss difference can be divided by the number of differences to obtain the average optical power loss difference. For example, using 100 time points acquired within a 100ms sliding window, the 100 physical optical path differences can be summed and divided by 100 to obtain the average physical optical path difference; similarly, the 100 optical power loss differences can be summed and divided by 100 to obtain the average optical power loss difference.

[0076] In this embodiment, the period of 1kHz data acquisition is 1ms, and the 100ms sliding window contains exactly 100 closed-loop data. Thus, the average physical optical path difference and the average optical power loss difference within the sliding window can both be derived from the 1kHz sampling data. Furthermore, the sliding rhythm of the sliding window follows the 1kHz closed-loop beat, thereby enabling the data construction and weight adjustment during the model training process to meet the kHz-level perturbation.

[0077] Since the average physical optical path difference and the average optical power loss difference are calculated using optical path offset information from multiple consecutive moments within a sliding window, they can represent the overall level of disturbance within the sliding window. A first weight value and a second weight value can be determined based on their relative difference to balance the physical constraints of both. For example, the physical optical path difference can be strengthened during sudden disturbances, while the optical power loss difference can be improved when there is no disturbance or the data is reliable.

[0078] Considering that a sudden disturbance at a certain moment can cause a sudden increase in the physical optical path difference, leading to a sudden change in the average physical optical path difference, a first weight value and a second weight value can be determined by comparing the average physical optical path difference and the average optical power loss difference. Before the comparison, the average optical power loss difference can be amplified to obtain a target dynamic threshold, thus avoiding the influence of small or regular disturbances on the first and second weight values.

[0079] For example, the comparison relationship between the average physical optical path difference and the target dynamic threshold can be followed by the following formula (2):

[0080] (2)

[0081] in, This represents the average physical optical path difference. This indicates the difference in average optical power loss. This represents a weighting adjustment factor used to account for differences in average optical power loss. Magnification is performed to obtain the target dynamic threshold. .For example, It can be 1.5.

[0082] In this embodiment, if the average physical optical path difference is greater than the target dynamic threshold, it indicates the presence of a sudden disturbance. The current weight value of the first dynamic weight can be increased to the first weight value, and the current weight value of the second dynamic weight can be decreased to the second weight value, thereby reinforcing the physical optical path difference through the first and second weight values ​​during sudden disturbances. Conversely, if the average physical optical path difference is less than or equal to the target dynamic threshold, the current weight values ​​of the first and second dynamic weights can be used for weighted calculation to obtain the aforementioned target loss function value. The current weight values ​​of the first and second dynamic weights can be the weights from the previous training batch, or they can be their respective initial weights, such as both being 0.5.

[0083] The comparison between the target dynamic threshold and the average physical optical path difference only triggers the dynamic adjustment of weights, without continuous fine-tuning, to prevent weight oscillation.

[0084] In one specific embodiment, the first dynamic weight can be increased and / or the second dynamic weight can be decreased according to a pre-set step adjustment method, such as increasing and / or decreasing the weight value by 0.1 each time.

[0085] In this embodiment, after determining the target dynamic threshold based on the difference in average optical power loss, the first dynamic weight and the second dynamic weight are selectively and directionally adjusted based on the relationship between the difference in average physical optical path and the target dynamic threshold. This improves the model's ability to resist disturbances during training, enabling the finally trained offset compensation model to adapt to various sudden disturbances in actual optical transmission scenarios and improving the accuracy and stability of the offset compensation model during subsequent offset compensation.

[0086] Furthermore, the weights are dynamically adjusted based on the average error within a 100ms sliding window to meet the microsecond-level response requirements of 1kHz-level high-frequency disturbances and solve the problem of insufficient real-time performance of dynamic compensation.

[0087] Figure 3 A flowchart illustrating the updating of a physical information neural network using the target loss function value according to an embodiment of this application is shown. Figure 3 As shown, after calculating the optical power loss difference 301 and the physical optical path difference 302, operation S303 can be executed to calculate the average physical optical path difference and the average optical power loss difference over a 100ms sliding window.

[0088] Then, operation S304 is executed to determine whether to update the weights. As mentioned above, the average physical optical path difference can be compared with the target dynamic threshold. If the average physical optical path difference is greater than the target dynamic threshold, the first dynamic weight and the second dynamic weight need to be updated. Operation S305 is executed to dynamically update the first dynamic weight and the second dynamic weight. Then, operation S306 is executed to obtain the target loss function value based on the weighted sum of the physical optical path difference and the first dynamic weight, the optical power loss difference, and the weighted sum of the second dynamic weight. After that, operation S307 is executed to optimize the parameters of the physical information neural network.

[0089] Conversely, if the average physical optical path difference is less than or equal to the target dynamic threshold, the first dynamic weight and the second dynamic weight need to be updated. Then, operation S305 is skipped and operations S306 and S307 are executed in sequence. That is, the target loss function value is calculated without updating the first dynamic weight and the second dynamic weight.

[0090] According to an embodiment of this application, the method further includes: updating the first weight value to the upper limit threshold when the first weight value is greater than the upper limit threshold; and updating the second weight value to the lower limit threshold when the second weight value is less than the lower limit threshold, wherein the upper limit threshold is greater than the lower limit threshold.

[0091] The upper and lower thresholds can be determined based on the actual situation. For example, the upper threshold could be 0.8, and the lower threshold could be 0.2. If the first weight value is greater than the upper threshold, it is updated to the upper threshold; conversely, if the first weight value is less than the lower threshold, it is updated to the lower threshold. If the second weight value is less than the lower threshold, it is updated to the lower threshold; if the second weight value is greater than the upper threshold, it is updated to the upper threshold.

[0092] In this embodiment, when dynamically adjusting the first dynamic weight and the second dynamic weight, upper and lower thresholds are further used to constrain the weight values ​​of the first dynamic weight and the second dynamic weight, so as to avoid the target loss function value being greatly affected by a single constraint due to a large difference between the first dynamic weight and the second dynamic weight.

[0093] According to an embodiment of this application, the physical optical path difference is determined as follows: the optical path offset information is compensated using first compensation information to obtain first beam position information; the preset ideal beam position is compensated using second compensation information to obtain second beam position information; and the distance between the first beam position information and the second beam position information is taken as the physical optical path difference.

[0094] The first compensation information can be location compensation, such as, first compensation information The form can be seen in the following formula (3):

[0095] (3)

[0096] in, These represent the compensation amounts used to compensate for the horizontal x-axis and y-axis positional offsets at time t, respectively, and are expressed in nanometers (nm). The compensation amount is used to compensate for the angular offset at time t, and the unit is microradians (μrad). T represents transpose.

[0097] The optical path offset information can include offsets relative to the x-axis, y-axis, and angle; therefore, the first compensation information can be... Applying the optical path offset information, the compensated first beam position information is obtained. It can be understood that the spot position of the beam output from the optical fiber in the light-emitting area of ​​the optical module can be used as the beam position information. The aforementioned optical path offset information is the optical path offset of the spot position of the beam output from the optical fiber relative to the photosensitive end face in the optical module. The first beam position information is also the physical offset of the actual compensated beam position.

[0098] The ideal beam position can be considered as the position of the beam spot on the photosensitive end face under conditions of no disturbance or other external factors. For example, the ideal beam position r0 is usually the center position of the photosensitive end face. The second compensation information can be considered as the inherent offset caused by the optical parameters of the optical module. By using the second compensation information to compensate for the ideal beam position r0, the second beam position information can be obtained, which is the physical offset under ideal alignment conditions. Then, the distance between the first beam position information and the second beam position information can be calculated, and this distance can be used as the physical optical path difference.

[0099] For example, the position information of the second beam can be determined by the following formula (4), and the difference in physical optical path can be determined by the following formula (5):

[0100] (4)

[0101] (5)

[0102] in, and These represent the position vectors corresponding to the position information of the first beam and the position information of the second beam, respectively, with units of micrometers (μm). This indicates the second compensation information. Indicates the ideal beam position. The distance between the first beam position information and the second beam position information is represented by the L2 norm function, with units of μm². In this embodiment, the physical optical path difference is also called the physical residual, which characterizes the deviation between the physical offset after compensation using the predicted first compensation information and the physical offset of the actual optical path obtained based on the beam propagation law.

[0103] In this embodiment, the ideal beam position is compensated by the second compensation information determined based on the beam propagation law, and the second beam position information used as a reference is obtained. Then, the physical optical path difference is calculated based on the first beam position information and the second beam position obtained from the PINN output. The physical constraints that conform to the beam propagation law can be directly used for model training, ensuring that the first compensation information output by the model does not violate the beam propagation law. This avoids the model only learning the data distribution and producing prediction results that violate the basic beam propagation law. As a result, the model finally trained can be directly applied to the offset compensation task in the actual operation of the optical module without the need for hardware adjustment equipment adaptation.

[0104] Figure 4 A data flow diagram illustrating the determination of physical optical path differences according to embodiments of this application is shown. For example... Figure 4 As shown, the first beam position information 402 is obtained by compensating the optical path offset information using the first compensation information 401, and the second beam position information 403 is obtained by compensating the preset ideal beam position using the second compensation information. Operation S404 is then performed to calculate the Euclidean distance based on the first beam position information 402 and the second beam position information 403. The calculated Euclidean distance is used as the physical optical path difference 302.

[0105] According to an embodiment of this application, the optical module includes multiple optical elements, and the second compensation information is determined by converting the optical parameters of each optical element in the optical module into a transmission matrix; multiplying the transmission matrices of each optical element according to the order of the multiple optical elements in the optical path to obtain the second compensation information.

[0106] To achieve photoelectric signal conversion, an optical module can include multiple optical components. These components may include lenses, electro-optic modulators (EOMs) and their internal micro-ring modulators (MRMs), fiber array units (FAUs) of optical fibers, photodetectors (PDs), etc. The optical parameters of each component can be the same or different, but they can all be constructed as a 2×2 transmission matrix as shown in formula (6). Taking a lens as an example, its optical parameters include a focal length of f, and its transmission matrix is ​​shown in formula (7):

[0107] (6)

[0108] (7)

[0109] in, , , , Representing the i-th optical element The optical parameters for the lens Its optical parameters include only the focal length f.

[0110] For the optical path from the optical fiber to the optical module, multiple optical elements are arranged sequentially and propagate the beam sequentially. Therefore, the transmission matrices of each optical element can be multiplied according to their order in the optical path to obtain the second compensation information. It can be determined according to formula (8):

[0111] (8)

[0112] in, This represents the transmission matrix of the Nth optical element in the optical path. Other parameters can be found in the explanations above.

[0113] In the embodiments of this application, the transmission matrices of each optical element in the entire optical system, including the optical module and the coupled optical fiber, are multiplied together to construct the second compensation information based on the system-level RTM model. Thus, the second compensation information can be utilized. The physical offset of the actual optical path is calculated from the ideal beam position, providing a benchmark for subsequent physical constraints.

[0114] Figure 5 A data flow diagram illustrating the determination of the second beam position according to an embodiment of this application is shown. Figure 5 As shown, the optical parameters 501 of the optical elements in the optical module are converted into the transmission matrix 502 of a single optical element. Then, operation S503 is performed to obtain the second compensation information obtained by multiplying multiple optical elements in the optical system. Afterwards, the ideal beam position 504 is compensated using the second compensation information to obtain the second beam position information 403.

[0115] According to an embodiment of this application, the optical path offset information includes physical offset information and optical power loss information; the optical power loss difference of the optical path offset information is determined in the following way: the position information of the first beam is calculated based on the fiber mode field to obtain the predicted optical power loss information; and the difference between the predicted optical power loss information and the optical power loss information is taken as the optical power loss difference.

[0116] The fiber mode field refers to the spatial distribution of electromagnetic field energy on the end face of an optical fiber when a beam propagates through it. For example, under the weak conduction approximation, the spatial distribution of the fundamental mode in a single-mode fiber is similar to the intensity distribution of a Gaussian beam. Therefore, the coupling efficiency of the fiber mode field in a single-mode fiber can be equivalent to the coupling efficiency model of a Gaussian beam.

[0117] For example, the offset between the first beam position information and the ideal beam position can be calculated. Based on the mode field radius relative to the fiber mode field, the offset between the first beam position information and the ideal beam position, the coupling efficiency of the Gaussian beam coupling efficiency model is calculated, and the calculated coupling efficiency is converted into predicted optical power loss information through a logarithmic function.

[0118] The difference between the predicted optical power loss information and the actual detected optical power loss information can be used to obtain the difference in optical power loss under the corresponding optical path offset. Considering that the optical power loss information may be caused by the two lateral offsets of the x-axis and y-axis, the L2 norm of the two can be solved according to the following formula (9) to obtain the difference in optical power loss:

[0119] (9)

[0120] in, It represents the difference in optical power loss, expressed in the square of decibels (dB). This represents the predicted optical power loss information at time t. This refers to the optical power loss information in the optical path offset information, all in dB.

[0121] In this embodiment, the difference in optical power loss that is reliable in the data dimension and satisfies the law of energy conservation can be directly calculated using the position information of the first beam, so that the difference can be used to train the model.

[0122] In one specific embodiment, the optical path offset information includes physical offset information and optical power loss information, wherein the optical path offset information... This can be expressed by the following formula (10):

[0123] (10)

[0124] in, This represents the optical power loss information at time t, and the physical offset information includes the positional offset at time t. and and angular offset .

[0125] According to an embodiment of this application, the method further includes: processing the beam position information acquired by the photodetector to obtain physical offset information; and using the loss value acquired by the optical power meter at the time of acquiring the beam position information as optical power loss information.

[0126] A photodetector is used to acquire the position information of a light beam output from an optical fiber. The lateral position offset is calculated from the beam position information using a centroid algorithm. and The angular offset was derived by calculating the beam position information using the differential signal detection method. Or directly based on the horizontal position offset and The angular offset is determined by the ratio of the distance between the lens and the photosensitive end face in the optical module. The photodetector used to acquire beam position information can be a quadrant photodetector (QPD).

[0127] An optical power meter is used to simultaneously detect the optical power loss value with a photodetector, and uses the loss value at the same time t as the physical offset information as the optical power loss information. .

[0128] Figure 6 A data flow diagram illustrating the determination of optical path offset information according to an embodiment of this application is shown. For example... Figure 6 As shown, operation S602 can be performed using the quadrant photodetector 601 to acquire beam position information. Then, based on the acquired beam position information, operation S603 (centroid algorithm) is performed to calculate the lateral position offset, and operation S604 (differential detection method) is performed to derive the angular offset. Simultaneously, operation S606 can be performed using the optical power meter 605 to acquire optical power loss information. Afterwards, based on the information obtained from operations S603, S604, and S606, operation S607 is performed to construct optical path offset information.

[0129] In the embodiments of this application, a photodetector (sampling frequency 1MHz) is used to collect beam position information and simultaneously acquire optical power loss information of the optical power meter. This allows for the acquisition of time input vectors (such as optical path offset information) at multiple moments, ensuring the synchronicity and high frequency of signal acquisition while facilitating subsequent PINN training.

[0130] According to an embodiment of this application, the physical information neural network includes: an encoder for extracting features from input optical path offset information to obtain intermediate features; and a multilayer perceptron for regressing the intermediate features to obtain first compensation information.

[0131] For example, the encoder can use a multi-layer Transformer encoder to extract features from the physical offset information and optical power loss information in the optical path offset information to obtain intermediate features. The multi-layer perceptron (MLP) can perform regression calculation on the extracted intermediate features to obtain the first compensation information u(t) in the above formula (3).

[0132] Figure 7 A data flow diagram illustrating the first compensation information obtained according to an embodiment of this application is shown. Figure 7 As shown, operations S701 to S706 are executed sequentially. In operation S701, optical path offset information is input; in operation S702, the encoder is input; in operation S703, feature extraction is performed through a multi-head self-attention mechanism; in operation S704, 256-dimensional intermediate features are obtained; in operation S705, the 3-layer multilayer perceptron is input for regression; in operation S706, the first compensation information is output.

[0133] For example, the optical path offset information of formula (10) can be used. Input PINN. PINN can contain a 3-layer Transformer encoder. Each Transformer encoder uses a multi-head (e.g., 8-head) self-attention mechanism to extract the time-varying features of physical offset and optical power loss information, as well as the long-term dependency between them, resulting in a 256-dimensional intermediate feature z(t). The intermediate feature z(t) is then input into a 3-layer MLP for regression calculation. The 3-layer MLP sequentially regresses the feature from 256 dimensions to 128 dimensions, then from 128 dimensions to 64 dimensions, and finally from 64 dimensions to 3 dimensions, ultimately outputting the first compensation information u(t) used to achieve three-axis adjustment. The activation function of the MLP can be Leaky ReLU.

[0134] In the embodiments of this application, by combining a simple PINN structure with the physical optical path difference and optical power prediction difference mentioned above, high-precision, accurate, and fast offset compensation between the optical module and the coupled optical fiber can be achieved.

[0135] According to embodiments of this application, the Transformer encoder and the differentiable computation layer for calculating the second compensation information can be integrated into a unified acceleration architecture, enabling parallel processing of the second compensation information through a customized processor core. For example, an intellectual property core (IP core) can be set up in a Field Programmable Gate Array (FPGA) to calculate the second compensation information. In this architecture, the IP core and tensor operations in PINN share memory bandwidth. Thus, during PINN training, the laws of optical propagation and the law of energy conservation can become intrinsic constraints of the network, rather than external verification tools, solving the problem of the "two-layer" separation between the physical model and the data-driven module in traditional technologies.

[0136] In fields such as autonomous driving and other areas where optical parameters are designed, the optical module can also be a device such as a lidar, and offset compensation can be achieved through the embodiments of this application. The physical constraints can be extended to an atmospheric scattering model of laser transmission, and the input of PINN can include environmental humidity, visibility monitoring values, etc. The displacement device can be adapted to the mirror adjustment requirements of lidar to compensate for ranging errors caused by complex outdoor environments.

[0137] Figure 8 A flowchart illustrating an offset compensation method for an optical module according to an embodiment of this application is shown. Figure 8 As shown, the method 800 includes operations S810 to S830.

[0138] The S810 is used to obtain the target optical path offset information between the optical module and the optical fiber.

[0139] When operating the S820, the target optical path offset information is input into the offset compensation model to obtain the target compensation information.

[0140] When operating S830, the displacement device is controlled to adjust the position of the optical module based on the target compensation information in order to compensate for the target optical path offset information.

[0141] The offset compensation model was trained using the same training method as the offset compensation model of the aforementioned optical module, and will not be elaborated further here.

[0142] The target optical path offset information can be acquired at least at the moment when the optical module is coupled to the optical fiber, or at least at the moment during the operation of the optical module and the optical fiber. Similar to the optical path offset information in the training phase, which serves as input for the PINN training phase, the target optical path offset information can be considered as input for the PINN application phase.

[0143] The target compensation information can be the output of the PINN application phase, which is similar to the first compensation information output of the PINN training phase, and will not be elaborated here.

[0144] The displacement device can be a three-axis displacement device, used to adjust the position information of the optical module based on the target compensation information, so as to offset the target physical offset information in the target optical path offset information, and realize the compensation of the optical path offset information using the target compensation information. For example, similar to the above formula (3), the displacement device can be a three-axis displacement device with x-axis, y-axis and angle, used to perform targeted compensation of the target physical offset information in the target optical path offset information according to the target compensation information.

[0145] In the embodiments of this application, since a physical information neural network is used and the PINN is trained using physical optical path differences and optical power loss differences, the offset compensation model trained based on PINN can directly and once output target compensation information that conforms to physical laws according to the target optical path offset information. This allows the target compensation information to be directly adapted to the displacement device used for optical path compensation, and ensures the accuracy, anti-interference and speed of the target compensation information, avoiding the slow response speed caused by iterative alignment compensation.

[0146] According to an embodiment of this application, the position of the optical module is adjusted by the displacement device based on the target compensation information to compensate for the target optical path offset information. This includes: converting the target compensation information into a driving voltage for the displacement device; and controlling the displacement device to perform hysteresis compensation on the position of the optical module through the driving voltage to compensate for the target optical path offset information.

[0147] The displacement device can be a voltage-driven displacement device, such as a displacement device based on piezoelectric ceramics. Therefore, the target compensation information can be converted into a driving voltage, and then the driving voltage can be used to control the displacement device to perform hysteresis compensation on the position of the optical module, so as to compensate for the target optical path offset information.

[0148] Because voltage-driven displacement devices such as piezoelectric ceramics exhibit a certain hysteresis in response to changes in the driving voltage, the relationship between the output displacement and the input voltage is not strictly linear. This hysteresis characteristic leads to a deviation between the actual position calculated directly from the target compensation information and the expected position. Therefore, in the process of compensating for the position of the optical module by controlling the displacement device with the driving voltage, in addition to considering the driving voltage, an extra voltage compensation amount is added to compensate for the hysteresis characteristic.

[0149] For example, taking x-axis compensation as an example, the actual voltage required for the displacement device to perform hysteresis compensation on the x-axis position of the optical module. The following formula (11):

[0150] (11)

[0151] in, This represents the driving voltage determined based on target compensation information. This represents the additional voltage compensation amount used to compensate for hysteresis characteristics; both are measured in volts (V). Hysteresis compensation can then be completed by using the actual voltage to compensate for the position of the optical module.

[0152] In the embodiments of this application, when adjusting the position of the optical module using a displacement device to compensate for the target optical path offset information, the hardware characteristics of the displacement device are considered, and the target compensation information is further optimized to compensate for the hysteresis effect of the high-precision displacement device and ensure the compensation accuracy.

[0153] According to an embodiment of this application, converting target compensation information into a driving voltage for a displacement device includes: normalizing the target physical offset information in the target compensation information based on the maximum and minimum displacement of the displacement device to obtain a normalized control quantity; and determining the driving voltage for the displacement device based on the maximum driving voltage of the displacement device and the normalized control quantity.

[0154] The first difference between the maximum and minimum displacement can be calculated. Then, the second difference between the target physical offset and the minimum displacement can be calculated. The ratio of the first difference to the second difference is used as the normalized control value. Then, the normalized control value is multiplied by the maximum drive voltage of the displacement device to obtain the drive voltage for the displacement device.

[0155] The maximum displacement, minimum displacement, and maximum driving voltage of the displacement device are constant parameters and can be obtained from the factory.

[0156] For example, taking x-axis compensation as an example, the driving voltage can be calculated according to the following formula (12):

[0157] (12)

[0158] The maximum driving voltage of the displacement device is 10V. and These represent the maximum and minimum displacement of the displacement device, respectively. This represents the compensation amount used in the target physical offset information to compensate for the lateral x-axis positional offset at time t. Driving voltage. The range can be 0~10V, and the maximum displacement and minimum displacement can be 0μm and 300μm, respectively.

[0159] In the embodiments of this application, based on the displacement characteristics of the displacement device, the target compensation information output by the offset compensation model is converted into a driving voltage that can directly drive the device, thereby realizing the rapid adaptation of optical path offset compensation and hardware displacement compensation device, and realizing the light speed compensation for optical path offset.

[0160] According to an embodiment of this application, the position of the optical module is hysteresis compensated by a displacement device controlled by a driving voltage to compensate for the target optical path offset information. The method includes: determining the number of hysteresis basis functions that match the disturbance frequency of the optical signal in the optical module, wherein the hysteresis basis functions are nonlinear functions; obtaining the hysteresis compensation weights corresponding to each hysteresis basis function; and using each hysteresis basis function, the corresponding hysteresis compensation weights, and the driving voltage to perform hysteresis compensation on the position of the optical module.

[0161] In this embodiment, the perturbation frequency of the optical signal in the optical module can be on the order of kilohertz (kHz). The higher the perturbation frequency, the higher the requirements for the hysteresis basis functions, ensuring that the accuracy of hysteresis compensation using these functions is adapted to the perturbation frequency. Therefore, to meet the compensation accuracy requirements, the higher the perturbation frequency, the more hysteresis basis functions are required. The relationship between the number of hysteresis basis functions and the perturbation frequency can be predetermined. During the packaging or operation of the optical module, the number of hysteresis basis functions matching the perturbation frequency can be directly obtained based on the actual perturbation frequency and the predetermined relationship between the number of hysteresis basis functions and the perturbation frequency.

[0162] Alternatively, multiple hysteresis basis functions that match kilohertz (kHz) can be selected.

[0163] The hysteresis basis functions can be determined based on the Preisach model, where the hysteresis basis functions can also be called relay hysteresis operators in the Preisach model, and the hysteresis compensation weights are the weights corresponding to these relay hysteresis operators. For example, when the disturbance frequency is 1kHz, the number of hysteresis basis functions is K, and K can be any one of 8 to 16.

[0164] The correspondence between hysteresis compensation weights and hysteresis basis functions can be predetermined. For example, it can be calibrated offline using the least squares method before the optical module leaves the factory, ensuring stable performance of the optical module and fiber within a wide temperature range of -40°C to +85°C. During hysteresis compensation, the hysteresis basis functions in the Preisach model can be directly reused, and the hysteresis compensation weights can be determined automatically. For instance, minor online fine-tuning can be performed to ensure stable performance over a wide temperature range without altering the hysteresis basis functions.

[0165] For example, taking x-axis compensation as an example, by summing the weighted sums of each hysteresis basis function and its corresponding hysteresis compensation weight, the additional voltage compensation amount in formula (12) above can be obtained. At this point, the actual voltage required for hysteresis compensation of the x-axis position of the optical module by the displacement device in formula (12) is... It can be transformed into the following formula (13):

[0166] (13)

[0167] in, This represents the k-th hysteresis basis function with respect to the driving voltage. This represents the hysteresis compensation weight of the k-th hysteresis basis function, with a total of K hysteresis basis functions.

[0168] In the embodiments of this application, by compensating for the nonlinear hysteresis characteristics of the displacement device in this way, the secondary offset caused by the motion hysteresis of the displacement device itself can be effectively offset, and the overall compensation accuracy of the optical path offset can be further improved.

[0169] Figure 9 A flowchart illustrating optical path compensation using target compensation information output by an offset compensation model according to an embodiment of this application is shown. Figure 9 As shown, the compensation process includes operations S901 to S906.

[0170] Operate S901 to obtain target compensation information.

[0171] In operation S902, determine the drive voltage.

[0172] In operation S903, the hysteresis basis function and hysteresis compensation weights are determined.

[0173] When operating the S904, the actual voltage is determined based on the driving voltage, hysteresis basis function, and hysteresis compensation weight.

[0174] When operating S905, the drive displacement device adjusts the position of the optical module.

[0175] When operating the S906, optimize optical power loss information and optical path offset.

[0176] To facilitate understanding, the following will be explained through... Figure 10 Explain the entire training and application process.

[0177] Figure 10 A flowchart illustrating the process of training a physical information neural network to obtain a offset compensation model according to an embodiment of this application is shown. Figure 10 As shown, the training process includes operations S1001 to S1005.

[0178] During operation of S1001, optical path offset information is acquired.

[0179] In operation S1002, the second compensation information is calculated.

[0180] In operation S1003, the physical information neural network makes predictions.

[0181] In operation S1004, calculate the differences in physical optical path and optical power loss.

[0182] In operation S1005, the target loss function value is calculated.

[0183] After obtaining the target loss function value by performing operations S1001 to S1005 during the training phase, operations S1001 to S1005 can be iterated continuously until the training of the physical information neural network is complete. Then, as... Figure 10 As shown by the dashed line, after training the offset compensation model, the model can output target compensation information based on the input target optical path offset information, and then use this information for dynamic compensation. Afterwards, the optical system is continuously monitored. For example, the offset compensation model can output target compensation information by executing operations S1001 and S1003 during the training phase. After using the target compensation information for dynamic compensation, the optical system is continuously monitored, and the target optical path offset information and the operations predicted by the offset compensation model are collected cyclically to continuously perform dynamic compensation for the optical path offset.

[0184] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0185] This application also provides a training device for an offset compensation model of an optical module, comprising: a first acquisition module for acquiring optical path offset information, wherein the optical path offset information includes optical path offset between the optical module and the coupled optical fiber at multiple time points, and the optical path offset characterizes the offset of the photosensitive end face of the optical module relative to the end face of the optical fiber; a first input module for inputting the optical path offset information into a physical information neural network to be trained to output first compensation information, wherein the first compensation information is used to compensate for the optical path offset information; and a training module for training the physical information neural network using the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, to obtain an offset compensation model.

[0186] According to an embodiment of this application, the training module includes: a first calculation submodule, used to weighted summation of physical optical path differences and optical power loss differences for optical path offset information to obtain a target loss function value; and an update submodule, used to use the target loss function value to perform at least one round of iterative updates on the parameters of the physical information neural network until the updated physical information neural network meets the training stopping condition, and to use the updated physical information neural network as an offset compensation model.

[0187] According to embodiments of this application, the target loss function of the physical information neural network includes a first dynamic weight corresponding to the difference in physical optical path and a second dynamic weight corresponding to the difference in optical power loss.

[0188] The first calculation submodule includes: a first calculation unit, used to determine the first weight value of the first dynamic weight and the second weight value of the second dynamic weight based on the differences in physical optical paths and optical power loss at multiple times; and a second calculation unit, used to determine the target loss function value by using the product between the first weight value and the differences in physical optical paths, and the product between the second weight value and the differences in optical power loss.

[0189] According to an embodiment of this application, the first calculation unit includes: a first calculation subunit, configured to determine the average physical optical path difference and the average optical power loss difference based on the physical optical path difference and optical power loss difference at multiple times; and a second calculation subunit, configured to increase the current weight value of the first dynamic weight to a first weight value and decrease the current weight value of the second dynamic weight to a second weight value when the average physical optical path difference is greater than a target dynamic threshold; wherein the target dynamic threshold is determined based on the average optical power loss difference.

[0190] According to an embodiment of this application, the first calculation unit further includes: a third calculation subunit, configured to update the first weight value to the upper limit threshold when the first weight value is greater than the upper limit threshold; and a fourth calculation subunit, configured to update the second weight value to the lower limit threshold when the second weight value is less than the lower limit threshold, wherein the upper limit threshold is greater than the lower limit threshold.

[0191] According to an embodiment of this application, the physical optical path difference is determined as follows: the optical path offset information is compensated using first compensation information to obtain first beam position information; the preset ideal beam position is compensated using second compensation information to obtain second beam position information; and the distance between the first beam position information and the second beam position information is taken as the physical optical path difference.

[0192] According to an embodiment of this application, the optical module includes multiple optical elements, and the second compensation information is determined by converting the optical parameters of each optical element in the optical module into a transmission matrix; and multiplying the transmission matrices of each optical element in the order of their positions in the optical path to obtain the second compensation information.

[0193] According to an embodiment of this application, the optical path offset information includes physical offset information and optical power loss information; the optical power loss difference of the optical path offset information is determined in the following way: the position information of the first beam is calculated based on the fiber mode field to obtain the predicted optical power loss information; and the difference between the predicted optical power loss information and the optical power loss information is taken as the optical power loss difference.

[0194] According to an embodiment of this application, the training device further includes: a first preprocessing module for processing the beam position information acquired by the photodetector to obtain physical offset information; and a second preprocessing module for using the loss value acquired by the optical power meter at the time of acquiring the beam position information as optical power loss information.

[0195] According to an embodiment of this application, the physical information neural network includes: an encoder for extracting features from input optical path offset information to obtain intermediate features; and a multilayer perceptron for regressing the intermediate features to obtain first compensation information.

[0196] This application also provides an offset compensation device for an optical module, comprising: a second acquisition module for acquiring target optical path offset information between the optical module and the optical fiber; a second input module for inputting the target optical path offset information into an offset compensation model to obtain target compensation information, wherein the offset compensation model is trained using the above-mentioned training method for the offset compensation model of the optical module; and a compensation module for controlling a displacement device to adjust the position of the optical module based on the target compensation information to compensate for the target optical path offset information.

[0197] According to an embodiment of this application, the compensation module includes: a voltage determination submodule for converting target compensation information into a driving voltage for the displacement device; and a compensation submodule for controlling the displacement device to perform hysteresis compensation on the position of the optical module through the driving voltage, so as to compensate for the target optical path offset information.

[0198] According to an embodiment of this application, the voltage determination submodule includes: a normalization unit, used to normalize the target physical offset information in the target compensation information based on the maximum and minimum displacement of the displacement device to obtain a normalized control quantity; and a voltage determination unit, used to determine the driving voltage for the displacement device based on the maximum driving voltage of the displacement device and the normalized control quantity.

[0199] According to an embodiment of this application, the compensation submodule includes: a first compensation unit, used to determine the number of hysteresis basis functions matching the disturbance frequency of the optical signal in the optical module, wherein the hysteresis basis functions are nonlinear functions; a second compensation unit, used to obtain the hysteresis compensation weights corresponding to each hysteresis basis function; and a third compensation unit, used to perform hysteresis compensation on the position of the optical module using each hysteresis basis function, the corresponding hysteresis compensation weights, and the driving voltage.

[0200] For a description of the features in the corresponding embodiments of the apparatus, please refer to the relevant descriptions in the corresponding embodiments of the method; they will not be repeated here.

[0201] Embodiments of this application also provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the training method of the offset compensation model of any of the above-described optical modules, and the steps in the offset compensation method embodiments.

[0202] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute, at runtime, the training method of the offset compensation model of any of the above-described optical modules and the steps in the offset compensation method embodiments.

[0203] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0204] The embodiments of this application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the training method for the offset compensation model of any of the above-mentioned optical modules and the steps in the offset compensation method embodiments.

[0205] The embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the training method for the offset compensation model of any of the above-described optical modules and the steps in the offset compensation method embodiments.

[0206] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0207] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments claimed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0208] The training method, offset compensation method, and device for an optical module offset compensation model provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A training method for an offset compensation model of an optical module, characterized in that, include: Obtain optical path offset information, wherein the optical path offset information includes the optical path offset between the optical module and the coupled optical fiber at multiple time points, and the optical path offset characterizes the offset of the photosensitive end face of the optical module relative to the end face of the optical fiber; The optical path offset information is input into the physical information neural network to be trained and the first compensation information is output, wherein the first compensation information is used to compensate for the optical path offset information. The physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, are used to train the physical information neural network to obtain the offset compensation model. The step of training the physical information neural network using the physical optical path difference between the first compensation information and the second compensation information determined based on the optical parameters of the optical module, and the optical power loss difference for the optical path offset information, to obtain an offset compensation model, includes: The target loss function value is obtained by weighted summing the physical optical path difference and the optical power loss difference for the optical path offset information. Using the target loss function value, the parameters of the physical information neural network are iteratively updated at least once until the updated physical information neural network meets the training stopping condition, and the updated physical information neural network is used as the offset compensation model. The physical optical path differences are determined in the following way: The optical path offset information is compensated using the first compensation information to obtain the first beam position information; the preset ideal beam position is compensated using the second compensation information to obtain the second beam position information; the distance between the first beam position information and the second beam position information is taken as the physical optical path difference.

2. The method according to claim 1, characterized in that, The target loss function of the physical information neural network includes a first dynamic weight corresponding to the difference in the physical optical path and a second dynamic weight corresponding to the difference in optical power loss. The step of weighted summing of the physical optical path difference and the optical power loss difference for the optical path offset information to obtain the target loss function value includes: Based on the differences in physical optical paths and optical power loss at each of the multiple said times, a first weight value for the first dynamic weight and a second weight value for the second dynamic weight are determined; The target loss function value is determined by multiplying the first weight value by the difference in the physical optical path and the second weight value by the difference in the optical power loss.

3. The method according to claim 2, characterized in that, The step of determining the first weight value of the first dynamic weight and the second weight value of the second dynamic weight based on the differences in physical optical paths and optical power loss at multiple times includes: Based on the physical optical path differences and optical power loss differences at each of the multiple said times, the average physical optical path difference and average optical power loss difference are determined; If the average physical optical path difference is greater than the target dynamic threshold, the current weight value of the first dynamic weight is increased to the first weight value, and the current weight value of the second dynamic weight is decreased to the second weight value. The target dynamic threshold is determined based on the difference in average optical power loss.

4. The method according to claim 2, characterized in that, The method further includes: If the first weight value is greater than the upper limit threshold, the first weight value is updated to the upper limit threshold. If the second weight value is less than the lower limit threshold, the second weight value is updated to the lower limit threshold, wherein the upper limit threshold is greater than the lower limit threshold.

5. The method according to claim 1, characterized in that, The optical module includes multiple optical elements, and the second compensation information is determined in the following manner: The optical parameters of each optical element in the optical module are converted into a transmission matrix; The second compensation information is obtained by multiplying the transmission matrices of each optical element according to their order in the optical path.

6. The method according to any one of claims 1 to 4, characterized in that, The optical path offset information includes physical offset information and optical power loss information; The difference in optical power loss for the optical path offset information is determined in the following way: Based on the fiber mode field, the position information of the first beam is calculated to obtain the predicted optical power loss information; and The difference between the predicted optical power loss information and the actual optical power loss information is taken as the optical power loss difference.

7. The method according to claim 6, characterized in that, The method further includes: The physical offset information is obtained by processing the beam position information collected by the photodetector. The loss value collected by the optical power meter at the time when the beam position information is acquired is used as the optical power loss information.

8. The method according to claim 1, characterized in that, The physical information neural network includes: An encoder is used to extract features from the input optical path offset information to obtain intermediate features; and A multilayer perceptron is used to regress the intermediate features to obtain the first compensation information.

9. An offset compensation method for an optical module, characterized in that, The method includes: Obtain the target optical path offset information between the optical module and the optical fiber; The target optical path offset information is input into the offset compensation model to obtain target compensation information, wherein the offset compensation model is trained using the method described in any one of claims 1 to 8; Based on the target compensation information, the control displacement device adjusts the position of the optical module to compensate for the target optical path offset information.

10. The method according to claim 9, characterized in that, The step of adjusting the position of the optical module based on the target compensation information to compensate for the target optical path offset information includes: Convert the target compensation information into a driving voltage for the displacement device; and The displacement device is controlled by the driving voltage to perform hysteresis compensation on the position of the optical module, so as to compensate for the target optical path offset information.

11. The method according to claim 10, characterized in that, The step of converting the target compensation information into a driving voltage for the displacement device includes: Based on the maximum and minimum displacement of the displacement device, the target physical offset information in the target compensation information is normalized to obtain the normalized control quantity. The driving voltage for the displacement device is determined based on the maximum driving voltage of the displacement device and the normalized control quantity.

12. The method according to claim 10, characterized in that, The step of controlling the displacement device to perform hysteresis compensation on the position of the optical module through the driving voltage, in order to compensate for the target optical path offset information, includes: Based on the perturbation frequency of the optical signal in the optical module, determine the number of hysteresis basis functions that match the perturbation frequency, wherein the hysteresis basis functions are nonlinear functions; Obtain the hysteresis compensation weights corresponding to each of the hysteresis basis functions; Hysteresis compensation is performed on the position of the optical module using the hysteresis basis functions, the corresponding hysteresis compensation weights, and the driving voltage.

13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as claimed in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Optical path switching method, system and device and readable storage medium

    CN118801981A

  • Fine tracking detection light path system of laser communication terminal

    CN122068976A