LED spectrum fitting method and system

CN122970741APending Publication Date: 2026-10-23AIR FORCE UNIV PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611159417.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-01
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]但是,在实际应用过程中,目标环境光谱会随着时间、光照条件、背景材质以及环境类型变化而持续变化,而现有技术通常采用固定组合方式或整体光谱拟合方式进行LED驱动计算,在面对波段范围较宽、环境光谱变化频繁或者LED数量较多的情况下,容易出现光谱拟合计算量较大、算法收敛速度较慢以及部分LED灯珠参与拟合效率较低的问题,从而导致LED发射光谱产生偏移,进而影响目标光谱的复现精度

Benefits of technology

[0009]1、本发明通过基于残差光谱数据分析各单波段LED灯珠对应的光谱贡献率,并按照贡献率大小筛选得到目标LED灯珠,从而使不同批次拟合过程持续围绕未完成拟合的目标光谱部分执行动态迭代拟合,进而实现了降低单批次光谱拟合复杂度并提高迭代收敛稳定性的技术效果,有效解决了现有技术中全部LED灯珠同时参与整体光谱拟合导致局部拟合偏差较高的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122970741A_ABST
    Figure CN122970741A_ABST
Patent Text Reader

Abstract

The application discloses an LED spectrum fitting method and system, and relates to the technical field of LED spectrum. The original emission spectrum data corresponding to a plurality of single-band LED lamp beads and target spectrum data corresponding to a target environment are acquired to construct an LED spectrum matrix and residual spectrum data. The spectrum contribution rate of each single-band LED lamp bead is analyzed based on the residual spectrum data, and a target LED lamp bead is obtained through screening. Non-negative least square fitting processing is performed based on the current batch LED spectrum sub-matrix and the residual spectrum data to obtain the fitting current value corresponding to each target LED lamp bead, and a PWM driving control value is generated. Weighted cumulative processing is performed on the original emission spectrum data based on the constraint current value to obtain cumulative fitting spectrum data, and residual update and iterative convergence analysis are performed to output corresponding LED driving control parameters. The application can reduce the complexity of single-batch spectrum fitting and improve the spectrum fitting accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of LED spectral technology, specifically to an LED spectral fitting method and system. Background Technology

[0002] With the development of multispectral detection technology, UAVs, satellites, and near-space platforms can acquire the reflectance spectral characteristics of targets in different bands through multispectral sensors, and identify and analyze ground targets based on these spectral features. To reduce the risk of target exposure under multispectral reconnaissance, existing technologies typically employ camouflage coatings, camouflage nets, and multi-band light-emitting devices. Some existing technologies utilize LED spectral databases, employ spectral reconstruction algorithms to calculate the driving parameters corresponding to different LEDs, and adjust the luminous intensity of the LEDs to generate a reproducible spectrum close to the target environment, thereby improving the target's camouflage capabilities in the visible and near-infrared bands.

[0003] However, in practical applications, the target environment spectrum will continuously change with time, lighting conditions, background materials and environment type. Existing technologies usually use fixed combination methods or overall spectrum fitting methods for LED driving calculations. When faced with a wide band range, frequent changes in the environmental spectrum or a large number of LEDs, problems such as large spectrum fitting calculation, slow algorithm convergence speed and low efficiency of some LEDs participating in the fitting are likely to occur, resulting in LED emission spectrum shift and thus affecting the accuracy of target spectrum reproduction. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides an LED spectrum fitting method and system.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention discloses an LED spectral fitting method, comprising the following steps: S1, acquiring the original emission spectral data corresponding to multiple single-band LED beads and the target spectral data corresponding to the target environment; S2, constructing an LED spectral matrix based on the original emission spectral data, and constructing residual spectral data based on the target spectral data; S3, analyzing the residual spectral data to obtain the spectral contribution rate corresponding to each single-band LED bead, and selecting a preset number of target LED beads according to the contribution rate, thereby forming the fitted LED data for the current batch; S4, performing non-negative least squares fitting processing based on the fitted LED data of the current batch and the corresponding residual spectral data to obtain... S5. The corresponding LED bead is fitted with a current value, and the current intensity is constrained to obtain a constraint current value, thereby generating the corresponding PWM drive control value; S6. Based on the PWM drive control value, the corresponding LED bead is driven to output the target emission spectrum. Based on the constraint current value and the corresponding original emission spectrum data, a weighted accumulation process is performed to obtain the cumulative fitted spectrum data; S7. Based on the cumulative fitted spectrum data and the target spectrum data, a residual update process is performed to obtain the residual spectrum update data; S8. Based on the residual spectrum update data, an iterative convergence analysis is performed. If the preset convergence condition is met, the corresponding LED drive control parameters are output. Otherwise, steps S3 to S7 are repeated based on the residual spectrum update data.

[0007] Secondly, this invention discloses an LED spectral fitting system, comprising the following modules: a data acquisition module, used to acquire the original emission spectral data corresponding to multiple single-band LED beads and the target spectral data corresponding to the target environment; a residual construction module, used to construct an LED spectral matrix based on the original emission spectral data and construct residual spectral data based on the target spectral data; a bead selection module, used to analyze the residual spectral data to obtain the spectral contribution rate corresponding to each single-band LED bead, and select a preset number of target LED beads according to the contribution rate, thereby forming the fitted LED data for the current batch; and a current constraint module, used to perform non-negative least squares fitting processing based on the fitted LED data of the current batch and the corresponding residual spectral data to obtain the current batch of LED beads. The system calculates the target LED's current value by fitting it and constraining its current intensity to obtain the constraint current value, which in turn generates the corresponding PWM drive control value. The spectral fitting module drives the corresponding LED to output the target emission spectrum based on the PWM drive control value. It then performs weighted accumulation processing based on the constraint current value and the corresponding original emission spectrum data to obtain the accumulated fitted spectral data. The residual spectral update module performs residual update processing based on the accumulated fitted spectral data and the target spectral data to obtain the residual updated spectral data. The iterative loop module performs iterative convergence analysis based on the residual updated spectral data. If the preset convergence condition is met, the corresponding LED drive control parameters are output; otherwise, the LED selection module is re-executed to the iterative loop module based on the residual updated spectral data.

[0008] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0009] 1. This invention analyzes the spectral contribution rate of each single-band LED based on residual spectral data, and selects target LEDs according to the contribution rate. This allows different batches of fitting processes to continuously perform dynamic iterative fitting around the unfitted target spectral portion, thereby reducing the complexity of single-batch spectral fitting and improving the stability of iterative convergence. This effectively solves the problem of high local fitting deviation caused by all LEDs participating in the overall spectral fitting at the same time in the prior art.

[0010] 2. This invention improves the driving stability of the spectral fitting results by performing a least-squares solution under non-negative constraints based on the current batch of LED spectral sub-matrix and residual spectral data.

[0011] 3. This invention performs weighted processing on the original emission spectrum data based on the constraint current value and performs cumulative superposition processing on the fitted spectrum data of each individual lamp bead, thereby forming cumulative fitted spectrum data across batches. This achieves continuous accumulation and dynamic fusion of fitting results from different batches, improving the fitting integrity of the overall target spectrum.

[0012] 4. This invention improves the accuracy of spectral fitting by performing residual update processing based on the cumulative fitted spectral data and the target spectral data, and performing iterative convergence analysis based on the residual spectral update data. This allows subsequent batch fitting processes to continuously perform dynamic fitting on the unfitted portion of the target spectrum, thereby improving the accuracy of spectral fitting. Attached Figure Description

[0013] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0014] Figure 1 This is an overall flowchart of the LED spectrum fitting process of the present invention;

[0015] Figure 2 This is a flowchart of the core process of the spectral fitting algorithm of the present invention;

[0016] Figure 3 This is a flowchart of the residual recursion and target LED bead selection process of the present invention;

[0017] Figure 4 This is a flowchart of the LED spectrum fitting and cumulative update process of the present invention;

[0018] Figure 5 This is a design diagram of the driving circuit of the present invention;

[0019] Figure 6 This is the PCB design diagram for the driver of this invention;

[0020] Figure 7 This is a schematic diagram illustrating the fitting effect of the first target spectrum in this invention;

[0021] Figure 8 This is a schematic diagram of the residual convergence curve corresponding to the first target spectrum of the present invention;

[0022] Figure 9 This is a schematic diagram illustrating the fitting effect of the second target spectrum in this invention;

[0023] Figure 10 This is a schematic diagram of the residual convergence curve corresponding to the second target spectrum of the present invention;

[0024] Figure 11 These are the environmental spectral reproduction results for different time periods of this invention;

[0025] Figure 12 This is a schematic diagram of the simulated grassland environment test results of the present invention;

[0026] Figure 13 This is a schematic diagram of the simulated desert environment test results of the present invention;

[0027] Figure 14 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0028] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0029] In existing multispectral camouflage or environmental spectral reconstruction technologies, all LED beads are usually used to participate in the spectral fitting at the same time to perform the overall spectral reconstruction. This can easily lead to problems such as large fitting computation, high single-batch fitting pressure, and poor iterative convergence stability. At the same time, in the process of multi-band environmental spectral fitting, some LED beads contribute less to the current residual spectrum but still participate in the overall fitting solution, which can easily lead to a decrease in fitting efficiency and an increase in local spectral deviation.

[0030] This invention constructs an LED spectral matrix and residual spectral data by acquiring the original emission spectral data corresponding to multiple single-band LED beads and the target spectral data corresponding to the target environment. Based on the residual spectral data, it analyzes the spectral contribution rate of each single-band LED bead and selects the target LED beads corresponding to the current batch. Furthermore, it performs a least squares solution under non-negative constraints based on the LED spectral submatrix and residual spectral data of the current batch to obtain the fitted current value corresponding to each target LED bead. Subsequently, it outputs the target emission spectrum by combining the PWM drive control value and achieves dynamic iterative spectral fitting through multi-batch cumulative fitting and residual update.

[0031] This invention constructs a batch residual recursive LED spectral fitting mechanism, which enables different batch fitting processes to continuously perform dynamic iterative fitting around the unfitted target spectral portion, thereby reducing the complexity of single-batch fitting, improving the stability and computational efficiency of spectral fitting, and enhancing the accuracy and practical feasibility of spectral fitting in multispectral environments.

[0032] This invention includes the following steps: S1, acquiring the original emission spectrum data corresponding to multiple single-band LED beads and the target spectrum data corresponding to the target environment; S2, constructing an LED spectral matrix based on the original emission spectrum data and constructing residual spectral data based on the target spectral data; S3, analyzing the residual spectral data to obtain the spectral contribution rate corresponding to each single-band LED bead, and selecting a preset number of target LED beads according to the contribution rate, thereby forming the fitted LED data for the current batch; S4, performing non-negative least squares fitting processing based on the fitted LED data of the current batch and the corresponding residual spectral data to obtain the corresponding spectral contribution rate of each target LED bead. S3. Fit the current value and constrain the current intensity to obtain the constraint current value, thereby generating the corresponding PWM drive control value; S4. Drive the corresponding LED bead to output the target emission spectrum based on the PWM drive control value, and perform weighted accumulation processing based on the constraint current value and the corresponding original emission spectrum data to obtain the cumulative fitted spectrum data; S5. Perform residual update processing based on the cumulative fitted spectrum data and the target spectrum data to obtain the residual spectrum update data; S6. Perform iterative convergence analysis based on the residual spectrum update data. If the preset convergence condition is met, output the corresponding LED drive control parameters; otherwise, repeat steps S3 to S7 based on the residual spectrum update data.

[0033] In this embodiment, as Figure 1 and Figure 2 As shown, Figure 1 This is an overall flowchart of the LED spectrum fitting process of the present invention. Figure 2 The core flowchart of the spectral fitting algorithm of this invention is as follows: by acquiring the original emission spectrum data and the target spectrum data, an LED spectral matrix and residual spectral data are constructed; the spectral contribution rate is analyzed based on the residual spectral data and the target LED beads are selected; the least squares fitting under non-negative constraints is performed to obtain the PWM drive control value; then the target emission spectrum is output and the cumulative fitted spectral data is generated; further residual update processing is performed, and it is determined whether to continue iterative fitting based on the convergence condition.

[0034] Single-band LED chips refer to LED chips that have a single dominant peak wavelength and output a corresponding narrowband emission spectrum under rated operating current. Raw emission spectrum data refers to the wavelength points and their corresponding emission intensity data obtained by a spectrometer in an optical darkroom, where the single-band LED chip is operated at its rated current. Target spectral data refers to the environmental spectral data of the target environment or the background to be fitted under current illumination conditions, collected by a spectral sensor. Specifically, this includes multiple wavelength points and the corresponding spectral intensity for each wavelength point.

[0035] The LED spectral matrix is ​​a data matrix formed by arranging the original emission spectral data of multiple single-band LED chips according to their chip numbers. Each column corresponds to the spectral vector of a single-band LED chip, and each row corresponds to a wavelength sampling point. Residual spectral data refers to the target spectral portion that still needs to be fitted in the current batch. It corresponds to the target spectral data and the cumulative fitted spectral data, and serves as the input for the next batch of chip selection and fitting. The fitted LED data for the current batch refers to the set of target LED chips and their corresponding single-chip spectral vectors selected according to their spectral contribution rate under the current residual spectral data.

[0036] This invention uses residual spectral data as the associated data for batch iteration, enabling LED bead selection, fitting current solution, PWM drive control, and residual update to form a closed-loop processing flow. This avoids the problem of large computational load caused by fitting all LED beads at once, thereby improving the convergence efficiency of LED spectral fitting and the accuracy of target spectral reproduction.

[0037] Furthermore, residual spectral data is constructed using the following method: If the current batch is the first batch, the target spectral data is used as the target spectral data corresponding to the current batch, and the initial cumulative fitted spectral intensity corresponding to each wavelength sampling point is set to zero to obtain the initial cumulative fitted spectral data; if the current batch is not the first batch, the residual spectral update data corresponding to the previous batch is used as the target spectral data corresponding to the current batch, and the cumulative fitted spectral data corresponding to the previous batch is used as the cumulative fitted spectral data corresponding to the current batch; the original emission spectral data corresponding to each single-band LED bead is matrix-arranged according to the bead number to obtain the LED spectral matrix; based on the target spectral data corresponding to the current batch and the preset residual scaling factor, a coupling analysis is performed to obtain the residual spectral data corresponding to the current batch; when the current batch is the first batch, the cumulative fitted spectral data is specifically the initial cumulative fitted spectral data; the preset residual scaling factor is used to limit the residual spectral amplitude during single-batch fitting and ensure that the spectral intensity of each wavelength point in the residual spectral data remains non-negative to satisfy the non-negative constraint condition of non-negative least squares fitting processing.

[0038] In this embodiment, as Figure 3 As shown, Figure 3 The flowchart of the residual recursion and target LED bead selection process of this invention is as follows: the corresponding residual spectral data is generated by determining whether the current batch is the first batch; then, the single-bead spectral vector corresponding to each single-band LED bead is extracted and spectral similarity analysis is performed with the residual spectral data of the current batch; target LED beads are selected based on spectral contribution rate, providing the current batch of fitted LED data for subsequent non-negative least squares fitting.

[0039] The LED spectral matrix is ​​obtained by arranging the original emission spectral data of each single-band LED according to its LED number in a matrix format. The original emission spectral data of each single-band LED is acquired by a spectrometer in an optical anechoic chamber, with the corresponding LED operating at its rated current during acquisition, and the emission intensity at multiple wavelength sampling points is recorded. The original data for spectral fitting can be obtained by measuring the emission spectral curves of multiple single-band LEDs in an optical anechoic chamber, using the ambient spectrum as the target spectrum.

[0040] When constructing the residual spectral data corresponding to the current batch, the system first determines whether the current batch is the first batch. If it is, the target spectral data is used as the target spectral data for the current batch. Since the system has not output any fitted spectra before the first batch fitting begins, the cumulative fitted spectral intensity corresponding to each wavelength sampling point is set to zero and arranged in wavelength order to obtain the initial cumulative fitted spectral data. If the current batch is not the first batch, the system reads the residual spectral update data corresponding to the previous batch and uses it as the target spectral data for the current batch, allowing the current batch fitting process to continue performing spectral fitting on the unfitted target spectral portion of the previous batch. Simultaneously, the system reads the cumulative fitted spectral data corresponding to the previous batch and uses it as the cumulative fitted spectral data for the current batch. Based on the target spectral data corresponding to the current batch and the preset residual scaling factor, a coupled analysis is performed to scale the target spectral intensity corresponding to each wavelength sampling point in the target spectral data corresponding to the current batch, thus obtaining the residual spectral data corresponding to the current batch. The preset residual scaling factor is used to limit the residual spectral amplitude during single-batch fitting, so that single-batch fitting does not approximate the complete target spectrum at once, but rather fits a part of the target spectrum of the current batch. This reduces the difficulty of single-batch fitting and ensures that the spectral intensity of each wavelength point in the residual spectral data remains non-negative, so as to meet the non-negative constraint condition of non-negative least squares fitting.

[0041] The range of values ​​for the residual scaling factor is: The residual scaling factor can be obtained as follows: During the device commissioning phase, select multiple sets of representative target environment spectral data and set multiple candidate residual scaling factors respectively; perform a complete fitting process for each candidate residual scaling factor and record the Pearson correlation coefficient, root mean square error, mean absolute error, correlation index and fitting batch number after fitting; select the candidate residual scaling factor that meets the preset requirements for fitting accuracy and has a low fitting batch number as the actual value used, for example: after testing and optimization, the residual factor can be selected as 0.8.

[0042] The residual spectral data corresponding to the current batch is obtained by the following calculation method:

[0043] ;

[0044] ;

[0045] In the formula, Indicates the first The first batch The residual spectral intensity corresponding to each wavelength sampling point; Indicates the preset residual scaling factor; Indicates the first The first batch The target spectral intensity corresponding to each wavelength sampling point; Indicates the wavelength sampling point number. , This indicates the total number of wavelength sampling points.

[0046] With the target spectral intensity unchanged, the larger the preset residual scaling factor, the larger the residual spectral intensity corresponding to the current batch, and the higher the spectral amplitude undertaken by the single batch fitting. This may reduce the number of batches but increase the fitting pressure of a single batch. Conversely, the smaller the preset residual scaling factor, the smaller the residual spectral intensity corresponding to the current batch, and the more stable the single batch fitting, but this may increase the number of iteration batches.

[0047] By associating the target spectral data with a preset residual scaling factor, the residual spectral data corresponding to the current batch is generated, so that the fitting of each subsequent batch is performed around the non-negative residual spectral data, thereby matching the non-negative constraint of the non-negative least squares fitting process. Reducing the fitting amplitude of a single batch by residual scaling helps to improve the stability of the iteration process and avoids the problem of excessive local deviation or unstable convergence caused by a one-time fitting.

[0048] Furthermore, the spectral contribution rate of each single-band LED is obtained. The specific method is as follows: acquire the residual spectral data corresponding to the current batch; extract the single-LED spectral vector corresponding to each single-band LED in the LED spectral matrix; perform cosine similarity analysis on the spectral vector of each single LED and the residual spectral data corresponding to the current batch to obtain the spectral contribution rate of each single-band LED relative to the residual spectral data; sort the single-band LEDs according to the spectral contribution rate from large to small, and select the single-band LEDs ranked in the top preset position as target LEDs; combine the single-LED spectral vectors corresponding to the target LEDs to form the fitted LED data of the current batch.

[0049] In this embodiment, the spectral contribution rate refers to the degree of matching between the spectral vector of a single-band LED and the residual spectral data of the current batch. It is used to characterize the fitting contribution of the single-band LED to the current residual spectrum. It is calculated by the residual spectral data of the current batch and the spectral vector of the single LED in the LED spectral matrix. Specifically, the residual spectral data corresponding to the current batch is first obtained; then, the spectral vector of each single-band LED is extracted from the LED spectral matrix; spectral similarity analysis is performed on each spectral vector of the single LED and the residual spectral data corresponding to the current batch to obtain the spectral contribution rate of each single-band LED relative to the current residual spectral data; then, the single-band LEDs are sorted from largest to smallest according to the spectral contribution rate, and the single-band LEDs ranked in the top preset position are selected as target LEDs; the spectral vectors of the single LEDs corresponding to the target LEDs are combined to form the fitted LED data of the current batch.

[0050] The formula for calculating the spectral contribution rate is as follows:

[0051] ;

[0052] in, Indicates the first Spectral contribution rate of a single-band LED bead; Indicates the first The single-band LED bead in the first Emission spectral intensity at each wavelength sampling point , This indicates the total number of wavelength sampling points. Indicates the first The first batch The residual spectral intensity corresponding to each wavelength sampling point Indicates the single-band LED chip number. Indicates the batch number. , This represents the threshold for the number of iteration batches.

[0053] When the wavelength distribution of a single LED's spectral vector is closer to that of the current residual spectral data, the sum of the products in the numerator is larger, the spectral contribution rate is greater, and the LED is more likely to be selected as the target LED. When the spectral vector of a single LED differs significantly from that of the current residual spectral data, the spectral contribution rate is smaller, and the LED is less likely to be included in the current batch of LED data fitting. When the calculation result is negative, it is corrected to zero through non-negativity processing to avoid LEDs with a direction opposite to the current residual spectrum from participating in the current batch fitting.

[0054] By calculating the spectral contribution rate of each single-band LED bead based on residual spectral data, each batch of target LED beads participating in the fitting has a high degree of matching with the residual spectral part that has not yet been fitted, thereby reducing the participation of invalid beads in the fitting and reducing the amount of calculation per batch.

[0055] The preset number of bits in this step represents the number of target LED beads allowed to participate in the fitting in each batch. The preset number of bits is obtained as follows: during the device calibration stage, multiple candidate preset number of bits are set, and the complete spectrum fitting process is executed for each set of candidate values. The fitting accuracy index and computation time corresponding to each set of candidate values ​​are recorded. Among the candidate values ​​whose fitting accuracy meets the preset accuracy requirements, the candidate values ​​with lower computation time or fewer participating LED beads are selected as the preset number of bits. For example, the number of LED beads participating in the fitting in each batch is 15.

[0056] Furthermore, the fitted current value corresponding to each target LED is obtained. The specific method is as follows: construct the LED spectral sub-matrix of the current batch based on the fitted LED data of the current batch; use the residual spectral data corresponding to the current batch as the fitting target vector; perform least squares solution under non-negative constraints based on the LED spectral sub-matrix of the current batch and the fitting target vector to obtain the fitted weight value corresponding to each target LED; perform proportional analysis based on the fitted weight value corresponding to each target LED and the corresponding rated operating current value to obtain the fitted current value corresponding to each target LED.

[0057] In this embodiment, the fitted current value refers to the operating current value of the LED beads calculated to make the spectrum output by the target LED bead combination as close as possible to the residual spectral data of the current batch. The fitted current value is obtained by performing a least squares solution under non-negative constraints on the current batch LED spectral sub-matrix and the fitted target vector. Specifically, the current batch LED spectral sub-matrix is ​​first constructed based on the fitted LED data of the current batch. The current batch LED spectral sub-matrix consists of the individual LED spectral vectors corresponding to the target LED beads, containing only the target LED beads selected in the current batch and excluding those not selected. The residual spectral data corresponding to the current batch is used as the fitted target vector; then, a least squares solution under non-negative constraints is performed based on the current batch LED spectral sub-matrix and the fitted target vector to obtain the fitted weight value corresponding to each target LED bead; the fitted current value corresponding to each target LED bead is determined according to the fitted weight value corresponding to each target LED bead in the fitted weight vector. The fitted weight vector can be calculated by the ratio of the target LED bead to its rated operating current.

[0058] The current batch LED spectral sub-matrix refers to a local spectral matrix formed by rearranging the individual LED spectral vectors of the target LEDs in the current batch from the LED spectral matrix. Specifically, it is obtained by: reading the target LED numbers from the fitted LED data of the current batch; finding the corresponding individual LED spectral vectors in the LED spectral matrix based on these numbers; rearranging these vectors according to the target LED numbers; and combining the rearranged individual LED spectral vectors to form the current batch LED spectral sub-matrix. It should be noted that the LED spectral matrix contains spectral data corresponding to all single-band LEDs, while the current batch LED spectral sub-matrix only contains the spectral data corresponding to the target LEDs in the current batch that are being fitted. Therefore, the current batch LED spectral sub-matrix is ​​a local matrix within the LED spectral matrix.

[0059] ;

[0060] In the formula, Indicates the first The corresponding LED spectral sub-matrix for each batch Indicates the first The spectral vector of a single LED bead corresponding to a target LED bead. Indicates the first The spectral vector of a single LED bead corresponding to a target LED bead. Indicates the first The number of target LED beads used in the batch for fitting. Indicates the target LED bead number.

[0061] The specific calculation method for the fitted current value corresponding to each target LED is as follows:

[0062] ;

[0063] ;

[0064] In the formula, Indicates the first The rated operating current value corresponding to each target LED bead. Indicates the first The corresponding LED spectral sub-matrix for each batch Indicates the first The fitted weight vector corresponding to each target LED bead in the batch. Indicates the first The residual spectral vector corresponding to the batch, Indicates the first The fitted weight values ​​corresponding to each target LED bead This indicates the number of the target LED bead within the current batch.

[0065] ;

[0066] In the formula, Indicates the first The fitted current value corresponding to each target LED bead. Indicates the first The fitted weight values ​​corresponding to each target LED bead Indicates the first The rated operating current value corresponding to each target LED bead.

[0067] With the rated operating current value remaining constant, a larger fitting weight value results in a larger fitting current value and a higher spectral intensity output from the target LED chip; conversely, a smaller fitting weight value results in a smaller fitting current value and a lower spectral intensity output from the target LED chip. The rated operating current value is directly obtained from the LED chip's datasheet.

[0068] By constructing the LED spectrum sub-matrix for the current batch of selected target LEDs and performing a least-squares solution under non-negative constraints, the fitted current value obtained from the solution satisfies the physical constraint that the current cannot be negative during the actual driving process of the LEDs. This ensures that the fitted current value not only meets the physical condition that the LED driving current is non-negative, but also avoids the increased computational load caused by all LEDs participating in the solution at the same time, thereby improving the efficiency and executability of the current batch fitting process.

[0069] Furthermore, current intensity constraints are applied to obtain constraint current values. The specific method is as follows: obtain the rated operating current value corresponding to each target LED bead; correct the fitted current value that is greater than the rated operating current value to the corresponding rated operating current value; correct the fitted current value that is less than the preset current threshold to zero; use the corrected fitted current value as the constraint current value; based on the constraint current value analysis, when the constraint current value corresponding to the target LED bead is zero, the corresponding target LED bead is marked as not participating in the driving state in the current batch; when the constraint current value corresponding to the target LED bead is greater than zero, the corresponding target LED bead is marked as participating in the driving state in the current batch.

[0070] In this embodiment, the fitted current value exceeding the rated operating current value is corrected to the corresponding rated operating current value; that is, the fitted current value exceeding the rated operating current value is adjusted to the corresponding rated operating current value. Since the fitted current value obtained through non-negative least squares fitting may exceed the rated operating current value of the target LED chip, or may be less than the preset current threshold that can stably drive the LED chip, it is necessary to constrain the fitted current value to obtain a constrained current value that can actually be used for drive control. When the operating current of the LED chip calculated by the algorithm exceeds the rated operating current of the LED chip, the current of the LED chip is directly limited to the rated operating current; at the same time, extremely low current values ​​are discarded to reduce noise and ensure system stability.

[0071] Obtain the rated operating current value for each target LED. The rated operating current value can be read from the LED product specification sheet or other LED parameter configuration files. Compare the fitted current value with the rated operating current value; when the fitted current value is greater than the rated operating current value, correct the fitted current value to the corresponding rated operating current value; when the fitted current value is less than a preset current threshold, correct the fitted current value to zero; when the fitted current value is between the preset current threshold and the rated operating current value, keep the fitted current value unchanged; use the corrected fitted current value as the constraint current value, and update the actual participation status of each target LED in the current batch based on the constraint current value.

[0072] The preset current threshold is used to eliminate low-intensity drive currents that cannot effectively contribute to the spectral output or are prone to introducing noise. It can be obtained by gradually reducing the drive current of the LED beads during the calibration stage, collecting the emission spectral intensity and noise level under different currents, and selecting the current value corresponding to the spectral output stability or signal-to-noise ratio that is lower than the preset requirement as the preset current threshold. For example, the minimum current can be set to 0.1mA.

[0073] The actual participation status of each target LED in the current batch is updated based on the constraint current value. Specifically, when the constraint current value corresponding to the target LED is zero, the target LED is marked as not participating in the driving state in the current batch, and the PWM duty cycle of the corresponding LED driving channel is set to zero during the generation of the PWM driving control value in the current batch; when the constraint current value corresponding to the target LED is greater than zero, the target LED is marked as participating in the driving state in the current batch, and the corresponding PWM driving control value is generated based on the constraint current value.

[0074] A larger fitted current value usually results in a larger constraint current value, but it will not exceed the rated operating current value. A larger rated operating current value results in a larger maximum allowable constraint current value. A larger preset current threshold means more low-current LEDs are corrected to zero, reducing weak drive noise, but potentially decreasing the ability to perform subtle spectral compensation. A smaller preset current threshold means more low-current LEDs are retained, potentially increasing the ability to fit subtle spectral data, but potentially introducing noise or ineffective drive. By correcting fitted current values ​​exceeding the rated operating current value to the rated operating current value, the risk of spectral drift and device damage caused by high-current operation of LEDs can be reduced. By correcting fitted current values ​​below the preset current threshold to zero, noise interference from low-intensity ineffective drive can be reduced. Together, these factors make the constraint current value output to the PWM drive control loop more stable and more consistent with the actual operating conditions of the LEDs, thereby improving the overall spectral reproduction stability of the spectral fitting device.

[0075] Furthermore, the corresponding PWM drive control value is generated. The specific method is as follows: based on the proportional relationship analysis between the constraint current value and the rated operating current value of the corresponding target LED, the target constraint current ratio is obtained; based on the target constraint current ratio, a mapping analysis is performed to obtain the corresponding PWM duty cycle; thus, the PWM drive control value is generated; the PWM drive control value is sent to the corresponding LED drive channel to control the emission spectral intensity of the target LED.

[0076] In this embodiment, as Figure 5 As shown, Figure 5 The diagram shows the design of the driving circuit of this invention. The driving circuit adopts a constant current driving structure and PWM dimming method. The PWM control signals output by MCU1-MCU3 are used to adjust the working current of each LED channel, providing an independent driving channel for multiple single-band LED beads. The output spectral intensity of each LED bead is controlled by the PWM duty cycle to achieve dynamic fitting and output of different target spectra.

[0077] like Figure 6 As shown, Figure 6 The PCB design diagram for the driver of this invention is shown. The PCB adopts a four-layer PCB structure design, which integrates the LED driver circuit, PWM control circuit and power supply circuit to ensure the stability of LED bead driving, system heat dissipation performance and multi-channel signal transmission stability, thereby improving the overall reliability of the LED spectrum fitting system.

[0078] The PWM drive control value is used to control the conduction time ratio of the corresponding LED drive channel to adjust the actual output spectral intensity of the target LED. Specifically, the constraint current value and rated operating current value of each target LED are first obtained; the proportional relationship between the constraint current value and the rated operating current value is analyzed to obtain the target constraint current ratio (by dividing the constraint current value by the rated operating current value); then, duty cycle mapping is performed based on the target constraint current ratio to obtain the corresponding PWM duty cycle; the PWM drive control value is generated based on the PWM duty cycle and sent to the corresponding LED drive channel to control the emission spectral intensity of the target LED. The target constraint current ratio refers to the ratio of the constraint current value to the rated operating current value of the corresponding LED, reflecting the relative luminous intensity that the current LED should output.

[0079] PWM scaling processing, specifically:

[0080] ;

[0081] ;

[0082] In the formula, Indicates the first The proportion of target constraint current corresponding to each target LED bead. Indicates the first The constraint current value corresponding to each target LED bead. Indicates the first The rated operating current value corresponding to each target LED bead. Indicates the first The PWM duty cycle corresponding to each target LED bead.

[0083] The larger the constraint current value, the larger the target constraint current ratio, and the higher the target luminous intensity of the corresponding LED bead; the larger the rated operating current value, the smaller the target constraint current ratio under the same constraint current value.

[0084] By mapping the constraint current value to the PWM drive control value, a correspondence is established between the actual output spectral intensity of the LED beads and the fitting result, thereby realizing independent adjustment of the luminous intensity of each target LED bead; at the same time, the PWM drive method improves the stability of drive control and reduces LED drive power consumption and heat loss.

[0085] Furthermore, the cumulative fitted spectral data is obtained. Specifically, the following method is used: spectral weighting coefficients are determined based on the constraint current values ​​corresponding to each target LED; the original emission spectral data corresponding to each target LED is weighted based on these weighting coefficients to obtain the individual LED fitted spectral data; the individual LED fitted spectral data are superimposed to obtain the current batch fitted spectral data; the current batch fitted spectral data is superimposed with the cumulative fitted spectral data output from the previous batch to obtain the current batch's cumulative fitted spectral data. The cumulative fitted spectral data refers to the comprehensive fitted spectrum formed by weighted superposition of the output spectra of all target LEDs in the current batch and historical batches, used to represent the target spectral portion that has been fitted.

[0086] In this embodiment, the cumulative fitted spectral data refers to the comprehensive fitted spectrum formed by weighted superposition of the output spectra of all target LED beads in the current batch and historical batches, which is used to represent the target spectral portion that the current system has completed fitting.

[0087] The specific method for obtaining the spectral weighting coefficients corresponding to each target LED bead is as follows:

[0088] ;

[0089] In the formula, Indicates the first The spectral weighting coefficients corresponding to each target LED chip No. The constraint current value corresponding to each target LED bead. No. The rated operating current value corresponding to each target LED bead.

[0090] The spectral weighting processing rule formula yields the fitted spectral data for each target LED chip, specifically:

[0091] ;

[0092] In the formula, Indicates the first The target LED beads are in the first The fitted spectral intensity of a single LED bead corresponding to each wavelength sampling point Indicates the first The spectral weighting coefficients corresponding to each target LED chip Indicates the first The target LED beads are in the first The original emission spectral intensity corresponding to each wavelength sampling point.

[0093] The larger the spectral weighting coefficient, the greater the intensity of the fitted spectrum of a single LED, the greater the intensity of the original emission spectrum, and the greater the intensity of the fitted spectrum output at the corresponding wavelength point.

[0094] The formula for calculating the fitted spectral data of the current batch is as follows:

[0095] ;

[0096] In the formula, Indicates the first The first batch The current batch fitted spectral intensity corresponding to each wavelength sampling point; Indicates the first The number of target LED beads used in the batch for fitting. Indicates the first The target LED beads are in the first The fitted spectral intensity of a single LED bead corresponds to each wavelength sampling point.

[0097] Batch cumulative processing calculation formula:

[0098] ;

[0099] In the formula, Indicates the first The first batch The cumulative fitted spectral intensity corresponding to each wavelength sampling point Indicates the first in the previous batch The cumulative fitted spectral intensity corresponding to each wavelength sampling point This indicates the intensity of the fitted spectrum for the current batch.

[0100] By batch-by-batch superposition of the fitted spectral data of each target LED, the system can gradually approach the target spectral data without having to complete the fitting of all bands at once, thereby improving the stability of the spectral fitting process. Through cumulative fitting, subsequent residual updates only process the spectral parts that have not yet been fitted, reducing the phenomenon of repeated fitting.

[0101] Furthermore, the residual spectral update data is obtained by calculating the wavelength-by-wavelength difference between the target spectral data and the cumulative fitted spectral data corresponding to the current batch, thus obtaining the spectral difference data corresponding to the current batch; the negative wavelength points in the spectral difference data are non-negatively corrected to obtain the residual spectral update data; the target spectral data corresponding to the next batch is updated based on the residual spectral update data; the residual spectral data corresponding to the next batch is regenerated based on the updated target spectral data and the preset residual scaling factor; the residual spectral data corresponding to the next batch is used to enable the non-negative least squares fitting process of the next batch to continue iterative fitting for the unfitted target spectral portion.

[0102] In this embodiment, as Figure 4 As shown, Figure 4 The flowchart for LED spectrum fitting and cumulative update of this invention is as follows: A sub-matrix of the current batch of LED spectra is constructed, and the fitted current value is obtained by performing a least-squares solution under non-negative constraints; subsequently, PWM drive control values ​​are generated and single-LED fitted spectrum data is output; furthermore, fitted spectrum data for the current batch and cumulative fitted spectrum data are generated, and residual update processing is performed based on the cumulative fitted spectrum data.

[0103] Residual spectral update data refers to the remaining spectral portion of the target spectral data that has not yet been covered by the cumulative fitted spectral data after the current batch fitting is completed. This data serves as input for the next batch fitting process. The specific method is as follows: First, the wavelength-by-wavelength difference between the target spectral data and the cumulative fitted spectral data corresponding to the current batch is calculated to obtain the spectral difference data for the current batch. Negative wavelength points in the spectral difference data are then non-negatively corrected to obtain residual spectral update data. Next, the target spectral data for the next batch is updated based on the residual spectral update data. Finally, the residual spectral data for the next batch is regenerated based on the updated target spectral data and a preset residual scaling factor, allowing the next batch of non-negative least squares fitting to continue iterative fitting of the unfitted target spectral portion. Negative wavelength points refer to wavelengths where, at a given wavelength sampling point, the cumulative fitted spectral intensity of the current batch is greater than the target spectral intensity, resulting in a difference value less than zero. Since non-negative least squares fitting requires the residual spectral intensity to be no less than zero, non-negative correction is necessary for negative wavelength points.

[0104] The residual update process is handled as follows:

[0105] ;

[0106] In the formula, Indicates the first The first batch The spectral difference corresponding to each wavelength sampling point Indicates the first The target spectral intensity corresponding to each wavelength sampling point Indicates the first The first batch The cumulative fitted spectral intensity corresponding to each wavelength sampling point.

[0107] The nonnegativity correction is as follows:

[0108] ;

[0109] In the formula, Indicates the first The first batch The residual spectral update intensity corresponding to each wavelength sampling point Indicates the first The first batch The spectral difference corresponding to each wavelength sampling point.

[0110] The closer the cumulative fitted spectral intensity of the current batch is to the target spectral intensity, the smaller the spectral difference, and the smaller the corresponding residual spectral update intensity. If the cumulative fitted spectral intensity exceeds the target spectral intensity, the corresponding wavelength point is corrected to zero and will not participate in the next batch fitting. By dynamically updating the residual spectral update data based on the current batch's cumulative fitted spectral data, the next batch fitting only continues to perform the fitting of the spectral portion that has not yet been completed, thus avoiding the repeated participation of the already fitted wavelength portion in the fitting. At the same time, by performing non-negativity correction on negative wavelength points, it can be ensured that the residual spectral data of the next batch meets the non-negative constraint condition of the non-negative least squares fitting process, improving the fitting stability of subsequent batches.

[0111] Furthermore, iterative convergence analysis is performed based on the residual spectral update data. Specifically, the residual intensity value is calculated based on the residual spectral update data. When the residual intensity value is less than a preset residual intensity value threshold and / or the number of iteration batches reaches a preset number of iteration batches threshold, the preset convergence condition is satisfied, and the LED drive control parameters corresponding to each batch are output. Otherwise, the preset convergence condition is not satisfied, and the residual spectral update data is used as the residual spectral data for the next batch. The LED drive control parameters include the LED bead number, constraint current value, and PWM drive control value.

[0112] In this embodiment, iterative convergence analysis refers to analyzing whether the current fitting result meets the preset fitting requirements based on the residual spectral update data corresponding to the current batch, thereby determining whether to terminate the fitting of subsequent batches. Specifically, the method is as follows: wavelength-by-wavelength point difference is calculated between the target spectral data and the cumulative fitted spectral data to obtain spectral difference data; residual spectral update data is generated based on the spectral difference data; residual intensity values ​​are then calculated based on the residual spectral update data; the residual intensity values ​​are compared with a preset residual intensity value threshold, and it is simultaneously determined whether the current iteration batch number has reached the preset iteration batch number threshold; if the corresponding conditions are met, the preset convergence condition is satisfied, and LED drive control parameters are output; otherwise, the preset convergence condition is not satisfied, and the residual spectral update data is used as the residual spectral data for the next batch. The residual intensity value represents the overall intensity of the current residual spectral update data.

[0113] The spectral difference data is obtained by calculating the difference between the target spectral data and the cumulative fitted spectral data at each wavelength point. The specific method is as follows: read the target spectral intensity corresponding to each wavelength sampling point in the target spectral data; read the cumulative fitted spectral intensity corresponding to each wavelength sampling point in the cumulative fitted spectral data corresponding to the current batch; calculate the difference between the target spectral intensity and the cumulative fitted spectral intensity at the same wavelength sampling point according to the one-to-one correspondence of the wavelength sampling point numbers, and obtain the spectral difference corresponding to each wavelength sampling point; arrange the spectral differences corresponding to all wavelength sampling points in wavelength order to obtain the spectral difference data corresponding to the current batch. Where: if the target spectral intensity is greater than the cumulative fitted spectral intensity, the spectral difference at the corresponding wavelength point is positive; if the target spectral intensity is equal to the cumulative fitted spectral intensity, the spectral difference at the corresponding wavelength point is zero; if the target spectral intensity is less than the cumulative fitted spectral intensity, the spectral difference at the corresponding wavelength point is negative. The above negative wavelength points indicate that the cumulative fitted spectrum corresponding to the current batch has exceeded the target spectral intensity at the corresponding wavelength point.

[0114] The method for generating residual spectral update data based on spectral difference data is as follows: Iterate through each wavelength sampling point in the spectral difference data sequentially; determine if the spectral difference corresponding to the current wavelength sampling point is less than zero; when the spectral difference corresponding to the current wavelength sampling point is less than zero, correct the residual spectral intensity corresponding to the current wavelength sampling point to zero; when the spectral difference corresponding to the current wavelength sampling point is greater than or equal to zero, use the spectral difference corresponding to the current wavelength sampling point as the residual spectral intensity corresponding to the current wavelength sampling point; rearrange the residual spectral intensities corresponding to all wavelength sampling points according to wavelength order to obtain residual spectral update data. The generated residual spectral update data is used to characterize the remaining target spectral portion that is not covered by the accumulated fitted spectrum after the current batch fitting is completed, and is used as the residual spectral data for the next batch to be input into the next round of target LED bead selection and non-negative least squares fitting processing.

[0115] The residual strength value is calculated using the following method:

[0116] ;

[0117] In the formula, Indicates the first The residual strength value corresponding to the batch, Indicates the first The first batch The residual spectral intensity corresponding to each wavelength sampling point.

[0118] The smaller the residual intensity value, the closer the current cumulative fitted spectral data is to the target spectral data; the closer the system is to a stable convergence state; the larger the number of iteration batches, the more rounds of fitting processing the system has performed.

[0119] The preset residual intensity threshold and the preset iteration batch number threshold can be obtained through experimental calibration. That is, multiple candidate thresholds are set, a complete spectral fitting experiment is performed, the fitting accuracy, computation time and convergence stability of each set of thresholds are recorded, and the threshold that can meet the fitting accuracy requirements and has the fewest batches is selected as the final parameter.

[0120] By simultaneously determining whether the preset convergence condition is met based on the residual intensity value and the number of iteration batches, the system can not only dynamically end the iteration based on the current fitting error, but also avoid infinite loops in the iteration process due to abnormal situations, thereby improving the stability and convergence reliability of the entire LED spectrum fitting process.

[0121] Experimental results are as follows Figure 7 , Figure 8 , Figure 9 and Figure 10 As shown, Figure 7 This is a schematic diagram of the fitting effect of the first target spectrum of the present invention. Figure 8 This is a schematic diagram of the residual convergence curve corresponding to the first target spectrum of the present invention. Figure 9 This is a schematic diagram of the fitting effect of the second target spectrum of the present invention. Figure 10 The diagram shows the residual convergence curve corresponding to the second target spectrum of the present invention. After multiple tests and optimizations of the algorithm, a set of parameter values ​​that optimize the algorithm performance were obtained: MAX_EPOCHS=20, SCALE_FACTOR=0.8, MAX_LED_PER_BATCH=15, where MAX_EPOCHS represents the fitting batch, SCALE_FACTOR represents the residual factor, and MAX_LED_PER_BATCH represents the number of LEDs participating in the fitting in each batch.

[0122] Table 1 Calculation results of each evaluation indicator

[0123] PCC RMSE MAE First target spectrum 0.9981 0.0191 0.0095 0.9960 Second target spectrum 0.9969 0.0228 0.0119 0.9933

[0124] from Figures 7 to 10 The experimental results and Table 1 show that the NNLS-based spectral fitting algorithm proposed in this invention has excellent performance and can accurately reproduce target spectra of different forms. With the increase of fitting batches, the residual value shows a decreasing trend, gradually stabilizing and reaching the convergence condition in the later stages. The PCC and... The values ​​all remained above 0.99, and the RMSE and MAE values ​​remained at low levels, meeting the established spectral fitting accuracy requirements. Here, PCC represents the Pearson Correlation Coefficient, RMSE represents the Root Mean Square Error, and MAE represents the Mean Absolute Error. This represents the Coefficient of Determination.

[0125] To verify the practical effect of this invention, an outdoor park environment without shadows or artificial light was selected. The reflectance spectra of ground objects at the same location under natural lighting conditions were collected at 9:00, 12:00, 15:00, and 18:00 on the same day as the target spectra. The method described in this paper was used to reproduce the target spectra for the four time periods. The reproduction results are as follows: Figure 11 As shown, Figure 11 The figures show the environmental spectral reproduction results for different time periods according to this invention. It can be seen that there are significant differences in the reflectance intensity and curve shape of the environmental spectra at different times: the reflectance intensity is highest at 3 PM and lowest at 6 PM. From 9 AM to 6 PM, the proportion of blue and green light radiation gradually increases, while the proportion of red and near-infrared light radiation gradually decreases. Even so, the spectra reproduced using the method presented in this paper maintain a high degree of similarity in intensity and shape to their corresponding target spectra. Using the fitting correlation index as the similarity evaluation index, the similarity between the reproduced spectra and the target spectra for the four time periods are 0.9742, 0.9621, 0.9795, and 0.9786, respectively. Therefore, the method presented in this paper can effectively reproduce environmental spectra of different time periods and types, demonstrating excellent camouflage performance in multispectral reconnaissance.

[0126] like Figure 12 , Figure 13 As shown, Figure 12 This is a schematic diagram of the simulated grassland environment test results of the present invention. Figure 13This diagram illustrates the simulated desert environment test results of this invention. The relevant data shows that in a grassland environment, the reflectance spectra of vehicle camouflage paint, woodland camouflage netting, and grassland under natural light conditions differ significantly in the visible light band (380nm-780nm). Using the fitting correlation index as the similarity evaluation index, the overall similarity between the reflectance spectra of camouflage paint and camouflage netting and the grassland reflectance spectra is 0.7164 and 0.8459, respectively. The similarity between the spectra fitted by the spectral fitting system designed and constructed in this paper and the grassland spectrum reaches 0.9913. In a desert environment, the reflectance spectra of vehicle camouflage paint, woodland camouflage netting, and desert under natural light conditions differ significantly in the visible and near-infrared bands (380nm-1020nm). The overall similarity between the reflectance spectra of camouflage paint and camouflage netting and the desert reflectance spectra is 0.8142 and 0.9106, respectively. The similarity between the spectra fitted by the spectral fitting system designed and constructed in this invention and the desert spectrum reaches 0.9883. Referring to the experimental conclusions of other related studies: Ren et al. proposed a spectrally tunable light source based on a deep neural network model, which reproduced the natural spectrum for four time periods, with spectral fitting correlation indices of 0.9276, 0.9067, 0.9009, and 0.9270, respectively, and a spectral tuning range of 381nm-680nm; Wang et al. proposed a multicolor fitting technique for object reflectance spectra based on LEDs, with the spectral matching degree between the fitted spectrum and the target spectrum all greater than 90%, and a spectral tuning range of 380nm-750nm; Zhao et al. proposed a tunable spectrally tunable light source based on light-emitting diodes, with a fitted spectral correlation coefficient of 0.9664 and a spectral fitting range of 400nm-700nm. In comparison, this invention broadens the wavelength range of spectral fitting, improves the accuracy of spectral fitting, and extends the application field of spectral fitting technology.

[0127] like Figure 14 As shown, Figure 14The system structure diagram of this invention is shown below. An LED spectral fitting system provided in this application includes the following modules: a data acquisition module, used to acquire the original emission spectral data corresponding to multiple single-band LED beads and the target spectral data corresponding to the target environment; a residual construction module, used to construct an LED spectral matrix based on the original emission spectral data and construct residual spectral data based on the target spectral data; a bead selection module, used to analyze the residual spectral data to obtain the spectral contribution rate corresponding to each single-band LED bead, and select a preset number of target LED beads according to the contribution rate, thereby forming the fitted LED data for the current batch; and a current constraint module, used to perform non-negative least squares fitting based on the fitted LED data for the current batch and the corresponding residual spectral data. The system employs several methods: a first, a fitting current value for each target LED bead is obtained, and a current intensity constraint is applied to obtain a constraint current value, which in turn generates the corresponding PWM drive control value; a second, a spectral fitting module is used to drive the corresponding LED bead to output the target emission spectrum based on the PWM drive control value, and performs weighted accumulation processing based on the constraint current value and the corresponding original emission spectrum data to obtain accumulated fitted spectral data; a third, a residual spectral update module is used to perform residual update processing based on the accumulated fitted spectral data and the target spectral data to obtain residual updated spectral data; and a fourth, a loop iteration module is used to perform iterative convergence analysis based on the residual updated spectral data. If the preset convergence condition is met, the corresponding LED drive control parameters are output; otherwise, the LED bead selection module is re-executed to the loop iteration module based on the residual updated spectral data.

[0128] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A method for LED spectrum fitting, characterized in that: Includes the following steps: S1. Acquire the raw emission spectrum data corresponding to multiple single-band LED beads and the target spectrum data corresponding to the target environment; S2. Construct an LED spectral matrix based on the original emission spectral data, and construct residual spectral data based on the target spectral data; S3. Based on residual spectral data analysis, the spectral contribution rate of each single-band LED bead is obtained, and a preset number of target LED beads are selected according to the contribution rate, thereby forming the fitted LED data for the current batch. S4. Based on the fitted LED data of the current batch and combined with the corresponding residual spectrum data, perform non-negative least squares fitting processing to obtain the fitted current value corresponding to each target LED bead, and perform current intensity constraint to obtain the constraint current value, thereby generating the corresponding PWM drive control value. S5. Drive the corresponding LED beads to output the target emission spectrum based on the PWM drive control value, and perform weighted accumulation processing based on the constraint current value and the corresponding original emission spectrum data to obtain the accumulated fitted spectrum data. S6. Perform residual update processing based on the cumulative fitted spectral data and the target spectral data to obtain residual spectral update data; S7. Perform iterative convergence analysis based on the residual spectrum update data. If the preset convergence condition is met, output the corresponding LED drive control parameters. Otherwise, re-execute steps S3 to S7 based on the residual spectrum update data.

2. The LED spectrum fitting method according to claim 1, characterized in that: The specific method for constructing the residual spectral data is as follows: If the current batch is the first batch, then the target spectral data will be used as the target spectral data for the current batch. If the current batch is not the first batch, the residual spectral update data corresponding to the previous batch will be used as the target spectral data corresponding to the current batch. The original emission spectrum data corresponding to each single-band LED bead are arranged in a matrix according to the bead number to obtain the LED spectrum matrix. The residual spectral data corresponding to the current batch is obtained by performing coupled analysis based on the target spectral data and the preset residual scaling factor. The preset residual scaling factor is used to limit the residual spectral amplitude during single-batch fitting and ensure that the spectral intensity of each wavelength point in the residual spectral data remains non-negative, so as to meet the non-negative constraint condition of non-negative least squares fitting processing.

3. The LED spectrum fitting method according to claim 1, characterized in that: The specific method for obtaining the spectral contribution rate corresponding to each single-band LED bead is as follows: Obtain the residual spectral data corresponding to the current batch; Extract the spectral vector of each LED bead corresponding to each single-band LED bead in the LED spectral matrix; Cosine similarity analysis is performed on the spectral vector of each individual LED bead and the residual spectral data corresponding to the current batch to obtain the spectral contribution rate of each single-band LED bead relative to the residual spectral data. The single-band LEDs are sorted from largest to smallest according to their spectral contribution rate, and the single-band LEDs ranked in the top preset position are selected as target LEDs. The spectral vectors of the individual LED beads corresponding to the target LED beads are combined to form the fitted LED data for the current batch.

4. The LED spectrum fitting method according to claim 1, characterized in that: The specific method for obtaining the fitted current value corresponding to each target LED bead is as follows: Construct a sub-matrix of LED spectra for the current batch based on the fitted LED data for the current batch; Use the residual spectral data corresponding to the current batch as the fitting target vector; Based on the current batch of LED spectral submatrix and the fitted target vector, perform the least squares solution under non-negative constraints to obtain the fitting weight value corresponding to each target LED. Based on the fitting weight value and the corresponding rated operating current value of each target LED bead, a proportional analysis is performed to obtain the fitting current value of each target LED bead.

5. The LED spectrum fitting method according to claim 1, characterized in that: The method for performing current intensity constraint to obtain the constraint current value is as follows: Obtain the rated operating current value corresponding to each target LED bead; Correct the fitted current value that is greater than the rated operating current value to the corresponding rated operating current value; Correct the fitted current value that is less than the preset current threshold to zero; The corrected fitted current value is used as the constraint current value; Based on constraint current value analysis, when the constraint current value corresponding to the target LED is zero, the corresponding target LED is marked as not participating in the driving state of the current batch. When the constraint current value corresponding to the target LED is greater than zero, the corresponding target LED is marked as participating in the driving state of the current batch.

6. The LED spectrum fitting method according to claim 1, characterized in that: The specific method for generating the corresponding PWM drive control value is as follows: The target constraint current ratio is obtained by analyzing the proportional relationship between the constraint current value and the rated operating current value of the corresponding target LED. Based on the target constraint current ratio, a mapping analysis is performed to obtain the corresponding PWM duty cycle; This generates PWM drive control values; The PWM drive control value is sent to the corresponding LED drive channel to control the emission spectral intensity of the target LED.

7. The LED spectrum fitting method according to claim 1, characterized in that: The method for obtaining the cumulative fitted spectral data is as follows: The spectral weighting coefficients for each target LED are determined based on the constraint current values ​​corresponding to each target LED. The original emission spectrum data of each target LED bead are weighted based on the spectral weighting coefficient to obtain the single LED bead fitted spectrum data of each target LED bead. The fitted spectral data of each individual LED are superimposed to obtain the fitted spectral data of the current batch. The current batch of fitted spectral data is superimposed with the cumulative fitted spectral data output from the previous batch to obtain the cumulative fitted spectral data corresponding to the current batch. The cumulative fitted spectral data refers to the comprehensive fitted spectrum formed by weighted superposition of the output spectra of all target LED beads in the current batch and historical batches, which is used to represent the target spectral portion that has been fitted.

8. The LED spectrum fitting method according to claim 1, characterized in that: The specific method for obtaining the residual spectral update data is as follows: The wavelength-by-wavelength difference between the target spectral data and the cumulative fitted spectral data corresponding to the current batch is calculated to obtain the spectral difference data corresponding to the current batch. The negative wavelength points in the spectral difference data are nonnegated and corrected to obtain the residual spectral update data. Update the target spectral data for the next batch based on the residual spectral update data; The next batch of residual spectral data is regenerated based on the updated target spectral data and the preset residual scaling factor. The residual spectral data corresponding to the next batch is used to enable the non-negative least squares fitting process of the next batch to continue iterative fitting for the target spectral portion that has not been fitted.

9. The LED spectrum fitting method according to claim 1, characterized in that: The iterative convergence analysis based on the residual spectral update data is performed using the following method: The residual intensity value is calculated based on the updated residual spectral data. When the residual intensity value is less than the preset residual intensity value threshold and / or the number of iteration batches reaches the preset number of iteration batches threshold, it is determined that the preset convergence condition is met, and the LED drive control parameters corresponding to each batch are output; otherwise, it is determined that the preset convergence condition is not met, and the residual spectrum update data is used as the residual spectrum data of the next batch. The LED drive control parameters include the LED bead number, constraint current value, and PWM drive control value.

10. A system applying the LED spectral fitting method as described in any one of claims 1-9, characterized in that: Includes the following modules: The data acquisition module is used to acquire the raw emission spectrum data corresponding to multiple single-band LED beads and the target spectrum data corresponding to the target environment; The residual construction module is used to construct the LED spectral matrix based on the original emission spectral data and to construct residual spectral data based on the target spectral data. The LED bead selection module is used to analyze residual spectral data to obtain the spectral contribution rate of each single-band LED bead, and select a preset number of target LED beads according to the contribution rate, thereby forming the fitted LED data for the current batch. The current constraint module is used to perform non-negative least squares fitting processing based on the fitted LED data of the current batch and combined with the corresponding residual spectral data to obtain the fitted current value corresponding to each target LED, and to perform current intensity constraint to obtain the constraint current value, thereby generating the corresponding PWM drive control value. The spectrum fitting module is used to drive the corresponding LED beads to output the target emission spectrum based on the PWM drive control value, and to obtain the cumulative fitted spectrum data by performing weighted accumulation processing based on the constraint current value and the corresponding original emission spectrum data. The residual spectral update module is used to perform residual update processing based on the cumulative fitted spectral data and the target spectral data to obtain the residual spectral update data; The loop iteration module is used to perform iterative convergence analysis based on the residual spectrum update data. If the preset convergence condition is met, the corresponding LED drive control parameters are output; otherwise, the LED bead selection module is re-executed based on the residual spectrum update data to the loop iteration module.