Temperature control method, system and device of optical instrument and storage medium

By using machine learning models to optimize the temperature control strategy of optical instruments, and combining the external environment and internal data of the instrument, the problem of insufficient temperature control stability and consistency in the existing technology is solved, and high-precision and intelligent temperature control is achieved.

CN119336094AInactive Publication Date: 2025-01-21SHENZHEN DOCOT INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411494444.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the temperature control stability and consistency of optical instruments are insufficient, making it difficult to meet the requirements of high-precision control, especially when the temperature environment changes.

Method used

By obtaining instrument parameters, historical temperature data, current temperature data and external ambient temperature, the machine learning model is used to optimize and adjust the temperature control strategy, including building an initial temperature control model, iterative optimization to obtain optimized correction parameters, and optimizing the temperature control model to generate Target temperature control strategy, and control heating or cooling components through PWM waveforms to achieve precise temperature control.

Benefits of technology

It achieves more precise and intelligent temperature control, improves the real-time and accuracy of control, can better respond to external environment and internal changes in the instrument, and ensures the stability and high accuracy of temperature control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336094A_ABST
    Figure CN119336094A_ABST
Patent Text Reader

Abstract

The invention discloses a temperature control method, system and device of an optical instrument and a storage medium. The method comprises the following steps: acquiring instrument parameters, historical temperature data, current temperature data and external environment temperature; inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain optimized correction parameters; optimizing the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; and controlling the temperature of the optical instrument according to the target temperature control strategy. The method has the advantages that strategy optimization is carried out in combination with machine learning, the influence of environmental factors is considered, and more accurate temperature control is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical instruments, and in particular to a temperature control method, system, device and storage medium for an optical instrument. Background Art

[0002] At present, in the field of modern science and technology, the performance stability of optical instruments is crucial to their application. Temperature is one of the key factors affecting the performance of optical instruments, and its control accuracy is directly related to the stability and reliability of the instrument. In high-precision applications such as solid-state lasers, optical crystals are prone to heat deposition during operation, causing their own temperature changes, which in turn affects the spectrum and power of the laser output, causing drift.

[0003] In the prior art, the temperature control of optical devices is usually implemented based on the type of device and the characteristics of the installation device. For example, different types of optical fibers have different optimal operating temperatures, so different temperature control methods are required. One existing technology involves real-time temperature monitoring of optical components and real-time adjustment using a temperature control module. The accuracy of this control method mainly depends on the performance of the temperature sensor, and the temperature control strategy is usually designed and optimized based on experimental data or experience.

[0004] However, the stability and consistency of temperature control in the prior art are insufficient. When the temperature environment changes, the controllability and accuracy of temperature control are poor, which makes it difficult to meet the high-precision control requirements of existing optical components. Summary of the invention

[0005] The present invention provides a temperature control method, system, device and storage medium for an optical instrument to solve the problems that the stability and consistency of temperature control in the prior art are insufficient, the controllability and temperature control accuracy are poor when the temperature environment changes, and it is difficult to meet the high-precision control requirements of existing optical components.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a temperature control method for an optical instrument, comprising: Obtain instrument parameters, historical temperature data, current temperature data and external ambient temperature; Inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; Calculate according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain optimized correction parameters; Optimizing the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; Inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; The temperature of the optical instrument is controlled according to the target temperature control strategy.

[0007] In an optional implementation, the calculation is performed according to the instrument parameters, the historical temperature data, the ambient temperature and the initial temperature control strategy to obtain the optimized correction parameters, including: Calculating a temperature variation coefficient according to the external environment temperature and an initial correction parameter included in the initial temperature control strategy; Iterative optimization is performed according to the instrument parameters, the historical temperature data, the external environment temperature and the temperature variation coefficient to obtain optimized correction parameters.

[0008] In an optional implementation, the iterative optimization is performed according to the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient to obtain the optimized correction parameters, including: Substitute the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient into the following formula, perform iterative optimization, and determine the parameters that satisfy the following formula as the optimized correction parameters: , in, is the optimized target temperature, is the current temperature, M is the temperature variation coefficient; Q is the ambient temperature; T is the historical temperature data; the instrument parameters include the temperature gradient S of the optical device, the focal length Z of the optical lens, the temperature variation rate S1 at the connection between the light source and the optical device, the temperature variation rate S2 on the surface of the optical device, and the coating material coefficient S3 of the optical lens; Among them, f is the set optical signal impact factor, and b is the atmospheric pressure coefficient; The optimization correction parameters include a correction coefficient K, a temperature influence coefficient P and an environmental factor coefficient d.

[0009] In an optional implementation manner, the temperature variation coefficient is calculated according to the external environment temperature and the initial correction parameter included in the initial temperature control strategy, including: The temperature variation coefficient is calculated by the following formula, Wherein, M is the temperature variation coefficient, the initial correction parameters include the environmental factor coefficient d; Z is the focal length of the optical lens, Q is the external environment temperature, b is the atmospheric pressure coefficient, and f is the optical signal influencing factor. and is the coefficient to be determined.

[0010] In an optional implementation, the training process of the first temperature control model includes: Building a machine learning model based on the historical temperature data, and training the machine learning model; When the training times of the machine learning model reaches a preset maximum number of times, the training is determined to be completed and a first temperature control model is obtained.

[0011] In an optional implementation, optimizing the first temperature control model according to the optimization correction parameter to obtain the second temperature control model includes: Storing the optimized correction parameters in the first temperature control model; Generate a learning strategy according to the optimization correction parameter and the first temperature control model, wherein the learning strategy includes a loss function, a learning rate, and an optimization algorithm; The first temperature control model is trained according to the learning strategy, and when the loss value of the loss function is less than a preset loss threshold, a second temperature control model is obtained.

[0012] In an optional implementation, controlling the temperature of the optical instrument according to the target temperature control strategy includes: According to the target temperature control strategy, a temperature control instruction including a PWM waveform is obtained; According to the PWM waveform, the heating component and the cooling component are controlled to control the temperature of the optical instrument.

[0013] In a second aspect, the present invention provides a temperature control system for an optical instrument, comprising: Data acquisition module, used to obtain instrument parameters, historical temperature data, current temperature data and external environment temperature; An initial control strategy generating module, used for inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; A correction parameter optimization module, used for calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain an optimized correction parameter; A temperature control model optimization module, used to optimize the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; The temperature control module is used to control the temperature of the optical instrument according to the target temperature control strategy.

[0014] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the temperature control method of the optical instrument described in any one of the above is implemented.

[0015] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned temperature control methods for optical instruments.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses a temperature control method for an optical instrument, including obtaining instrument parameters, historical temperature data, current temperature data and external environment temperature; inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain an optimized correction parameter; optimizing the first temperature control model according to the optimized correction parameter to obtain a second temperature control model; inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; and controlling the temperature of the optical instrument according to the target temperature control strategy. The present invention combines a machine learning model to optimize and adjust the strategy, takes into account the influence of environmental factors on temperature control, ensures that the temperature control strategy can be adjusted based on the latest temperature data, thereby achieving more precise and intelligent temperature control and improving the real-time and accuracy of control. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic flow chart of a temperature control method for an optical instrument provided by the first embodiment of the present invention; Figure 2 It is a schematic diagram of a correction parameter optimization process provided by the first embodiment of the present invention; Figure 3 A schematic diagram of a temperature control model optimization process provided by the first embodiment of the present invention; Figure 4 A schematic diagram of an instrument temperature control flow chart provided by the first embodiment of the present invention; Figure 5 It is a schematic diagram of the structure of a temperature control system of an optical instrument provided by the second embodiment of the present invention. DETAILED DESCRIPTION

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

[0019] Reference Figure 1 The first embodiment of the present invention provides a temperature control method for an optical instrument, comprising the following steps: S1, obtain instrument parameters, historical temperature data, current temperature data and external environment temperature; S2, inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; S3, calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain an optimized correction parameter; S4, optimizing the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; S5, inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; S6, controlling the temperature of the optical instrument according to the target temperature control strategy.

[0020] In step S1, it is necessary to obtain instrument parameters, historical temperature data, current temperature data and external ambient temperature. Among them, instrument parameters refer to the inherent characteristics and performance indicators of optical instruments, which are usually provided by the manufacturer and can be found in the user manual or technical specification sheet of the instrument, or obtained through experiments. These parameters are crucial to understanding how the instrument responds to temperature changes, because different materials and designs have different sensitivities to temperature changes. Instrument parameters mainly include the temperature gradient of optical devices, the focal length of optical lenses, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device, and the coating material coefficient of the optical lens; historical temperature data is the temperature data recorded by the instrument in the past operation. By analyzing historical data, the control algorithm can be adjusted and optimized to make it more accurate and adaptable; current temperature data refers to the temperature of the instrument at the current moment, which is usually collected in real time by a temperature sensor; external ambient temperature refers to the temperature of the external environment in which the optical instrument is located.

[0021] In step S2, the current temperature data obtained is input into the preset first temperature control model, and the use of the current temperature data as input can achieve real-time control and rapid response. The current temperature data refers to the actual temperature of the optical instrument measured at a specific time point, which is usually achieved through a temperature sensor, which can accurately measure and record the real-time temperature of the instrument; the first temperature control model is a data-driven machine learning model, which calculates and outputs the initial temperature control strategy based on the input temperature data and other preset parameters; the initial temperature control strategy includes a series of control instructions, such as turning on or off the heater, adjusting the power output of the heater, starting or stopping the cooling cycle, etc. These instructions are intended to achieve temperature control by changing the thermal energy input or output of the optical instrument.

[0022] like Figure 2 As shown, in step S3, the optimization correction parameters are obtained by calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy, including: S31, calculating a temperature variation coefficient according to the external environment temperature and an initial correction parameter included in the initial temperature control strategy; S32, performing iterative optimization according to the instrument parameters, the historical temperature data, the external environment temperature and the temperature variation coefficient to obtain optimized correction parameters.

[0023] In step S31, the temperature variation coefficient is calculated according to the external environment temperature and the initial correction parameter included in the initial temperature control strategy, including: The temperature variation coefficient is calculated by the following formula, Wherein, M is the temperature variation coefficient, the initial correction parameters include the environmental factor coefficient d; Z is the focal length of the optical lens, Q is the external environment temperature, b is the atmospheric pressure coefficient, and f is the optical signal influencing factor. and is the coefficient to be determined; Among them, d is used to adjust the impact of overall environmental factors on temperature changes, Z affects the temperature distribution of optical devices, Q affects the temperature of optical instruments, b affects the performance and temperature of optical devices, and f affects the temperature of optical devices when the optical signal intensity is high. and They respectively represent the influence of the combination of the focal length of the optical lens, the external environment temperature and atmospheric pressure and the light signal influencing factor on the temperature variation coefficient.

[0024] In the embodiment of the present invention, the influence of the overall environmental factors is adjusted by introducing the environmental factor coefficient d, which makes the model more flexible and adaptable to different environmental conditions. and These coefficients represent the degree of influence of different factors on the temperature variation coefficient. They can be determined through experimental data or historical data analysis to ensure the accuracy of the model. The above formula adjusts the coefficients to adapt to different optical instruments and environmental conditions, making the temperature control strategy more accurate and effective.

[0025] In step S32, iterative optimization is performed according to the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient to obtain optimized correction parameters, including: Substitute the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient into the following formula, perform iterative optimization, and determine the parameters that satisfy the following formula as the optimized correction parameters: , in, is the optimized target temperature, is the current temperature, M is the temperature variation coefficient; Q is the ambient temperature; T is the historical temperature data; the instrument parameters include the temperature gradient S of the optical device, the focal length Z of the optical lens, the temperature variation rate S1 at the connection between the light source and the optical device, the temperature variation rate S2 on the surface of the optical device, and the coating material coefficient S3 of the optical lens; Among them, f is the set optical signal impact factor, and b is the atmospheric pressure coefficient; Wherein, the optimization correction parameters include the correction coefficient K, the temperature influence coefficient P and the environmental factor coefficient d; It is worth noting that the iterative optimization is performed using an iterative optimization algorithm, which includes a gradient descent method or a Newton method, to minimize an objective function, such as the sum of squares of temperature errors. The objective function is ,in, is the target temperature after the i-th iteration, is the target temperature of the i-th iteration, and n is the number of iterations. Through the iterative optimization algorithm, the optimal correction parameters K, P and d can be obtained; In this process, the correction parameters include the correction parameter K, the temperature influence coefficient P and the environmental factor coefficient d. K is used to adjust the temperature gradient of the optical device, the focal length of the optical lens, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device and the coating material coefficient of the optical lens. P is used to adjust the difference between the historical temperature data and the external ambient temperature. d is used to adjust the comprehensive influence of the light signal influence factor and the atmospheric pressure coefficient. The instrument parameters include the temperature gradient of the optical device, the focal length of the optical lens, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device and the coating material coefficient of the optical lens. The historical temperature data provides the temperature changes of the instrument under different conditions in the past. These data help the model understand the long-term trends and patterns of temperature changes. The external ambient temperature takes into account the temperature influence of the environment in which the instrument is located, which is crucial for predicting and adjusting the temperature inside the instrument. The optimal correction parameters are determined by iterative calculation. Iterative optimization is a method of gradually improving the solution by repeatedly applying an optimization algorithm. In this step, the optimization algorithm will iterate multiple times, and each iteration will adjust the parameters according to the current model performance until the optimal or satisfactory solution is found. The iterative optimization process allows the model to improve the accuracy of temperature control through continuous learning and adjustment. The temperature control strategy is continuously adjusted and improved according to real-time data and model predictions, and the impact of external environmental changes and internal changes of the instrument on the temperature is more accurately compensated. Ensure that the temperature control strategy can accurately respond to changes in the external environment and the inside of the instrument, maintain the stability of temperature control, improve the accuracy of future temperature control, and improve the performance and reliability of high optical instruments.

[0026] like Figure 3 As shown, in step S4, the first temperature control model is optimized according to the optimization correction parameter to obtain a second temperature control model, including: S41, storing the optimized correction parameters in the first temperature control model; S42, generating a learning strategy according to the optimization correction parameter and the first temperature control model, wherein the learning strategy includes a loss function, a learning rate, and an optimization algorithm; S43, training the first temperature control model according to the learning strategy, and obtaining a second temperature control model when the loss value of the loss function is less than a preset loss threshold.

[0027] In step S41, the optimized correction parameters are a set of adjusted and optimized values ​​that are used to improve the prediction accuracy and control effect of the first temperature control model. The storage method includes directly editing the source code of the model, hard-coding the parameters into the model, or using a configuration file to store the parameters so that the model can read these parameters at runtime. In more advanced implementations, machine learning frameworks may be used that allow models to dynamically learn and update parameters. Storing the optimized correction parameters in the first temperature control model enables the model to adjust according to these parameters. This step ensures that the model can remember and apply previously learned correction parameters for use in future temperature control tasks.

[0028] In step S42, the loss function is a function used in machine learning to measure the difference between the model's predicted value and the actual value. In the temperature control model, the loss function is defined as the deviation between the predicted temperature and the actual temperature. The choice of the loss function has a direct impact on the training effect of the model. Common loss functions include mean square error or mean absolute error. The learning rate is a hyperparameter that controls the step size of the model parameter update during the training process. A suitable learning rate can ensure that the model will neither converge too slowly nor diverge due to excessive step size during the training process. The choice of learning rate usually needs to be adjusted according to the specific problem and data set. The adaptive learning rate optimization algorithm can automatically adjust the learning rate according to the gradient of the model, making the training process more stable and efficient. The optimization algorithm refers to the algorithm used to minimize the loss function. It guides the model on how to update the parameters according to the gradient of the loss function. Common optimization algorithms include gradient descent, stochastic gradient descent, etc. The choice of the optimization algorithm will affect the training efficiency and final performance of the model.

[0029] In step S43, the first temperature control model is trained using a learning strategy until the loss value of the loss function is less than a preset loss threshold. At this time, a second temperature control model is obtained. During the training process, the model will continuously adjust parameters to minimize the value of the loss function. The smaller the value of the loss function, the closer the model's prediction result is to the actual value, and the better the model's performance is, until the model's performance reaches a satisfactory level.

[0030] It is worth noting that machine learning models can continuously learn from new data and continuously improve performance without the need for redesign or training from scratch. By optimizing correction parameters and learning strategies, the second temperature control model can more accurately predict and control temperature and improve control accuracy. The model can automatically learn and adapt to new data and environmental changes. Compared with traditional temperature control methods, machine learning models can make predictions and adjustments faster and improve response speed. Through the training of learning strategies, the model can better handle abnormal situations and uncertainties and enhance the robustness of the system.

[0031] In step S5, the current temperature data is input into the second temperature control model to obtain a target temperature control strategy. The target temperature control strategy is the best action plan predicted by the model to adjust the temperature of the optical instrument to reach or maintain the optimal operating temperature. Using an optimized model can generate a more accurate control strategy faster, improve the accuracy and response speed of temperature control. As time goes by and more data is accumulated, the model can continue to learn and improve, making the control strategy more and more accurate.

[0032] like Figure 4 As shown, in step S6, controlling the temperature of the optical instrument according to the target temperature control strategy includes: S61, obtaining a temperature control instruction including a PWM waveform according to the target temperature control strategy; S62, controlling the heating component and the cooling component according to the PWM waveform to control the temperature of the optical instrument.

[0033] In step S61, the target temperature control strategy is converted into a specific PWM waveform temperature control instruction, such as calculating the required PWM duty cycle. The target temperature control strategy defines a series of control actions required to achieve the desired temperature. PWM is a commonly used signal modulation technology that controls the average power or voltage of the output signal by changing the width of the pulse. In temperature control applications, the PWM waveform can be used to adjust the power of the heating or cooling element, thereby achieving precise control of the output signal to meet the needs of different applications and improve the stability and reliability of the system.

[0034] In step S62, control is performed according to the duty cycle of the PWM waveform, and the duty cycle of the PWM signal is adjusted to achieve precise control of the output signal. The duty cycle refers to the ratio of the duration of the high-level state in the PWM waveform to the entire cycle time. For example, if the cycle of a PWM signal is 10ms, and the high level lasts for 5ms, then the duty cycle is 50%. By adjusting the duty cycle, the average power output of the heating or cooling element can be changed, thereby achieving precise control of the temperature. PWM control can control power output very accurately, providing enough energy to maintain or adjust the temperature only when needed, thereby reducing energy waste, and can be adjusted quickly, so that the system can respond quickly to temperature changes and improve the response speed of the control. PWM control can adapt to different loads and environmental conditions because it can dynamically adjust the duty cycle based on real-time data.

[0035] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0036] In this embodiment, the temperature control system of the optical instrument involves a system composed of a data acquisition module, an initial control strategy generation module, a correction parameter optimization module, a temperature control model optimization module, and a temperature control module. The system aims to solve the problem that the stability and consistency of temperature control in the prior art are insufficient, and when the temperature environment changes, the controllability and temperature control accuracy of the temperature control are poor, and it is difficult to meet the high-precision control requirements of existing optical components.

[0037] The working process is as follows: Step 1: The data acquisition module acquires instrument parameters, historical temperature data, current temperature data and external ambient temperature; Step 2: The initial control strategy generation module inputs the current temperature data into the preset first temperature control model to obtain the initial temperature control strategy; Step 3: The correction parameter optimization module calculates based on the instrument parameters, historical temperature data, external environment temperature and initial temperature control strategy to obtain the optimized correction parameters; Step 4: The temperature control model optimization module optimizes the first temperature control model according to the optimization correction parameters to obtain a second temperature control model; Step 5: The target control strategy generation module inputs the current temperature data into the second temperature control model to obtain the target temperature control strategy; Step 6: The temperature control module controls the temperature of the optical instrument according to the target temperature control strategy.

[0038] Through the above steps, the impact of environmental factors on temperature control is taken into account, ensuring that the temperature control strategy can be adjusted based on the latest temperature data, achieving more precise and intelligent temperature control, and improving the real-time and accuracy of control.

[0039] In summary, the present invention provides a temperature control method for an optical instrument, including: obtaining instrument parameters, historical temperature data, current temperature data and external ambient temperature; inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; calculating according to the instrument parameters, the historical temperature data, the external ambient temperature and the initial temperature control strategy to obtain optimized correction parameters; optimizing the first temperature control model according to the optimized correction parameters to obtain a second temperature control model; inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; controlling the temperature of the optical instrument according to the target temperature control strategy. The method combines a machine learning model to optimize and adjust the strategy, takes into account the impact of environmental factors on temperature control, and ensures that the temperature control strategy can be adjusted based on the latest temperature data, thereby achieving more precise and intelligent temperature control and improving the real-time and accuracy of control.

[0040] Reference Figure 5 A second embodiment of the present invention provides a temperature control system for an optical instrument, comprising: Data acquisition module, used to obtain instrument parameters, historical temperature data, current temperature data and external environment temperature; An initial control strategy generating module, used for inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; A correction parameter optimization module, used for calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain an optimized correction parameter; A temperature control model optimization module, used to optimize the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; A target control strategy generating module, inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; The temperature control module is used to control the temperature of the optical instrument according to the target temperature control strategy.

[0041] In one embodiment, the data acquisition module includes: Obtain instrument parameters, historical temperature data, current temperature data, and ambient temperature. Instrument parameters refer to the inherent characteristics and performance indicators of optical instruments, which are usually provided by the manufacturer and can be found in the user manual or technical specification sheet of the instrument, or obtained through experiments. These parameters are crucial to understanding how the instrument responds to temperature changes, because different materials and designs have different sensitivities to temperature changes. Instrument parameters mainly include the temperature gradient of optical devices, the focal length of optical lenses, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device, and the coating material coefficient of the optical lens; historical temperature data is the temperature data recorded by the instrument in the past operation. By analyzing historical data, the control algorithm can be adjusted and optimized to make it more accurate and adaptable; current temperature data refers to the temperature of the instrument at the current moment, which is usually collected in real time by a temperature sensor; ambient temperature refers to the temperature of the external environment in which the optical instrument is located.

[0042] In one embodiment, the initial control strategy generation module includes: The current temperature data obtained is input into the preset first temperature control model. Using the current temperature data as input can achieve real-time control and rapid response. The current temperature data refers to the actual temperature of the optical instrument measured at a specific time point, which is usually achieved through a temperature sensor that can accurately measure and record the real-time temperature of the instrument; the first temperature control model is a data-driven machine learning model. The model will calculate and output the initial temperature control strategy based on the input temperature data and other preset parameters; the initial temperature control strategy includes a series of control instructions, such as turning on or off the heater, adjusting the power output of the heater, starting or stopping the cooling cycle, etc. These instructions are designed to control the temperature by changing the thermal energy input or output of the optical instrument.

[0043] In one embodiment, the modification parameter optimization module includes: A temperature variation coefficient calculation unit, which calculates the temperature variation coefficient according to the external environment temperature and the initial correction parameter included in the initial temperature control strategy; The correction parameter optimization unit performs iterative optimization according to the instrument parameters, the historical temperature data, the external environment temperature and the temperature variation coefficient to obtain optimized correction parameters.

[0044] The temperature variation coefficient is calculated based on the external environment temperature and the initial correction parameter included in the initial temperature control strategy, including: The temperature variation coefficient is calculated by the following formula, Wherein, M is the temperature variation coefficient, the initial correction parameters include the environmental factor coefficient d; Z is the focal length of the optical lens, Q is the external environment temperature, b is the atmospheric pressure coefficient, and f is the optical signal influencing factor. and is the coefficient to be determined; Among them, d is used to adjust the impact of overall environmental factors on temperature changes, Z affects the temperature distribution of optical devices, Q affects the temperature of optical instruments, b affects the performance and temperature of optical devices, and f affects the temperature of optical devices when the optical signal intensity is high. and They respectively represent the influence of the combination of the focal length of the optical lens, the external environment temperature and atmospheric pressure and the light signal influencing factor on the temperature variation coefficient.

[0045] Substitute the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient into the following formula, perform iterative optimization, and determine the parameters that satisfy the following formula as the optimized correction parameters: , Wherein, M is the temperature variation coefficient; Q is the ambient temperature; the historical temperature data includes the historical target temperature , historical instrument temperature The instrument parameters include the temperature gradient S of the optical device, the focal length Z of the optical lens, the temperature change rate S1 at the connection between the light source and the optical device, the temperature change rate S2 on the surface of the optical device, and the coating material coefficient S3 of the optical lens; Among them, f is the set optical signal impact factor, and b is the atmospheric pressure coefficient; Wherein, the optimization correction parameters include the correction coefficient K, the temperature influence coefficient P and the environmental factor coefficient d; It is worth noting that the iterative optimization is performed using an iterative optimization algorithm, which includes a gradient descent method or a Newton method, to minimize an objective function, such as the sum of squares of temperature errors. The objective function is ,in, is the target temperature after the i-th iteration, is the target temperature of the i-th iteration, and n is the number of iterations. Through the iterative optimization algorithm, the optimal correction parameters K, P and d can be obtained; In this process, the correction parameters include the correction parameter K, the temperature influence coefficient P and the environmental factor coefficient d. K is used to adjust the temperature gradient of the optical device, the focal length of the optical lens, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device and the coating material coefficient of the optical lens. P is used to adjust the difference between the historical temperature data and the external ambient temperature. d is used to adjust the comprehensive influence of the light signal influence factor and the atmospheric pressure coefficient. The instrument parameters include the temperature gradient of the optical device, the focal length of the optical lens, the temperature change rate at the connection between the light source and the optical device, the temperature change rate on the surface of the optical device and the coating material coefficient of the optical lens. The historical temperature data provides the temperature changes of the instrument under different conditions in the past. These data help the model understand the long-term trends and patterns of temperature changes. The external ambient temperature takes into account the temperature influence of the environment in which the instrument is located, which is crucial for predicting and adjusting the temperature inside the instrument. The optimal correction parameters are determined by iterative calculation. Iterative optimization is a method of gradually improving the solution by repeatedly applying an optimization algorithm. In this step, the optimization algorithm will iterate multiple times, and each iteration will adjust the parameters according to the current model performance until the optimal or satisfactory solution is found. The iterative optimization process allows the model to improve the accuracy of temperature control through continuous learning and adjustment. The temperature control strategy is continuously adjusted and improved according to real-time data and model predictions, and the impact of external environmental changes and internal changes of the instrument on the temperature is more accurately compensated. Ensure that the temperature control strategy can accurately respond to changes in the external environment and the inside of the instrument, maintain the stability of temperature control, improve the accuracy of future temperature control, and improve the performance and reliability of high optical instruments.

[0046] In one embodiment, the temperature control model optimization module includes: A correction parameter storage unit stores the optimized correction parameters in the first temperature control model so that the model can be adjusted according to these parameters, wherein the optimized correction parameters are a set of adjusted and optimized values, which are used to improve the prediction accuracy and control effect of the first temperature control model. The storage method includes directly editing the source code of the model, hard-coding the parameters into the model, or using a configuration file to store the parameters so that the model can read these parameters at runtime. In more advanced implementations, machine learning frameworks may be used, which allow models to dynamically learn and update parameters. Storing the optimized correction parameters in the first temperature control model so that the model can be adjusted according to these parameters, this step ensures that the model can remember and apply previously learned correction parameters for use in future temperature control tasks; A learning strategy generation unit generates a learning strategy according to the optimization correction parameters and the first temperature control model. The learning strategy includes a loss function, a learning rate and an optimization algorithm. The loss function is a function used in machine learning to measure the difference between the model prediction value and the actual value. In the temperature control model, the loss function is defined as the deviation between the predicted temperature and the actual temperature. The selection of the loss function has a direct impact on the training effect of the model. Common loss functions include mean square error or mean absolute error. The learning rate is a hyperparameter that controls the step size of the model parameters during the training process. A suitable learning rate can ensure that the model will neither converge too slowly nor diverge due to excessive step size during the training process. The selection of the learning rate usually needs to be adjusted according to the specific problem and data set. The adaptive learning rate optimization algorithm can automatically adjust the learning rate according to the gradient of the model to make the training process more stable and efficient. The optimization algorithm refers to an algorithm used to minimize the loss function. It guides the model on how to update parameters according to the gradient of the loss function. Common optimization algorithms include gradient descent, stochastic gradient descent, etc. The selection of the optimization algorithm will affect the training efficiency and final performance of the model. The control model optimization unit trains the first temperature control model according to the learning strategy. When the loss value of the loss function is less than a preset loss threshold, a second temperature control model is obtained. During the training process, the model will continuously adjust parameters to minimize the value of the loss function. The smaller the value of the loss function, the closer the prediction result of the model is to the actual value, and the better the performance of the model, until the performance of the model reaches a satisfactory level.

[0047] It is worth noting that machine learning models can continuously learn from new data and continuously improve performance without the need for redesign or training from scratch. By optimizing correction parameters and learning strategies, the second temperature control model can more accurately predict and control temperature and improve control accuracy. The model can automatically learn and adapt to new data and environmental changes. Compared with traditional temperature control methods, machine learning models can make predictions and adjustments faster and improve response speed. Through the training of learning strategies, the model can better handle abnormal situations and uncertainties and enhance the robustness of the system.

[0048] In one embodiment, the target control strategy generation module includes: The current temperature data is input into the second temperature control model to obtain a target temperature control strategy. The target temperature control strategy is the best action plan predicted by the model to adjust the temperature of the optical instrument to reach or maintain the optimal operating temperature. Using an optimized model can generate more accurate control strategies faster, improve the accuracy and response speed of temperature control. As time goes by and more data is accumulated, the model can continue to learn and improve, making the control strategy more and more accurate.

[0049] In one embodiment, the temperature control module comprises: The temperature control instruction generating unit obtains the temperature control instruction including the PWM waveform according to the target temperature control strategy, wherein the target temperature control strategy defines a series of control actions required to achieve the desired temperature. PWM is a commonly used signal modulation technology, which controls the average power or voltage of the output signal by changing the width of the pulse. In the temperature control application, the PWM waveform can be used to adjust the power of the heating or cooling element, thereby achieving precise control of the output signal, meeting the needs of different applications and improving the stability and reliability of the system; An instrument temperature control unit controls a heating component and a cooling component according to the PWM waveform to control the temperature of the optical instrument; Among them, the duty cycle of the PWM waveform can be used for control. By adjusting the duty cycle of the PWM signal, precise control of the output signal can be achieved. The duty cycle refers to the ratio of the duration of the high-level state in the PWM waveform to the entire cycle time. For example, if the cycle of a PWM signal is 10ms, and the high level lasts for 5ms, then the duty cycle is 50%. By adjusting the duty cycle, the average power output of the heating or cooling element can be changed, thereby achieving precise control of the temperature. PWM control can control power output very accurately, providing only enough energy to maintain or adjust the temperature when needed, thereby reducing energy waste. It can be adjusted quickly, allowing the system to respond quickly to temperature changes and improve the response speed of the control. PWM control can adapt to different loads and environmental conditions because it can dynamically adjust the duty cycle based on real-time data.

[0050] It should be noted that the temperature control system of an optical instrument provided in an embodiment of the present invention is used to execute all process steps of a purification control method for a dust-free workshop in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0051] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a correction parameter optimization program. When the processor executes the computer program, the steps in the above-mentioned temperature control method embodiments of the optical instrument are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules in the above-mentioned system embodiments are realized, such as the target strategy generation module.

[0052] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0053] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0054] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0055] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0056] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0057] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0058] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A temperature control method for an optical instrument, characterized in that: Executed by a computer, including: Obtain instrument parameters, historical temperature data, current temperature data and external ambient temperature; Inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; Calculate according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain optimized correction parameters; Optimizing the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; Inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; The temperature of the optical instrument is controlled according to the target temperature control strategy.

2. The temperature control method of an optical instrument according to claim 1, characterized in that: The calculation is performed according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain the optimized correction parameters, including: Calculating a temperature variation coefficient according to the external environment temperature and an initial correction parameter included in the initial temperature control strategy; Iterative optimization is performed according to the instrument parameters, the historical temperature data, the external environment temperature and the temperature variation coefficient to obtain optimized correction parameters.

3. The temperature control method of an optical instrument according to claim 2, characterized in that: The iterative optimization is performed according to the instrument parameters, the historical temperature data, the external environment temperature and the temperature variation coefficient to obtain the optimized correction parameters, including: Substitute the instrument parameters, the historical temperature data, the ambient temperature and the temperature variation coefficient into the following formula, perform iterative optimization, and determine the parameters that satisfy the following formula as the optimized correction parameters: , in, is the optimized target temperature, is the current temperature, M is the temperature variation coefficient; Q is the ambient temperature; T is the historical temperature data; the instrument parameters include the temperature gradient S of the optical device, the focal length Z of the optical lens, the temperature variation rate S1 at the connection between the light source and the optical device, the temperature variation rate S2 on the surface of the optical device, and the coating material coefficient S3 of the optical lens; Among them, f is the set optical signal impact factor, and b is the atmospheric pressure coefficient; The optimization correction parameters include a correction coefficient K, a temperature influence coefficient P and an environmental factor coefficient d.

4. The temperature control method of an optical instrument according to claim 2, characterized in that: The temperature variation coefficient is calculated based on the external environment temperature and the initial correction parameter included in the initial temperature control strategy, including: The temperature variation coefficient is calculated by the following formula, Wherein, M is the temperature variation coefficient, the initial correction parameters include the environmental factor coefficient d; Z is the focal length of the optical lens, Q is the external environment temperature, b is the atmospheric pressure coefficient, and f is the optical signal influencing factor. and is the coefficient to be determined.

5. The temperature control method of an optical instrument according to claim 1, characterized in that: The training process of the first temperature control model includes: Building a machine learning model based on the historical temperature data, and training the machine learning model; When the training times of the machine learning model reaches a preset maximum number of times, the training is determined to be completed and a first temperature control model is obtained.

6. The temperature control method of an optical instrument according to claim 1, characterized in that: The step of optimizing the first temperature control model according to the optimization correction parameter to obtain a second temperature control model includes: Storing the optimized correction parameters in the first temperature control model; Generate a learning strategy according to the optimization correction parameter and the first temperature control model, wherein the learning strategy includes a loss function, a learning rate, and an optimization algorithm; The first temperature control model is trained according to the learning strategy, and when the loss value of the loss function is less than a preset loss threshold, a second temperature control model is obtained.

7. The temperature control method of an optical instrument according to claim 1, characterized in that: The step of controlling the temperature of the optical instrument according to the target temperature control strategy comprises: According to the target temperature control strategy, a temperature control instruction including a PWM waveform is obtained; According to the PWM waveform, the heating component and the cooling component are controlled to control the temperature of the optical instrument.

8. A temperature control system for an optical instrument, characterized in that: include: Data acquisition module, used to obtain instrument parameters, historical temperature data, current temperature data and external environment temperature; An initial control strategy generating module, used for inputting the current temperature data into a preset first temperature control model to obtain an initial temperature control strategy; A correction parameter optimization module, used for calculating according to the instrument parameters, the historical temperature data, the external environment temperature and the initial temperature control strategy to obtain an optimized correction parameter; A temperature control model optimization module, used to optimize the first temperature control model according to the optimization correction parameter to obtain a second temperature control model; a target control strategy generating module, inputting the current temperature data into the second temperature control model to obtain a target temperature control strategy; The temperature control module is used to control the temperature of the optical instrument according to the target temperature control strategy.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the temperature control method of the optical instrument according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the temperature control method of the optical instrument according to any one of claims 1 to 7.