Intelligent control method and system for LED illuminating lamp

By capturing the PWM signal in the LED lighting and performing cluster analysis, combining the average correlation factor and hysteresis influence, adjusting the proportional coefficient in the PID control algorithm, the problem of rapid change in brightness during the LED lighting dimming process is solved, and the smoothness and stability of brightness adjustment are achieved.

CN119653543AActive Publication Date: 2025-03-18SHANGHAI BIAOLANG LIGHTING ELECTRIC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510182536.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-03-18
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

During the dimming process of LED lighting, the selection of PWM frequency will affect the adjustment of duty cycle. If the change in duty cycle is too large, it will cause rapid changes in LED brightness, causing flickering, leading to health problems such as visual fatigue and headaches.

Method used

The PWM signal is captured by the microcontroller, the PWM frequency and duty cycle are calculated, the adjustment smoothness is calculated, and the average correlation factor and the hysteresis influence is combined, the adjustment feedback deviation is determined, the proportional coefficient in the PID control algorithm is adjusted, and the duty cycle of the PWM is accurately adjusted to smoothly adjust the brightness of the LED.

Benefits of technology

The smoothness and stability of LED lighting brightness adjustment is achieved, avoiding flicker caused by rapid changes in brightness, and improving user experience and lighting effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653543A_ABST
    Figure CN119653543A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent control of LED lamps, in particular to an intelligent control method and system of an LED illuminating lamp, and the method comprises the steps: capturing a PWM signal on a driving circuit of the LED illuminating lamp through a microcontroller with a timer input capturing function in the process of regulating and controlling the brightness of the LED illuminating lamp, calculating the PWM frequency and PWM duty ratio at each moment, and adjusting the brightness of the LED illuminating lamp according to the PWM frequency and PWM duty ratio; digital voltage values of the LED illuminating lamp at all moments are obtained; calculating adjustment smoothness, an average correlation factor, a lag influence degree and an adjustment feedback deviation value; obtaining an adjusted proportionality coefficient in the PID control algorithm; and the duty ratio of the PWM is adjusted, so that the brightness of the LED illuminating lamp is adjusted. The brightness adjustment of the LED illuminating lamp can be smoother, more accurate and more stable, the brightness of the LED illuminating lamp can be accurately controlled, and the overall illuminating effect and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent control of LED lamps, and in particular to an intelligent control method and system for LED lighting lamps. Background Art

[0002] In the intelligent control of LED lighting, LED lighting dimming technology is an important part, but the problem of reduced light efficiency may occur during the dimming process. Using PWM to dim LED lighting can achieve precise brightness control while maintaining the stability of color temperature and light efficiency, extending the service life of LEDs, and has high energy efficiency and good compatibility. When using PWM for dimming, the brightness of the LED is adjusted by changing the duty cycle of PWM, but the frequency selection of PWM will affect the adjustment of the duty cycle. If the duty cycle changes too much, it will cause the brightness of the LED to change rapidly, causing the brightness of the LED to fluctuate in a short period of time. The human eye will perceive flickering, leading to health problems such as visual fatigue and headaches. Summary of the invention

[0003] In order to solve the above technical problems, a method and system for intelligent control of LED lighting are provided to solve the existing problems.

[0004] The solution to the technical problem of the present application is to provide an LED lighting intelligent control method and system, including the following steps: In a first aspect, an embodiment of the present application provides an intelligent control method for an LED lighting lamp, the method comprising the following steps: In the process of adjusting the brightness of the LED lighting lamp, a microcontroller with a timer input capture function is used to capture the PWM signal on the driving circuit of the LED lighting lamp, calculate the PWM frequency and PWM duty cycle at each moment, perform analog-to-digital conversion on the voltage divider circuit where the LED lighting lamp is located, and obtain the digital voltage value of the LED lighting lamp at each moment; The PWM frequencies at all times are clustered, and the adjustment smoothness of the PWM signal in the LED lighting lamp is calculated by combining the average change of the PWM frequencies at all times in each cluster and the average change of the PWM duty cycle at the corresponding time, and the complexity of the change between the PWM frequencies at all times in each cluster and the PWM duty cycle at the corresponding time. Analyze the correlation between the digital voltage value at all times and the PWM frequency and the PWM duty cycle, and calculate the average correlation factor between the voltage and PWM; analyze the hysteresis relationship between the changes in the digital voltage value at all times, the PWM frequency, and the PWM duty cycle, and calculate the hysteresis influence between the voltage and PWM; determine the adjustment feedback deviation of the LED lighting lamp based on the average correlation factor, the hysteresis influence, and the adjustment smoothness; Based on the adjustment feedback deviation, the adjusted proportional coefficient in the PID control algorithm is obtained; combined with the deviation of the actual brightness of the LED lighting lamp, the duty cycle of the PWM is adjusted through the PID control algorithm, thereby adjusting the brightness of the LED lighting lamp.

[0005] Preferably, the calculation of the adjustment smoothness of the PWM signal in the LED lighting lamp includes: According to the average level of PWM frequency and the average level of PWM duty cycle at all times in each cluster, the relative change of each cluster is calculated; According to the difference in fractal dimension between PWM frequency and PWM duty cycle at all times in each cluster, the dimension difference of each cluster is calculated; The relative change is used as a weight to calculate the inverse of the weighted sum of the dimensional differences of all clusters, and the adjustment smoothness is positively correlated with the inverse.

[0006] Preferably, the calculating the relative change amount of each cluster includes: The ratio between the mean of the PWM frequencies at all times in each cluster and the maximum PWM frequency in the corresponding cluster is recorded as the first ratio; The ratio between the mean of the PWM duty cycles corresponding to all moments in each cluster and the maximum PWM duty cycle in the corresponding cluster is recorded as the second ratio; The ratio of the first ratio to the second ratio is calculated and recorded as a third ratio, and the difference between the value 1 and the third ratio is taken as the relative change.

[0007] Preferably, the dimension difference is the absolute value of the difference between the fractal dimension of the PWM frequency at all times and the fractal dimension of the PWM duty cycle at all times in each cluster.

[0008] Preferably, the calculation of the average correlation factor between the voltage and the PWM includes: Calculate the correlation between the digital voltage value at all times and the PWM frequency at all times and the PWM duty cycle at all times, which are recorded as the first correlation and the second correlation respectively; The average correlation factor is the average of the first correlation and the second correlation.

[0009] Preferably, the calculating of the hysteresis influence between the voltage and PWM comprises: A cross-correlation algorithm is used to obtain cross-correlation graphs of the digital voltage value at all times, the PWM frequency at all times, and the PWM duty cycle at all times, and the hysteresis numbers corresponding to the peak values ​​in the cross-correlation graph are recorded as the first hysteresis value and the second hysteresis value, respectively; Recording the difference between the first hysteresis value and the second hysteresis value as a hysteresis difference; Accordingly, the hysteresis number corresponding to the peak value in the cross-correlation diagram of the PWM frequency at all times and the PWM duty cycle at all times is obtained, and recorded as the third hysteresis value; The difference between the third hysteresis value and the hysteresis difference is used as the hysteresis influence degree between voltage and PWM.

[0010] Preferably, the calculation formula of the adjustment feedback deviation of the LED lighting lamp is: ,in, It is the adjustment feedback deviation of LED lighting. is the adjustment smoothness of the PWM signal in the LED lighting, is the hysteresis influence degree, is the average correlation factor, is an exponential function with a natural constant as base, is the normalization function.

[0011] Preferably, the adjusted proportional coefficient in the PID control algorithm is The calculation process is: ,in, is the adjustment feedback deviation, The preset initial scale factor.

[0012] Preferably, the step of adjusting the duty cycle of PWM by using a PID control algorithm comprises: In the process of adjusting the brightness of the LED lighting lamp, the brightness of the LED lighting lamp set by the user is used as the target brightness; The actual illuminance in the environment is obtained in real time through a photoresistor; the difference between the actual illuminance and the target brightness is recorded as a brightness deviation; Based on the adjusted proportional coefficient, the brightness deviation is used as an input of a PID controller to adjust the duty cycle of the PWM.

[0013] In a second aspect, an embodiment of the present application further provides an intelligent control system for LED lighting, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned intelligent control methods for LED lighting are implemented.

[0014] This application has at least the following beneficial effects: The present application clusters PWM frequencies so as to subsequently analyze the degree of balance of changes between PWM frequency and PWM duty cycle and the complexity of changes between PWM frequency and PWM duty cycle under a category where PWM frequency fluctuations are relatively close, and calculates the adjustment smoothness. The beneficial effect of this application is that it takes into account the balance of changes between PWM frequency and PWM duty cycle, reflects the coordination and consistency of the adjustment of PWM signal, and illustrates the smoothness of brightness adjustment of LED lighting lamps and reflects the stability of brightness changes. The application calculates the average correlation factor between voltage and PWM through digital voltage value, PWM frequency and PWM duty cycle. The beneficial effect of this application is that it takes into account the correlation between voltage value and PWM frequency, and between voltage value and PWM duty cycle, and illustrates that the less significant the effect of adjustment of PWM signal on the brightness of LED lighting lamps is, the more lagging the adjustment of PWM signal on voltage changes on LED lighting lamps is. The hysteresis effect between voltage and PWM is calculated, which has the beneficial effect of considering the influence of the changes in PWM frequency and duty cycle on the hysteresis degree of voltage change of LED lamp, indicating the delay phenomenon of PWM regulation signal in the transmission process, or the situation of uncoordinated response; then the adjustment feedback deviation of LED lighting lamp is obtained, which has the beneficial effect of the hysteresis of voltage feedback caused by PWM regulation, quantifying the hysteresis effect of filter circuit on voltage change, so as to accurately evaluate the feedback efficiency and deviation degree of PWM signal regulation; by adjusting the feedback deviation, the proportional coefficient of PID algorithm is adjusted, and the duty cycle of PWM is adjusted, which has the beneficial effect of avoiding the flickering phenomenon caused by the rapid change of brightness of LED lighting lamp, so as to make the brightness adjustment of LED lighting lamp smoother, more accurate and stable, which is conducive to accurately controlling the brightness of LED lighting lamp and improving the overall lighting effect and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The following is a further detailed description of an LED lighting intelligent control method of the present application in conjunction with the accompanying drawings.

[0016] Figure 1 A flowchart of a method for intelligently controlling an LED lighting lamp provided in an embodiment of the present application; Figure 2 A flowchart of the steps of a method for obtaining the adjustment smoothness of a PWM signal in an LED lighting lamp provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the following further describes in detail the LED lighting intelligent control method and system proposed in the present application in combination with the accompanying drawings and implementation examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0019] See also Figure 1 , which shows a flowchart of a method for intelligently controlling an LED lighting lamp provided by an embodiment of the present application, the method comprising the following steps: Step 1, in the process of adjusting the brightness of the LED lighting lamp, the PWM signal is captured on the driving circuit of the LED lighting lamp through a microcontroller with a timer input capture function, the PWM frequency and PWM duty cycle at each moment are calculated, and the voltage signal on the voltage divider circuit where the LED lighting lamp is located is converted into an analog-to-digital signal to obtain the digital voltage value of the LED lighting lamp at each moment.

[0020] PWM (Pulse Width Modulation) is a technology that adjusts the output power by controlling the width of the pulse signal. In LED lighting control systems, PWM is mainly used to adjust the brightness of LEDs while maintaining high efficiency and low energy consumption.

[0021] In the process of adjusting the brightness of the LED lighting lamp, a microcontroller with a timer input capture function is installed on the driving circuit that controls the LED lighting lamp, and the input capture mode of the timer is configured. By capturing the rising and falling edge signals of the PWM signal, the PWM frequency and PWM duty cycle at each moment are calculated; In this embodiment, a microcontroller STM32 is installed in the LED driving circuit to capture the PWM square wave signal to obtain the frequency and duty cycle of the PWM. It should be noted that obtaining the frequency and duty cycle of the PWM by configuring the input capture mode of the timer is a well-known technology and will not be repeated here.

[0022] Connect the photoresistor to the voltage divider circuit of the LED lighting lamp, and measure the voltage across the photoresistor to reflect the change of light intensity. The resistance of the photoresistor will decrease as the light intensity increases, so the voltage is inversely proportional to the light intensity. The collected voltage signal is input into the ADC module for analog-to-digital conversion to obtain a digital voltage value. The acquisition frequency is set to 1kHz, and the PWM frequency, PWM duty cycle, and digital voltage value at each moment are obtained. All the acquired data are normalized to eliminate the impact of the dimension.

[0023] In this embodiment, the maximum and minimum value normalization method is used for normalization processing, wherein the maximum and minimum value normalization method is a well-known technology and will not be described in detail here.

[0024] At this point, the PWM frequency and PWM duty cycle at each moment, as well as the digital voltage value of the LED lighting lamp at each moment, are obtained.

[0025] Step 2: Cluster the PWM frequencies at all times, calculate the adjustment smoothness of the PWM signal in the LED lighting lamp through the average change of the PWM frequency at all times in each cluster and the average change of the PWM duty cycle at the corresponding time, combined with the complexity of the change between the PWM frequency at all times in each cluster and the PWM duty cycle at the corresponding time.

[0026] When the PWM frequency is high enough, for example, when the PWM frequency is higher than 100Hz, the human eye cannot distinguish the flicker of light, but only feels the change in average brightness. The higher the frequency, the smoother the dimming and the less flickering it can avoid. The PWM duty cycle is the ratio of the high level time to the interval time of the entire pulse cycle within a pulse cycle. The larger the duty cycle, the longer the LED stays on within the pulse cycle, thereby producing brighter light output. For example, a 90% duty cycle means that the LED is turned on during 90% of the pulse cycle and turned off only during 10% of the pulse cycle, thereby producing close to full brightness. That is, choosing the right PWM frequency can avoid flickering, and adjusting the PWM duty cycle can control the brightness.

[0027] Secondly, the choice of PWM frequency will affect the adjustment of duty cycle. When the PWM frequency is higher, the time of each pulse cycle is shorter, which means that more pulse cycles can occur in the same time. Therefore, at high frequency, a small change in duty cycle, such as a duty cycle from 90% to 91%, will result in a finer change in LED brightness, thus achieving smoother brightness adjustment.

[0028] Based on the above analysis, when the brightness adjustment of the LED lighting lamp is smoother, the PWM has a higher frequency and a higher duty cycle. Therefore, the change of the PWM duty cycle of the LED lighting lamp under the same PWM frequency is analyzed, and the adjustment smoothness is calculated to reflect the adjustment of the duty cycle by the change of the frequency. The step flow chart of the method for obtaining the adjustment smoothness of the PWM signal in the LED lighting lamp provided in the embodiment of the present application is as follows: Figure 2 As shown, specifically including: Cluster the PWM frequencies at all times to obtain multiple clusters; In this embodiment, the DBSCAN density clustering algorithm is used for clustering, wherein the minimum sample size is set to 5 and the neighborhood radius is set to 1 in the DBSCAN density clustering algorithm. As other implementations, the implementer can set them according to the actual situation. The DBSCAN density clustering algorithm is a well-known technology and will not be described here. As other implementations, the implementer can adopt other methods of the prior art, such as hierarchical clustering algorithms, etc. This embodiment does not impose any special restrictions on this.

[0029] The ratio between the mean of the PWM frequencies at all times in each cluster and the maximum PWM frequency in the corresponding cluster is recorded as the first ratio; The ratio between the average value of the PWM duty cycle at the time corresponding to all the PWM frequencies in each cluster and the maximum PWM duty cycle in the corresponding cluster is recorded as the second ratio; Calculate the ratio of the first ratio to the second ratio, record it as a third ratio, and use the difference between the value 1 and the third ratio as the relative change of each cluster; In this embodiment, the absolute value of the difference between the value 1 and the third ratio is used as the relative change amount of each cluster.

[0030] The absolute value of the difference between the fractal dimension of the PWM frequency at all times in each cluster and the fractal dimension of the PWM duty cycle at all times is taken as the dimension difference of each cluster; In this embodiment, the box counting method is used to calculate the fractal dimension, wherein the box counting method is a well-known technology and will not be described in detail here. As other implementation methods, the implementer can adopt other methods of the prior art, such as the Higuchi fractal dimension method, the Hausdorff algorithm, etc. This embodiment does not impose any special restrictions on this.

[0031] The relative change is used as a weight to calculate the inverse of the weighted sum of the dimensional differences of all clusters, and the adjustment smoothness is positively correlated with the inverse.

[0032] It should be noted that a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. This is determined by actual application and this application does not impose any special restrictions.

[0033] In this embodiment, the calculation method of the adjustment smoothness of the PWM signal in the LED lighting lamp is: in, is the adjustment smoothness of the PWM signal in the LED lighting, For the The dimensionality difference of the clusters is For the The relative change of clusters, is the number of all clusters, is an exponential function with a natural constant as its base.

[0034] It should be noted that the dimension difference reflects the coordination and consistency of the changes in the PWM signal during the frequency and duty cycle adjustment process. The smaller the dimension difference, the better the The smaller the difference in fractal dimension of PWM frequency and duty cycle at all times in a cluster, that is, the closer the complexity of the two in the change process is, the more coordinated the adjustment of PWM signal is, and the more conducive to achieving smoother brightness adjustment; secondly, the smaller the relative change is, the closer the relative change is to 1, then Within each cluster, the variation degree of PWM frequency and duty cycle is relatively balanced, which is conducive to achieving smoother brightness adjustment. The greater the adjustment smoothness, the smoother the adjustment of the PWM signal, the more delicate and stable the brightness change of the LED lighting, and the less flickering.

[0035] At this point, the adjustment smoothness of the PWM signal in the LED lighting lamp is obtained.

[0036] Step 3, analyzing the correlation between the digital voltage value at all times and the PWM frequency and the PWM duty cycle, and calculating the average correlation factor between the voltage and PWM; analyzing the hysteresis relationship between the changes in the digital voltage value at all times, the PWM frequency, and the PWM duty cycle, and calculating the hysteresis influence between the voltage and PWM; based on the average correlation factor, the hysteresis influence, and the adjustment smoothness, determining the adjustment feedback deviation of the LED lighting lamp.

[0037] Furthermore, in the lighting control link of LED lighting lamps, since the LED lighting lamps themselves have certain nonlinear characteristics, the relationship between their brightness and voltage is not completely linear. Due to other control links and feedback mechanisms, changes in the frequency and duty cycle of PWM may not cause changes in the voltage on the LED lighting lamps. For example, in the driving circuit of LED lighting lamps, constant current drivers are usually equipped. This driver can ensure that the current flowing through the LED remains constant. Even if the frequency and duty cycle of PWM change, the constant current driver will automatically adjust its output voltage to maintain a constant current, thereby keeping the brightness of the LED lighting lamp stable.

[0038] Secondly, since the PWM signal needs to pass through a filter circuit, such as a capacitor for smoothing, the filter circuit has a certain response time to the rapidly changing PWM signal, causing the voltage change to lag behind the change in the PWM frequency and duty cycle.

[0039] Therefore, in order to analyze whether the frequency and duty cycle of PWM can effectively cause the brightness of LED lighting to change, the adjustment feedback deviation is calculated by analyzing the correlation between the digital voltage value and the frequency and duty cycle of PWM, as well as the hysteresis change of the voltage, which is specifically: Calculate the correlation between the digital voltage value at all times and the PWM frequency at all times, which is recorded as the first correlation; Calculate the correlation between the digital voltage value at all times and the duty cycle of the PWM at all times, which is recorded as the second correlation; Calculating an average of the first correlation and the second correlation as an average correlation factor between voltage and PWM; In this embodiment, the degree of correlation is calculated by calculating the Pearson correlation coefficient between the digital voltage value at all times and the frequency of PWM at all times; the Pearson correlation coefficient between the digital voltage value at all times and the duty cycle of PWM at all times is calculated, wherein the calculation of the Pearson correlation coefficient is a well-known technology and will not be repeated here. As other implementation methods, the implementer may adopt other methods of the prior art, such as the Spearman correlation coefficient, etc., and this embodiment does not impose any special restrictions on this.

[0040] The digital voltage values ​​at all times and the PWM frequencies at all times are used as inputs of the cross-correlation algorithm, and the hysteresis number corresponding to the peak value in the cross-correlation graph is obtained, which is recorded as the first hysteresis value; The digital voltage values ​​at all times and the duty cycle of the PWM at all times are used as inputs of the cross-correlation algorithm, and the lag number corresponding to the peak value in the cross-correlation graph is obtained, which is recorded as the second lag value; Recording the difference between the first hysteresis value and the second hysteresis value as a hysteresis difference; In this embodiment, the absolute value of the difference between the first hysteresis value and the second hysteresis value is recorded as the hysteresis difference.

[0041] It should be noted that the cross-correlation algorithm is a well-known technology and will not be described in detail here.

[0042] The PWM frequency at all times and the PWM duty cycle at all times are used as inputs of the cross-correlation algorithm, and the lag number corresponding to the peak value in the cross-correlation graph is obtained, which is recorded as the third lag value; Using the difference between the third hysteresis value and the hysteresis difference as the hysteresis influence degree between voltage and PWM; In this embodiment, the absolute value of the difference between the third hysteresis value and the hysteresis difference is used as the hysteresis influence degree between voltage and PWM.

[0043] Based on the adjustment smoothness, the average correlation factor and the hysteresis influence, the adjustment feedback deviation of the LED lighting lamp is calculated, and the specific calculation formula is: in, It is the adjustment feedback deviation of LED lighting. is the adjustment smoothness of the PWM signal in the LED lighting, is the hysteresis effect between voltage and PWM, is the average correlation factor between voltage and PWM, is an exponential function with a natural constant as base, is a normalization function. In this embodiment, a sigmoid function is used for normalization. The sigmoid function is a well-known technology and will not be described in detail here. As other implementation methods, the implementer can adopt other methods of the prior art, such as the tanh function, etc. This embodiment does not impose any special restrictions on this.

[0044] It should be noted that the greater the adjustment smoothness, the smoother the adjustment of the PWM signal, the more delicate and stable the brightness change of the LED lighting lamp should be, and the more obvious the feedback of the LED lamp voltage change should be, which is used as the smoothing weight of PWM to amplify the subsequent calculation; the hysteresis influence reflects the influence of the change of the frequency and duty cycle of PWM on the hysteresis degree of the voltage change of the LED lamp. The greater the hysteresis influence, the greater the hysteresis of the influence of the frequency and duty cycle change on the voltage change of the LED lamp, indicating that the greater the delay or the response incoordination of the adjustment signal in the transmission process, the greater the impact on the accuracy and stability of the adjustment feedback efficiency; the smaller the average correlation factor, the weaker the correlation between the frequency and duty cycle change of PWM and the voltage change on the LED lighting lamp, and the less significant the influence of the adjustment of the PWM signal on the brightness of the LED lighting lamp; secondly, in the process of adjusting the brightness of the LED lighting, when the frequency and duty cycle of the PWM signal change, theoretically, it should cause a corresponding change in the brightness of the LED lamp, and the adjustment feedback deviation reflects the problem of poor voltage feedback or transmission hysteresis in the process of adjusting the PWM signal.

[0045] At this point, the adjustment feedback deviation of the LED lighting lamp is obtained.

[0046] Step 4, based on the adjustment feedback deviation, obtain the adjusted proportional coefficient in the PID control algorithm; combined with the deviation of the actual brightness of the LED lighting lamp, adjust the duty cycle of the PWM through the PID control algorithm to adjust the brightness of the LED lighting lamp.

[0047] In the process of adjusting the brightness of LED lighting, when PWM is used for brightness control, the PID (Proportion Integration Differentiation) control algorithm is used to control the PWM duty cycle. The PID algorithm controls the PWM duty cycle based on the deviation between the target brightness and the actual brightness through the proportional coefficient. , integral coefficient and the differential coefficient , dynamically adjust the PWM duty cycle to accurately control the brightness of the LED lighting.

[0048] Secondly, based on the adjustment feedback deviation, the proportional coefficient of the PID control algorithm is adjusted, specifically: in, is the adjusted proportional coefficient in the PID control algorithm, To adjust the feedback deviation, To preset the initial scale factor.

[0049] In this embodiment, the preset initial proportional coefficient is 10. As other implementations, the implementer can set it according to the actual situation. Secondly, the integral coefficient in the PID control algorithm is 1, and the differential coefficient is 0.1. As other implementations, the implementer can set it according to the actual situation.

[0050] In the process of adjusting the brightness of the LED lighting lamp, the brightness of the LED lighting lamp set by the user is used as the target brightness; The actual light intensity in the environment is obtained in real time through photoresistors; It should be noted that the method of calculating illuminance by using a photoresistor is a well-known technology and will not be described in detail here.

[0051] The difference between the actual illuminance and the target brightness is recorded as brightness deviation; In this embodiment, the absolute value of the difference between the actual illuminance and the target brightness is recorded as brightness deviation.

[0052] Based on the adjusted proportional coefficient, the brightness deviation is used as an input of a PID controller to adjust the duty cycle of the PWM, thereby adjusting the brightness of the LED lighting lamp.

[0053] It should be noted that by adjusting the proportional coefficient of the PID control algorithm through the adjustment feedback deviation, the adjustment of the PWM duty cycle can be made more accurate and stable. When the adjustment feedback deviation is large, it means that there is a large voltage feedback problem or transmission lag in the PWM signal adjustment process. At this time, increasing the proportional coefficient It can enhance the response speed and adjustment strength of the lighting control system, enable the LED lighting to reach the target brightness faster, and reduce the error and fluctuation of brightness adjustment; when the adjustment feedback deviation is small, it means that the PWM signal adjustment is relatively ideal. At this time, the proportional coefficient before and after the adjustment does not change much, which can maintain the stability and reliability of the lighting control system, avoid system oscillation or overshoot caused by excessive adjustment, and ensure the smoothness and comfort of the brightness adjustment of the LED lighting. Secondly, by adjusting the proportional coefficient, it can adapt to changes in different environments and working conditions, improve the adaptability and robustness of the LED lighting control system, and optimize the overall lighting effect and user experience.

[0054] Based on the same inventive concept as the above method, an embodiment of the present application also provides an intelligent control system for LED lighting, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned intelligent control methods for LED lighting are implemented.

[0055] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0056] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0057] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the present application. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the content of the technical solution of the present application, shall fall within the protection scope of the technical solution of the present application.

Claims

1. An intelligent control method for LED lighting, characterized in that: The method comprises the following steps: In the process of adjusting the brightness of the LED lighting lamp, a microcontroller with a timer input capture function is used to capture the PWM signal on the driving circuit of the LED lighting lamp, calculate the PWM frequency and PWM duty cycle at each moment, perform analog-to-digital conversion on the voltage divider circuit where the LED lighting lamp is located, and obtain the digital voltage value of the LED lighting lamp at each moment; The PWM frequencies at all times are clustered, and the adjustment smoothness of the PWM signal in the LED lighting lamp is calculated by combining the average change of the PWM frequencies at all times in each cluster and the average change of the PWM duty cycle at the corresponding time, and the complexity of the change between the PWM frequencies at all times in each cluster and the PWM duty cycle at the corresponding time. Analyze the correlation between the digital voltage value at all times and the PWM frequency and the PWM duty cycle, and calculate the average correlation factor between the voltage and PWM; analyze the hysteresis relationship between the changes in the digital voltage value at all times, the PWM frequency, and the PWM duty cycle, and calculate the hysteresis influence between the voltage and PWM; determine the adjustment feedback deviation of the LED lighting lamp based on the average correlation factor, the hysteresis influence, and the adjustment smoothness; Based on the adjustment feedback deviation, the adjusted proportional coefficient in the PID control algorithm is obtained; combined with the deviation of the actual brightness of the LED lighting lamp, the duty cycle of the PWM is adjusted through the PID control algorithm, thereby adjusting the brightness of the LED lighting lamp.

2. The LED lighting intelligent control method according to claim 1, characterized in that: The step of calculating the adjustment smoothness of the PWM signal in the LED lighting lamp comprises: According to the average level of PWM frequency and the average level of PWM duty cycle at all times in each cluster, the relative change of each cluster is calculated; According to the difference in fractal dimension between PWM frequency and PWM duty cycle at all times in each cluster, the dimension difference of each cluster is calculated; The relative change is used as a weight to calculate the inverse of the weighted sum of the dimensional differences of all clusters, and the adjustment smoothness is positively correlated with the inverse.

3. The LED lighting intelligent control method according to claim 2, characterized in that: The calculating of the relative change of each cluster includes: The ratio between the mean of the PWM frequencies at all times in each cluster and the maximum PWM frequency in the corresponding cluster is recorded as the first ratio; The ratio between the mean of the PWM duty cycles corresponding to all moments in each cluster and the maximum PWM duty cycle in the corresponding cluster is recorded as the second ratio; The ratio of the first ratio to the second ratio is calculated and recorded as a third ratio, and the difference between the value 1 and the third ratio is taken as the relative change.

4. The LED lighting intelligent control method according to claim 2, characterized in that: The dimension difference is the absolute value of the difference between the fractal dimension of the PWM frequency at all times and the fractal dimension of the PWM duty cycle at all times in each cluster.

5. The LED lighting intelligent control method according to claim 1, characterized in that: The calculating average correlation factor between voltage and PWM includes: Calculate the correlation between the digital voltage value at all times and the PWM frequency at all times and the PWM duty cycle at all times, which are recorded as the first correlation and the second correlation respectively; The average correlation factor is the average of the first correlation and the second correlation.

6. The LED lighting intelligent control method according to claim 1, characterized in that: The calculating the hysteresis influence between the voltage and the PWM comprises: A cross-correlation algorithm is used to obtain cross-correlation diagrams of the digital voltage value at all times, the PWM frequency at all times, and the PWM duty cycle at all times, and the lag numbers corresponding to the peak values ​​in the cross-correlation diagram are recorded as the first lag value and the second lag value, respectively; Recording the difference between the first hysteresis value and the second hysteresis value as a hysteresis difference; Accordingly, the hysteresis number corresponding to the peak value in the cross-correlation diagram of the PWM frequency at all times and the PWM duty cycle at all times is obtained, and recorded as the third hysteresis value; The difference between the third hysteresis value and the hysteresis difference is used as the hysteresis influence degree between voltage and PWM.

7. The LED lighting intelligent control method according to claim 1, characterized in that: The calculation formula of the adjustment feedback deviation of the LED lighting lamp is: ,in, It is the adjustment feedback deviation of LED lighting. is the adjustment smoothness of the PWM signal in the LED lighting, is the hysteresis influence degree, is the average correlation factor, is an exponential function with a natural constant as base, is the normalization function.

8. The LED lighting intelligent control method according to claim 1, characterized in that: Adjusted proportional coefficient in PID control algorithm The calculation process is: ,in, is the adjustment feedback deviation, The preset initial scale factor.

9. The LED lighting intelligent control method according to claim 1, characterized in that: The step of adjusting the duty cycle of PWM by using a PID control algorithm includes: In the process of adjusting the brightness of the LED lighting lamp, the brightness of the LED lighting lamp set by the user is used as the target brightness; The actual illuminance in the environment is obtained in real time through a photoresistor; the difference between the actual illuminance and the target brightness is recorded as a brightness deviation; Based on the adjusted proportional coefficient, the brightness deviation is used as an input of a PID controller to adjust the duty cycle of the PWM.

10. An intelligent control system for LED lighting, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the LED lighting intelligent control method as described in any one of claims 1-9 are implemented.

Citation Information

Patent Citations

  • Image fractal feature based objective image quality evaluation method

    CN104794716A

  • Self-adaptive adjusting method for LED illuminating lamp of underwater robot

    CN110933814A

  • Power supply system capable of adaptively switching working modes and dynamically adjusting voltage

    CN117767744A