Optical detection light source calibration method, device, equipment and storage medium
By collecting and iteratively optimizing optical detection light sources, real-time monitoring and automatically compensate for the drift trend of light source parameters, and building a correlation model between light source parameters and environmental conditions, the problem of low light source calibration efficiency in the existing technology is solved, and high-precision and stable light source calibration is achieved.
Patent Information
- Application Number
- CN202510254021.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-03-05
AI Technical Summary
The existing optical detection light source calibration methods are difficult to monitor changes in light source parameters in real time, cannot effectively compensate for the performance drift of light source, and lack an automated adjustment mechanism that matches the requirements of the detection task, resulting in insufficiency of calibration.
By collecting and iteratively optimizing the target light source, the optimal parameter settings and performance indicators are obtained; the drift trend of the light source parameters is monitored in real time, and the correlation model between the light source parameters and environmental conditions is constructed; based on the correlation model and the corrected light source parameters, the standard reference spectrum matching the current detection task is selected and the light source calibration is performed.
Real-time monitoring and automatic compensation of light source parameters are realized, the accuracy and stability of light source calibration are improved, and the accuracy and flexibility requirements of complex detection tasks for light sources are met.
Smart Images

Figure CN119743881B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical technology, and in particular to an optical detection light source calibration method, device, equipment and storage medium. Background Art
[0002] Optical inspection technology is widely used in industrial inspection, medical imaging, scientific research and other fields. As the core component of the optical inspection system, the performance and stability of the light source directly affect the accuracy and reliability of the inspection. In order to ensure the accuracy of the inspection results, the calibration of the optical inspection light source becomes a vital task. The calibration process usually requires the measurement and adjustment of parameters such as the spectral characteristics, brightness uniformity and power stability of the light source so that the light source output meets the requirements of the inspection task.
[0003] Most existing light source calibration methods rely on manual operation or single calibration. This method makes it difficult to monitor changes in light source parameters in real time, especially during long-term use, when the performance drift of the light source caused by factors such as ambient temperature, humidity or aging cannot be compensated in time. In addition, traditional calibration methods usually set the light source for a single detection task, lacking an automated adjustment mechanism that matches environmental conditions and actual task requirements, resulting in low calibration efficiency and failure to meet the requirements of complex detection tasks for light source accuracy and flexibility. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problems in the existing optical detection light source calibration method, such as difficulty in real-time monitoring of light source parameter changes, inability to effectively compensate for light source performance drift, and lack of an automated adjustment mechanism that matches the detection task requirements;
[0005] A first aspect of the present invention provides an optical detection light source calibration method, the optical detection light source calibration method comprising:
[0006] Performing multi-parameter data collection and processing on a target light source, and iteratively optimizing light source parameters of the target light source according to the collected multi-parameter data, to obtain optimal parameter settings and performance indicators of the target light source;
[0007] According to the optimal parameter settings and performance indicators, the target light source is monitored in real time to obtain drift trend data of light source parameters;
[0008] Automatically compensating the target light source according to the drift trend data to obtain corrected light source parameters, and cumulatively analyzing the corrected light source parameters to obtain a correlation model between the light source parameters and environmental conditions;
[0009] According to the association model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the light source calibration is performed based on the standard reference spectrum and the actual output of the target light source.
[0010] Optionally, in a first implementation of the first aspect of the present invention, the multi-parameter data acquisition process is performed on the target light source, and the light source parameters of the target light source are iteratively optimized according to the acquired multi-parameter data to obtain the optimal parameter settings and performance indicators of the target light source, including:
[0011] Performing multi-parameter scanning sampling processing on the target light source to obtain an original data set, and performing principal component analysis processing on the original data set to obtain the main influencing factors of the light source parameters;
[0012] Performing parameter adjustment processing on the target light source according to the main influencing factors to obtain initial parameter values of the target light source, and performing grid division processing on the parameter space of the target light source according to the initial parameter values to obtain a multi-dimensional sampling grid;
[0013] Performing high-precision sampling processing on the target light source on a multidimensional sampling grid to obtain a multidimensional data set, and performing nonlinear optimization processing on the multidimensional data set to obtain an objective function;
[0014] Gradient descent processing is performed on the light source parameters according to the objective function to obtain a parameter update direction, and an iterative adjustment processing is performed on the target light source along the parameter update direction to obtain an optimal parameter setting and performance index of the target light source.
[0015] Optionally, in a second implementation of the first aspect of the present invention, the real-time monitoring and processing of the target light source according to the optimal parameter setting and performance index to obtain drift trend data of the light source parameters includes:
[0016] Performing parameter configuration processing on the target light source according to the optimal parameter setting to obtain a reference light source output, and performing real-time data acquisition processing on the target light source to obtain real-time output data of the light source;
[0017] Performing difference calculation processing on the reference light source output and the light source real-time output data to obtain parameter deviation data, and performing normalization processing on the parameter deviation data according to a preset parameter variation range to obtain normalized deviation data;
[0018] Based on the performance index, the normalized deviation data is weighted to obtain a weighted deviation sequence, and a time series analysis algorithm is applied to the weighted deviation sequence to extract long-term trend components to obtain drift trend data of light source parameters.
[0019] Optionally, in a third implementation of the first aspect of the present invention, the automatic compensation processing of the target light source according to the drift trend data to obtain corrected light source parameters, and cumulative analysis of the corrected light source parameters to obtain an association model between the light source parameters and the environmental conditions includes:
[0020] Performing time series prediction processing on the drift trend data to obtain parameter prediction values at future time points, calculating compensation amounts based on the parameter prediction values and current light source parameters, and quantizing the compensation amounts to obtain discrete compensation instructions;
[0021] Sending the discretization compensation instruction to the control system of the target light source, adjusting the light source parameters in real time, and obtaining corrected light source parameters;
[0022] Performing time series storage processing on the corrected light source parameters to obtain a parameter history database, and performing periodic data aggregation processing on the parameter history database to obtain parameter change trends at different time scales;
[0023] Performing time synchronization processing on the parameter change trends and environmental monitoring data of the different time scales to obtain a long-term parameter-environment corresponding data set, and applying a multivariate regression analysis algorithm to the long-term parameter-environment corresponding data set to construct a preliminary association model between light source parameters and environmental conditions;
[0024] According to the preliminary correlation model, historical data is retrospectively analyzed, model residuals are calculated, and statistical analysis is performed on the model residuals to obtain error distribution characteristics, and the preliminary correlation model is corrected based on the error distribution characteristics to obtain an optimized correlation model between light source parameters and environmental conditions.
[0025] Optionally, in a fourth implementation of the first aspect of the present invention, the historical data is retrospectively analyzed according to the preliminary association model, the model residuals are calculated, and the model residuals are statistically analyzed to obtain error distribution characteristics, and the preliminary association model is corrected based on the error distribution characteristics to obtain an optimized association model of light source parameters and environmental conditions, including:
[0026] Performing sliding window processing on the historical data to obtain sub-data sets of multiple time windows, and applying the preliminary association model to each sub-data set to perform parameter prediction to obtain predicted parameter values for each time window;
[0027] Compare and calculate the predicted parameter value with the actual parameter value stored in the parameter history database to obtain time series residual data, and perform autocorrelation analysis on the time series residual data to obtain the time correlation characteristics of the residual;
[0028] Decomposing the time series residual data according to the time correlation characteristics to obtain a periodic residual component and a random residual component;
[0029] Performing spectrum analysis on the periodic residual component to obtain main periodic features, and constructing a periodic correction function according to the main periodic features;
[0030] Performing probability distribution fitting processing on the random residual component to obtain a probability density function of the residual;
[0031] The parameters of the preliminary correlation model are updated according to the periodic correction function and the probability density function to obtain an optimized correlation model between the light source parameters and the environmental conditions.
[0032] Optionally, in a fifth implementation of the first aspect of the present invention, selecting a standard reference spectrum matching the current detection task according to the association model and the corrected light source parameters, and performing light source calibration based on the standard reference spectrum and the actual output of the target light source includes:
[0033] According to the correlation model, the ideal light source parameters under the current environmental conditions are predicted and processed to obtain the target spectral characteristics;
[0034] Applying spectral similarity calculation processing to a preset standard reference spectrum library, and selecting a standard reference spectrum that best matches the target spectrum feature;
[0035] Performing wavelength calibration processing on the actual output spectrum of the target light source and the standard reference spectrum to obtain a calibrated spectrum data pair;
[0036] Calculating a spectral response function according to the calibrated spectral data, and performing an inverse operation on the spectral response function to obtain a light source correction coefficient;
[0037] The light source correction coefficient is applied to the control system of the target light source, and the light source output is modulated in real time to complete the light source calibration.
[0038] Optionally, in a sixth implementation of the first aspect of the present invention, calculating a spectral response function according to the calibrated spectral data and performing an inverse operation on the spectral response function to obtain a light source correction coefficient includes:
[0039] Performing discrete Fourier transform processing on the calibrated spectral data pair to obtain spectral data represented in the frequency domain;
[0040] Constructing a transfer function matrix according to the spectral data represented in the frequency domain, and performing singular value decomposition processing on the transfer function matrix to obtain main eigenvectors of the spectral response function;
[0041] Regularizing the main eigenvector to obtain a normalized spectral response function, and applying an inverse filtering algorithm to the normalized spectral response function to obtain a preliminary correction coefficient;
[0042] Performing test output processing on the target light source according to the preliminary correction coefficient to obtain a corrected actual spectrum, and performing residual analysis processing on the corrected actual spectrum and a standard reference spectrum to obtain a residual spectrum;
[0043] The preliminary correction coefficient is iteratively optimized according to the residual spectrum to obtain the light source correction coefficient.
[0044] A second aspect of the present invention provides an optical detection light source calibration device, the optical detection light source calibration device comprising:
[0045] A data acquisition module is used to perform multi-parameter data acquisition processing on a target light source, and iteratively optimize the light source parameters of the target light source according to the acquired multi-parameter data to obtain the optimal parameter settings and performance indicators of the target light source;
[0046] A real-time monitoring module, used to perform real-time monitoring processing on the target light source according to the optimal parameter settings and performance indicators, and obtain drift trend data of the light source parameters;
[0047] A compensation association module, used for automatically compensating the target light source according to the drift trend data to obtain corrected light source parameters, and performing cumulative analysis on the corrected light source parameters to obtain an association model between the light source parameters and environmental conditions;
[0048] The light source calibration module is used to select a standard reference spectrum that matches the current detection task according to the association model and the corrected light source parameters, and perform light source calibration based on the standard reference spectrum and the actual output of the target light source.
[0049] The third aspect of the present invention provides an optical detection light source calibration device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; the at least one processor calls the instructions in the memory so that the optical detection light source calibration device performs the steps of the above-mentioned optical detection light source calibration method.
[0050] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned optical detection light source calibration method.
[0051] The above-mentioned optical detection light source calibration method, device, equipment and storage medium, through multi-parameter data collection of the target light source, iteratively optimizes the light source parameters, and obtains the optimal parameter settings and performance indicators. Based on the optimal parameter settings and performance indicators, the target light source is monitored and processed in real time, the drift trend data of the light source parameters are obtained, and automatic compensation is performed according to the drift trend to generate corrected light source parameters. By cumulatively analyzing the corrected light source parameters, an association model between the light source parameters and environmental conditions is constructed. According to the association model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the actual output of the target light source is calibrated based on the reference spectrum. The present invention combines multi-parameter data collection and optimization, drift trend monitoring and automatic compensation processing to realize dynamic association modeling of light source parameters and environmental conditions, perform adaptive calibration, and improve the accuracy and stability of the detection system.
[0052] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a schematic diagram of a first embodiment of a method for calibrating an optical detection light source in an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of an embodiment of an optical detection light source calibration device in an embodiment of the present invention;
[0056] Figure 3 It is a schematic diagram of an embodiment of an optical detection light source calibration device in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0059] To facilitate understanding of this embodiment, a method for calibrating an optical detection light source disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0060] 101. Perform multi-parameter data collection and processing on the target light source, and iteratively optimize the light source parameters of the target light source according to the collected multi-parameter data to obtain the optimal parameter setting and performance index of the target light source;
[0061] In one embodiment of the present invention, the multi-parameter data acquisition processing of the target light source and the iterative optimization processing of the light source parameters of the target light source based on the acquired multi-parameter data to obtain the optimal parameter settings and performance indicators of the target light source include: performing multi-parameter scanning sampling processing on the target light source to obtain an original data set, and performing principal component analysis processing on the original data set to obtain main influencing factors of the light source parameters; performing parameter adjustment processing on the target light source according to the main influencing factors to obtain initial parameter values of the target light source, and performing grid division processing on the parameter space of the target light source according to the initial parameter values to obtain a multidimensional sampling grid; performing high-precision sampling processing on the target light source on the multidimensional sampling grid to obtain a multidimensional data set, and performing nonlinear optimization processing on the multidimensional data set to obtain an objective function; performing gradient descent processing on the light source parameters according to the objective function to obtain a parameter update direction and iteratively adjusting the target light source along the parameter update direction to obtain the optimal parameter settings and performance indicators of the target light source.
[0062] Specifically, it is necessary to determine the parameters to be collected, which usually include the current, voltage, temperature, spectral distribution, light intensity, etc. of the light source. After determining the parameters, the parameter space is systematically sampled by grid scanning or random sampling. For example, the current range can be set to 0-1000mA and scanned in steps of 10mA; the temperature range can be set to 20-80℃ and sampled at intervals of 5℃. During the sampling process, high-precision spectrometers, light intensity meters and other equipment are used to measure the light source output in real time, and the set values of various parameters are recorded at the same time. In this way, an original data set containing multidimensional parameters and corresponding light source output characteristics can be obtained. The data set is a multidimensional matrix, where each row represents a set of parameter settings and each column represents a parameter or output feature. In order to improve the reliability of the data, each set of parameter settings needs to be sampled repeatedly multiple times, and the average value is taken as the final result.
[0063] Specifically, after obtaining the original data set, it is necessary to perform principal component analysis on it to extract the main influencing factors of the light source parameters. Principal component analysis (PCA) is a commonly used dimensionality reduction and feature extraction method. First, the original data set is standardized to eliminate the dimensional differences between different parameters. Then the covariance matrix of the data is calculated, and the eigenvalue decomposition of the covariance matrix is performed. The eigenvalues are sorted from large to small, and the corresponding eigenvectors are the principal components. The first few principal components with a cumulative contribution rate of 85% or 90% are selected as the main influencing factors. These principal components are linear combinations of the original parameters and reflect the main direction of change of the data. By analyzing the composition of the principal components, it is possible to determine which original parameters have the greatest impact on the performance of the light source. For example, it may be found that the first principal component is mainly composed of current and temperature, indicating that these two parameters have the most significant impact on the output of the light source. Principal component analysis can not only reduce the computational complexity of subsequent optimization, but also reveal the intrinsic relationship between parameters and provide guidance for parameter adjustment.
[0064] Specifically, adjusting the parameters of the target light source according to the main influencing factors is the starting point of the optimization process. First, the original parameters are mapped to the principal component space to obtain the coordinates of each sampling point in the principal component space. Then, a point close to the center with good performance indicators is selected in the principal component space, and it is mapped back to the original parameter space to obtain the initial parameter value of the target light source. This initial value should have good comprehensive performance and provide a good starting point for subsequent optimization. Next, the parameter space of the target light source is gridded with the initial parameter value as the center. The range of the grid can be determined according to ±20% of the initial value, and the density of the grid depends on the required accuracy and computing resources. For example, for the current parameter, if the initial value is 500mA, the grid range can be set to 400-600mA, and divided with a step size of 5mA. Similar grid division is performed for each parameter, and finally a multidimensional sampling grid is formed. This grid structure makes the subsequent high-precision sampling more systematic and comprehensive, and can conduct detailed exploration around the initial parameters to find the optimal parameter combination.
[0065] Specifically, high-precision sampling is performed on a multidimensional sampling grid to obtain more accurate data for subsequent nonlinear optimization. The sampling process uses high-precision measurement equipment, such as high-resolution spectrometers and precision current sources, to ensure the accuracy of the data. Each point in the grid is measured repeatedly and the average is taken to reduce the influence of random errors. The measured indicators include spectral distribution, color temperature, color rendering index, luminous flux and other parameters directly related to the performance of the light source. At the same time, auxiliary indicators such as power consumption and thermal management efficiency need to be recorded. In this way, a high-quality multidimensional data set is obtained, which describes in detail the performance changes of the light source in the parameter space. Next, this multidimensional data set is subjected to nonlinear optimization processing, with the aim of establishing a mathematical model that can accurately describe the relationship between parameters and performance. Commonly used nonlinear optimization methods include least squares method, genetic algorithm, particle swarm optimization, etc. Through these algorithms, a nonlinear function can be fitted, which is the so-called objective function. The objective function is usually a multi-objective optimization problem, which requires considering multiple performance indicators at the same time, such as light efficiency, color rendering, stability, etc. The weighted sum method can be used to merge multiple objectives into a single objective function, and the choice of weights reflects the importance of different performance indicators.
[0066] Specifically, finally, the light source parameters are subjected to gradient descent according to the objective function. Gradient descent is an iterative optimization algorithm that updates the parameters along the negative gradient direction of the objective function to find the local minimum of the function. First, the gradient of the objective function at the current parameter point is calculated, and this gradient points to the direction in which the function value increases fastest. The direction of parameter update is the opposite direction of the gradient, and the step size of the update is determined by the learning rate. The choice of learning rate is critical. Too large a learning rate may lead to missing the optimal solution, while too small a learning rate may slow down the convergence speed. An adaptive learning rate strategy can be used to dynamically adjust the learning rate according to the optimization process. The target light source is iteratively adjusted along the update direction, and the value of the objective function is re-evaluated after each adjustment. If the function value continues to decrease, it means that the optimization is proceeding in the right direction; if the function value begins to rise or fluctuate, it may be necessary to adjust the learning rate or use techniques such as momentum method to improve convergence. The iterative process continues until the stopping condition is met, such as reaching the preset number of iterations, or the parameter change is less than a certain threshold. The final parameter value is the optimal parameter setting of the target light source, and the corresponding objective function value reflects the performance index of the light source. This set of optimal parameters not only enables the light source to achieve optimal performance, but also ensures stability and reliability in actual use.
[0067] 102. According to the optimal parameter settings and performance indicators, the target light source is monitored and processed in real time to obtain the drift trend data of the light source parameters;
[0068] In one embodiment of the present invention, the target light source is monitored in real time according to the optimal parameter settings and performance indicators to obtain drift trend data of the light source parameters, including: parameter configuration processing of the target light source according to the optimal parameter settings to obtain a reference light source output, and real-time data acquisition processing of the target light source to obtain real-time light source output data; difference calculation processing of the reference light source output and the real-time light source output data to obtain parameter deviation data, and normalizing the parameter deviation data according to a preset parameter variation range to obtain normalized deviation data; weighting the normalized deviation data based on the performance indicators to obtain a weighted deviation sequence, and applying a time series analysis algorithm to the weighted deviation sequence to extract long-term trend components to obtain drift trend data of the light source parameters.
[0069] Specifically, the optimal parameter values obtained by the previous optimization are first input into the light source control system, including key parameters such as current, voltage, and temperature. The control system adjusts the working state of the light source according to these parameter values to achieve the ideal output condition. Subsequently, a high-precision spectrometer and photometer are used to accurately measure the output of the light source in this optimal state. The measurement content includes key indicators such as spectral distribution, color temperature, color rendering index, and luminous flux. After processing, these measurement data form a benchmark light source output data set as a reference standard for subsequent real-time monitoring. The benchmark data collection process requires repeated measurements under stable environmental conditions, and the average value is taken to eliminate the influence of random errors. At the same time, the environmental parameters during the collection, such as ambient temperature and humidity, are recorded so that necessary corrections can be made during subsequent analysis. The benchmark light source output data set not only contains the specific values of each performance indicator, but also includes the allowable fluctuation range of these indicators, which will be used for subsequent deviation judgment.
[0070] Specifically, after obtaining the output of the reference light source, it is necessary to continuously collect and process the target light source in real time. This process requires the establishment of an automated data acquisition system that can sample the various parameters and output characteristics of the light source at a sufficiently high frequency. The selection of the sampling frequency requires a balance between data accuracy and system load, and can usually be set to sample once per second or faster. The collected data includes electrical parameters (such as current, voltage, power), thermal parameters (such as junction temperature, heat sink temperature), optical parameters (such as spectral distribution, light intensity, color temperature, color rendering index), etc. of the light source. These data are collected through various sensors and measuring devices, and then preliminarily processed and stored by data acquisition cards or industrial computers. The real-time data acquisition system needs to have high reliability and stability, and be able to work continuously for a long time without data loss or system crash. At the same time, the system should also have real-time data visualization function, so that operators can grasp the working status of the light source at any time. The collected real-time output data forms a time series, and each time point corresponds to a complete set of light source parameters and performance indicators.
[0071] Specifically, next, the difference calculation processing is performed on the benchmark light source output and the real-time light source output data to obtain parameter deviation data. This step quantifies the real-time deviation degree of the light source performance by comparing the difference between the real-time data and the benchmark data. The difference calculation needs to be performed separately for each parameter and performance index. For continuous data (such as light intensity and color temperature), the difference or percentage deviation between the real-time value and the benchmark value can be directly calculated. For discrete data (such as color rendering index), it can be calculated whether the real-time value falls within the predetermined allowable range. The result of the difference calculation forms a multi-dimensional parameter deviation data set, and each dimension corresponds to a monitored parameter or index. In order to make the deviations between different parameters comparable, the parameter deviation data needs to be normalized according to the preset parameter variation range. The normalization method can adopt minimum-maximum normalization or Z-score normalization. For example, when using minimum-maximum normalization, the deviation value of each parameter can be mapped to the interval [0,1], where 0 indicates no deviation and 1 indicates reaching the maximum allowable deviation. The normalized deviation data obtained after such processing enables parameters of different dimensions and scales to be compared and analyzed in the same framework.
[0072] Specifically, although the normalized deviation data makes each parameter comparable, it does not mean that all parameters have the same degree of influence on the performance of the light source. Therefore, it is necessary to weight the normalized deviation data based on the performance index. The purpose of weighting is to highlight the key parameters that have a greater impact on the overall performance of the light source, while reducing the impact of minor parameters. The weights can be determined based on the results of a previous sensitivity analysis or can be set based on expert experience. For example, for a lighting source with high color rendering as the main goal, a higher weight may be given to the deviation of the color rendering index, while a lower weight may be given to the deviation of power consumption. The result of the weighted processing is a weighted deviation sequence, which comprehensively reflects the changes in the performance of the light source over time. The weighted deviation value at each time point can be regarded as the comprehensive performance score of the light source at that moment. The lower the score, the closer the performance of the light source is to the ideal state. This weighted deviation sequence is a time series data that contains comprehensive information on the changes in the performance of the light source over time.
[0073] Specifically, finally, the time series analysis algorithm is applied to the weighted deviation sequence to extract the long-term trend component and obtain the drift trend data of the light source parameters. The purpose of this step is to extract meaningful long-term change trends from the original sequence that may contain noise and short-term fluctuations. First, the moving average method can be used to smooth the original sequence to eliminate the impact of short-term fluctuations. Then, the seasonal decomposition method (such as STL decomposition) is used to decompose the sequence into three components: trend, seasonality, and residual. Among them, the trend component represents the long-term drift trend of the light source parameters. For trends of different time scales, moving windows of different lengths can be used for analysis. For example, a 24-hour window can be used to obtain a daily scale trend, and a 30-day window can be used to obtain a monthly scale trend. In addition, the ARIMA model or exponential smoothing method can be used to model and predict trends to estimate the drift in the future. Through these analyses, the drift trend data obtained not only contains the change trend of the light source parameters in the past period of time, but also provides a possible change forecast in the future. These data provide an important basis for subsequent automatic compensation and maintenance decisions.
[0074] 103. Automatically compensate the target light source according to the drift trend data to obtain corrected light source parameters, and cumulatively analyze the corrected light source parameters to obtain a correlation model between the light source parameters and environmental conditions;
[0075] In one embodiment of the present invention, the target light source is automatically compensated according to the drift trend data to obtain corrected light source parameters, and the corrected light source parameters are cumulatively analyzed to obtain a correlation model between the light source parameters and the environmental conditions, which includes: performing time series prediction processing on the drift trend data to obtain parameter prediction values at future time points, and calculating compensation amounts based on the parameter prediction values and current light source parameters, and quantizing the compensation amounts to obtain discrete compensation instructions; sending the discrete compensation instructions to the control system of the target light source, adjusting the light source parameters in real time to obtain corrected light source parameters; performing time series storage processing on the corrected light source parameters to obtain to a parameter history database, and perform periodic data aggregation processing on the parameter history database to obtain parameter change trends at different time scales; perform time synchronization processing on the parameter change trends at different time scales and environmental monitoring data to obtain a long-term parameter-environment corresponding data set, and apply a multivariate regression analysis algorithm to the long-term parameter-environment corresponding data set to construct a preliminary association model between light source parameters and environmental conditions; perform a retrospective analysis on historical data according to the preliminary association model, calculate model residuals, and perform statistical analysis on the model residuals to obtain error distribution characteristics, and modify the preliminary association model based on the error distribution characteristics to obtain an optimized association model between light source parameters and environmental conditions.
[0076] Specifically, advanced time series analysis techniques, such as ARIMA (autoregressive integrated moving average) models or LSTM (long short-term memory) neural networks, are used to predict the future changes of each key light source parameter. The time span of the prediction is usually set to 24 hours to a week to balance the accuracy and practicality of the prediction. When making predictions, it is necessary to consider the seasonal and cyclical characteristics of the data, such as the daily and weekly changes in the frequency of light source use. The training of the prediction model uses historical drift data, and the model parameters are continuously optimized through rolling prediction and error analysis. The predicted value of the parameter at the future time point is a multidimensional time series, with each dimension corresponding to a light source parameter. Subsequently, these predicted values are compared with the currently measured light source parameters to calculate the compensation required for each parameter at the future time point. The calculation of the compensation amount takes into account the importance weight and allowable fluctuation range of the parameter to ensure that the key parameters are compensated first. In order to convert the theoretical compensation amount into an actual executable instruction, quantization processing is required. The quantization process takes into account the resolution and adjustment step of the control system and converts the continuous compensation amount into discrete control instructions. For example, if the minimum step size of current regulation is 0.1 mA, the calculated current compensation amount needs to be rounded to the nearest multiple of 0.1 mA. The discretized compensation instruction obtained in this way not only conforms to the operating characteristics of the control system, but also can maximize the desired compensation effect.
[0077] Specifically, sending the discrete compensation instruction to the control system of the target light source is the key link to achieve automatic compensation. This process first requires the establishment of a reliable communication interface, usually using industrial-grade communication protocols such as Modbus, Profibus or OPC UA to ensure the accurate transmission and execution of the instruction. After receiving the compensation instruction, the control system will verify the instruction according to the preset priority and safety restrictions. After the verification, the control system will gradually adjust the various parameters of the light source, such as driving current, working voltage, color temperature control, etc. according to the instruction. The adjustment process adopts a closed-loop control strategy, and the actual effect will be verified through sensor feedback after each minor adjustment to ensure the accuracy of the adjustment. In order to avoid the impact of sudden and large changes on the performance of the light source, the adjustment process usually adopts a progressive method to decompose the total compensation amount into multiple small steps and gradually implement it. While adjusting the parameters, the control system will monitor the various performance indicators of the light source in real time, such as luminous flux, color rendering index, color temperature, etc., to ensure that the adjusted parameter combination can meet the expected performance requirements. After the adjustment is completed, the system will record the corrected light source parameters, which reflect the latest working status of the light source after compensation, and provide basic data for subsequent analysis and optimization.
[0078] Specifically, the time series storage processing of the corrected light source parameters is to build a comprehensive parameter history database. This database not only records the parameter values after each compensation, but also includes the original values before compensation, the compensation amount, and the corresponding timestamps. The storage system uses high-performance time series databases, such as InfluxDB or TimescaleDB, which are specially optimized for time series data and can efficiently process a large amount of time series data. The granularity of data storage is usually set to the minute level to meet the needs of high-precision analysis. In addition to the light source parameters, the database also synchronously records environmental parameters, such as ambient temperature, humidity, atmospheric pressure, etc., to provide a basis for subsequent environmental impact analysis. In order to ensure the integrity and traceability of the data, the storage system also records the operation log of each parameter adjustment, including the reason for adjustment, the operator (if there is manual intervention), and other information. The parameter history database is periodically aggregated to extract valuable information from the massive amount of raw data. The aggregation processing uses a multi-scale analysis method to calculate the parameter statistical characteristics at the hourly, daily, weekly, and monthly levels, such as the mean, standard deviation, maximum, minimum, etc. This multi-scale aggregation can reveal the trend of parameter changes at different time scales, which helps to identify short-term fluctuations and long-term drifts. The aggregation results form a new multi-level time series dataset, where each level corresponds to a time scale and contains the parameter change characteristics at that scale.
[0079] Specifically, the time synchronization of parameter change trends and environmental monitoring data at different time scales is the basis for building a model for associating light source parameters with environmental conditions. This step first requires solving the problem of time alignment of data, because the sampling frequencies of light source parameters and environmental parameters may be different. Through interpolation or resampling techniques, all data are unified to the same time scale, and lower frequency data are usually selected as the benchmark. The time-synchronized data form a comprehensive long-term parameter-environment corresponding data set, which contains light source parameters, environmental parameters and their time relationship. Next, multivariate regression analysis algorithms such as multivariate linear regression, random forest regression or support vector regression are applied to this data set to construct a preliminary association model between light source parameters and environmental conditions. The independent variables of the model include various environmental factors, and the dependent variables are the key performance parameters of the light source. Through this model, the degree of influence of different environmental factors on light source parameters can be quantified, and the theoretical values of light source parameters under given environmental conditions can be predicted. The training process of the model adopts a cross-validation method to prevent overfitting. The preliminary association model provides a first-hand quantitative description of the relationship between light source parameters and environmental conditions, laying the foundation for subsequent refined analysis and optimization.
[0080] Specifically, finally, the preliminary correlation model is optimized to improve its accuracy and applicability. This process first performs a retrospective analysis of historical data, uses the model to predict historical data points, and compares them with actual records to calculate the model residuals. A detailed statistical analysis of the residuals is performed to obtain error distribution characteristics, such as mean, variance, skewness, kurtosis, etc. Based on these error characteristics, the preliminary model is modified, which may involve adding new variables, adjusting interaction terms between variables, introducing nonlinear terms, etc. Through these optimization steps, a more accurate and robust model of the association between light source parameters and environmental conditions is finally obtained, which can better describe and predict the impact of environmental changes on light source performance.
[0081] Furthermore, the historical data is retrospectively analyzed according to the preliminary association model, the model residual is calculated, and the model residual is statistically analyzed to obtain the error distribution characteristics, and the preliminary association model is corrected based on the error distribution characteristics to obtain the optimized association model of the light source parameters and the environmental conditions, including: sliding window processing is performed on the historical data to obtain sub-data sets of multiple time windows, and the preliminary association model is applied to each sub-data set to perform parameter prediction to obtain the predicted parameter value of each time window; the predicted parameter value is compared and calculated with the actual parameter value stored in the parameter history database to obtain the time series residual data , and perform autocorrelation analysis on the time series residual data to obtain the time correlation characteristics of the residuals; decompose the time series residual data according to the time correlation characteristics to obtain periodic residual components and random residual components; perform spectrum analysis on the periodic residual components to obtain main periodic characteristics, and construct a periodic correction function based on the main periodic characteristics; perform probability distribution fitting on the random residual components to obtain the probability density function of the residuals; update the parameters of the preliminary correlation model according to the periodic correction function and the probability density function to obtain the correlation model of the optimized light source parameters and environmental conditions.
[0082] Specifically, first determine the appropriate window size, usually a time span that can cover a complete cycle, such as 24 hours or 7 days. The sliding window moves across the entire historical data set with a fixed step size (such as 1 hour or 1 day), and each move generates a sub-dataset. This processing method can capture the data characteristics in different time periods and help to discover the performance differences of the model at different time scales. For each sub-dataset, a preliminary correlation model is applied for parameter prediction. The prediction process uses the environmental condition data in the sub-dataset as input and outputs the corresponding light source parameter prediction value. In this way, a set of predicted parameter values can be obtained for each time window. These predicted values reflect the prediction ability of the model in different time periods and provide rich information for subsequent model evaluation and optimization. The prediction results are organized into a time series data set, in which each time point corresponds to a set of predicted parameter values. This structure facilitates comparative analysis with actual parameter values.
[0083] Specifically, the key step in evaluating the performance of the model is to compare the predicted parameter values with the actual parameter values stored in the parameter history database. This process first requires extracting the actual parameter values corresponding to the predicted time points from the parameter history database. The comparison calculation uses a variety of indicators, including absolute error, relative error, root mean square error, etc., to comprehensively evaluate the accuracy of the prediction. The calculated time series residual data reflects the change of the deviation between the model prediction and the actual value over time. The purpose of autocorrelation analysis on these residual data is to reveal the possible time correlation in the residuals. Autocorrelation analysis uses ACF (autocorrelation function) and PACF (partial autocorrelation function) tools to calculate the correlation coefficients under different time lags. By analyzing these correlation coefficients, the time correlation characteristics of the residuals can be obtained, such as whether there are significant periodic, trend or seasonal patterns. These characteristics provide important clues for further optimizing the model, indicating possible systematic deviations or insufficiently considered time dependencies in the model.
[0084] Specifically, decomposing the time series residual data according to the time correlation characteristics is a key step to deeply understand the residual structure. This process usually uses time series decomposition techniques, such as STL (Seasonal and Trend decomposition using Loess) or X-12-ARIMA method. The purpose of decomposition is to split the residual data into periodic components and random components. The periodic component reflects the regular changes in the residual, which may be due to the influence of periodic environmental factors that the model fails to fully capture or the periodic changes of the light source itself. The random component represents the fluctuations that cannot be explained by the deterministic pattern. This decomposition not only helps to identify systematic deviations in the model, but also provides direction for subsequent optimization strategies. The spectral analysis of the periodic residual components is to accurately quantify their periodic characteristics. This step usually uses techniques such as fast Fourier transform (FFT) or power spectral density analysis to convert the time domain signal into a frequency domain representation. By analyzing the spectrum, the main periodic components, such as daily cycles, weekly cycles or seasonal cycles, can be identified. The frequency and amplitude information of these main periodic features provides the basis for constructing the periodic correction function. The periodic correction function is usually in the form of a Fourier series, where the coefficients of the various frequency components are determined based on the results of the spectrum analysis. This correction function can capture the periodic deviations in the model predictions and compensate for them accordingly in subsequent predictions.
[0085] Specifically, the probability distribution fitting process of the random residual component is to characterize the characteristics of random errors in model prediction. This step first performs statistical analysis on the random residual data and calculates its mean, variance, skewness, kurtosis and other statistics. Then, try to use a variety of probability distribution models for fitting. Common distributions include normal distribution, t distribution, Laplace distribution, etc. The fitting process uses statistical techniques such as maximum likelihood estimation or moment method to estimate the optimal parameters for each distribution. By comparing the goodness of fit of different distributions (such as AIC, BIC criteria), the distribution model that best describes the characteristics of random residuals is selected. The final probability density function not only describes the distribution characteristics of random errors, but also provides a theoretical basis for subsequent uncertainty analysis and risk assessment. This function can be used to generate confidence intervals, evaluate the reliability of prediction results, or simulate random errors in Monte Carlo simulations.
[0086] Specifically, finally, the parameters of the preliminary correlation model are updated according to the periodic correction function and the probability density function to obtain the optimized correlation model between the light source parameters and the environmental conditions. This step first integrates the periodic correction function into the original model, usually as an additional correction term or multiplier factor. This can systematically compensate for the periodic deviation in the model prediction. Then, using the probability density function of the random residual, an error term is constructed and added to the model to reflect the uncertainty of the prediction. The update process of the model parameters uses advanced optimization algorithms, such as maximum likelihood estimation or Bayesian update method, while considering the original data and the newly introduced correction function. The optimization process may require multiple iterations, and each iteration will evaluate the prediction performance and generalization ability of the model. The final optimized model can not only more accurately predict the changes of light source parameters with environmental conditions, but also provide confidence intervals for the prediction results, providing more comprehensive information support for light source control and management decisions. This optimized model comprehensively considers systematic deviations and random errors, can better adapt to complex practical application environments, and improve the accuracy and reliability of light source parameter prediction and control.
[0087] 104. According to the correlation model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the light source calibration is performed based on the standard reference spectrum and the actual output of the target light source.
[0088] In one embodiment of the present invention, the method of selecting a standard reference spectrum that matches the current detection task based on the association model and the corrected light source parameters, and performing light source calibration based on the standard reference spectrum and the actual output of the target light source includes: predicting the ideal light source parameters under the current environmental conditions based on the association model to obtain target spectral characteristics; applying spectral similarity calculation processing to a preset standard reference spectral library to select a standard reference spectrum that best matches the target spectral characteristics; performing wavelength calibration processing on the actual output spectrum of the target light source and the standard reference spectrum to obtain a calibrated spectral data pair; calculating a spectral response function based on the calibrated spectral data pair, and performing inverse operation processing on the spectral response function to obtain a light source correction coefficient; applying the light source correction coefficient to the control system of the target light source, performing real-time modulation processing on the light source output, and completing the light source calibration.
[0089] Specifically, we first need to obtain real-time data of the current environment, including environmental factors such as temperature, humidity, and air pressure that may affect the performance of the light source. These data are collected in real time through a sensor network distributed around the light source. After obtaining the environmental data, it is input into the previously established optimized light source parameter and environmental condition association model. The model will predict the various parameters that the light source should have under ideal conditions, such as color temperature, color rendering index, spectral distribution, etc., based on the current environmental conditions. These predicted parameters constitute the target spectral characteristics. The target spectral characteristics are a multidimensional vector, and each dimension represents a key feature of the spectrum, such as the main wavelength, half-peak width, energy distribution, etc. This prediction process not only takes into account the direct impact of environmental factors, but also includes the performance drift of the light source that may be caused by environmental changes. In this way, the target spectral characteristics obtained can adapt to the current environmental conditions to the greatest extent, ensuring the best performance of the light source in the actual use environment.
[0090] Specifically, applying spectral similarity calculation processing to the preset standard reference spectrum library and selecting the most matching standard reference spectrum is a key step to ensure the accuracy of light source calibration. The standard reference spectrum library is a database containing various standard light source spectra, which are usually from the standards set by the International Commission on Illumination (CIE) or national standards organizations. In order to select the most suitable reference spectrum from this library, it is necessary to calculate the similarity between each standard spectrum and the previously predicted target spectrum characteristics. The similarity calculation uses a variety of algorithms, such as cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. Each algorithm evaluates different characteristics of the spectrum. For example, cosine similarity focuses on the similarity of spectral shapes, while Euclidean distance focuses more on the absolute difference in spectral intensity. In practical applications, the results of multiple algorithms are usually combined to obtain a comprehensive similarity score through weighted averaging or other integrated methods. After the calculation is completed, the standard spectrum with the highest similarity score is selected as the reference spectrum. This process ensures that the selected reference spectrum is closest to the ideal light source output under current environmental conditions in terms of spectral characteristics, laying the foundation for subsequent accurate calibration.
[0091] Specifically, wavelength calibration of the actual output spectrum of the target light source and the selected standard reference spectrum is an important step to ensure the comparability of spectral data. This process first requires the use of a high-precision spectrometer to measure the actual output of the target light source. Environmental conditions need to be controlled during the measurement process to ensure the stability and repeatability of the measurement. After obtaining the actual output spectrum, it is necessary to align the wavelength with the standard reference spectrum. Wavelength calibration usually uses characteristic peak matching or interpolation. The characteristic peak matching method identifies significant characteristic peaks in the two spectra, such as the characteristic emission lines of certain elements, and then calibrates the measured spectrum through the known wavelengths of these peaks. The interpolation rule is to adjust the wavelength axis of the measured spectrum to be consistent with the reference spectrum through mathematical algorithms, such as linear interpolation or spline interpolation. The calibration process also needs to consider the instrument function of the spectrometer to eliminate the spectrum broadening effect caused by the instrument itself. After these processes, the calibrated spectral data pairs obtained are completely aligned on the wavelength axis, which provides an accurate basis for subsequent spectral comparison and analysis. The calibrated spectral data pair contains not only the wavelength information, but also the light intensity value corresponding to each wavelength point, forming a two-dimensional data set, which is ready for calculating the spectral response function.
[0092] Specifically, the core step of light source calibration is to calculate the spectral response function based on the calibrated spectral data and obtain the light source correction coefficient through inverse operation. This process involves complex mathematical operations and signal processing techniques, including Fourier transform, deconvolution and other methods. The final light source correction coefficient is a set of values that reflects the difference between the actual output and the ideal output of the light source, which is used for subsequent light source modulation.
[0093] Specifically, applying the light source correction coefficient to the control system of the target light source and performing real-time modulation processing on the light source output is the last step to complete the light source calibration. This process first requires converting the calculated correction coefficient into an instruction format that can be understood and executed by the light source control system. The conversion process takes into account the characteristics of the light source and the parameter range of the control system to ensure that the modulation instruction is technically feasible and safe. The converted instruction is sent to the control system of the light source through the communication interface. After receiving the instruction, the control system will make fine adjustments to the various parameters of the light source. These adjustments may include changing the drive current, adjusting the color temperature control circuit, and fine-tuning the spectral filter. The adjustment process adopts a closed-loop control strategy, that is, after each minor adjustment, the effect will be verified through feedback from a spectrometer or other sensor and compared with the target value. If there is a deviation, the system will continue to make fine adjustments until the preset accuracy requirements are met. This real-time modulation process can dynamically compensate for the effects of environmental changes and light source aging, ensuring that the light source output is always in the best state. After the modulation is completed, the system will conduct a comprehensive performance verification, including measuring key indicators such as the final spectral distribution, color temperature, and color rendering index, and comparing these data with standard reference values. If all indicators are within the allowable error range, the light source calibration is considered complete. This process not only achieves accurate calibration of the light source, but also establishes a dynamic adjustment mechanism that can continuously maintain the optimal performance of the light source.
[0094] Furthermore, the spectral response function is calculated based on the calibrated spectral data pair, and the spectral response function is inversely processed to obtain the light source correction coefficient, including: performing discrete Fourier transform processing on the calibrated spectral data pair to obtain spectral data represented in the frequency domain; constructing a transfer function matrix based on the spectral data represented in the frequency domain, and performing singular value decomposition processing on the transfer function matrix to obtain the main eigenvectors of the spectral response function; regularizing the main eigenvectors to obtain a normalized spectral response function, and applying an inverse filtering algorithm to the normalized spectral response function to obtain preliminary correction coefficients; testing the target light source according to the preliminary correction coefficients to output the target light source to obtain a corrected actual spectrum, and performing residual analysis processing on the corrected actual spectrum and a standard reference spectrum to obtain a residual spectrum; iteratively optimizing the preliminary correction coefficients according to the residual spectrum to obtain a light source correction coefficient.
[0095] Specifically, the spectral data in the time domain (or wavelength domain) is first converted to a frequency domain representation. In specific implementation, the fast Fourier transform (FFT) algorithm is usually used, which can efficiently process a large number of data points. Before performing FFT, the spectral data needs to be preprocessed, including removing baseline drift and eliminating high-frequency noise. The frequency domain data obtained after FFT processing contains the amplitude spectrum and phase spectrum information of the spectrum. The amplitude spectrum reflects the intensity distribution of different frequency components, while the phase spectrum contains the relative phase relationship of these components. Spectral data represented in the frequency domain provides a new perspective to analyze spectral characteristics, especially in identifying periodic structures and subtle changes. This representation method also facilitates subsequent mathematical processing, such as filtering and deconvolution.
[0096] Specifically, constructing a transfer function matrix based on spectral data represented in the frequency domain is the key to understanding the response characteristics of the light source. The transfer function matrix describes the conversion relationship from the input spectrum (standard reference spectrum) to the output spectrum (actual measured spectrum). During the construction process, the frequency domain data is organized into a matrix form, where each column of the matrix corresponds to a frequency component. This matrix reflects the response characteristics of the light source system at different frequencies. Next, the transfer function matrix is processed by singular value decomposition (SVD). SVD is a powerful matrix decomposition technique that can decompose a complex matrix into the product of three matrices: U, S, and V^T. Among them, U and V contain left singular vectors and right singular vectors, and S is a diagonal matrix containing singular values. By analyzing the size of these singular values, the main eigenvectors of the system can be determined. These eigenvectors reflect the main components of the spectral response function. They are sorted by importance, and usually only the first few most significant eigenvectors are retained for subsequent processing. This dimensionality reduction process not only simplifies the calculation, but also helps to reduce the impact of noise and extract the most essential spectral response characteristics.
[0097] Specifically, the main eigenvectors are regularized to obtain a spectral response function that is stable and has a clear physical meaning. The regularization process first normalizes the eigenvectors so that their norm is 1, which can eliminate the influence of the dimension and facilitate the comparison between different features. Then, according to the size of the eigenvalue, the eigenvectors are weighted and combined to construct a normalized spectral response function. This function describes the response of the light source system to light of different wavelengths. Next, the inverse filtering algorithm is applied to the normalized spectral response function to restore the ideal input spectrum. During the inverse filtering process, it is necessary to avoid noise amplification problems. Usually, Wiener filtering or regularization methods are used to enhance the stability of the algorithm. The result of the inverse filtering is the preliminary correction coefficient, which reflects how the light source output needs to be adjusted to obtain the ideal spectrum. This preliminary correction coefficient is a vector, each element of which corresponds to the correction factor of a wavelength point.
[0098] Specifically, testing the output of the target light source according to the preliminary correction coefficient is an important step to verify the correction effect. This process first applies the correction coefficient to the control system of the light source and adjusts the various parameters of the light source, such as driving current, color temperature control, etc. After adjustment, the actual output of the light source is measured using a high-precision spectrometer to obtain the actual spectrum after correction. This spectrum should be closer to the standard reference spectrum than when it is not corrected. In order to evaluate the effect of the correction, it is necessary to perform residual analysis on the actual spectrum after correction and the standard reference spectrum. Residual analysis involves calculating the point-to-point difference between the two spectra to obtain the residual spectrum. The residual spectrum reflects the deviation that still exists after correction, and it contains the error information that has not been completely eliminated during the correction process. By analyzing the characteristics of the residual spectrum, such as the root mean square error, maximum deviation and other indicators, the effectiveness of the correction can be evaluated and provide direction for further optimization.
[0099] Specifically, finally, the preliminary correction coefficient is iteratively optimized according to the residual spectrum to obtain the final light source correction coefficient. This process uses an iterative algorithm, such as gradient descent or Newton's method, to continuously adjust the correction coefficient to minimize the residual. Each iteration updates the correction coefficient, reapplies it to the light source, measures the new actual spectrum, and calculates the new residual. During the iteration, it is necessary to set appropriate stop conditions, such as when the residual is lower than a certain threshold or reaches the maximum number of iterations. The optimization process also needs to consider avoiding overfitting, and regularization terms or cross-validation can be introduced to enhance the generalization ability of the model. The final light source correction coefficient is a set of parameters that can make the actual spectrum closest to the standard reference spectrum. This correction coefficient not only takes into account the inherent characteristics of the light source, but also includes compensation for environmental factors and system errors, and can achieve high-precision spectral matching in practical applications.
[0100] In this embodiment, multi-parameter data collection is performed on the target light source, and the light source parameters are iteratively optimized to obtain the optimal parameter settings and performance indicators. Based on the optimal parameter settings and performance indicators, the target light source is monitored and processed in real time, the drift trend data of the light source parameters are obtained, and automatic compensation is performed according to the drift trend to generate corrected light source parameters. By cumulatively analyzing the corrected light source parameters, an association model between the light source parameters and environmental conditions is constructed. According to the association model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the actual output of the target light source is calibrated based on the reference spectrum. The present invention combines multi-parameter data collection and optimization, drift trend monitoring and automatic compensation processing to achieve dynamic association modeling of light source parameters and environmental conditions, perform adaptive calibration, and improve the accuracy and stability of the detection system.
[0101] The optical detection light source calibration method in the embodiment of the present invention is described above. The optical detection light source calibration device in the embodiment of the present invention is described below. Figure 2 In one embodiment of the present invention, an optical detection light source calibration device includes:
[0102] The data acquisition module 201 is used to perform multi-parameter data acquisition processing on the target light source, and iteratively optimize the light source parameters of the target light source according to the acquired multi-parameter data to obtain the optimal parameter settings and performance indicators of the target light source;
[0103] A real-time monitoring module 202 is used to perform real-time monitoring processing on the target light source according to the optimal parameter settings and performance indicators to obtain drift trend data of the light source parameters;
[0104] The compensation association module 203 is used to automatically compensate the target light source according to the drift trend data to obtain corrected light source parameters, and to perform cumulative analysis on the corrected light source parameters to obtain an association model between the light source parameters and environmental conditions;
[0105] The light source calibration module 204 is used to select a standard reference spectrum that matches the current detection task according to the association model and the corrected light source parameters, and perform light source calibration based on the standard reference spectrum and the actual output of the target light source.
[0106] In an embodiment of the present invention, the optical detection light source calibration device runs the above-mentioned optical detection light source calibration method, and the optical detection light source calibration device performs multi-parameter data collection on the target light source, iteratively optimizes the light source parameters, and obtains the optimal parameter settings and performance indicators. Based on the optimal parameter settings and performance indicators, the target light source is monitored and processed in real time, the drift trend data of the light source parameters are obtained, and automatic compensation is performed according to the drift trend to generate corrected light source parameters. By cumulatively analyzing the corrected light source parameters, an association model between the light source parameters and environmental conditions is constructed. According to the association model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the actual output of the target light source is calibrated based on the reference spectrum. The present invention combines multi-parameter data collection and optimization, drift trend monitoring and automatic compensation processing to realize dynamic association modeling of light source parameters and environmental conditions, perform adaptive calibration, and improve the accuracy and stability of the detection system.
[0107] above Figure 2 The optical detection light source calibration device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The optical detection light source calibration device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0108] Figure 3It is a structural schematic diagram of an optical detection light source calibration device provided by an embodiment of the present invention. The optical detection light source calibration device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the optical detection light source calibration device 300. Furthermore, the processor 310 can be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the optical detection light source calibration device 300 to implement the steps of the above-mentioned optical detection light source calibration method.
[0109] The optical detection light source calibration device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the optical detection light source calibration device shown does not constitute a limitation on the optical detection light source calibration device provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0110] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the optical detection light source calibration method.
[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0113] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calibrating an optical detection light source, characterized in that: The optical detection light source calibration method comprises: Performing multi-parameter data collection and processing on a target light source, and iteratively optimizing light source parameters of the target light source according to the collected multi-parameter data, to obtain optimal parameter settings and performance indicators of the target light source; According to the optimal parameter settings and performance indicators, the target light source is monitored in real time to obtain drift trend data of light source parameters; The drift trend data is subjected to time series prediction processing to obtain parameter prediction values at future time points, and a compensation amount is calculated based on the parameter prediction values and current light source parameters, and the compensation amount is quantified to obtain a discrete compensation instruction; the discrete compensation instruction is sent to the control system of the target light source, and the light source parameters are adjusted in real time to obtain corrected light source parameters; the corrected light source parameters are subjected to time series storage processing to obtain a parameter history database, and the parameter history database is subjected to periodic data aggregation processing to obtain parameter change trends at different time scales; the parameter change trends at different time scales and environmental monitoring data are subjected to time synchronization processing to obtain a long-term parameter-environment corresponding data set, and a multivariate regression analysis algorithm is applied to the long-term parameter-environment corresponding data set to construct a preliminary association model between light source parameters and environmental conditions; the historical data is retrospectively analyzed based on the preliminary association model to calculate the model residuals, and the model residuals are statistically analyzed to obtain error distribution characteristics, and the preliminary association model is corrected based on the error distribution characteristics to obtain an optimized association model between light source parameters and environmental conditions; According to the association model and the corrected light source parameters, a standard reference spectrum matching the current detection task is selected, and the light source calibration is performed based on the standard reference spectrum and the actual output of the target light source.
2. The optical detection light source calibration method according to claim 1, characterized in that: The multi-parameter data collection and processing of the target light source, and the iterative optimization processing of the light source parameters of the target light source according to the collected multi-parameter data, to obtain the optimal parameter settings and performance indicators of the target light source include: Performing multi-parameter scanning sampling processing on the target light source to obtain an original data set, and performing principal component analysis processing on the original data set to obtain the main influencing factors of the light source parameters; Performing parameter adjustment processing on the target light source according to the main influencing factors to obtain initial parameter values of the target light source, and performing grid division processing on the parameter space of the target light source according to the initial parameter values to obtain a multi-dimensional sampling grid; Performing high-precision sampling processing on the target light source on a multidimensional sampling grid to obtain a multidimensional data set, and performing nonlinear optimization processing on the multidimensional data set to obtain an objective function; Gradient descent processing is performed on the light source parameters according to the objective function to obtain a parameter update direction, and an iterative adjustment processing is performed on the target light source along the parameter update direction to obtain an optimal parameter setting and performance index of the target light source.
3. The optical detection light source calibration method according to claim 1, characterized in that: The step of performing real-time monitoring on the target light source according to the optimal parameter settings and performance indicators to obtain drift trend data of the light source parameters includes: Performing parameter configuration processing on the target light source according to the optimal parameter setting to obtain a reference light source output, and performing real-time data acquisition processing on the target light source to obtain real-time output data of the light source; Performing difference calculation processing on the reference light source output and the light source real-time output data to obtain parameter deviation data, and performing normalization processing on the parameter deviation data according to a preset parameter variation range to obtain normalized deviation data; Based on the performance index, the normalized deviation data is weighted to obtain a weighted deviation sequence, and a time series analysis algorithm is applied to the weighted deviation sequence to extract long-term trend components to obtain drift trend data of light source parameters.
4. The optical detection light source calibration method according to claim 1, characterized in that: The step of performing a retrospective analysis on historical data according to the preliminary correlation model, calculating model residuals, and performing a statistical analysis on the model residuals to obtain error distribution characteristics, and correcting the preliminary correlation model based on the error distribution characteristics to obtain an optimized correlation model between light source parameters and environmental conditions includes: Performing sliding window processing on the historical data to obtain sub-data sets of multiple time windows, and applying the preliminary association model to each sub-data set to perform parameter prediction to obtain predicted parameter values for each time window; Compare and calculate the predicted parameter value with the actual parameter value stored in the parameter history database to obtain time series residual data, and perform autocorrelation analysis on the time series residual data to obtain the time correlation characteristics of the residual; Decomposing the time series residual data according to the time correlation characteristics to obtain a periodic residual component and a random residual component; Performing spectrum analysis on the periodic residual component to obtain main periodic features, and constructing a periodic correction function according to the main periodic features; Performing probability distribution fitting processing on the random residual component to obtain a probability density function of the residual; The parameters of the preliminary correlation model are updated according to the periodic correction function and the probability density function to obtain an optimized correlation model between the light source parameters and the environmental conditions.
5. The optical detection light source calibration method according to claim 1, characterized in that: The selecting a standard reference spectrum matching the current detection task according to the association model and the corrected light source parameters, and performing light source calibration based on the standard reference spectrum and the actual output of the target light source includes: According to the correlation model, the ideal light source parameters under the current environmental conditions are predicted and processed to obtain the target spectral characteristics; Applying spectral similarity calculation processing to a preset standard reference spectrum library, and selecting a standard reference spectrum that best matches the target spectrum feature; Performing wavelength calibration processing on the actual output spectrum of the target light source and the standard reference spectrum to obtain a calibrated spectrum data pair; Calculating a spectral response function according to the calibrated spectral data, and performing an inverse operation on the spectral response function to obtain a light source correction coefficient; The light source correction coefficient is applied to the control system of the target light source, and the light source output is modulated in real time to complete the light source calibration.
6. The optical detection light source calibration method according to claim 5, characterized in that: The calculating of the spectral response function according to the calibrated spectral data and performing inverse operation processing on the spectral response function to obtain the light source correction coefficient comprises: Performing discrete Fourier transform processing on the calibrated spectral data pair to obtain spectral data represented in the frequency domain; Constructing a transfer function matrix according to the spectral data represented in the frequency domain, and performing singular value decomposition processing on the transfer function matrix to obtain main eigenvectors of the spectral response function; Regularizing the main eigenvector to obtain a normalized spectral response function, and applying an inverse filtering algorithm to the normalized spectral response function to obtain a preliminary correction coefficient; Performing test output processing on the target light source according to the preliminary correction coefficient to obtain a corrected actual spectrum, and performing residual analysis processing on the corrected actual spectrum and a standard reference spectrum to obtain a residual spectrum; The preliminary correction coefficient is iteratively optimized according to the residual spectrum to obtain the light source correction coefficient.
7. An optical detection light source calibration device, characterized in that: The optical detection light source calibration device comprises: A data acquisition module is used to perform multi-parameter data acquisition processing on a target light source, and iteratively optimize the light source parameters of the target light source according to the acquired multi-parameter data to obtain the optimal parameter settings and performance indicators of the target light source; A real-time monitoring module, used to perform real-time monitoring processing on the target light source according to the optimal parameter settings and performance indicators, and obtain drift trend data of the light source parameters; A compensation association module is used to perform time series prediction processing on the drift trend data to obtain parameter prediction values at future time points, and calculate compensation amounts based on the parameter prediction values and current light source parameters, and quantify the compensation amounts to obtain discrete compensation instructions; the discrete compensation instructions are sent to the control system of the target light source to adjust the light source parameters in real time to obtain corrected light source parameters; the corrected light source parameters are stored in time series to obtain a parameter history database, and the parameter history database is periodically aggregated to obtain parameter change trends at different time scales; the parameter change trends at different time scales and environmental monitoring data are synchronized to obtain a long-term parameter-environment corresponding data set, and a multivariate regression analysis algorithm is applied to the long-term parameter-environment corresponding data set to construct a preliminary association model between light source parameters and environmental conditions; the historical data is retrospectively analyzed according to the preliminary association model to calculate the model residuals, and the model residuals are statistically analyzed to obtain error distribution characteristics, and the preliminary association model is corrected based on the error distribution characteristics to obtain an optimized association model between light source parameters and environmental conditions; The light source calibration module is used to select a standard reference spectrum that matches the current detection task according to the association model and the corrected light source parameters, and perform light source calibration based on the standard reference spectrum and the actual output of the target light source.
8. An optical detection light source calibration device, characterized in that: The optical detection light source calibration device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the optical detection light source calibration device to perform the steps of the optical detection light source calibration method as described in any one of claims 1-6.
9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the optical detection light source calibration method as described in any one of claims 1-6 are implemented.
Citation Information
Patent Citations
Four-dimensional live-action traffic road condition perceiving and early-warning monitoring management system based on radar tracking and positioning
CN108922188A
Building deformation monitoring system and method based on three-dimensional laser scanning technology
CN118857134A