LED constant current circuit control method and device based on continuous inductive current

By collecting and optimizing the inductance signal of the LED driver circuit, a current control sequence is generated, which solves the problem of current ripple exceeding the expected range in the existing technology, realizes precise current control and luminous efficacy stability, and improves the performance and lifespan of the LED driver circuit.

CN121865467APending Publication Date: 2026-04-14SHENZHEN XINLIANXIN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XINLIANXIN ELECTRONICS CO LTD
Filing Date
2025-11-20
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing LED driver circuits cannot achieve precise current control that matches the characteristics of the inductor, resulting in current ripple exceeding the expected range and affecting the operating quality and lifespan of the driver circuit.

Method used

By collecting the switching frequency, inductor voltage, and inductor current of the LED driver circuit, signal calculation, filtering and noise reduction, and ripple envelope boundary analysis are performed to optimize timing parameters, generate current control sequences, and perform distortion suppression and fluctuation verification to achieve dynamic frequency adjustment and circuit regulation.

Benefits of technology

It effectively suppresses current ripple within the target range, improves the accuracy and adaptability of constant current control, and extends the luminous efficiency stability and service life of LED driver circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121865467A_ABST
    Figure CN121865467A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power electronics, and discloses an LED constant current circuit control method and device based on continuous inductive current, and the method comprises the steps: collecting the switching frequency, inductive voltage and current of an LED drive circuit, calculating a ripple envelope boundary, and carrying out the time sequence division, continuity test and boundary optimization of the obtained ripple envelope boundary. Optimized time sequence parameters are obtained; performing current fluctuation analysis and switching frequency optimization according to the optimized time sequence parameters and the switching frequency, generating a current control sequence, and performing boundary correction and lighting effect stability analysis in combination with a ripple envelope boundary to obtain a lighting effect stability sequence; and carrying out life prediction, phase compensation and distortion suppression according to the lighting effect stabilization sequence, the de-noised inductance signal and the optimized time sequence parameter, completing response and fluctuation verification through current slope iterative optimization, obtaining a fluctuation stabilization strategy, and carrying out circuit adjustment. According to the method, accurate current control matched with inductance characteristics is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power electronics technology, and in particular to a method and apparatus for controlling an LED constant current circuit based on continuous inductor current. Background Technology

[0002] Currently, in the field of LED driver circuits, maintaining stable luminous efficacy and extending lifespan requires high-precision constant current control. Research on segmented control based on the actual response characteristics of the inductor, through precise matching of the inductor time constant and control timing, ensures that the current ripple is always constrained within the target range, thereby improving the overall performance and reliability of the driver circuit. This has become a hot topic in the field of modern energy-saving lighting.

[0003] In one existing technology, the circuit sets a fixed switching frequency and presets a current reference value. At the beginning of the switching cycle, the inductor current is sampled, and the sampled value is compared with the internally set reference value. When the sampled current reaches or exceeds the reference value, the comparator outputs a signal, triggering the control logic to repeat the above process, thereby stabilizing the average current near the target value. The entire control process relies on a fixed timing cycle and instantaneous current peak detection. If its time constant characteristics do not match the control timing, it can easily cause the current ripple to exceed the expected range. The actual inductor response cannot closely follow the preset ripple envelope, resulting in waveform distortion and brightness fluctuations, directly affecting the operating quality of energy-saving lighting equipment.

[0004] Therefore, existing technologies cannot achieve precise current control that matches the characteristics of inductors. Summary of the Invention

[0005] This invention provides a method and apparatus for controlling LED constant current circuits based on continuous inductor current, so as to achieve precise current control that matches the characteristics of the inductor.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an LED constant current circuit control method based on continuous inductor current, comprising: The switching frequency, inductor voltage, and inductor current of the LED driver circuit are collected to obtain the raw dataset; Based on the original dataset, inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation are performed to obtain the denoised inductor signal and ripple envelope boundary. Based on the ripple envelope boundary, time series partitioning, continuity verification, and boundary optimization are performed to obtain optimized time series parameters; Based on the optimized timing parameters and the switching frequency, current fluctuation analysis and switching frequency optimization are performed, and a current control sequence is generated. Based on the current control sequence and the ripple envelope boundary, boundary condition correction and luminous efficacy stability analysis are performed to obtain a stable luminous efficacy sequence. Based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters, lifetime prediction, phase compensation, and distortion suppression analysis are performed to obtain distortion suppression results. Based on the distortion suppression results, current slope iterative optimization, response stability verification, and fluctuation verification are performed to obtain a fluctuation stability strategy and adjust the circuit.

[0007] Secondly, the present invention provides an LED constant current circuit control device based on continuous inductor current, comprising: The data acquisition module is used to collect the switching frequency, inductor voltage, and inductor current of the LED driver circuit to obtain the raw dataset. The ripple boundary analysis module is used to perform inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation based on the original dataset to obtain the denoised inductor signal and ripple envelope boundary. The timing parameter analysis module is used to perform timing division, continuity check and boundary optimization based on the ripple envelope boundary to obtain optimized timing parameters; The analysis and optimization module is used to perform current fluctuation analysis and switching frequency optimization based on the optimized timing parameters and the switching frequency, and to generate a current control sequence. The luminous efficacy verification module is used to perform boundary condition correction and luminous efficacy stability analysis based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence. The distortion suppression module is used to perform lifetime prediction, phase compensation, and distortion suppression analysis based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters, and to obtain the distortion suppression result. The verification output module is used to perform current slope iterative optimization, response stability verification, and fluctuation verification based on the distortion suppression results, to obtain a fluctuation stability strategy and adjust the circuit.

[0008] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the LED constant current circuit control method based on continuous inductor current as described in any one of the above.

[0009] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the LED constant current circuit control method based on continuous inductor current as described above.

[0010] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention obtains the original dataset by collecting the switching frequency, inductor voltage and inductor current of the LED driving circuit, and performs inductor signal calculation, filtering and noise reduction and ripple envelope boundary calculation based on differential calculation and first-order low-pass filtering. Combined with extreme value detection and least squares method to optimize the boundary, it effectively filters out high-frequency switching noise and improves signal quality.

[0011] (2) The present invention uses the sliding window algorithm to divide the time sequence of the denoised inductor signal, performs continuity optimization through the dynamic time warping algorithm, and uses the least squares method to perform boundary optimization to obtain optimized timing parameters, thereby ensuring the continuity and smoothness of the current waveform in time sequence and reducing current ripple and waveform distortion caused by timing mismatch.

[0012] (3) Based on optimizing timing parameters and switching frequency, this invention extracts current fluctuation characteristics through fast Fourier transform and optimizes the switching frequency to generate a current control sequence, realizes dynamic frequency adjustment, effectively suppresses current fluctuation, keeps current ripple within the target range, improves the accuracy and adaptability of constant current control, and avoids response lag caused by fixed frequency control.

[0013] (4) This invention performs lifetime prediction, phase compensation and distortion suppression analysis through a stable luminous efficacy sequence. It calculates timing deviation by combining the exponential fitting lifetime formula, fast Fourier transform and cross-correlation algorithm, and optimizes parameters through phase compensation algorithm. Furthermore, it generates a fluctuation stabilization strategy through current slope iteration optimization, response stability verification and fluctuation verification. It also achieves distortion suppression and lifetime extension through pulse width modulation adjustment circuit, thereby improving the luminous efficacy stability of LED driver circuit. Attached Figure Description

[0014] Figure 1 This is a schematic flowchart of an LED constant current circuit control method based on continuous inductor current provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of an LED constant current circuit control device based on continuous inductor current, provided in the second embodiment of the present invention. Detailed Implementation

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

[0016] Reference Figure 1The first embodiment of the present invention provides a method for controlling an LED constant current circuit based on continuous inductor current, comprising the following steps: S11: Collect the switching frequency, inductor voltage, and inductor current of the LED driver circuit to obtain the raw dataset; S12, based on the original dataset, perform inductor signal calculation, filtering and noise reduction, and calculate ripple envelope boundary to obtain the denoised inductor signal and ripple envelope boundary; S13, Based on the ripple envelope boundary, perform time series partitioning, continuity check and boundary optimization to obtain optimized time series parameters; S14, based on the optimized timing parameters and the switching frequency, perform current fluctuation analysis and switching frequency optimization, and generate a current control sequence; S15, based on the current control sequence and the ripple envelope boundary, perform boundary condition correction and luminous efficacy stability analysis to obtain a luminous efficacy stable sequence; S16. Based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters, lifetime prediction, phase compensation, and distortion suppression analysis are performed to obtain distortion suppression results. S17. Based on the distortion suppression results, perform current slope iterative optimization, response stability verification, and fluctuation verification to obtain a fluctuation stability strategy and adjust the circuit.

[0017] In step S11, the switching frequency, inductor voltage, and inductor current of the LED driver circuit are collected to obtain the raw dataset.

[0018] Specifically, the switching frequency is read digitally directly from the frequency output pin of the circuit controller. The inductor voltage is measured as an analog signal by a voltage sensor connected in parallel across the inductor. The inductor current is measured as an analog signal by a current sensor connected in series in the inductor circuit. These analog signals are converted into digital signals by an analog-to-digital converter at a fixed sampling rate, forming a raw dataset containing three specific variables: the switching frequency, the inductor voltage, and the inductor current. The data acquisition process uses synchronous sampling technology to ensure the three variables are aligned in time, avoiding phase deviation. This step is significant because it provides real, real-time circuit state data for subsequent signal processing and control algorithms, ensuring that the entire control method can be adjusted based on the actual inductor characteristics, thus providing the necessary data support for achieving precise current control.

[0019] In step S12, based on the original dataset, inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation are performed to obtain the denoised inductor signal and ripple envelope boundary, including: Based on the original dataset, the inductor voltage change rate is calculated using differential calculation. Based on the inductor voltage change rate and the inductor current, high-frequency switching noise is filtered out by a first-order low-pass filter algorithm, and the credibility is verified based on the inductor voltage change rate to obtain a denoised inductor signal. Based on the denoised inductor signal, the peak value is extracted through a preset sliding window to obtain the preliminary ripple envelope boundary; Based on the preliminary ripple envelope boundary, the peak deviation is extracted. When the peak deviation does not exceed a preset peak deviation threshold, the preliminary ripple envelope boundary is output to obtain the ripple envelope boundary. When the peak deviation exceeds a preset peak deviation threshold, the boundary is optimized using the least squares method to obtain the ripple envelope boundary.

[0020] Specifically, firstly, based on the switching frequency and inductor voltage in the original dataset, the rate of change of the inductor voltage is calculated using differential calculation. The differential calculation employs the discrete differential method, calculating the difference in inductor voltage between adjacent sampling points and dividing it by the sampling time interval, which is determined by the reciprocal of the switching frequency. The inductor voltage data originates from the analog signal measured by the voltage sensor, which is converted into a digital signal by an analog-to-digital converter; the switching frequency data is directly read from the frequency output pin of the circuit controller.

[0021] Next, the inductor current in the original dataset is filtered to obtain a denoised inductor current signal. The inductor current data originates from the analog signal measured by a current sensor connected in series in the inductor circuit, which is converted into a digital signal by an analog-to-digital converter. A first-order low-pass filter algorithm is used to filter out high-frequency switching noise introduced by the operation of the power switch in the original inductor current signal. The cutoff frequency of the first-order low-pass filter is set to one-tenth of the switching frequency. The filter coefficients are calculated based on the cutoff frequency and the system sampling rate, using a recursive implementation method, i.e., the current output value equals the current input value multiplied by the input coefficient plus the previous output value multiplied by the output coefficient.

[0022] The specific calculation process for the input and output coefficients is as follows: First, the ratio of the cutoff frequency to the system sampling rate is calculated. Then, this ratio is substituted into a coefficient relationship derived from the backward difference method discretization of the simulated transfer function of a first-order RC filter. This relationship stipulates that the input coefficients are obtained by calculating the ratio of the cutoff frequency to the system sampling rate, dividing this ratio by 1, and summing the two ratios. The output coefficients are equal to one minus the input coefficients. The filtering calculation process is as follows: the original inductor current data is used as the input signal of the filter. Following a recursive calculation method, the original inductor current value at the current sampling time is multiplied by the input coefficient, and then the denoised inductor current signal value calculated at the previous sampling time is multiplied by the output coefficient to obtain the denoised inductor current signal value at the current sampling time. Simultaneously with obtaining the denoised inductor current signal, the instantaneous reliability cross-validation process is initiated. This verification utilizes the inductor voltage change rate. Within a single sampling time interval, the calculated inductor voltage change rate is multiplied by the sampling time interval and then divided by the known inductance value in the circuit to obtain an estimated value of the current change based on the voltage change. Simultaneously, the difference between the value of the denoised inductor current signal at the next moment and the value at the previous moment within the same sampling time interval is calculated to obtain the measured value of the current change. The absolute value of the difference between the estimated value and the measured value is calculated to obtain the instantaneous deviation.

[0023] The preset instantaneous deviation tolerance threshold is directly set to 2% of the rated current of the inductor in the circuit. This setting is based on the fact that, under normal operating conditions of the LED driver circuit, the instantaneous current deviation caused by measurement noise and small model errors is usually much smaller than the average operating current of the circuit. Setting the threshold to 2% of the rated current can effectively cover the normal fluctuation range, while maintaining sufficient sensitivity to obvious abnormal signals.

[0024] If the instantaneous deviation at the current sampling point does not exceed the tolerance threshold, the denoised inductor current signal at that point is considered reliable and retained. If the instantaneous deviation exceeds the tolerance threshold, the signal value from the previous reliable sampling point is interpolated using an estimated value of the current change. After traversing all sampling points, a verified and necessaryly corrected denoised inductor current signal is output and identified as the high-quality initial inductor current signal. Then, based on the denoised inductor signal, the peak value is extracted through a preset sliding window to obtain the preliminary ripple envelope boundary.

[0025] Specifically, a fixed-length window is defined, with the window length directly determined to be twice the switching cycle; the window slides along the time axis with a fixed step size, which is set to half the window length; within each window range, the values ​​of all denoising inductor signal data points within the window are compared, and the point with the largest value is identified as the local maximum point, and the point with the smallest value is identified as the local minimum point; all detected local maximum points are connected in timestamp order to form the upper envelope, and all local minimum points are connected in timestamp order to form the lower envelope. The upper and lower envelopes together constitute the preliminary ripple envelope boundary.

[0026] When the peak deviation exceeds the preset peak deviation threshold, boundary optimization is performed using the least squares method. The least squares method uses a quadratic polynomial for fitting. The fitting process involves finding a quadratic function curve for the initial ripple envelope boundary data points, such that the sum of the squares of the vertical distances between each point on the curve and the corresponding initial ripple envelope boundary data points is minimized. By establishing a normal equation system and solving the coefficients of the equation system, the optimal quadratic polynomial coefficients are obtained. The boundary values ​​of all points are recalculated using this polynomial to form a smooth, optimized ripple envelope boundary.

[0027] The preset peak deviation threshold is set based on inductor characteristic parameters, multiplied by the rated current value of the inductor (unit: A), the inductance tolerance percentage (typically ±10%-20%), and then multiplied by a safety factor (recommended 0.5-0.8). The experimental statistical method involves collecting peak deviation data from over 100 sets of steady-state operation under rated operating conditions, calculating the probability distribution of the deviation values, taking the 95th quantile as the benchmark value, and considering the 3σ principle, setting the threshold to 1.5-2 times the benchmark value. Based on typical parameters of LED driver circuits, the recommended threshold range is [missing information - likely related to low-power LEDs]. The threshold is 0.1-0.5A for low-power circuits (<10W), 0.5-1.2A for medium-power circuits (10-50W), and 1.2-3.0A for high-power circuits (>50W). A dynamic adjustment mechanism, such as temperature compensation, can be considered. The threshold decreases by a coefficient of 0.1% / ℃ as the temperature increases, i.e., Thresholdadj = Thresholdbase × [1-0.001×(T-25)], where Thresholdbase is the base threshold and Thresholdadj is the temperature-compensated threshold. For example, taking a 30W LED driver circuit with a rated current of 1.5A and an operating temperature of 60℃, the base threshold is set to 0.8A based on experimental statistics, and the temperature-compensated threshold is 0.772A. The rationality of the threshold can also be verified through experiments, such as injecting a ±10% current disturbance at the threshold critical point and observing whether the luminous flux fluctuation remains within 5%. The number of times the optimization operation is falsely triggered in 100 tests should be less than 5.

[0028] The significance of this step lies in eliminating high-frequency noise and abnormal fluctuations through signal processing and boundary calculation, providing a smooth and accurate inductor current signal and ripple boundary, laying the foundation for subsequent timing division and current control, ensuring that the current ripple is effectively constrained, and improving the luminous efficiency stability and control accuracy of LED drivers.

[0029] In step S13, based on the ripple envelope boundary, time series partitioning, continuity checking, and boundary optimization are performed to obtain optimized time series parameters, including: Based on the ripple envelope boundary, the denoised inductor signal is time-series divided using a sliding window algorithm to obtain time sequence data. Based on the time sequence data, a continuous time sequence is obtained by performing continuity optimization through a dynamic time warping algorithm. Based on the continuous time series segments, boundary optimization is performed using the least squares method to obtain optimized time series parameters.

[0030] Specifically, the denoised inductor signal obtained in step S12 is first divided into time-series segments using a sliding window algorithm. The sliding window algorithm defines a fixed-length window, which is directly determined to be twice the switching cycle. The window slides along the time axis with a fixed step size, set to half the window length, thereby dividing the denoised inductor signal into multiple temporally continuous and partially overlapping time-series segments. Each time-series segment contains the denoised inductor signal values ​​at all time points within the window and their corresponding timestamps.

[0031] Next, a dynamic time warping algorithm is used to optimize the continuity of adjacent time series data. This algorithm aligns the time series by calculating the cumulative distance between adjacent time series data. Specifically, two adjacent time series data are used as input, serving as rows and columns of the cumulative distance matrix, respectively. The local distance of each element in the matrix is ​​calculated, defined as the absolute difference between the denoised inductor signal values ​​at the corresponding row and column indices of the two time series data. The value of each element in the matrix represents the minimum cumulative distance from the matrix's starting point to that position. This value is calculated by adding the minimum cumulative distance of the three adjacent elements to the left, above, and upper left of the current position to the local distance of the current position. The process of finding the optimal path is as follows: starting from the end point of the cumulative distance matrix, tracing back to the starting point, at each step, the element with the smallest cumulative distance among the three adjacent elements to the left, above, or upper left of the current element is selected as the previous point of the path, until the starting point is reached, ultimately forming an optimal path that traverses the matrix. This path defines the optimal correspondence between each data point in two timing segments. Based on this path, the time axis of the second timing segment is stretched or compressed to align it with the first timing segment in time, outputting the aligned continuous timing segments. This process ensures a smooth transition of the current waveform in the time dimension, reducing timing misalignment and waveform distortion caused by switching actions or sudden load changes.

[0032] Finally, based on the continuous time series segments processed by the dynamic time warping algorithm, and using the ripple envelope boundary obtained from step S12 as a reference, the least squares method is applied for boundary optimization. Specifically, a local boundary line is established for each continuous time series segment. This boundary line is described using a linear model, which includes two undetermined parameters: slope and intercept. The optimization objective is to minimize the sum of squares of the differences between all points on this local boundary line and the corresponding points on the ripple envelope boundary within the corresponding time period—that is, the residual sum of squares. The solution process is accomplished by constructing and solving a system of normal equations. The specific principle for constructing this system of equations is: setting the partial derivatives of the residual sum of squares function with respect to the slope parameter to zero, and the partial derivatives with respect to the intercept parameter to zero, respectively, thus obtaining two equations. These two equations together constitute a system of linear equations concerning the slope and intercept values, i.e., the normal equation system. By solving this system of linear equations, a unique set of slope and intercept values ​​is directly obtained; this set of values ​​is the optimal solution that minimizes the residual sum of squares. After obtaining the optimal local boundary lines for each consecutive timing segment, key feature parameters of these boundary lines are extracted, including the start and end point values ​​of each segment and the slope of the boundary lines. These parameters together constitute the final optimized timing parameters. The significance of this step lies in ensuring the continuity and smoothness of the inductor current through precise timing division and optimization, thereby reducing waveform distortion and brightness fluctuations, and providing an accurate timing basis for achieving precise current control that matches the inductor characteristics.

[0033] In step S14, current fluctuation analysis and switching frequency optimization are performed based on the optimized timing parameters and the switching frequency, and a current control sequence is generated.

[0034] In one specific implementation, the step of performing current fluctuation analysis and switching frequency optimization based on the optimized timing parameters and the switching frequency, and generating a current control sequence, includes: Based on the optimized timing parameters, the fluctuation characteristics are extracted using the Fast Fourier Transform algorithm to obtain the current fluctuation characteristics; When the current fluctuation characteristic does not exceed the preset fluctuation amplitude threshold, the switching frequency is output to obtain the optimized switching frequency; When the current fluctuation characteristics exceed the preset fluctuation amplitude threshold, the switching frequency is queried and matched through the preset frequency and ripple mapping table to obtain the optimized switching frequency; Based on the optimized switching frequency, the target current value is determined through the preset mapping relationship between the switching frequency and the target current, the real-time inductor current signal is obtained, and the current error value is calculated. Based on the current error value, a control sequence is generated using a PID control algorithm to obtain the current control sequence.

[0035] Specifically, firstly, based on the timing segmentation information provided by the optimized timing parameters, the start and end times of each continuous timing segment are clearly defined. The optimized timing parameters include boundary characteristic parameters for each segment, but these parameters describe the morphological characteristics of the ripple envelope boundary, not the original current sample values. Based on these time points, the system extracts a sequence of current sample values ​​within the corresponding time interval from the high-quality initial inductor current signal, forming current time series data for analysis. Next, a Fast Fourier Transform (FFT) algorithm is applied to this current time series data. The input to this algorithm is the extracted current time series data, which is a sequence consisting of consecutive timestamps and their corresponding current sample values.

[0036] The algorithm's specific implementation involves grouping the input current time-series data into groups, each containing a power of two number of sampling points. A butterfly operation structure is applied to each group, and through multi-level iterative calculations, the current sequence in the time domain is converted into a complex sequence in the frequency domain. Then, the amplitude value corresponding to each frequency point in this complex sequence is calculated, forming the frequency-amplitude distribution of the current signal. From this distribution, the three components with the largest amplitude values ​​are extracted from all frequency components except the switching frequency and its integer multiples. The frequency and amplitude values ​​of these three components are recorded, collectively constituting the current fluctuation characteristics.

[0037] The preset fluctuation amplitude threshold is used to determine whether the current fluctuation characteristics are acceptable. The threshold is determined by operating the LED driver circuit under laboratory conditions in four typical states: rated load, light load, heavy load, and load change. In each state, multiple sets of historical current time series data under stable operation are collected. Fast Fourier transform is performed on each set of data and the current fluctuation characteristics are extracted. The distribution of the maximum amplitude value among all characteristics is statistically analyzed. The distribution is sorted from smallest to largest, and the amplitude value at the 90th percentile of the sorted positions is taken as the fluctuation amplitude threshold.

[0038] The process of constructing the preset frequency and ripple mapping table is as follows: During the system development phase, a test platform is built, including the LED driver circuit under test and the programmable load. Multiple sets of different load current conditions are set to cover the normal operating range of the circuit. Under each load current condition, a series of candidate switching frequency values ​​are scanned from low to high. At each candidate switching frequency, the circuit is allowed to operate stably, and a high-quality initial inductor current signal is acquired. A fast Fourier transform is performed to extract the current fluctuation characteristics, and the maximum amplitude value of these characteristics is recorded. All test data are organized according to the load current conditions and candidate switching frequency values, forming a lookup table structure with the load current and candidate switching frequency as a joint index and the maximum amplitude value of the current fluctuation characteristics as the corresponding data. This mapping table is stored in the controller's non-volatile memory.

[0039] The process of using the preset frequency and ripple mapping table is as follows: the system monitors the load current of the circuit in real time and quantifies it to the closest load current condition existing in the mapping table. Then, the maximum amplitude value in the currently extracted current fluctuation feature is compared with a preset fluctuation amplitude threshold. If the maximum amplitude value exceeds the threshold, all candidate switching frequencies and their corresponding maximum amplitude value records are searched in the mapping table under the current quantized load current condition. Candidate switching frequency records whose maximum amplitude value does not exceed the preset fluctuation amplitude threshold are selected. If multiple candidate frequencies meet the conditions, the candidate frequency with the smallest absolute difference from the current original switching frequency value is selected as the optimized switching frequency. If no record has a maximum amplitude value below the threshold, the candidate switching frequency in the mapping table that can produce the minimum maximum amplitude value under the current load current condition is selected as the optimized switching frequency. Finally, based on the optimized switching frequency, the corresponding target current value is determined through the preset switching frequency-target current mapping relationship.

[0040] The process of constructing the preset mapping relationship between switching frequency and target current is as follows: During the system development phase, for each test's optimized switching frequency, circuit parameters are adjusted to achieve optimal current ripple and stability. The stable average output current value at this point is recorded as the target current value corresponding to that switching frequency. The determined target current value is subtracted from the sampled value of the high-quality initial inductor current signal acquired in real time to obtain the current error signal.

[0041] Based on this current error signal, a current control sequence is generated using a PID control algorithm. The specific implementation of the PID control algorithm involves using the current error signal as input. The algorithm consists of three parts: a proportional term, which multiplies the current current error signal by a proportional coefficient; an integral term, which accumulates historical current error signals and multiplies them by an integral coefficient; and a derivative term, which multiplies the difference between the current current error signal and the previous current error signal by a derivative coefficient.

[0042] The proportional, integral, and derivative coefficients are determined using an engineering tuning method. Specifically, when the control system is at its rated operating point, the integral and derivative coefficients are initially set to zero. The proportional coefficient is gradually increased until the system output exhibits constant-amplitude oscillations. This proportional coefficient is recorded as the critical proportional coefficient, and the oscillation period is measured. Then, 60% of the critical proportional coefficient is taken as the initial value of the proportional coefficient. Zero-six times this initial value is divided by the oscillation period to obtain the initial value of the integral coefficient. Finally, this initial value is multiplied by one-eighth of the oscillation period to obtain the initial value of the derivative coefficient.

[0043] After setting initial values, the dynamic response characteristics of the system, including overshoot, settling time, and steady-state error, are measured by applying a step change in load. The criteria for adjusting these three coefficients are to ensure that the overshoot does not exceed 5%, the settling time does not exceed 20 milliseconds, and the steady-state error does not exceed 1%. Through multiple adjustments and tests, the specific values ​​of the proportional coefficient, integral coefficient, and derivative coefficient that make the system simultaneously meet these three indicators are finally determined.

[0044] The proportional, integral, and derivative terms are added together to obtain the output signal of the PID controller. This output signal is then quantized. Specifically, the numerical representation range of the PWM controller is first determined, from zero to the maximum count value, corresponding to a duty cycle from 0 to 100%. The scaling factor is determined based on the output range of the PID controller under typical operating conditions. This is achieved by applying a standard test signal to the control system during the development phase, recording the maximum and minimum values ​​of the PID controller output, calculating the span of its output range, and then dividing the maximum count value of the PWM controller by this span to obtain the scaling factor. The offset is determined to map the theoretical zero value of the PID output to the midpoint of the PWM controller. This value is obtained by subtracting half of the maximum count value of the PWM controller from the theoretical zero value of the PID output multiplied by the scaling factor.

[0045] Then, the continuous value of the PID output signal is multiplied by the scaling factor and the offset is added to ensure that the transformed value falls within the representation range of the PWM controller. Next, the transformed value is rounded to obtain the closest integer value. Finally, a range check is performed on the rounded value; if the value is less than zero, it is forced to zero; if the value exceeds the maximum count value, it is forced to the maximum count value. This process completes the conversion from a continuous signal to a discrete control value. The quantized signal forms a current control sequence for controlling the power switch, which is a timing signal containing switching time and switching state commands. The significance of this step is that by analyzing the current fluctuation characteristics, the switching frequency is dynamically adjusted, and a precise current control sequence is generated, ensuring that the inductor current ripple is always constrained within the target range. This effectively suppresses the response lag and current fluctuation problems caused by fixed frequency control, improving the constant current accuracy and dynamic response performance of the LED driver circuit.

[0046] In step S15, boundary condition correction and luminous efficacy stability analysis are performed based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence.

[0047] In one specific implementation, the step of performing boundary condition correction and luminous efficacy stability analysis based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence includes: Extreme value detection is performed based on the ripple envelope boundary to obtain a boundary sequence. When the current control sequence does not exceed the boundary sequence, the current control sequence remains unchanged. When the current control sequence exceeds the boundary sequence, the current ripple coefficient and load voltage fluctuation rate are calculated, and the current control sequence is corrected by a preset correction strategy table to obtain a stable luminous efficacy sequence.

[0048] Specifically, a fixed-length sliding window is used on the ripple envelope boundary curve. The window length is set to an integer multiple of the switching cycle and slides along the time axis with a fixed step size, half the window length. Within each window, the values ​​of all ripple envelope boundary data points are compared, identifying the point with the largest value as the local maximum and the point with the smallest value as the local minimum. All detected local maximum and local minimum points are connected in timestamp order to form a boundary sequence containing alternating upper and lower boundary points. Then, the current control sequence generated in step S14 is compared point-by-point with the boundary sequence. The current control sequence contains the target current value and its corresponding timestamp for each switching cycle. When the target current value at all time points in the current control sequence does not exceed the upper boundary value and is not lower than the lower boundary value at the corresponding time point in the boundary sequence, the current control sequence is deemed to satisfy the boundary constraints, and the current control sequence remains unchanged.

[0049] When the target current value at some or all time points in the current control sequence exceeds the corresponding upper boundary value or falls below the lower boundary value of the boundary sequence, it is necessary to calculate the current ripple coefficient and load voltage fluctuation rate. The current ripple coefficient is calculated by extracting all target current values ​​within a complete switching cycle from the current control sequence, identifying the maximum and minimum values ​​within that cycle, calculating the difference between the maximum and minimum values ​​to obtain the peak-to-peak current value, and then dividing by the arithmetic mean of all target current values ​​within that cycle. The load voltage fluctuation rate is calculated by synchronously acquiring the voltage signal across the LED load. This voltage signal is measured by a voltage sensor and converted to load voltage data via an analog-to-digital converter. The maximum and minimum values ​​are identified from the load voltage data within a complete switching cycle, the difference is calculated to obtain the peak-to-peak voltage value, and then divided by the arithmetic mean of all load voltage data within that cycle.

[0050] The preset ripple coefficient threshold and volatility threshold are determined by analyzing the luminous efficacy stability requirements of the LED light source. Specifically, under laboratory conditions, a test system is built, including the LED light source under test and a luminous flux measurement device. By adjusting the parameters of the LED driver circuit, a series of driving conditions with different current ripple coefficients and load voltage volatility are generated. Under each driving condition, the volatility of the LED light source's output luminous flux is measured. The luminous flux volatility is defined as the ratio of the peak-to-peak value to the average value of the measured luminous flux. From all test data, data points with luminous flux volatility not exceeding 5% are selected. Among these qualified data points, the largest current ripple coefficient value is identified and used as the ripple coefficient threshold, and the largest load voltage volatility value is identified and used as the volatility threshold.

[0051] When the calculated current ripple coefficient is greater than or equal to the preset ripple coefficient threshold or the load voltage fluctuation rate is greater than or equal to the preset fluctuation rate threshold, the current control sequence is corrected by the preset correction strategy table.

[0052] The process of constructing the correction strategy table is as follows: during the system development phase, multiple sets of different load conditions are set. Under each set of load conditions, the optimal current control sequence correction parameters that make the current ripple coefficient and load voltage fluctuation rate simultaneously lower than their respective thresholds are determined through experimental testing. The set of load conditions, the measured current ripple coefficient and load voltage fluctuation rate, and the corresponding optimal correction parameters are recorded to form the correction strategy table.

[0053] The process of using the correction strategy table is as follows: under real-time load monitoring conditions, the load is quantified to the closest condition found in the correction strategy table, while simultaneously obtaining the currently calculated current ripple coefficient and load voltage fluctuation rate. In the correction strategy table, under the current quantified load conditions, all records are searched. First, records where both the current ripple coefficient and load voltage fluctuation rate are below their respective thresholds are selected. If multiple records meet the criteria, the record with the smallest combined difference between the current current ripple coefficient and load voltage fluctuation rate is chosen as the optimal correction parameter. If no record meets both criteria, the record with the smallest weighted sum of the current ripple coefficient and load voltage fluctuation rate is chosen as the optimal correction parameter.

[0054] The current control sequence is adjusted using the optimal correction parameters obtained from the query. This adjustment is repeated until the current ripple coefficient is lower than a preset ripple coefficient threshold and the load voltage fluctuation rate is lower than a preset fluctuation rate threshold. At this point, the luminous efficacy is considered stable, and the final corrected current control sequence is output as the luminous efficacy stable sequence. The significance of this step is that by dynamically correcting the current control sequence, the ripple characteristics and voltage stability of the LED driving current meet the luminous efficacy requirements, thereby ensuring the brightness stability and color consistency of the LED light source. This avoids visible flicker and brightness unevenness caused by current fluctuations, achieving precise current control that matches the inductor characteristics.

[0055] In step S16, lifetime prediction, phase compensation, and distortion suppression analysis are performed based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters to obtain distortion suppression results.

[0056] In one specific implementation, the step of performing lifetime prediction, phase compensation, and distortion suppression analysis based on the stable optical effect sequence, the denoised inductor signal, and the optimized timing parameters to obtain distortion suppression results includes: Based on the optical efficiency stability sequence, the expected lifespan of the inductor element is calculated in advance using an inductor lifetime prediction formula fitted by exponentially, and the lifetime prediction result is obtained. When the life prediction result is equal to or greater than the preset equipment operating cycle, the optimized timing parameters remain unchanged; When the predicted lifespan is lower than the preset equipment operating cycle, frequency features are extracted by fast Fourier transform based on the denoised inductor signal, and deviation analysis is performed on the frequency features and the preset timing reference to obtain the timing deviation. Based on the timing deviation and the optimized timing parameters, phase compensation is performed to obtain the corrected timing parameters; Based on the corrected timing parameters, a Fourier transform is performed and the total harmonic distortion value is calculated to quantify the degree of distortion, thereby obtaining the distortion measurement value; When the distortion measurement value exceeds the preset distortion threshold, the optimized timing parameters are further compensated. When the distortion measurement value does not exceed the preset distortion threshold, the corrected timing parameters are output as the distortion suppression result.

[0057] Specifically, the inductor lifetime is first predicted based on the stable luminous efficacy sequence obtained in step S15. The inductor lifetime prediction model used is a product-form empirical model based on the Arrhenius model. Its core structure consists of the product of temperature stress, current stress, and frequency stress terms. The model's final output is the expected lifetime of the inductor element in hours. The model construction process is as follows: During the system development phase, multiple samples that are completely consistent with the model and batch of the inductor element used in the product are selected. The samples are placed in a controlled environmental chamber, and multiple different combinations of constant stress conditions are set. Each set of conditions includes a constant ambient temperature, a constant DC bias current stress, and a constant switching frequency. The inductor samples are allowed to operate continuously under these accelerated stress conditions, and their inductance values ​​are measured periodically using an LCR meter under specific test conditions. The data on the decay of the inductance value of each sample over time is recorded. When the inductance value of a sample decays to a specific percentage of its initial value, the sample is determined to have failed under that stress condition, and this cumulative time is recorded as the lifetime data under that stress condition.

[0058] Subsequently, a multivariate nonlinear regression method was used to fit all collected stress conditions and corresponding lifetime data. The fitting process aimed to find an optimal set of model coefficients that minimized the overall deviation between the predicted lifetime calculated for each stress condition and the measured lifetime. The final model included a baseline lifetime constant, a temperature stress influence coefficient, a current stress influence coefficient, and a frequency stress influence coefficient. When applying this trained lifetime model to the current operating state, the required input variables included the average current value calculated from the luminous efficacy stability sequence as the current stress input; the inductor casing temperature data obtained in real time through a temperature sensor as the temperature stress input; and the switching frequency data of the circuit's current operation as the frequency stress input. Based on these real-time inputs, the model calculated a value according to its inherent mathematical relationships, namely, the expected lifetime of the inductor under specific operating conditions, which is the lifetime prediction result.

[0059] The preset equipment operating cycle is determined based on the design specifications of the LED lighting product, taking the nominal product lifespan value. When the lifespan prediction result is equal to or greater than the equipment operating cycle, the optimized timing parameters obtained from step S13 are kept unchanged.

[0060] When the predicted lifespan is lower than the equipment's operating cycle, a phase compensation process is initiated. This process first extracts frequency features from the denoised inductor signal obtained in step S12 using a Fast Fourier Transform (FFT). The input to the FFT is the denoised inductor signal, which is a sequence of inductor current samples after filtering and noise reduction. The transformation process converts the denoised inductor signal from the time domain to the frequency domain, identifying the fundamental frequency and the amplitude and phase values ​​of its harmonic components. These amplitude and phase information together constitute the frequency features. Then, a deviation analysis is performed between this frequency feature and a preset timing reference to obtain the timing deviation. The preset timing reference is stored in a pre-built reference feature library. The library is built by acquiring steady-state signals of the inductor current on a standard test platform using a calibrated LED driver circuit under rated input voltage, ambient temperature, and load conditions. A FFT is then performed on this steady-state signal to extract the amplitude and phase information of the fundamental frequency and its harmonics, forming standard spectral features, which are then stored as the timing reference.

[0061] The timing bias is calculated using a cross-correlation algorithm. The specific implementation of the cross-correlation algorithm is as follows: the amplitude data in the currently extracted frequency feature sequence is used as the sequence to be matched, and the amplitude data in the time-series reference sequence is used as the reference sequence. During calculation, the sequence to be matched is used as a sliding window, moving point by point on the reference sequence. At each shift position, the sum of the products of corresponding data points in the sequence to be matched and the reference sequence is calculated, and then divided by the square root of the product of the sum of squares of all data points in the sequence to be matched and the sum of squares of all data points in the reference sequence, to obtain the cross-correlation coefficient at that shift position. After repeating this calculation at all possible shift positions, the shift amount corresponding to the maximum value of the cross-correlation coefficient is found. This shift amount represents the offset of the current frequency feature relative to the time-series reference on the time axis, and the timing bias value is measured in units of the number of sampling points.

[0062] Based on the obtained timing deviation and the optimized timing parameters obtained from step S13, a corrected timing parameter is generated using a phase compensation algorithm. The specific implementation process of the phase compensation algorithm is as follows: First, the timing deviation value is multiplied by the sampling time interval to convert it from the number of sampling points to the actual time value, obtaining the total compensation time. Then, the duration of each timing segment in the optimized timing parameters is analyzed. The optimized timing parameters include the start and end times of each timing segment. The duration of each timing segment is calculated, and the proportion of each timing segment's duration to the total duration of all segments is calculated. The total compensation time is allocated to each timing segment according to this proportion, with the compensation amount allocated to each segment equal to the total compensation time multiplied by the proportion of that segment's duration. Next, the time markers in the optimized timing parameters are recalibrated. For each timing segment, its start and end time markers are simultaneously added to the compensation amount allocated to that segment; if the timing deviation is negative, the corresponding compensation amount is subtracted from the time markers.

[0063] After adjusting all time markers, the adjusted time series is checked and ensured to maintain a strict chronological order, with no time reversal or overlap. This calibration process ensures that the actual switching moment of the power switch is precisely matched in time to the rise and fall of the inductor current, thus aligning the switching action with the optimal response time of the inductor current.

[0064] Subsequently, distortion suppression analysis was performed based on the corrected timing parameters. The corrected timing parameters were input into the driver circuit simulation model, which was built based on circuit topology component parameters, including inductance values, capacitance values, and switching characteristics. This model was used to simulate the circuit response under a given control timing, obtaining the output analog current waveform data. The Fourier transform of this analog current waveform data was performed to obtain its spectral distribution, and the total harmonic distortion (THD) value was calculated to quantify the degree of distortion; this value is the distortion measurement. The THD value is calculated by taking the square root of the ratio of the sum of the squares of the amplitudes of all harmonic components to the square of the fundamental amplitude.

[0065] The preset distortion threshold is determined based on the luminous efficacy stability requirements of the LED driver circuit. Specifically, it measures the luminous flux fluctuation data of the LED light source under different total harmonic distortion values. The luminous flux fluctuation is defined as the ratio of the peak-to-peak value to the average value of the luminous flux measurement. The maximum total harmonic distortion value corresponding to the luminous flux fluctuation not exceeding 5% is selected as the distortion threshold.

[0066] When the distortion measurement exceeds the distortion threshold, the system returns to the phase compensation step. The difference between the current distortion measurement and the distortion threshold is used as the new compensation basis to further compensate the optimized timing parameters. When the distortion measurement does not exceed the distortion threshold, the current corrected timing parameters are output as the final distortion suppression result. The significance of this step is that, through lifetime prediction and phase compensation, it effectively suppresses current waveform distortion, reduces harmonic components, and ensures that the LED driver circuit maintains stable electrical performance and optical output quality throughout its entire lifespan, while extending the system's reliable operating time, all while ensuring the lifespan of the inductor components.

[0067] In step S17, based on the distortion suppression results, current slope iterative optimization, response stability verification, and fluctuation verification are performed to obtain a fluctuation stabilization strategy and perform circuit adjustment, including: Based on the distortion suppression results, the envelope sequence is extracted, and the root mean square error between the envelope sequence and the preset ideal envelope reference is calculated to obtain the distortion amplitude data. Calculate the initial value of the current rise slope, calculate the mean square error based on the initial value of the current rise slope and the preset target response curve, and iteratively optimize the initial value of the current rise slope using the gradient descent method until the calculated mean square error is lower than the preset convergence criterion, thereby obtaining the optimized current slope. Based on the optimized current slope, the PWM duty cycle and the switching frequency are predicted to obtain a segmented control strategy. According to the segmented control strategy, drive the feedforward and feedback control circuits and acquire measured response data; Based on the measured response data, the absolute difference is calculated in conjunction with the preset target response data to obtain the response deviation data; When the response deviation data exceeds the preset response deviation threshold, the segmented control strategy is adjusted according to the response deviation data using a PID control algorithm until the response deviation data is lower than or equal to the preset response deviation threshold, thus obtaining a stable response strategy. Based on the aforementioned response stabilization strategy, the maximum deviation value of the envelope is calculated using the sliding window algorithm to obtain the maximum deviation amount; When the maximum deviation does not exceed the preset envelope deviation threshold, the performance is deemed satisfactory, and the response stability strategy remains unchanged. When the maximum deviation exceeds the preset envelope deviation threshold, the absolute difference between the maximum deviation and the preset envelope deviation threshold is calculated, and the response stabilization strategy is adjusted by a linear weighted sum method. The adjustment is continued until the maximum deviation is lower than or equal to the preset envelope deviation threshold, and the final adjusted response stabilization strategy is output as the fluctuation stabilization strategy. According to the fluctuation stabilization strategy, the control circuit is adjusted by pulse width modulation.

[0068] Specifically, using the switching cycle as a reference, the current waveform data is divided into continuous periodic segments. Within each periodic segment, the values ​​of all current data points are compared, and the point with the largest value is identified as the local maximum point of that cycle, and the point with the smallest value is identified as the local minimum point of that cycle. All local maximum points are connected in chronological order to form an upper envelope, i.e., an envelope sequence. Subsequently, the root mean square error between this envelope sequence and a preset ideal envelope reference is calculated. The construction process of the ideal envelope reference is as follows: based on the actual parameters of the circuit, including input voltage, output voltage, inductance, switching frequency, and steady-state duty cycle, according to the rising rate of change of inductor current during the conduction phase and the falling rate of change during the turn-off phase, the theoretical peak and theoretical valley values ​​of the current ripple in each switching cycle are calculated respectively. All theoretical peak points are connected to form a theoretical envelope, which serves as the ideal envelope reference. The process of calculating the root mean square error is as follows: subtract the current value of each data point in the envelope sequence from the theoretical current value of the corresponding time point of the ideal envelope reference to obtain the difference sequence; calculate the square of each difference in the difference sequence; then calculate the arithmetic mean of these squares; finally, take the square root of the arithmetic mean to obtain the distortion amplitude data.

[0069] The initial value of the current rise slope is calculated strictly based on the fundamental physical characteristics of the inductor. During the conduction period of the switching transistor, the voltage applied across the inductor is the input voltage minus the output voltage. The input voltage data comes from an analog signal measured by a voltage divider resistor network connected to the power input terminal, which is then converted into a digital signal by an analog-to-digital converter. Similarly, the output voltage data comes from an analog signal measured by a voltage divider resistor network connected to the load terminals, which is also converted into a digital signal by an analog-to-digital converter. Subtracting the real-time monitored output voltage value from the real-time monitored input voltage value yields the net voltage value applied across the inductor. Dividing this net voltage value by the known inductance value in the circuit gives the initial value of the current rise slope.

[0070] Next, the mean square error is calculated based on the initial value of the current rise slope and the preset target response curve. The design process of the target response curve is as follows: based on the ideal constant current condition, through circuit theory analysis and simulation, considering the equivalent time constant and stability boundary of the system, a smooth rise curve without overshoot from zero current to the target current is generated. This curve is formed by connecting the initial linear rise segment and the subsequent exponential approach segment.

[0071] The calculation process for the mean squared error (MSE) is as follows: Simulate the current response of the system under a given initial current rise slope to obtain a simulated current response curve. Subtract the current value at each time point on this curve from the current value at the corresponding time point on the target response curve, calculate the square of all differences, and then calculate the arithmetic mean of these squares. Then, iteratively optimize the initial current rise slope using the gradient descent method. The specific implementation of the gradient descent method is as follows: Starting from the initial current rise slope, calculate the derivative of the MSE with respect to that slope. This derivative is calculated using the central difference method, i.e., changing the current rise slope by a small increment and calculating the ratio of the change in MSE to the increment. Then, adjust the current rise slope value along the direction of the descent of the derivative with a fixed step size. The step size is determined based on historical optimization data, taking the average of the effective step sizes from the previous five successful optimization processes. After each adjustment, the mean squared error is recalculated. Optimization stops when the improvement in mean squared error for three consecutive iterations is less than the preset convergence criterion. The convergence criterion is determined by analyzing historical optimization data. The average improvement of the last three iterations in all successful cases is calculated, and half of this average improvement is taken as the convergence criterion. The current rise slope value corresponding to this point is the optimized current slope.

[0072] Based on the optimized current slope, the PWM duty cycle and the switching frequency are predicted. The specific implementation process of the model predictive control algorithm is as follows: First, a discrete-time state-space model of the system is established. This model uses the inductor current and output voltage as state variables, and the PWM duty cycle as the control variable. System parameters include the known inductance value, the known output capacitance value, the known on-resistance value of the switching transistor, and the real-time monitored load current value. The state-space model contains two core state equations: The first state equation describes the change of the inductor current over time. This rate of change is equal to the input voltage minus the on-state voltage drop of the switching transistor minus the current output voltage, divided by the inductance value during the switching transistor's on-state phase; and equal to the output voltage divided by the negative of the inductance value during the switching transistor's off-state phase. The second state equation describes the change of the output voltage over time. This rate of change is equal to the load current divided by the negative of the output capacitance value during the switching transistor's on-state phase; and equal to the inductor current minus the load current divided by the output capacitance value during the switching transistor's off-state phase. By weighting the state equations for the on and off phases within a switching cycle, with the weight being the current PWM duty cycle, the average state-space model of the system is obtained. Subsequently, the forward Euler method is used to discretize this continuous-time average model, with the discretization step size set to one-tenth of the switching cycle, resulting in a discrete state-space model with the step size as the time interval.

[0073] The inputs to the model predictive control algorithm include the current sampled value of the high-quality initial inductor current signal obtained in step S12 as the initial state of the inductor current, the current sampled value of the output voltage obtained from the load voltage monitoring circuit as the initial state of the output voltage, and the target current trajectory corresponding to the optimized current slope. Based on the current state and the target trajectory, the algorithm predicts the evolution of the system state within the next twenty control steps.

[0074] A cost function is defined, comprising three terms: the first is the sum of squared errors between the predicted inductor current value and the corresponding target current trajectory; the second is the sum of squared errors between the predicted output voltage value and the rated output voltage; and the third is the squared rate of change of the PWM duty cycle. By solving a constrained quadratic programming problem, the PWM duty cycle sequence that minimizes the cost function is found. The constraints include that the PWM duty cycle must be between zero and one, and the inductor current cannot exceed the maximum allowable current. The PWM duty cycle value of the first control step is taken as the current control variable, while the current switching frequency is maintained at the optimized switching frequency. Together, these constitute a piecewise control strategy that includes the PWM duty cycle and switching frequency settings for multiple future time periods.

[0075] Based on a segmented control strategy, the feedforward and feedback control circuits are driven. The feedforward control section directly outputs preset values ​​for the PWM duty cycle and switching frequency according to the segmented control strategy, while the feedback control section fine-tunes the control input based on real-time acquired inductor current and load voltage values. Current and voltage waveform data from actual operation are acquired using current and voltage sensors as measured response data.

[0076] The absolute difference is calculated based on the measured current waveform data and the preset target response data. The target response data consists of the current values ​​at each time point on the ideal current response curve. The calculation process for the absolute difference is as follows: subtract the measured current waveform data from the target response data at the same time point, and take the absolute value of the difference to obtain a set of response deviation data. When the maximum value in the response deviation data exceeds the preset response deviation threshold, the adjustment process is initiated.

[0077] The process of determining the response deviation threshold is as follows: during the system development phase, the current response is tested under different load conditions, the maximum current deviation value that does not cause LED luminous flux fluctuations to exceed 5% is measured, and the minimum deviation value among all test conditions is taken as the response deviation threshold.

[0078] Based on the response deviation data, the PWM duty cycle parameter in the segmented control strategy is adjusted in real time using a PID control algorithm. The specific implementation process of the PID control algorithm is as follows: the maximum value in the response deviation data is used as the input error signal. The algorithm consists of three parts: a proportional term, which multiplies the current error signal by a proportional coefficient; an integral term, which accumulates historical error signals and multiplies them by an integral coefficient; and a derivative term, which multiplies the difference between the current error signal and the error signal from the previous moment by a derivative coefficient.

[0079] The proportional, integral, and derivative coefficients were determined using an engineering tuning method. Specifically, when the control system was at its rated operating point, the integral and derivative coefficients were initially set to zero. The proportional coefficient was gradually increased until the system output exhibited constant-amplitude oscillations. This proportional coefficient was recorded as the critical proportional coefficient, and the oscillation period was measured. Then, 60% of the critical proportional coefficient was taken as the initial value of the proportional coefficient. Zero-six times this initial value was divided by the oscillation period to obtain the initial value of the integral coefficient, and one-eighth of this initial value was multiplied by the oscillation period to obtain the initial value of the derivative coefficient. After setting the initial values, a step change in load was applied to the system, and the system's dynamic response characteristics, including overshoot, settling time, and steady-state error, were measured. The criteria for adjusting these three coefficients were to ensure that the overshoot did not exceed 5%, the settling time did not exceed 20 milliseconds, and the steady-state error did not exceed 1%. Through multiple adjustments and tests, the specific values ​​of the proportional, integral, and derivative coefficients that simultaneously satisfied these three indicators were finally determined.

[0080] The proportional, integral, and derivative terms are added together to obtain the output signal of the PID controller. This output signal is then quantized. Specifically, the numerical representation range of the PWM controller is first determined, from zero to the maximum count value, corresponding to a duty cycle from 0 to 100%. The scaling factor is determined based on the output range of the PID controller under typical operating conditions. This is done by applying a standard test signal to the control system during the development phase, recording the maximum and minimum values ​​of the PID controller output, calculating the span of its output range, and then dividing the maximum count value of the PWM controller by this span to obtain the scaling factor.

[0081] The offset is determined to map the theoretical zero value of the PID output to the midpoint of the PWM controller. This value is obtained by subtracting the theoretical zero value of the PID output from half of the maximum count value of the PWM controller and multiplying it by the scaling factor.

[0082] Then, the continuous value of the PID output signal is multiplied by the scaling factor and the offset is added to ensure that the transformed value falls within the representation range of the PWM controller. Next, the transformed value is rounded to obtain the closest integer value. Finally, a range check is performed on the rounded value; if the value is less than zero, it is forced to zero; if the value exceeds the maximum count value, it is forced to the maximum count value. This process completes the conversion from a continuous signal to a discrete control value. The quantized signal forms a correction amount for adjusting the PWM duty cycle. This correction amount is superimposed on the PWM duty cycle parameter in the segmented control strategy to obtain a stable response strategy. When the maximum deviation exceeds the preset envelope deviation threshold, the PWM duty cycle parameter in the stable response strategy is adjusted in real time using the PID control algorithm.

[0083] The process of determining the preset envelope deviation threshold is based on the IEEE or International Commission on Illumination (ICI) standards for testing and evaluating flicker in lighting products. These standards specify quantitative evaluation methods for light output waveform fluctuations. Specifically, the process involves using a metrologically calibrated test system in a standard testing environment. This system includes an LED driver circuit, an integrating sphere, and a luminous flux measurement device. By adjusting the parameters of the LED driver circuit, a series of driving conditions with different current ripple amplitudes are generated. Under each driving condition, the fluctuation characteristics of the LED light source's output luminous flux are measured. These fluctuation characteristics are quantified by the ratio of the peak-to-peak value to the average value of the luminous flux measurement. Based on the maximum permissible light output fluctuation amplitude corresponding to the flicker-free requirement specified in the standard, the corresponding current ripple amplitude value is determined, and this current ripple amplitude value is taken as the envelope deviation threshold.

[0084] The specific implementation process of the PID control algorithm is as follows: the difference between the maximum deviation and the envelope deviation threshold is used as the input error signal. The algorithm consists of three parts: the proportional term is formed by multiplying the current error signal by a proportional coefficient; the integral term is formed by accumulating the historical error signals and multiplying them by an integral coefficient; and the derivative term is formed by multiplying the difference between the current error signal and the error signal at the previous moment by a derivative coefficient.

[0085] The proportional, integral, and derivative coefficients were determined using an engineering tuning method. Specifically, when the control system was at its rated operating point, the integral and derivative coefficients were initially set to zero. The proportional coefficient was gradually increased until the system output exhibited constant-amplitude oscillations. This proportional coefficient was recorded as the critical proportional coefficient, and the oscillation period was measured. Then, 60% of the critical proportional coefficient was taken as the initial value of the proportional coefficient. Zero-six times this initial value was divided by the oscillation period to obtain the initial value of the integral coefficient, and one-eighth of this initial value was multiplied by the oscillation period to obtain the initial value of the derivative coefficient. After setting the initial values, a step change in load was applied to the system, and the system's dynamic response characteristics, including overshoot, settling time, and steady-state error, were measured. The criteria for adjusting these three coefficients were to ensure that the overshoot did not exceed 5%, the settling time did not exceed 20 milliseconds, and the steady-state error did not exceed 1%. Through multiple adjustments and tests, the specific values ​​of the proportional, integral, and derivative coefficients that simultaneously satisfied these three indicators were finally determined.

[0086] The proportional, integral, and derivative terms are added together to obtain the output signal of the PID controller. This output signal is then quantized. Specifically, the numerical representation range of the PWM controller is first determined, from zero to the maximum count value, corresponding to a duty cycle from 0 to 100%. The scaling factor is determined based on the output range of the PID controller under typical operating conditions. This is achieved by applying a standard test signal to the control system during the development phase, recording the maximum and minimum values ​​of the PID controller output, calculating the span of its output range, and then dividing the maximum count value of the PWM controller by this span to obtain the scaling factor. The offset is determined to map the theoretical zero value of the PID output to the midpoint of the PWM controller. This value is obtained by subtracting half of the maximum count value of the PWM controller from the theoretical zero value of the PID output multiplied by the scaling factor. Then, the continuous value of the PID output signal is multiplied by the scaling factor and the offset is added to make the transformed value fall within the representation range of the PWM controller. Next, the transformed value is rounded to obtain the nearest integer value. Finally, the rounded value is checked for range. If the value is less than zero, it is forced to be zero. If the value exceeds the maximum count value, it is forced to be the maximum count value. This process completes the conversion from a continuous signal to a discrete control value.

[0087] The quantized signal forms a correction value for adjusting the PWM duty cycle. This correction value is superimposed on the PWM duty cycle parameter in the response stabilization strategy to obtain the adjusted response stabilization strategy. The maximum deviation is recalculated using the adjusted strategy, and this adjustment process is repeated until the maximum deviation is lower than or equal to the envelope deviation threshold. The final adjusted response stabilization strategy is then output as the fluctuation stabilization strategy. Based on the fluctuation stabilization strategy, a stable operating state of the LED driver circuit is obtained through pulse width modulation (PWM) adjustment control circuit. The specific process of PWM adjustment is as follows: the PWM duty cycle value and switching frequency value in the fluctuation stabilization strategy are input into the timer configuration register of the microcontroller. The timer sets the counting period according to the switching frequency value and sets the value of the comparison register according to the PWM duty cycle value, generating a PWM digital signal with the corresponding duty cycle and frequency. This signal is amplified by the gate driver and drives the power switch to turn on and off.

[0088] By adjusting the ratio of the switching time of the switching transistor to the switching cycle, the average value of the inductor current is controlled, keeping the current flowing through the LED constant. Simultaneously, the inductor current value is monitored in real time through a current sampling circuit, and the load voltage value is monitored in real time through a voltage sampling circuit. The sampled values ​​are compared with the current reference value in the fluctuation stabilization strategy. The difference is processed by an error amplifier, and the duty cycle of the PWM signal is dynamically adjusted to compensate for external interference such as load changes or input voltage fluctuations. This closed-loop control process ensures that the LED driver circuit enters a stable operating state, characterized by an inductor current ripple coefficient below a preset threshold and LED light output flux fluctuations meeting design requirements.

[0089] This step, through dynamic optimization and verification, ensures stable current waveforms and controlled ripple, improving the consistency and reliability of LED driver luminous efficacy. Simultaneously, closed-loop control is achieved through pulse width modulation adjustment, ensuring the LED driver circuit enters a stable operating state.

[0090] Reference Figure 2 The second embodiment of the present invention provides an LED constant current circuit control device based on continuous inductor current, comprising: The data acquisition module is used to collect the switching frequency, inductor voltage, and inductor current of the LED driver circuit to obtain the raw dataset. The ripple boundary analysis module is used to perform inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation based on the original dataset to obtain the denoised inductor signal and ripple envelope boundary. The timing parameter analysis module is used to perform timing division, continuity check and boundary optimization based on the ripple envelope boundary to obtain optimized timing parameters; The analysis and optimization module is used to perform current fluctuation analysis and switching frequency optimization based on the optimized timing parameters and the switching frequency, and to generate a current control sequence. The luminous efficacy verification module is used to perform boundary condition correction and luminous efficacy stability analysis based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence. The distortion suppression module is used to perform lifetime prediction, phase compensation, and distortion suppression analysis based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters, and to obtain the distortion suppression result. The verification output module is used to perform current slope iterative optimization, response stability verification, and fluctuation verification based on the distortion suppression results, to obtain a fluctuation stability strategy and adjust the circuit.

[0091] It should be noted that the LED constant current circuit control device based on continuous inductor current provided in this embodiment of the invention is used to execute all the process steps of the LED constant current circuit control method based on continuous inductor current in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.

[0092] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for controlling an LED constant current circuit based on continuous inductor current, characterized in that, include: The switching frequency, inductor voltage, and inductor current of the LED driver circuit are collected to obtain the raw dataset; Based on the original dataset, inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation are performed to obtain the denoised inductor signal and ripple envelope boundary. Based on the ripple envelope boundary, time series partitioning, continuity verification, and boundary optimization are performed to obtain optimized time series parameters; Based on the optimized timing parameters and the switching frequency, current fluctuation analysis and switching frequency optimization are performed, and a current control sequence is generated. Based on the current control sequence and the ripple envelope boundary, boundary condition correction and luminous efficacy stability analysis are performed to obtain a stable luminous efficacy sequence. Based on the stable optical efficiency sequence, the denoised inductor signal, and the optimized timing parameters, lifetime prediction, phase compensation, and distortion suppression analysis are performed to obtain distortion suppression results. Based on the distortion suppression results, current slope iterative optimization, response stability verification, and fluctuation verification are performed to obtain a fluctuation stability strategy and adjust the circuit.

2. The LED constant current circuit control method based on continuous inductor current according to claim 1, characterized in that, The step of calculating the inductor signal, filtering and denoising, and calculating the ripple envelope boundary based on the original dataset to obtain the denoised inductor signal and ripple envelope boundary includes: Based on the original dataset, the inductor voltage change rate is calculated using differential calculation. Based on the inductor voltage change rate and the inductor current, high-frequency switching noise is filtered out by a first-order low-pass filter algorithm, and the credibility is verified based on the inductor voltage change rate to obtain a denoised inductor signal. Based on the denoised inductor signal, the peak value is extracted through a preset sliding window to obtain the preliminary ripple envelope boundary; Based on the preliminary ripple envelope boundary, the peak deviation is extracted. When the peak deviation does not exceed a preset peak deviation threshold, the preliminary ripple envelope boundary is output to obtain the ripple envelope boundary. When the peak deviation exceeds a preset peak deviation threshold, the boundary is optimized using the least squares method to obtain the ripple envelope boundary.

3. The LED constant current circuit control method based on continuous inductor current according to claim 1, characterized in that, The step of performing time series partitioning, continuity testing, and boundary optimization based on the ripple envelope boundary to obtain optimized time series parameters includes: Based on the ripple envelope boundary, the denoised inductor signal is time-series divided using a sliding window algorithm to obtain time sequence data. Based on the time sequence data, a continuous time sequence is obtained by performing continuity optimization through a dynamic time warping algorithm. Based on the continuous time series segments, boundary optimization is performed using the least squares method to obtain optimized time series parameters.

4. The LED constant current circuit control method based on continuous inductor current according to claim 1, characterized in that, The step of performing current fluctuation analysis and switching frequency optimization based on the optimized timing parameters and the switching frequency, and generating a current control sequence, includes: Based on the optimized timing parameters, the fluctuation characteristics are extracted using the Fast Fourier Transform algorithm to obtain the current fluctuation characteristics; When the current fluctuation characteristic does not exceed the preset fluctuation amplitude threshold, the switching frequency is output to obtain the optimized switching frequency; When the current fluctuation characteristics exceed the preset fluctuation amplitude threshold, the switching frequency is queried and matched through the preset frequency and ripple mapping table to obtain the optimized switching frequency; Based on the optimized switching frequency, the target current value is determined through the preset mapping relationship between the switching frequency and the target current, the real-time inductor current signal is obtained, and the current error value is calculated. Based on the current error value, a control sequence is generated using a PID control algorithm to obtain the current control sequence.

5. The LED constant current circuit control method based on continuous inductor current according to claim 1, characterized in that, The step of performing boundary condition correction and luminous efficacy stability analysis based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence includes: Extreme value detection is performed based on the ripple envelope boundary to obtain a boundary sequence. When the current control sequence does not exceed the boundary sequence, the current control sequence remains unchanged. When the current control sequence exceeds the boundary sequence, the load voltage is obtained, and the current ripple coefficient and load voltage fluctuation rate are calculated in combination with the current control sequence. When the current ripple coefficient is greater than or equal to a preset ripple coefficient threshold or the load voltage fluctuation rate is greater than or equal to a preset fluctuation rate threshold, the current control sequence is corrected by the gradient descent method until the current ripple coefficient is lower than the preset ripple coefficient threshold and the load voltage fluctuation rate is lower than the preset fluctuation rate threshold. The luminous efficacy is then determined to be stable, and the final corrected current control sequence is output as the luminous efficacy stable sequence. The current ripple coefficient is obtained by calculating the ratio of the peak-to-peak value to the average value of the current control sequence, and the load voltage fluctuation rate is obtained by calculating the ratio of the peak-to-peak value to the average value of the load voltage.

6. The LED constant current circuit control method based on continuous inductor current according to claim 2, characterized in that, The process involves performing lifetime prediction, phase compensation, and distortion suppression analysis based on the stable optical efficiency sequence, the denoised inductor signal, and the optimized timing parameters to obtain distortion suppression results, including: Based on the optical efficiency stability sequence, the expected lifespan of the inductor element is calculated in advance using an inductor lifetime prediction formula fitted by exponentially, and the lifetime prediction result is obtained. When the life prediction result is equal to or greater than the preset equipment operating cycle, the optimized timing parameters remain unchanged; When the predicted lifespan is lower than the preset equipment operating cycle, frequency features are extracted by fast Fourier transform based on the denoised inductor signal, and deviation analysis is performed on the frequency features and the preset timing reference to obtain the timing deviation. Based on the timing deviation and the optimized timing parameters, phase compensation is performed to obtain the corrected timing parameters; Based on the corrected timing parameters, a Fourier transform is performed and the total harmonic distortion value is calculated to quantify the degree of distortion, thereby obtaining the distortion measurement value; When the distortion measurement value exceeds the preset distortion threshold, the optimized timing parameters are further compensated. When the distortion measurement value does not exceed the preset distortion threshold, the corrected timing parameters are output as the distortion suppression result.

7. The LED constant current circuit control method based on continuous inductor current according to claim 1, characterized in that, The process of performing iterative optimization of the current slope, response stability verification, and fluctuation verification based on the distortion suppression results to obtain a fluctuation stabilization strategy and perform circuit adjustment includes: Based on the distortion suppression results, the envelope sequence is extracted, and the root mean square error between the envelope sequence and the preset ideal envelope reference is calculated to obtain the distortion amplitude data. Calculate the initial value of the current rise slope, calculate the mean square error based on the initial value of the current rise slope and the preset target response curve, and when the mean square error is greater than or equal to the preset mean square error threshold, iteratively optimize the initial value of the current rise slope using the gradient descent method until the calculated mean square error is less than the preset mean square error threshold, thereby obtaining the optimized current slope. Based on the optimized current slope, the PWM duty cycle and the switching frequency are predicted to obtain a segmented control strategy. According to the segmented control strategy, drive the feedforward and feedback control circuits and acquire measured response data; Based on the measured response data, the absolute difference is calculated in conjunction with the preset target response data to obtain the response deviation data; When the response deviation data exceeds the preset response deviation threshold, the segmented control strategy is adjusted according to the response deviation data using a PID control algorithm until the response deviation data is lower than or equal to the preset response deviation threshold, thus obtaining a stable response strategy. Based on the aforementioned response stabilization strategy, the maximum deviation value of the envelope is calculated using the sliding window algorithm to obtain the maximum deviation amount; When the maximum deviation does not exceed the preset envelope deviation threshold, the performance is deemed satisfactory, and the response stability strategy remains unchanged. When the maximum deviation exceeds the preset envelope deviation threshold, the absolute difference between the maximum deviation and the preset envelope deviation threshold is calculated. Based on the absolute difference, the response stabilization strategy is adjusted using a linear weighted sum method until the maximum deviation is lower than or equal to the preset envelope deviation threshold. The final adjusted response stabilization strategy is then output as the fluctuation stabilization strategy. According to the fluctuation stabilization strategy, the control circuit is adjusted by pulse width modulation.

8. A control device for an LED constant current circuit based on continuous inductor current, characterized in that, include: The data acquisition module is used to collect the switching frequency, inductor voltage, and inductor current of the LED driver circuit to obtain the raw dataset. The ripple boundary analysis module is used to perform inductor signal calculation, filtering and noise reduction, and ripple envelope boundary calculation based on the original dataset to obtain the denoised inductor signal and ripple envelope boundary. The timing parameter analysis module is used to perform timing division, continuity check and boundary optimization based on the ripple envelope boundary to obtain optimized timing parameters; The analysis and optimization module is used to perform current fluctuation analysis and switching frequency optimization based on the optimized timing parameters and the switching frequency, and to generate a current control sequence. The luminous efficacy verification module is used to perform boundary condition correction and luminous efficacy stability analysis based on the current control sequence and the ripple envelope boundary to obtain a stable luminous efficacy sequence. The distortion suppression module is used to perform lifetime prediction, phase compensation, and distortion suppression analysis based on the optical efficiency stabilization sequence, the denoised inductor signal, and the optimized timing parameters, and to obtain the distortion suppression result. The verification output module is used to perform current slope iterative optimization, response stability verification, and fluctuation verification based on the distortion suppression results, to obtain a fluctuation stability strategy and adjust the circuit.