Array light source flicker detection and compensation method and system

By combining the masking automatic encoder and the dual-channel feature extraction mechanism of the DenseNet network, the strobe mode of the surface array light source is identified and adaptive compensation is performed, and the problems of insufficient strobe detection accuracy and lack of adaptability in the prior art are solved, and the compensation effect of high-precision strobe detection and optimization is achieved.

CN119357620BActive Publication Date: 2025-04-08东莞康视达自动化科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411909523.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-08
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The existing surface array light source strobe detection method lacks detection accuracy in complex lighting environments, and the traditional strobe compensation technology lacks adaptability and cannot effectively suppress complex strobe phenomena.

Method used

The dual-channel feature extraction mechanism of masked automatic encoder and DenseNet network is adopted. Through median filtering, dynamic masking processing and feature extraction, the strobe mode is identified and the timing evolution model is constructed, inverse compensation waveform calculation and signal synthesis are carried out, and the optimal compensation control parameters are obtained through power modulation and parameter optimization.

Benefits of technology

It improves the accuracy and compensation effect of strobe detection, enhances the ability to identify and classify various types of strobe features, and ensures the accuracy and stability of the compensation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357620B_ABST
    Figure CN119357620B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of array light source detection, and discloses a method and system for detecting and compensating a stroboscopic light source. The method comprises: collecting and median filtering a light intensity signal of an array light source to obtain a light intensity data sequence and working parameter information; inputting the light intensity data sequence into a masking autoencoder for dynamic masking processing, and extracting features of an original sequence and a masking sequence respectively through a DenseNet network to obtain a dual-path stroboscopic feature vector; performing stroboscopic pattern recognition to obtain a stroboscopic pattern recognition result; constructing a time series evolution model, calculating feature deviations through convex-concave programming to obtain corrected stroboscopic feature data; performing anti-phase compensation waveform calculation, and performing signal synthesis through a piecewise linear function to obtain a digital compensation signal; performing power modulation and superimposing it on a driving circuit, and performing parameter optimization to obtain an optimal compensation control parameter. The invention improves the accuracy of stroboscopic detection and optimizes the compensation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of area array light source detection, and in particular to a method and system for detecting and compensating for stroboscopic light sources of an area array. Background Art

[0002] Due to fluctuations in the power supply system, device aging, and environmental factors, area array light sources often experience different types of flicker during actual operation. At present, existing flicker detection methods mainly rely on traditional photoelectric sensor acquisition and signal processing technologies. These methods are easily interfered by noise in complex lighting environments, resulting in insufficient detection accuracy. At the same time, since area array light sources may have multiple types of flicker characteristics at the same time, traditional single detection algorithms are difficult to accurately identify and classify these complex flicker patterns. In addition, existing flicker compensation technologies mostly use fixed-parameter feedback control schemes and lack the ability to adaptively compensate for different types of flicker. This compensation method not only fails to effectively suppress complex flicker phenomena, but may also introduce new light intensity fluctuations due to improper compensation parameters, affecting the overall performance of the area array light source. Summary of the invention

[0003] The present invention provides a method and system for detecting and compensating for a planar light source stroboscopic light, which improves the accuracy of stroboscopic detection and optimizes the compensation effect.

[0004] In a first aspect, the present invention provides a method for detecting and compensating for stroboscopic light sources of an area array, the method comprising:

[0005] The light intensity signal of the array light source is collected and processed by median filtering to obtain the light intensity data sequence and working parameter information;

[0006] The light intensity data sequence is input into a masked autoencoder for dynamic masking processing, and features of the original sequence and the masked sequence are extracted through a DenseNet network to obtain a dual-path stroboscopic feature vector;

[0007] Performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result;

[0008] Based on the stroboscopic pattern recognition result and the historical recognition data, a time series evolution model is constructed, and characteristic deviations are calculated by convex-concave programming to obtain corrected stroboscopic characteristic data;

[0009] Calculate the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesize the signal through a piecewise linear function to obtain a digital compensation signal;

[0010] The digital compensation signal is power modulated and superimposed on the driving circuit, and parameter optimization is performed to obtain the optimal compensation control parameter.

[0011] In a second aspect, the present invention provides a system for detecting and compensating a stroboscopic light source of an area array, the system comprising:

[0012] An acquisition module is used to collect and process the light intensity signal of the array light source through median filtering to obtain a light intensity data sequence and working parameter information;

[0013] A feature extraction module is used to input the light intensity data sequence into a masking autoencoder for dynamic masking processing, and to extract features from the original sequence and the masking sequence respectively through a DenseNet network to obtain a dual-path stroboscopic feature vector;

[0014] An identification module, used for performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result;

[0015] A correction module, used to construct a time series evolution model based on the stroboscopic pattern recognition result and historical recognition data, calculate the characteristic deviation through convex-concave programming, and obtain corrected stroboscopic characteristic data;

[0016] A synthesis module, used for calculating the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesizing the signal through a piecewise linear function to obtain a digital compensation signal;

[0017] The parameter optimization module is used to power modulate the digital compensation signal and superimpose it on the drive circuit, and perform parameter optimization to obtain the optimal compensation control parameter.

[0018] A third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned method for detecting and compensating the stroboscopic light source of an array.

[0019] 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 above-mentioned method for detecting and compensating for stroboscopic light sources of an array.

[0020] In the technical solution provided by the present invention, by combining the dual-path feature extraction mechanism of the masked autoencoder and the DenseNet network, the extraction capability and anti-noise performance of the stroboscopic feature are effectively improved; the stroboscopic pattern recognition strategy based on contrast loss and independent component analysis is adopted to achieve accurate classification of various types of stroboscopic features; the time series evolution model and convex-concave programming optimization method are introduced to enhance the dynamic correction capability of the stroboscopic feature; the signal synthesis mechanism of the piecewise linear function and the adaptive parameter optimization algorithm are designed to ensure the accuracy and stability of the compensation effect. The present invention improves the accuracy of stroboscopic detection and optimizes the compensation effect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 A schematic diagram of the steps of a method for detecting and compensating for stroboscopic light sources of an area array in an embodiment of the present invention;

[0023] Figure 2 It is a structural schematic diagram of a system for detecting and compensating a stroboscopic light source in an embodiment of the present invention;

[0024] Figure 3 It is a schematic block diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The embodiments of the present invention provide a method and system for detecting and compensating for stroboscopic light sources of an array. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the method for detecting and compensating the stroboscopic light source of an array in an embodiment of the present invention includes:

[0027] Step S1, collecting and median filtering the light intensity signal of the array light source to obtain a light intensity data sequence and working parameter information;

[0028] It is understandable that the execution subject of the present invention may be a system for detecting and compensating the stroboscopic light source of an array, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as an execution subject.

[0029] Specifically, the light intensity signal of the array light source is sampled based on the photoelectric sensor to obtain the original light intensity value. The original light intensity value is an analog signal, and the analog signal is subjected to digital-to-analog conversion to obtain the digital form of the light intensity signal. The digital-to-analog conversion process can effectively convert the continuous analog signal into discrete data points that can be processed by digital calculation. The digital quantity of the light intensity signal is segmented to obtain a segmented light intensity sequence. The segmented processing reduces the amount of data processed at a single time and improves the processing efficiency. The segmented light intensity sequence is subjected to sudden interference removal. In the actual sampling process, the light intensity signal is affected by some external sudden interference, such as short-term interference from other light sources, or sampling anomalies caused by changes in the electromagnetic environment. By removing these interferences, a more accurate and smooth light intensity sequence is obtained. The filtered segmented light intensity sequence is spliced ​​and reorganized in time windows, and the independent segmented light intensity sequences are recombined into a complete light intensity data sequence to ensure time continuity and maintain the complete trend of light intensity changes. At the same time, the ambient temperature of the array light source is monitored in real time to obtain temperature parameter data, and the power supply voltage of the array light source is collected in real time to obtain voltage parameter data. The temperature parameter data and the voltage parameter data are combined in time synchronization to obtain the working parameter information.

[0030] Step S2, inputting the light intensity data sequence into the masking autoencoder for dynamic masking processing, and extracting features of the original sequence and the masking sequence respectively through the DenseNet network to obtain a dual-path stroboscopic feature vector;

[0031] Specifically, the light intensity data sequence is randomly masked, the masking ratio is set to 30%, and 30% of the randomly selected data points of the original light intensity data sequence are masked. Using zero value replacement, the selected 30% data points are replaced with zero to obtain the masked data sequence. Through random masking, the loss of data is effectively simulated, and rich data characteristics are provided for the training of the masked autoencoder. The masked sequence is input into the encoder part of the masked autoencoder, which contains 3 encoding layers, each of which contains convolution operation, ReLU activation function and batch normalization operation in turn. In the encoding stage, the convolution operation can effectively extract the spatial features of the data, while the ReLU activation function enhances the expression ability of the network through nonlinear transformation, and the batch normalization operation is used to stabilize the training of the network to prevent the occurrence of gradient disappearance or explosion. Through the layer-by-layer processing of the three encoding layers, the input features of the masked sequence are mapped to a deeper feature space to obtain a masked feature map. The masked feature map is input into the decoder part of the masked autoencoder. The decoder part contains three decoding layers, each of which contains deconvolution operation, ReLU activation function and batch normalization operation in turn. The function of deconvolution operation is to gradually restore the spatial resolution of masked feature map to reconstruct a sequence close to the original input, perform nonlinear transformation through ReLU activation function, and normalize the output through batch normalization. After deconvolution and processing of three decoding layers layer by layer, the reconstructed light intensity data sequence is obtained. The original light intensity data sequence and the reconstructed sequence are respectively input into the first dense block of DenseNet network. The first dense block of DenseNet network contains 6 convolution layers, and the output of each convolution layer is connected with the subsequent layers through dense connection. The dense connection method is a significant feature of DenseNet network. This method makes full use of the features extracted by the previous layer, enhances the information flow of the network, and enables the features to be effectively reused. The output of each convolution layer is processed by LeakyReLU activation function to ensure nonlinear transformation while avoiding the "death" problem of ReLU function, and finally obtain the first feature group of DenseNet network. The first feature group is input into the second dense block of DenseNet network. The second dense block contains 8 convolutional layers, which also use dense connections to ensure that the output of each convolution layer can be shared with subsequent layers, making the feature extraction process more efficient and reducing the risk of gradient disappearance. The second feature group is obtained through the processing of 8 convolutional layers and the action of the LeakyReLU activation function. The hierarchical processing method of DenseNet ensures that features at different levels can complement each other and increase the diversity of features. The second feature group is input into the third dense block of the DenseNet network. The third dense block contains 10 convolutional layers, which also use dense connections, so that the network structure can still maintain good information flow when the depth increases.Each convolutional layer can use the features extracted by the previous layer as input to improve the ability of the entire network to capture the stroboscopic features of the light intensity signal. After being processed by the LeakyReLU activation function, the third feature group is obtained. The third feature group is input into the fourth dense block of the DenseNet network. The fourth dense block contains 12 convolutional layers, and through dense connections, the features are continued to be extracted and aggregated layer by layer. In this process, through the processing of the LeakyReLU activation function, the fourth dense block can generate a higher level and more complex feature expression to obtain the fourth feature group. The fourth feature group of the DenseNet network is reduced in dimension by the global average pooling layer, and the global average pooling layer averages the spatial dimensions of the feature map to obtain a more compact feature representation. After being processed by the fully connected layer, the final dual-path stroboscopic feature vector is obtained. These two stroboscopic feature vectors represent the deep features of the original light intensity data sequence and the masked reconstruction sequence after the DenseNet feature extraction, and are ultimately used for stroboscopic pattern recognition and compensation.

[0032] Step S3, performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result;

[0033] Specifically, the cosine similarity function is used to calculate the contrast loss of the dual-path stroboscopic feature vectors to obtain a feature difference matrix. The cosine similarity function is used to measure the similarity between two feature vectors, and its result is used to evaluate the similarity between feature vectors, so as to determine the difference between different feature vectors in stroboscopic characteristics. According to the feature difference matrix, a contrast loss function is constructed. The contrast loss function is used to quantify the difference between two feature vectors, and through quantization, a clear optimization target is provided for model training. In order to prevent the model from overfitting and improve the stability of the features, the loss value is L2 regularized to obtain standardized contrast features. L2 regularization limits the complexity of the model by adding a penalty term to the loss function, avoiding over-reliance on training data and resulting in reduced generalization performance. Independent component decomposition is performed on the standardized contrast features. Independent component decomposition is a statistical technique used to decompose multidimensional signals into independent components, thereby extracting independent frequency patterns in stroboscopic features. Through this process, basic stroboscopic pattern combinations are obtained, which contain characteristic information of different types of stroboscopic. In order to analyze the stroboscopic characteristics, the basic stroboscopic pattern combination is decomposed according to the frequency component, and the characteristic parameters of four types of power frequency stroboscopic, high frequency stroboscopic, random stroboscopic and gradient stroboscopic are extracted respectively to obtain the pattern feature set. The feature vector of the pattern feature set is constructed, and the high-dimensional features are simplified to obtain the stroboscopic features after dimensionality reduction. Dimensionality reduction processing helps to reduce the complexity of model calculation, while retaining the representative information of stroboscopic characteristics and improving the efficiency and performance of the model. The dimensionality-reduced stroboscopic features are input into the weighted support vector machine classifier, and the feature space conversion matrix is ​​constructed using the radial basis kernel function to map the dimensionality-reduced features into the high-dimensional feature space. The role of the radial basis kernel function is to convert nonlinear separable problems into linear separable problems, so as to find the optimal classification boundary in the high-dimensional space. Penalty weights are set for different types of stroboscopic patterns based on high-dimensional feature mapping. The penalty weight is used to distinguish different types of stroboscopic. By assigning different weights to different types of stroboscopic, the classifier's ability to identify certain important stroboscopic types is enhanced, thereby improving the overall classification effect. In order to optimize the kernel function parameters and penalty factors, the grid search method is used for parameter tuning. The grid search method is a hyperparameter optimization method. By traversing different parameter combinations, the parameter combination that makes the classification performance the best is found, and the optimal classification parameters are obtained. The optimal classification parameters are input into the multi-class support vector machine classifier, and the classification hyperplane is constructed by the soft margin maximization principle. The purpose of soft margin maximization is to maintain a certain interval between the classification boundary and the data point to ensure that the model has good fault tolerance, so that it can better deal with data points near the boundary. Through this process, the stroboscopic pattern recognition results are obtained, which effectively distinguish different types of stroboscopic phenomena, such as power frequency flicker, high frequency flicker, random flicker and gradient flicker.

[0034] Step S4, constructing a time series evolution model based on the stroboscopic pattern recognition result and the historical recognition data, calculating the characteristic deviation through convex-concave programming, and obtaining the corrected stroboscopic characteristic data;

[0035] Specifically, the stroboscopic pattern recognition results and historical recognition data are combined in a time series to form a set of time series data groups containing a time dimension, which reflects the temporal change law of the stroboscopic characteristics of the light source. Feature learning is performed on the time series data group to extract the implicit time series relationship and obtain the time series state vector, which reflects the evolution trend of the current stroboscopic state of the light source. A time series evolution model is constructed based on the time series state vector. The time series evolution model contains 3 hidden layers, each of which contains 128 neurons. The setting of hidden layers and neurons is to make the model have sufficient complexity and fitting ability to accurately capture the implicit relationship in the time series data. The time series state is modeled by a deep neural network, and the time series evolution model can predict the temporal evolution pattern of the stroboscopic characteristics. The stroboscopic characteristics of the current moment are input into the time series evolution model, and the stroboscopic characteristics prediction value of the next moment is calculated by forward propagation to obtain the predicted feature data. Forward propagation is a general process of calculating output in a neural network. By transmitting the input signal layer by layer, the stroboscopic characteristics prediction value of the next moment is obtained. By constructing convex optimization subproblems, the predicted feature data and the actual feature data are optimized and analyzed, the optimal feature difference is solved, and the convex partial deviation is obtained. The optimal feature difference is solved by the second-order cone programming method. Second-order cone programming is a convex optimization technique that can find the optimal difference value in a complex feature space, thereby optimizing the deviation between the predicted and actual features and obtaining the convex partial deviation. The convex partial deviation is used to describe the maximum possible deviation of the stroboscopic feature under specific constraints to ensure that good control effects are maintained in certain aspects of the stroboscopic feature. Concave optimization subproblems are constructed for the predicted feature data and the actual feature data. Through concave optimization, the minimum possible feature deviation is found to minimize the impact of stroboscopic. In this process, the differential evolution algorithm is used to solve the minimum feature difference and obtain the concave partial deviation. The differential evolution algorithm is a population-based optimization algorithm suitable for solving complex nonlinear optimization problems. Through the differential evolution algorithm, a solution that minimizes the feature difference can be found in the feature space to obtain the concave partial deviation. The introduction of the concave partial deviation is to find a balance between different optimization objectives to ensure that the correction of the stroboscopic feature can take into account both the global effect and the local accuracy. The convex part deviation and the concave part deviation are weighted and superimposed to obtain a comprehensive feature deviation. Considering the different effects of the convex part deviation and the concave part deviation on the overall deviation, the weight is adjusted to make the comprehensive feature deviation better reflect the actual deviation, which can not only control the maximum impact of the flicker, but also effectively reduce unnecessary deviations. The comprehensive feature deviation and the flicker feature are corrected to obtain the corrected flicker feature data. The current flicker feature is adjusted based on the deviation information to reduce the flicker effect, thereby improving the lighting quality and stability of the light source.

[0036] Step S5, calculating the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesizing the signal through a piecewise linear function to obtain a digital compensation signal;

[0037] Specifically, the corrected flicker characteristic data is classified according to different flicker types, and characteristic subsets of power frequency flicker, high frequency flicker, random flicker and gradual flicker are constructed respectively to obtain classified characteristic data. The classification operation helps to adopt corresponding compensation methods for different flicker types and improve the overall compensation accuracy and effect. The power frequency flicker characteristics in the classified characteristic data are Fourier transformed to extract frequency and phase information. Fourier transform can convert time domain signals into frequency domain and identify the frequency characteristics and phase relationship of power frequency flicker. After extracting the frequency and phase information of the power frequency, a sine wave with the same frequency but opposite phase as the power frequency is generated to obtain a power frequency compensation waveform. The opposite phase sine wave is used to offset the original power frequency signal to reduce the influence of power frequency flicker. For the high frequency flicker characteristic data, the frequency components of the signal are analyzed by spectrum analysis. High frequency flicker is usually manifested as rapidly changing light intensity fluctuations, and its main spectrum components are identified by spectrum analysis. In order to compensate, the pulse width modulation (PWM) method is used to set the duty cycle parameters to generate a high frequency compensation waveform. PWM is a method of adjusting the output waveform by controlling the ratio of the switching time of the signal. By setting the duty cycle reasonably, a compensation waveform opposite to the high-frequency flicker is generated, thereby effectively reducing the impact of high-frequency flicker. For the random flicker feature, due to its unpredictability and random changes, an adaptive filter is used to process this part of the feature data. The adaptive filter can dynamically adjust its own parameters to adapt to the changes in the signal, and calculate the filter coefficients through the minimum mean square error criterion, so that the compensation waveform is as close as possible to the opposite characteristics of the random flicker. In this way, a random compensation waveform is generated, which can adaptively offset the impact of random flicker and improve the flexibility and accuracy of compensation. For the gradual flicker feature, a segmented processing method is used to deal with this type of flicker phenomenon. A piecewise linear function is constructed by the cubic spline interpolation method to generate a gradual compensation waveform. Cubic spline interpolation is an interpolation method that can ensure continuity and smoothness at the boundary of each segment, and is suitable for processing gradual light intensity fluctuations. The gradual feature is fitted by a piecewise linear function, which effectively offsets the gradual flicker phenomenon, so that the compensation waveform can match the gradual flicker change trend. The power frequency compensation waveform, high frequency compensation waveform, random compensation waveform and gradual compensation waveform are superimposed in the time domain to obtain a combined compensation waveform. Various compensation waveforms are accumulated in time so that compensation signals of different frequencies and characteristics act together on the driving signal of the light source, thereby comprehensively reducing the impact of the stroboscopic effect. The combined compensation waveform is converted into a digital signal by analog-to-digital conversion, and the analog combined compensation waveform is converted into a digital signal to obtain a quantized compensation signal. Analog-to-digital conversion can quantize continuous analog signals into discrete digital signals for processing in digital control systems. The quantized compensation signal is compatible with the digital control module in the drive circuit.The quantized compensation signal is digitally filtered to further smooth the signal, remove the existing high-frequency noise and unnecessary jitter, ensure the quality of the compensation signal, and obtain the final digital compensation signal.

[0038] Step S6: power modulate the digital compensation signal and superimpose it on the drive circuit, and perform parameter optimization to obtain the optimal compensation control parameter.

[0039] Specifically, the amplitude of the digital compensation signal is modulated by a pulse width modulator to obtain a power modulation signal. The pulse width modulator can modulate the digital compensation signal, change its amplitude, and obtain a modulation signal suitable for superposition with the light source driving signal. The power modulation signal is superimposed on the original driving signal to obtain a combined driving signal. By introducing the compensation signal, the flicker is offset on the basis of the original driving signal. The superposition of the compensation signal will affect the overall output of the light source, especially in terms of the suppression of the flicker phenomenon. The combined driving signal after superposition makes the light intensity output of the light source smoother and the flicker effect is effectively weakened. The light intensity output of the array light source under the action of the combined driving signal is sampled and analyzed to evaluate the compensation effect. The light intensity output is sampled in real time to obtain the value of the flicker suppression rate. The flicker suppression rate is an important indicator to measure the compensation effect, reflecting the degree to which the flicker phenomenon is suppressed. The higher the flicker suppression rate, the better the compensation effect. In order to optimize the compensation effect, the flicker suppression rate value is used as the objective function, and the loss function is constructed by adding L1 regularization terms and L2 regularization terms to obtain the optimized objective function. The L1 regularization term can sparse the model parameters, making some unnecessary parameters tend to zero, thereby simplifying the model structure. The L2 regularization term suppresses the excessive size of the model parameters and prevents the model from overfitting, thereby improving the robustness and generalization ability of the compensation model. The gradient calculation of the optimization objective function is performed to determine the update direction of the compensation parameters. Through the gradient calculation, the parameter update vector is obtained, which is used to indicate how to adjust the existing control parameters to improve the compensation effect. The calculation of the parameter update vector is based on the partial derivative of the optimization objective function. Through the gradient descent method, it can gradually approach the minimum value of the loss function and achieve the optimal adjustment of the compensation parameters. Based on the parameter update vector, the modulation frequency, duty cycle and weighting coefficient are jointly optimized. The modulation frequency determines the rate of change of the compensation signal, while the duty cycle determines the effective working time ratio of the compensation signal within the cycle. The weighting coefficient is used to adjust the weight of different compensation signals in the combination. The three parameters are jointly optimized to ensure that the frequency characteristics, amplitude characteristics and superposition effects of the compensation signal can reach the best state to effectively suppress the flicker. In order to find the optimal parameter combination, the grid search method is used for parameter optimization. Grid search is a hyperparameter optimization method that iterates over different parameter combinations one by one to find the parameter combination that can make the optimization objective function reach the optimal value. During the grid search process, different combinations of modulation frequency, duty cycle and weighting coefficient are tested and evaluated to finally determine the optimal compensation control parameters that can maximize the flicker suppression rate.

[0040] In the embodiment of the present invention, by combining the dual-path feature extraction mechanism of the masked autoencoder and the DenseNet network, the extraction capability and anti-noise performance of the stroboscopic feature are effectively improved; the stroboscopic pattern recognition strategy based on contrast loss and independent component analysis is adopted to achieve accurate classification of various types of stroboscopic features; the time series evolution model and convex-concave programming optimization method are introduced to enhance the dynamic correction capability of the stroboscopic feature; the signal synthesis mechanism of the piecewise linear function and the adaptive parameter optimization algorithm are designed to ensure the accuracy and stability of the compensation effect. The present invention improves the accuracy of stroboscopic detection and optimizes the compensation effect.

[0041] In a specific embodiment, the process of executing step S1 may specifically include the following steps:

[0042] The light intensity signal of the array light source is sampled based on the photoelectric sensor to obtain the original light intensity value, and the original light intensity value is converted into digital to obtain the digital value of the light intensity signal;

[0043] The digital quantity of the light intensity signal is segmented to obtain a segmented light intensity sequence, and sudden interference is removed from the segmented light intensity sequence to obtain a filtered light intensity sequence;

[0044] The filtered light intensity sequence is spliced ​​and reorganized in time windows to obtain a light intensity data sequence;

[0045] The ambient temperature of the array light source is monitored in real time to obtain temperature parameter data, and the power supply voltage of the array light source is collected in real time to obtain voltage parameter data;

[0046] The temperature parameter data and the voltage parameter data are combined in time synchronization to obtain the working parameter information.

[0047] Specifically, the light intensity signal of the array light source is sampled by a photoelectric sensor to obtain the original light intensity value. A photoelectric sensor is a device that can convert light signals into electrical signals. By collecting the light intensity output of the light source, a voltage or current signal is generated to represent the light intensity value at the sampling time. Assume that the output of the photoelectric sensor is a voltage signal , then the sampled light intensity value is expressed as ,in is the light intensity at time The original value at the time of Perform digital-to-analog conversion to obtain the digital value of the light intensity signal ,in Represents the discrete sampling point number, Indicated in The light intensity value at each sampling point. The digital-to-analog conversion process is completed by an analog-to-digital converter (ADC). The formula for analog-to-digital conversion is expressed as:

[0048] ;

[0049] in, is the reference voltage of the analog-to-digital converter, is the number of bits of the ADC (e.g. 12 bits, 16 bits, etc.). Through this formula, the continuous analog light intensity signal is converted into the corresponding digital quantity , so that the light intensity data can be used by subsequent digital signal processing methods. Segment the data to obtain a segmented light intensity sequence. Divide the light intensity data for a long time into several smaller data segments for subsequent analysis and processing. Assume that the digital quantity of the light intensity signal is divided into The data length of each segment is , then the segmented light intensity sequence is expressed as ,in , . The segmented processing method can reduce the amount of data, improve computing efficiency, and capture the local characteristics of light intensity in the time dimension. The segmented light intensity sequence is subjected to sudden interference removal to obtain a filtered light intensity sequence. In actual light intensity signal acquisition, the light source will be subject to sudden interference, such as brief flashes of other light sources, instantaneous fluctuations in power supply, etc. These interferences cause abnormal noise points in the light intensity signal. In order to remove these noises, the median filtering method is used. The formula for median filtering is:

[0050] ;

[0051] in, is the window size, Indicates Section The median filter can effectively remove sudden interference, making the light intensity sequence after filtering Smoother. The filtered light intensity sequence is spliced ​​and reorganized in time windows to obtain a complete light intensity data sequence. Assume that the filtered intensity sequence of each segment is , then through the splicing operation of the time window, these segmented signals are reorganized in time order to obtain a continuous light intensity data sequence:

[0052] ;

[0053] This process ensures the continuity of the light intensity data in time, thereby maintaining the integrity of the light intensity change. At the same time, the ambient temperature of the array light source is monitored in real time, and the power supply voltage is collected in real time to obtain the working parameter data of the array light source. The change of ambient temperature directly affects the luminous efficiency and light intensity output of the light source, so it is necessary to collect temperature parameters in real time. The temperature sensor collects the temperature signal near the light source and converts it into a temperature value. Similarly, the fluctuation of the power supply voltage affects the light source output. The voltage sensor samples the power supply voltage in real time to obtain the voltage value. . The temperature parameter data and voltage parameter data Perform time synchronization combination to obtain the working parameter information of the array light source The formula for this process is:

[0054] ;

[0055] By combining the temperature and voltage data with the light intensity data in a time-synchronous manner, the comprehensive working parameter information of the area array light source is obtained.

[0056] In a specific embodiment, the process of executing step S2 may specifically include the following steps:

[0057] The light intensity data sequence is randomly masked, the masking ratio is set to 30%, and the masked sequence is obtained by the zero value replacement method;

[0058] The masked sequence is input into the encoder part of the masked autoencoder. The encoder contains three encoding layers, each of which contains convolution operation, ReLU activation function and batch normalization operation in sequence to obtain the masked feature map;

[0059] The masked feature map is input into the decoder part of the masked autoencoder. The decoder contains three decoding layers, each of which contains deconvolution operation, ReLU activation function and batch normalization operation in sequence to obtain the reconstructed sequence;

[0060] The light intensity data sequence and the reconstructed sequence are respectively input into the first dense block of the DenseNet network. The first dense block contains 6 convolutional layers. The output of each convolutional layer is connected through dense connections and processed by the LeakyReLU activation function to obtain the first feature group.

[0061] The first feature group is input into the second dense block of the DenseNet network. The second dense block contains 8 convolutional layers. The output of each convolutional layer is connected through dense connections and processed by the LeakyReLU activation function to obtain the second feature group.

[0062] The second feature group is input into the third dense block of the DenseNet network. The third dense block contains 10 convolutional layers. The output of each convolutional layer is connected through dense connections and processed by the LeakyReLU activation function to obtain the third feature group.

[0063] The third feature group is input into the fourth dense block of the DenseNet network. The fourth dense block contains 12 convolutional layers. The output of each convolutional layer is connected through dense connections and processed by the LeakyReLU activation function to obtain the fourth feature group.

[0064] The fourth feature group is subjected to dimensionality reduction processing through a global average pooling layer and a fully connected layer to obtain a dual-path stroboscopic feature vector.

[0065] Specifically, the light intensity data sequence is randomly masked to increase the robustness of the data and improve the model's adaptability to missing data. Suppose the light intensity data sequence is ,in Indicates at a point in time The light intensity value at is the length of the light intensity data sequence. In order to perform random masking, the masking ratio is set to 30%, that is, 30% of the data is randomly selected from the data sequence for masking. Suppose the masking sequence is ,in ,if ,but is masked to zero value. The resulting masked sequence is expressed as ,in represents the operation of element-by-element multiplication. The masked sequence is input into the encoder part of the masked autoencoder. The encoder part contains 3 encoding layers, each of which contains convolution operation, ReLU activation function and batch normalization operation in sequence. Let the input be , the output after the first layer of convolution operation is ,in Represents the first layer of convolution operation. The convolution operation extracts the local features of the input data, and its mathematical expression is:

[0066] ;

[0067] in is the size of the convolution kernel, is the weight of the convolution kernel, is the bias term. After the convolution operation, the convolution output is nonlinearly transformed through the ReLU activation function to obtain:

[0068] ;

[0069] The form of the ReLU function is:

[0070] ;

[0071] Batch normalization is used to standardize the activated data to make its distribution more stable and accelerate the convergence of the network. The output of batch normalization is expressed as:

[0072] ;

[0073] After three layers of coding processing, the masked feature map is finally obtained. . The masked feature map Input to the decoder part of the masked autoencoder. The decoder part contains 3 decoding layers, each of which contains deconvolution operation, ReLU activation function and batch normalization operation in sequence. The purpose of the deconvolution operation is to restore the spatial resolution of the input and obtain a reconstructed sequence with the same dimension as the original input. Let the output of the first deconvolution layer be , through ReLU activation and batch normalization, we get:

[0074] ;

[0075] After processing in three decoding layers, the reconstructed light intensity data sequence is obtained. . Reconstruction sequence It represents the optimal reconstruction of the original light intensity sequence learned by the masked autoencoder when the masked data is input. and reconstruct the sequence They are input into the first dense block of the DenseNet network. The first dense block contains 6 convolutional layers, and the output of each convolutional layer is connected through dense connections. Dense connections are a core feature of the DenseNet network, which can ensure that the features extracted by the previous layers are continued to be used in the subsequent layers, thereby improving the reusability of the features. The output of the layer convolution operation is ,in Represents the concatenation of the outputs of all previous convolutional layers. The output of each convolutional layer is processed by the LeakyReLU activation function, and the expression of LeakyReLU is:

[0076] ;

[0077] in is a constant less than 1, which is used to retain a certain negative gradient when the input is less than zero. After 6 convolutional layers, the first feature group is obtained. The first feature group The second dense block is input into the DenseNet network. The second dense block contains 8 convolutional layers. The output of each convolutional layer is also connected through dense connections and processed by the LeakyReLU activation function to obtain the second feature set. The combination of dense connections and activation functions can ensure the diversity of features and the expressiveness of the network. The third dense block contains 10 convolutional layers. The use of dense connections enables the features of all previous layers to be used by the current layer. The third feature group is input into the fourth dense block of the DenseNet network. The fourth dense block contains 12 convolutional layers. Through the same dense connection and activation function processing, the fourth feature group is obtained. The fourth feature group is pooled by the global average pooling layer and the fully connected layer. The dimensionality reduction process is performed to obtain the dual-path stroboscopic feature vector. The function of the global average pooling layer is to take the average value of all elements of each feature map, thereby reducing the dimension of each feature map to a scalar, effectively reducing the number of parameters and improving the generalization ability of the model. Suppose the output of the global average pooling is , then the fully connected layer performs a linear transformation to obtain the final dual-path stroboscopic feature vector :

[0078] ;

[0079] in is the weight matrix of the fully connected layer, is the bias vector.

[0080] In a specific embodiment, the process of executing step S3 may specifically include the following steps:

[0081] The dual-path stroboscopic feature vectors are subjected to contrast loss calculation using the cosine similarity function to obtain a feature difference matrix;

[0082] A contrast loss function is constructed according to the feature difference matrix, and the loss value is normalized by L2 regularization to obtain standardized contrast features. The standardized contrast features are then decomposed into independent components to obtain a basic stroboscopic pattern combination.

[0083] The basic stroboscopic pattern combination is decomposed according to the frequency components, and the characteristic parameters of the four types of power frequency flicker, high frequency flicker, random flicker and gradual flicker are extracted respectively to obtain the pattern feature set;

[0084] The feature vector is constructed for the pattern feature set to obtain the dimension-reduced stroboscopic feature, and the dimension-reduced stroboscopic feature is input into the weighted support vector machine classifier, and the feature space conversion matrix is ​​constructed using the radial basis kernel function to obtain the high-dimensional feature map;

[0085] The penalty weights of different types of stroboscopic patterns are set based on high-dimensional feature mapping. The kernel function parameters and penalty factors are optimized by grid search method to obtain the optimal classification parameters. The optimal classification parameters are input into a multi-class support vector machine classifier. The classification hyperplane is constructed by the soft margin maximization principle to obtain the stroboscopic pattern recognition result.

[0086] Specifically, the cosine similarity of the dual-path stroboscopic feature vectors is calculated to obtain a feature difference matrix. Assume that the dual-path stroboscopic feature vector is and , respectively represent the high-dimensional features of the two inputs after passing through the deep network. Cosine similarity is used to measure the similarity between two vectors, and its calculation formula is:

[0087] ;

[0088] in, represents the dot product of vectors, and Represents vectors and By calculating the cosine similarity, we get a similarity value between 0 and 1, which represents the angular relationship between the two feature vectors. The closer to 1, the more similar they are. Based on the similarity value, we calculate the contrast loss and construct the feature difference matrix. , whose elements Represents the feature vector With the eigenvector The contrast loss function is constructed based on the feature difference matrix. The purpose of the contrast loss function is to maximize the difference between features of different categories while minimizing the distance between features of the same category. The contrast loss function is expressed as:

[0089] ;

[0090] in, is a binary variable, if the eigenvector and From the same category, otherwise . is a hyperparameter that represents the minimum distance threshold between features of different categories. Through this loss function, features of the same category are closer and features of different categories are farther away. The loss value is normalized by L2 regularization to prevent overfitting while maintaining the stability of model parameters. The L2 regularization term is expressed as:

[0091] ;

[0092] in, is the regularization coefficient, is the set of model parameters, Represents each parameter in the parameter set. By adding L2 regularization to the contrast loss function, the normalized loss function is obtained:

[0093] ;

[0094] By optimizing this loss function, the standardized contrast features are obtained. Independent component decomposition is performed on the standardized contrast features to obtain the basic stroboscopic pattern combination. Independent component decomposition is a method of decomposing a multidimensional signal into a set of independent components, which is suitable for extracting independent signal sources from mixed signals. Let the standardized contrast features be the matrix , the goal of independent component decomposition is to find a matrix , so that:

[0095] ;

[0096] in, is a matrix of independent components, representing the combination of basic strobe patterns. Through independent component decomposition, a set of independent strobe patterns is obtained. The basic strobe pattern combination is decomposed according to the frequency component, so as to extract characteristic parameters for the four types of power frequency flicker, high frequency flicker, random flicker and gradual flicker, and obtain a pattern feature set. For power frequency flicker, the main low-frequency component is extracted by Fourier transform; for high frequency flicker, the high frequency component is extracted by spectrum analysis; random flicker captures random fluctuation characteristics through adaptive filter; and gradual flicker extracts features through trend analysis in time domain. Assume that the strobe pattern is , each The feature representing a type of stroboscopic light is decomposed to obtain a set of pattern features containing different frequency features. The feature vector is constructed for the pattern feature set to obtain the stroboscopic feature after dimensionality reduction. The complexity of the feature is reduced while retaining the representative information of the stroboscopic feature, thereby improving the efficiency and accuracy of the subsequent classification model. Assume that the stroboscopic feature after dimensionality reduction is a vector , then it is expressed as:

[0097] ;

[0098] in, is a dimensionality reduction matrix. Through matrix multiplication, the high-dimensional stroboscopic pattern combination is reduced to a lower-dimensional feature vector. The stroboscopic features after dimensionality reduction are input into the weighted support vector machine classifier. In order to distinguish different stroboscopic patterns, the radial basis kernel function is used to construct the feature space conversion matrix so as to map the original features into the high-dimensional feature space. The expression of the radial basis kernel function is:

[0099] ;

[0100] in, are the parameters of the kernel function, Represents the Euclidean distance between two feature vectors. Through kernel function mapping, the original low-dimensional features are converted into high-dimensional feature representations so as to find a hyperplane in high-dimensional space that can distinguish different categories of stroboscopic features. Based on high-dimensional feature mapping, different penalty weights are set for different types of stroboscopic patterns. The introduction of penalty weights is to deal with the problem of class imbalance so that the classifier can better identify certain specific types of stroboscopic patterns. The kernel function parameters and penalty factors are optimized through the grid search method to find the parameter combination that achieves the best classification effect. The grid search process is to find the parameter combination that can achieve the optimal objective function by traversing and searching the parameters within a certain range. The optimal classification parameters are input into the multi-class support vector machine classifier. The multi-class support vector machine constructs a classification hyperplane through the soft interval maximization principle to maximize the interval between different categories of data. The objective function of soft interval maximization is expressed as:

[0101] ;

[0102] in, is the normal vector of the classification hyperplane, is the bias term, is a slack variable that allows some data points to fall within the interval boundaries, is a penalty factor, which is used to control the penalty intensity of misclassification. By optimizing the objective function, the optimal classification hyperplane is found, thus obtaining the recognition result of the stroboscopic pattern.

[0103] In a specific embodiment, the process of executing step S4 may specifically include the following steps:

[0104] The stroboscopic pattern recognition result and the historical recognition data are combined in time series to obtain a time series data group, and feature learning is performed on the time series data group to obtain a time series state vector;

[0105] A time series evolution model is constructed based on the time series state vector. The time series evolution model contains three hidden layers, and each hidden layer contains 128 neurons.

[0106] The stroboscopic characteristics at the current moment are input into the time series evolution model, and the stroboscopic characteristic prediction value at the next moment is calculated through forward propagation to obtain the predicted characteristic data;

[0107] Convex optimization subproblems are constructed for the predicted feature data and the actual feature data, and the optimal feature difference is solved by the second-order cone programming method to obtain the convex partial deviation. Concave optimization subproblems are constructed for the predicted feature data and the actual feature data, and the minimum feature difference is solved by the differential evolution algorithm to obtain the concave partial deviation.

[0108] The convex part deviation and the concave part deviation are weightedly superimposed to obtain a comprehensive characteristic deviation, and the comprehensive characteristic deviation and the stroboscopic characteristic are corrected to obtain corrected stroboscopic characteristic data.

[0109] Specifically, the stroboscopic pattern recognition result is combined with the historical recognition data in time series. Assume that the stroboscopic pattern recognition result is ,in represents a time point, and the historical identification data is ,in is a time interval. and historical stroboscopic characteristic data Combine to get a complete time series data set , which is expressed in the form of:

[0110] ;

[0111] This combination process is carried out in a stacking manner, including the changing trend of the stroboscopic characteristics at the current moment and over a period of history, forming a time series data set to capture the evolution information of the light source characteristics. Perform feature learning to obtain a time series state vector. Extract key features from complex time series data and remove redundant information, so that the model has a better description of time series features. Assume that a neural network model is used to extract features from time series data, and the obtained time series state vector is expressed as This step is done through a deep learning model, such as LSTM (Long Short-Term Memory) or GRU (Gated Recurrent Unit), to capture the temporal dependencies of the data. The process of feature learning is:

[0112] ;

[0113] in, Represents a recurrent neural network model (such as LSTM or GRU) used to extract time-dependent feature vectors from input time series data . Timing state vector Reflects the correlation between the current light source stroboscopic state and the historical state. Based on the extracted time series state vector, a time series evolution model is constructed. The time series evolution model is used to predict future stroboscopic characteristics and capture the changing law of light source characteristics over time. The model contains 3 hidden layers, each of which contains 128 neurons. The hidden layer uses nonlinear activation functions to enhance the expressive power of the model and capture more complex feature relationships. Differential evolution is a population-based global optimization algorithm suitable for solving complex nonlinear optimization problems. Through the differential evolution algorithm, the parameters that minimize the difference can be found in the feature space, and the concave part deviation can be obtained, which is recorded as . The convex part deviation and concave deviation Perform weighted superposition to obtain comprehensive feature deviation. The weighted superposition process is expressed as:

[0114] ;

[0115] in, is a weighting factor used to control the influence of convex deviation and concave deviation on the total feature deviation. , so that the model finds a balance point between global optimum and local optimum, ensuring accurate correction of the stroboscopic characteristics. and stroboscopic characteristics Perform correction calculation to obtain corrected stroboscopic characteristic data The correction operation formula is expressed as:

[0116] ;

[0117] Through this process, the corrected flicker characteristic data can better reflect the actual output state of the light source and thus be used for flicker compensation control.

[0118] In a specific embodiment, the process of executing step S5 may specifically include the following steps:

[0119] The corrected stroboscopic characteristic data are classified according to the stroboscopic type, and characteristic subsets of power frequency stroboscopic, high frequency stroboscopic, random stroboscopic and gradual stroboscopic are constructed respectively to obtain the classified characteristic data;

[0120] Perform Fourier transform on the power frequency flicker characteristics in the classification feature data, extract frequency and phase information, generate a sine wave with the same frequency and opposite phase as the power frequency, and obtain a power frequency compensation waveform; perform spectrum analysis on the high-frequency flicker characteristics in the classification feature data, set the duty cycle parameters through pulse width modulation, and obtain a high-frequency compensation waveform; construct an adaptive filter for the random flicker characteristics in the classification feature data, calculate the filter coefficients through the minimum mean square error criterion, and obtain a random compensation waveform; perform segmented processing on the gradual flicker characteristics in the classification feature data, and construct a piecewise linear function through cubic spline interpolation to obtain a gradual compensation waveform;

[0121] The power frequency compensation waveform, the high frequency compensation waveform, the random compensation waveform and the gradual compensation waveform are superimposed in the time domain to obtain a combined compensation waveform;

[0122] An analog-to-digital conversion operation is performed on the combined compensation waveform to obtain a quantized compensation signal, and a digital filtering process is performed on the quantized compensation signal to obtain a digital compensation signal.

[0123] Specifically, the corrected stroboscopic feature data is classified according to the stroboscopic type, and feature subsets of power frequency flicker, high frequency flicker, random flicker, and gradual flicker are constructed respectively. Suppose the feature subset of power frequency flicker is , the feature subset of high-frequency flicker is , the feature subset of random flashing is , the feature subset of gradual flicker is Through this classification, appropriate compensation methods are adopted for each type of flicker to minimize the impact of flicker on the light source output. Perform Fourier transform to extract its frequency and phase information. Suppose the Fourier transform result is ,in Represents the frequency component. The formula for Fourier transform is:

[0124] ;

[0125] Through Fourier transform, the main frequency component of the power frequency signal is obtained And phase information In order to compensate for the power frequency flicker, a sine wave with the same frequency and opposite phase as the power frequency signal is generated to obtain the power frequency compensation waveform , whose expression is:

[0126] ;

[0127] in, To compensate for the amplitude of the waveform, Indicates a phase shift of 180 degrees, thereby ensuring that the compensation signal is in phase with the original power frequency signal to offset the flicker caused by the power frequency. , perform spectrum analysis and extract its main high-frequency components, which will help to take corresponding compensation measures. Through spectrum analysis, determine the frequency of the high-frequency components , use the pulse width modulation (PWM) method to set the duty cycle parameters of the compensation waveform. Assume the duty cycle is , then the high frequency compensation waveform This is achieved by controlling the pulse width and adjusting the duty cycle to control the time distribution of the high-frequency signal to effectively suppress high-frequency flicker:

[0128] ;

[0129] in, is the pulse amplitude, is the pulse period, and D is the duty cycle, which indicates the proportion of the pulse duration to the entire period. Since random flicker has strong uncertainty and unpredictability, an adaptive filter is constructed to process random flicker. The adaptive filter calculates the filter coefficients through the minimum mean square error criterion to minimize the error between the filter output and the target signal. Let the filter coefficients be , the input signal is , the target signal is , the filter output is In order to minimize the error , the update formula of the adaptive filter is:

[0130] ;

[0131] in, is the learning rate, which is used to control the step size of the update. In this way, the random compensation waveform is obtained , the compensation waveform can adaptively track the changes of random flicker, thus effectively compensating. , a segmented processing method is used to deal with this gradual change characteristic. A piecewise linear function is constructed by cubic spline interpolation to generate a gradual compensation waveform Cubic spline interpolation is an interpolation method used to construct smooth curves, which can ensure the continuity and smoothness of the curve at the boundaries of each segment. Let the interpolation nodes be , the interpolation function is , the form of cubic spline interpolation is:

[0132] ;

[0133] in, is the interpolation coefficient, and the continuity and smoothness of each interpolation segment are guaranteed by the constraint conditions. The final gradient compensation waveform It can effectively match the characteristics of gradual flicker, thus realizing effective compensation for gradual flicker. , high frequency compensation waveform , Random compensation waveform and gradient compensation waveform Perform time domain superposition to obtain a combined compensation waveform The combined compensation waveform is expressed as:

[0134] ;

[0135] Through time domain superposition, all types of flicker are comprehensively compensated, thereby minimizing the flicker effect and ensuring the stability of the light output of the light source. Perform analog-to-digital conversion on the combined compensation waveform to convert the analog combined compensation waveform into a digital signal to obtain a quantized compensation signal. . Convert the continuous compensation waveform into discrete digital quantity for further processing in the digital control system. The formula for analog-to-digital conversion is:

[0136] ;

[0137] in, is the reference voltage, is the number of bits of the analog-to-digital converter (e.g. 8 bits, 12 bits, etc.). Through this process, the quantized signal obtained is used for subsequent processing of the digital system. Perform digital filtering to obtain the final digital compensation signal The purpose of digital filtering is to remove the noise and unnecessary high-frequency components introduced in the quantization process, so that the compensation signal is smoother and more stable. Assuming that a low-pass filter is used to filter the quantized signal, the filtered signal is expressed as:

[0138] ;

[0139] in, are the coefficients of the filter, is the order of the filter. By properly selecting the filter coefficients, the noise and jitter in the signal can be effectively reduced and the quality of the compensation signal can be improved.

[0140] In a specific embodiment, the process of executing step S6 may specifically include the following steps:

[0141] The amplitude of the digital compensation signal is modulated by a pulse width modulator to obtain a power modulation signal, and the power modulation signal is superimposed on the original driving signal to obtain a combined driving signal;

[0142] The light intensity output of the array light source under the combined driving signal is sampled and analyzed to obtain the flicker suppression rate value, and the flicker suppression rate value is used as the objective function. The loss function is constructed by adding L1 regularization terms and L2 regularization terms to obtain the optimized objective function.

[0143] The gradient of the optimization objective function is calculated to obtain the parameter update vector. Based on the parameter update vector, the modulation frequency, duty cycle and weighting coefficient are jointly optimized, and the optimal compensation control parameters are determined by the grid search method.

[0144] Specifically, the amplitude of the digital compensation signal is modulated by a pulse width modulator to obtain a power modulation signal. After being processed by the pulse width modulator, the power modulation signal The amplitude of the compensation signal can be controlled by adjusting the duty cycle of the signal to ensure the optimal flicker suppression effect in the drive circuit. Pulse width modulation controls the amplitude of the signal by changing the high level duration of the pulse signal within one cycle. Assume that the duty cycle is , then the power modulation signal is expressed as:

[0145] ;

[0146] in, The value range is [0,1], which indicates the proportion of high level of the modulation signal in one cycle. , effectively control the amplitude of the power modulation signal so that it can adapt to different compensation requirements. The power modulation signal is superimposed on the original drive signal to obtain a combined drive signal . Assume the original driving signal is , then the combined driving signal is expressed as:

[0147] ;

[0148] The superposition operation is to add a compensation component on the basis of the original driving signal, so that the output light intensity of the light source is more stable and the flicker phenomenon is effectively suppressed. The combined driving signal can contain both the original driving characteristics and the flicker compensation characteristics, so that the compensated light source can reduce the periodic fluctuation of the light intensity while maintaining the normal luminous performance. The light intensity output of the array light source under the combined driving signal is sampled and analyzed to evaluate the effect of flicker compensation. The light intensity output is sampled by the sensor to obtain a series of light intensity data . Calculate the flicker suppression rate value. The flicker suppression rate is used to measure the flicker suppression effect of the light source after compensation. The calculation formula is expressed as:

[0149] ;

[0150] in, represents the variance of the signal, is the light intensity signal of the front light source for compensation, is the light intensity signal of the light source after compensation. By calculating the flicker suppression rate , evaluate the compensation signal's effect on flicker suppression, when The closer it is to 1, the better the flicker suppression effect. In order to optimize the flicker compensation effect, the flicker suppression rate value is used as the objective function, and the loss function is constructed by adding L1 regularization terms and L2 regularization terms to obtain the optimized objective function. The L1 regularization term is used to sparse the model parameters to prevent the model from being overly complicated; the L2 regularization term is used to suppress the parameter value from being too large and enhance the stability of the model. The optimized objective function is expressed as:

[0151] ;

[0152] in, Indicates the parameters that need to be optimized, such as modulation frequency, duty cycle and weighting coefficient. is the L1 regularization term, is the L2 regularization term, and are the weight coefficients of the regularization term respectively. By minimizing the loss function , find the optimal compensation control parameter combination to achieve the best flicker suppression effect. Perform gradient calculation on the optimization objective function to obtain the parameter update vector. The gradient calculation is used to determine how to update the parameters to reduce the value of the loss function. Assume that the loss function is The partial derivative of , then the parameter update vector It is expressed as:

[0153] ;

[0154] in, is the learning rate, which is used to control the step size of each update. By using the gradient descent method, the current parameters are updated according to the parameter update vector, and the value of the loss function is gradually reduced, thereby optimizing the flicker compensation. Based on the parameter update vector, the modulation frequency , duty cycle D and weighting coefficient The modulation frequency determines the speed of change of the compensation signal, the duty cycle controls the amplitude ratio of the signal, and the weighting coefficient is used to adjust the contribution of each compensation signal in the combined signal. The purpose of joint optimization is to find the best combination among these three parameters to maximize the flicker suppression rate. In order to find the optimal compensation control parameters, the grid search method is used to optimize the parameters. Grid search is an exhaustive method that traverses multiple possible values ​​of the parameters to find the parameter combination that can make the optimization objective function reach the optimal value. Suppose the range of the modulation frequency is , the duty cycle range is The value range of the weighting coefficient is By performing a grid search within these ranges, the optimal parameter combination is found to achieve the most significant flicker suppression effect.

[0155] The above describes the method for detecting and compensating the stroboscopic light source of the planar array light source in the embodiment of the present invention. The following describes the system for detecting and compensating the stroboscopic light source of the planar array light source in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, an embodiment of the area array light source stroboscopic detection and compensation system includes:

[0156] An acquisition module is used to collect and process the light intensity signal of the array light source through median filtering to obtain a light intensity data sequence and working parameter information;

[0157] The feature extraction module is used to input the light intensity data sequence into the masking autoencoder for dynamic masking processing, and extract features from the original sequence and the masking sequence through the DenseNet network to obtain a dual-path stroboscopic feature vector;

[0158] The recognition module is used to perform stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result;

[0159] A correction module is used to construct a time series evolution model based on the stroboscopic pattern recognition results and historical recognition data, calculate the feature deviation through convex-concave programming, and obtain the corrected stroboscopic feature data;

[0160] A synthesis module is used to calculate the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesize the signal through a piecewise linear function to obtain a digital compensation signal;

[0161] The parameter optimization module is used to power modulate the digital compensation signal and superimpose it on the drive circuit, and perform parameter optimization to obtain the optimal compensation control parameters.

[0162] Through the synergy of the above components, the dual-path feature extraction mechanism combining the masked autoencoder and the DenseNet network effectively improves the extraction capability and anti-noise performance of the stroboscopic feature; the stroboscopic pattern recognition strategy based on contrast loss and independent component analysis is adopted to achieve accurate classification of various types of stroboscopic features; the introduction of the time series evolution model and the convex-concave programming optimization method enhances the dynamic correction capability of the stroboscopic feature; the signal synthesis mechanism of the piecewise linear function and the adaptive parameter optimization algorithm are designed to ensure the accuracy and stability of the compensation effect. The present invention improves the accuracy of stroboscopic detection and optimizes the compensation effect.

[0163] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0164] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0165] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0166] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

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

[0168] 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.

[0169] 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 detecting and compensating stroboscopic light sources of an array, characterized in that: The method comprises: The light intensity signal of the array light source is collected and processed by median filtering to obtain the light intensity data sequence and working parameter information; The light intensity data sequence is input into a masked autoencoder for dynamic masking processing, and the original sequence and the masked sequence are respectively feature extracted through a DenseNet network to obtain a dual-path stroboscopic feature vector; specifically comprising: performing random masking processing on the light intensity data sequence, setting the masking ratio to 30%, and obtaining a masked sequence through a zero value replacement method; the masked sequence is input into the encoder part of the masked autoencoder, the encoder comprises three encoding layers, each encoding layer sequentially comprises a convolution operation, a ReLU activation function, and a batch normalization operation to obtain a masked feature map; the masked feature map is input into the decoder part of the masked autoencoder, the decoder comprises three decoding layers, each decoding layer sequentially comprises a deconvolution operation, a ReLU activation function, and a batch normalization operation to obtain a reconstructed sequence; the light intensity data sequence and the reconstructed sequence are respectively input into the first dense block of the DenseNet network, the first dense block comprises six convolution layers, and the output of each convolution layer is obtained through The first feature group is input into the second dense block of the DenseNet network, the second dense block includes 8 convolutional layers, the output of each convolutional layer is connected by dense connection, and the second feature group is obtained by LeakyReLU activation function; the second feature group is input into the third dense block of the DenseNet network, the third dense block includes 10 convolutional layers, the output of each convolutional layer is connected by dense connection, and the third feature group is obtained by LeakyReLU activation function; the third feature group is input into the fourth dense block of the DenseNet network, the fourth dense block includes 12 convolutional layers, the output of each convolutional layer is connected by dense connection, and the fourth feature group is obtained by LeakyReLU activation function; the fourth feature group is subjected to dimensionality reduction processing through a global average pooling layer and a fully connected layer to obtain a dual-path stroboscopic feature vector; Performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result; Based on the stroboscopic pattern recognition result and the historical recognition data, a time series evolution model is constructed, and characteristic deviations are calculated by convex-concave programming to obtain corrected stroboscopic characteristic data; Calculate the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesize the signal through a piecewise linear function to obtain a digital compensation signal; The digital compensation signal is power modulated and superimposed on the driving circuit, and parameter optimization is performed to obtain the optimal compensation control parameter.

2. The method for detecting and compensating the stroboscopic light source of an area array according to claim 1, characterized in that: The light intensity signal of the array light source is collected and processed by median filtering to obtain a light intensity data sequence and working parameter information, including: The light intensity signal of the array light source is sampled based on the photoelectric sensor to obtain the original light intensity value, and the original light intensity value is converted into a digital value to obtain the digital value of the light intensity signal; Segmenting the digital quantity of the light intensity signal to obtain a segmented light intensity sequence, and removing sudden interference from the segmented light intensity sequence to obtain a filtered light intensity sequence; The filtered light intensity sequence is spliced ​​and reorganized in time windows to obtain a light intensity data sequence; The ambient temperature of the area array light source is monitored in real time to obtain temperature parameter data, and the power supply voltage of the area array light source is collected in real time to obtain voltage parameter data; The temperature parameter data and the voltage parameter data are combined in time synchronization to obtain working parameter information.

3. The method for detecting and compensating the stroboscopic light source of an area array according to claim 1, characterized in that: The step of performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result includes: The dual-path stroboscopic feature vectors are subjected to contrast loss calculation using a cosine similarity function to obtain a feature difference matrix; Constructing a contrast loss function according to the feature difference matrix, normalizing the loss value by L2 regularization to obtain a standardized contrast feature, and performing independent component decomposition on the standardized contrast feature to obtain a basic stroboscopic pattern combination; Decomposing the basic stroboscopic pattern combination according to frequency components, extracting characteristic parameters of four types of flicker, namely, power frequency flicker, high frequency flicker, random flicker and gradual flicker, respectively, to obtain a pattern feature set; Constructing a feature vector for the pattern feature set to obtain a reduced-dimensional stroboscopic feature, inputting the reduced-dimensional stroboscopic feature into a weighted support vector machine classifier, constructing a feature space conversion matrix using a radial basis kernel function, and obtaining a high-dimensional feature map; The penalty weights of different types of stroboscopic patterns are set based on the high-dimensional feature mapping, the kernel function parameters and the penalty factor are optimized by the grid search method to obtain the optimal classification parameters, and the optimal classification parameters are input into the multi-class support vector machine classifier, and the classification hyperplane is constructed by the soft margin maximization principle to obtain the stroboscopic pattern recognition result.

4. The method for detecting and compensating the stroboscopic light source of an area array according to claim 3, characterized in that: The method of constructing a time series evolution model based on the stroboscopic pattern recognition result and the historical recognition data, and calculating the characteristic deviation through convex-concave programming to obtain the corrected stroboscopic characteristic data includes: Combining the stroboscopic pattern recognition result with the historical recognition data in time series to obtain a time series data group, and performing feature learning on the time series data group to obtain a time series state vector; Building a time series evolution model based on the time series state vector, wherein the time series evolution model comprises three hidden layers, and each hidden layer comprises 128 neurons; Inputting the stroboscopic feature at the current moment into the time series evolution model, calculating the stroboscopic feature prediction value at the next moment through forward propagation, and obtaining the prediction feature data; Constructing a convex optimization subproblem for the predicted feature data and the actual feature data, solving the optimal feature difference by a second-order cone programming method, and obtaining a convex partial deviation; constructing a concave optimization subproblem for the predicted feature data and the actual feature data, solving the minimum feature difference by a differential evolution algorithm, and obtaining a concave partial deviation; The convex part deviation and the concave part deviation are weightedly superimposed to obtain a comprehensive characteristic deviation, and a correction operation is performed on the comprehensive characteristic deviation and the stroboscopic characteristic to obtain corrected stroboscopic characteristic data.

5. The method for detecting and compensating the stroboscopic light source of an area array according to claim 4, characterized in that: The method of calculating the anti-phase compensation waveform according to the corrected stroboscopic characteristic data and synthesizing the signal through a piecewise linear function to obtain a digital compensation signal includes: Classifying the corrected stroboscopic characteristic data according to stroboscopic types, constructing characteristic subsets of power frequency stroboscopic, high frequency stroboscopic, random stroboscopic and gradual stroboscopic, respectively, to obtain classified characteristic data; Performing Fourier transform on the power frequency flicker feature in the classification feature data, extracting frequency and phase information, generating a sine wave with the same frequency and opposite phase as the power frequency, and obtaining a power frequency compensation waveform; performing spectrum analysis on the high frequency flicker feature in the classification feature data, setting the duty cycle parameter by pulse width modulation, and obtaining a high frequency compensation waveform; constructing an adaptive filter for the random flicker feature in the classification feature data, calculating the filter coefficient by the minimum mean square error criterion, and obtaining a random compensation waveform; performing segmentation processing on the gradual flicker feature in the classification feature data, constructing a piecewise linear function by cubic spline interpolation, and obtaining a gradual compensation waveform; Superimposing the power frequency compensation waveform, the high frequency compensation waveform, the random compensation waveform and the gradual compensation waveform in the time domain to obtain a combined compensation waveform; An analog-to-digital conversion operation is performed on the combined compensation waveform to obtain a quantized compensation signal, and a digital filtering process is performed on the quantized compensation signal to obtain a digital compensation signal.

6. The method for detecting and compensating the stroboscopic light source of an area array according to claim 5, characterized in that: The power modulation of the digital compensation signal is performed and superimposed on the driving circuit, and parameter optimization is performed to obtain the optimal compensation control parameter, including: Modulating the amplitude of the digital compensation signal by a pulse width modulator to obtain a power modulation signal, and performing a superposition operation on the power modulation signal and the original driving signal to obtain a combined driving signal; Sampling and analyzing the light intensity output of the array light source under the combined driving signal to obtain a flicker suppression rate value, and using the flicker suppression rate value as the objective function, constructing a loss function by adding an L1 regularization term and an L2 regularization term to obtain an optimized objective function; The optimization objective function is gradient-calculated to obtain a parameter update vector, and the modulation frequency, duty cycle and weighting coefficient are jointly optimized based on the parameter update vector, and the optimal compensation control parameter is determined by a grid search method.

7. A system for detecting and compensating stroboscopic light sources of an array, characterized in that: Used to perform the method for detecting and compensating the stroboscopic light source of an area array according to any one of claims 1 to 6, the stroboscopic light source detection and compensation system of the area array comprises: An acquisition module is used to collect and process the light intensity signal of the array light source through median filtering to obtain a light intensity data sequence and working parameter information; A feature extraction module is used to input the light intensity data sequence into a masking autoencoder for dynamic masking processing, and to extract features from the original sequence and the masking sequence respectively through a DenseNet network to obtain a dual-path stroboscopic feature vector; An identification module, used for performing stroboscopic pattern recognition on the dual-path stroboscopic feature vector to obtain a stroboscopic pattern recognition result; A correction module, used to construct a time series evolution model based on the stroboscopic pattern recognition result and historical recognition data, calculate the characteristic deviation through convex-concave programming, and obtain corrected stroboscopic characteristic data; A synthesis module, used for calculating the anti-phase compensation waveform according to the corrected stroboscopic characteristic data, and synthesizing the signal through a piecewise linear function to obtain a digital compensation signal; The parameter optimization module is used to power modulate the digital compensation signal and superimpose it on the drive circuit, and perform parameter optimization to obtain the optimal compensation control parameter.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor executes the computer program, the method for detecting and compensating the stroboscopic light source of any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is enabled to execute the method for detecting and compensating for stroboscopic light sources of an area array as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Stroboscopic strip information identification method and device and electronic equipment

    CN113688820A

  • Pre-training method and device of identification model, identification method and device, medium and equipment

    CN115312127A

  • LED lamp drive circuit control method for preventing stroboscopic effect

    CN119012455A