CN111511077B - Dimming curve generation method, dimming curve generation device and LED lighting device - Google Patents

Dimming curve generation method, dimming curve generation device and LED lighting device Download PDF

Info

Publication number
CN111511077B
CN111511077B CN201910098404.1A CN201910098404A CN111511077B CN 111511077 B CN111511077 B CN 111511077B CN 201910098404 A CN201910098404 A CN 201910098404A CN 111511077 B CN111511077 B CN 111511077B
Authority
CN
China
Prior art keywords
pwm
time
dimming
curve
dimming curve
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910098404.1A
Other languages
Chinese (zh)
Other versions
CN111511077A (en
Inventor
陈永虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to CN201910098404.1A priority Critical patent/CN111511077B/en
Publication of CN111511077A publication Critical patent/CN111511077A/en
Application granted granted Critical
Publication of CN111511077B publication Critical patent/CN111511077B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The invention relates to a dimming curve generation method, a dimming curve generation device and an LED lighting device. The dimming curve generation method is used for dimming an LED load in an LED lighting device, and comprises the following steps: determining a PWM threshold value x%, dividing dimming curve segments between the time from the starting point time T0 to the time tm1 from the first operation to the PWM threshold value x%, between the time tm1 from the first operation to the PWM threshold value x% and the time tm2 from the second operation to the PWM threshold value x%, and between the time tm2 from the second operation to the PWM threshold value x% and a complete period T into a plurality of segments, and generating a fitting curve, thereby obtaining the dimming curve of the current segment. According to the invention, a large number of PWM-current relation points are not required to be acquired, the data space and the MCU cost can be saved, a smooth dimming curve can be generated simply and conveniently, and the universal effect is good.

Description

Dimming curve generation method, dimming curve generation device and LED lighting device
Technical Field
The present invention relates to an illumination device, and more particularly, to a dimming curve generation method and a dimming curve generation device suitable for an irregular dimming curve, and an LED illumination device.
Background
As dimming applications increase, so too do various irregular dimming curves. In order to realize the control of the irregular dimming curve, a table look-up method or a curve fitting method is generally adopted to generate the dimming curve.
Fig. 1 is a schematic diagram of a table lookup method used to generate an irregular PWM dimming curve comprising n cycles (7 shown in the figure), wherein the cycle time length and amplitude of each cycle are different as shown in the figure.
If a table look-up method is adopted, a large amount of PWM-current corresponding relation data needs to be collected to completely simulate curve trend in the traditional method, if N data need to be collected in each period, N periods are collected, namely N x N data are needed to make a data table, for example, data of five points A1-E1 are collected in the first period in the graph 1. However, if a better dimming effect is expected, a smooth brightness feeling can be obtained through the table look-up method, the collected point data is also increased correspondingly, the requirement on the storage space of the MCU is increased, and the efficiency and the cost are high.
If the curve fitting mode is adopted, the CPU has less calculation time. The specific method is to decompose the complete dimming curve into different periods, capture some main characteristic points in each period, such as three points of a2(T1, PWM1), B2(T2, PWM2), and C2(T3, PWM3) in fig. 2, and then generate a simple linear equation to calculate and output, instead of collecting a large amount of data.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a dimming curve generation method, a dimming curve generation unit, and an LED lighting device, which can better implement smooth and continuous dimming in a certain brightness region while reducing the occupation of MCU data space when performing optimization processing on an irregular dimming curve, so as to solve the above-mentioned defects in the prior art.
The invention provides a dimming curve generation method, which is used for dimming an LED load in an LED lighting device and comprises the following steps: s1: determining a PWM dimming upper limit MAX, a PWM first lower limit MIN, a PWM second lower limit MIN, a PWM threshold value x%, a single operation period T, time tm1 from the first operation to the PWM threshold value x%, time tn from the operation to the PWM dimming upper limit MAX, time tm2 from the second operation to the PWM threshold value x%, and starting point time T0 of the current period; s2: collecting time values of M1+ M2+ N +1 time points and corresponding PWM value data, and storing the time values and the corresponding PWM value data as Tk、PWMkK is an integer, and k is more than or equal to 0 and less than or equal to M1+ M2+ N, wherein T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NIncluding time point T by acquisition0、TM1The number of dimming segments of the dimming curve from the starting point time T0 to the time tm1 of the first operation to the PWM threshold x% is divided into M1 intervals, the number of dimming segments of the dimming curve from the time tm1 of the first operation to the PWM threshold x% to the time tm2 of the second operation to the PWM threshold x% is divided into N intervals by collecting the time values of N-1 time points and the corresponding PWM value data, and the dimming segment number of the dimming curve including the time TM1+M2、TM1+M2+NThe time values of M2+1 time points and the corresponding PWM value data will be run from the second time to the PWM threshold valueThe dimming segment number of the dimming curve between the time tm2 of x% and the time of one complete period T is divided into M2 intervals, wherein M1, M2 and N are positive integers; s3: judging the time point T is located at the interval position in M1+ M2+ N intervals, and acquiring the coordinates of two end points of the interval, wherein the coordinates of the two end points are respectively (T)k、PWMk)、(Tk+1、PWMk+1) (ii) a S4: and calculating the PWM value PWM corresponding to the time point t, and generating a fitting curve, thereby obtaining the dimming curve of the current interval.
Further, the above steps S1-S4 are repeated until the dimming curve of the cycle is generated.
Further, the fitted curve is expressed in the form of a curve equation.
Further, the curve equation is generated by a linear interpolation method.
Further, the curve equation is PWM ═ PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Wherein T is more than or equal to 0 and less than or equal to T.
Further, the relationship among M1, N and M2 satisfies that M2 is not less than M1> N.
Further, setting a PWM threshold value x% based on the selected drive IC; or setting the PWM threshold value x% based on a fixed threshold value of a control unit in the LED lighting device; alternatively, the PWM threshold x% is set according to data input by the user through the user interface.
Further, the PWM threshold value x% is a predetermined proportion of the PWM dimming upper limit MAX, and may be, for example, 30% or 60% of the PWM dimming upper limit MAX.
Further, in step S3, the time points T and the previously acquired M1+ M2+ N +1 time points T are comparedkTo determine that the time point t is located at a section position among the M1+ M2+ N sections.
Further, the PWM dimming upper limit MAX, the PWM first lower limit MIN, the PWM second lower limit MIN, the PWM threshold x%, T, tm1, tn, tm2, t0, M1, M2, N, Tk、PWMkCan be stored in the control unit of the LED lighting device or can be input through the user interface and then sent to the control unitAnd updating the unit.
Further, the control unit is a main control MCU.
Another aspect of the present invention provides a dimming curve generation apparatus for dimming an LED load in an LED lighting apparatus, the apparatus comprising: the data parameter setting unit is used for determining a PWM dimming upper limit MAX, a PWM first lower limit MIN, a PWM second lower limit MIN, a PWM threshold value x%, a single operation period T, time tm1 from the first operation to the PWM threshold value x%, time tn from the operation to the PWM dimming upper limit MAX, time tm2 from the second operation to the PWM threshold value x%, and starting point time T0 of the current period; collecting time values of M1+ M2+ N +1 time points and corresponding PWM value data and storing the time values and the corresponding PWM value data as Tk、PWMkThe data acquisition unit of (1), wherein k is an integer, and k is more than or equal to 0 and less than or equal to M1+ M2+ N, T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NT, the unit contains the time point T by the acquisition0、TM1The dimming segment number of the dimming curve between the time tm1 from the starting point T0 to the time x% of the PWM threshold value is divided into M1 intervals, the dimming segment number of the dimming curve between the time tm1 from the first time operation to the time x% of the PWM threshold value to the time tm2 from the second time operation to the time x% of the PWM threshold value is divided into N intervals by collecting the time values of N-1 time points and the corresponding PWM value data, and the dimming segment number of the dimming curve between the time tm1 from the first time operation to the time x% of the PWM threshold value is collected to the time tm2 from the second time operation to the time x% of the PWM threshold valueM1+M2、TM1+M2+NThe time values of the M2+1 time points and the corresponding PWM value data divide the number of dimming segments of the dimming curve from the time tm2 of the second operation to the PWM threshold x% to the time of one complete period T into M2 intervals, wherein M1, M2, N are positive integers; a judging and point-taking unit for judging the position of the time point T in the M1+ M2+ N intervals and obtaining the coordinates of two end points of the interval, wherein the coordinates of the two end points are respectively (T)k、PWMk)、(Tk+1、PWMk+1) (ii) a And calculating the PWM value PWM corresponding to the time point t, and generating a fitting curve, thereby obtaining a dimming curve generation unit of the dimming curve in the current period.
Further, the device operates for each cycle until a dimming curve is generated for all cycles.
Further, the fitted curve is expressed in the form of a curve equation.
Further, the curve equation is generated by a linear interpolation method.
Further, the curve equation is PWM ═ PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Wherein T is more than or equal to 0 and less than or equal to T.
Further, the relationship among M1, N and M2 satisfies that M2 is not less than M1> N.
Further, setting a PWM threshold value x% based on the selected drive IC; or setting the PWM threshold value x% based on a fixed threshold value of a control unit in the LED lighting device; alternatively, the PWM threshold x% is set according to data input by the user through the user interface.
Further, the PWM threshold value x% is a predetermined proportion of the PWM dimming upper limit MAX, and may be, for example, 30% or 60% of the PWM dimming upper limit MAX.
Further, the time point t is judged to be located at the interval position in the M1+ M2+ N intervals by comparing the time point t with the previously acquired M1+ M2+ N +1 time points Tk.
Further, the PWM dimming upper limit MAX, the PWM first lower limit MIN, the PWM second lower limit MIN, the PWM threshold x%, T, tm1, tn, tm2, t0, M1, M2, N, Tk、PWMkThe LED illumination device can be stored in a control unit of the LED illumination device, and can also be input through a user interface and then sent to the control unit for updating.
Further, the control unit is a main control MCU.
In another aspect, the present invention provides an LED lighting device, which executes the foregoing dimming curve generation method to generate a dimming curve.
According to the technical scheme, the irregular PWM curve generation mode does not need to acquire a large amount of PWM-current corresponding relation data, saves a large amount of data space, saves MCU cost, can simply and conveniently generate a smooth dimming curve, and has a good general effect.
Drawings
FIG. 1 is a schematic diagram of generating an irregular PWM dimming curve using a table lookup;
FIG. 2 is a schematic diagram of generating an irregular PWM dimming curve using curve fitting;
fig. 3 is a schematic diagram of generating an irregular PWM dimming curve according to an embodiment of the present invention;
FIG. 4 is a detailed schematic diagram of a UI interface according to embodiments of the invention;
fig. 5a is a schematic diagram of a PWM dimming curve during a first period generated according to the data in the table of fig. 4;
FIGS. 5b-5d are enlarged schematic diagrams of segments of the PWM dimming curve of FIG. 5 a;
FIG. 6 is a schematic diagram of a PWM dimming curve for one of the M1+ M2+ N intervals of FIGS. 5a-5 d;
FIG. 7 is a flow chart of a method of forming a dimming curve according to an embodiment of the present invention;
fig. 8 is a demonstration mode of the dimming portion for controlling the gradual dimming of the LED during one cycle.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention is not limited to only these embodiments. The invention is intended to cover alternatives, modifications, equivalents, and alternatives that may be included within the spirit and scope of the invention. In the following description of the preferred embodiments of the present invention, specific details are set forth in order to provide a thorough understanding of the present invention, and it will be apparent to those skilled in the art that the present invention may be practiced without these specific details.
The invention is used for the LED illumination device comprising a control unit and at least one LED load module, wherein the control unit generates a PWM signal to control the LED load module to emit light.
In a preferred embodiment of the invention, the control unit is an MCU.
Fig. 3 is a schematic diagram of an irregular PWM dimming curve generated according to one embodiment of the present invention. In the invention, the irregular dimming curve is decomposed into a plurality of independent units for analysis and curve generation. As shown in fig. 3, the irregular dimming curve includes a plurality of irregular dimming cycles, and a first cycle (hereinafter, also referred to as a first cycle) is described as an example.
It is first determined that several important data parameters involved in embodiments of the present invention are defined as follows,
PWM dimming upper limit point MAX: i.e., the PWM value at which the PWM output reaches a peak value in the period.
PWM first lower limit MIN: i.e., the PWM value at which the PWM output is the first lowest value in the period.
PWM second lower limit MIN: that is, the PWM output in the period passes through the PWM dimming upper limit MAX and then falls back to the PWM value at the second lowest value in the period.
PWM threshold (x%): setting a certain PWM output value as a PWM threshold value.
Cycle time T: is the time duration corresponding to the period.
Time t 0: the starting point when the first lower limit MIN corresponds to PWM for PWM output is the starting point of each period in which t0 is 0 ms.
Time tm1 is the time that the PWM output first runs from the starting point t0 to the PWM threshold (x%).
Time tn: for the time the PWM output runs from the starting point t0 to the PWM dimming upper limit point MAX via the PWM threshold (x%).
Time tm 2: for the time the PWM output is run from the starting point t0 through the PWM dimming upper limit MAX for the second time to the PWM threshold.
Based on the above nine data parameters, five points, which are a (T0, PWM first lower limit MIN), B (tm1, PWM threshold x%), C (tn, PWM dimming upper limit MAX), D (tm2, PWM threshold x%), and E (period T, PWM second lower limit MIN), can be determined on the dimming curve of the first cycle, and based on the five points, the dimming curve can be divided into three sections, a curve AB, a curve BCD, and a curve DE, as shown in fig. 3.
Regarding the setting of the value of x% of the threshold point, the following two ways may be used:
first, only one PWM threshold (x%) is preset for all cycles, so that after a number of cycles. When the PWM dimming upper limit MAX of the period is smaller than the set PWM threshold (x%), the time tm1 or tm2 to reach the PWM threshold (x%) does not exist in the period, and at this time tm1 is equal to tm2 which is equal to tn, the divided sections are reduced, and the data amount is also reduced accordingly.
In the second way, a certain PWM output value is set as the PWM threshold (x%) of the current period, that is, the PWM threshold (x%) corresponding to the period is set for each period, for example, 90% of the MAX value of the PWM output in the period is set as the PWM threshold (x%) of the period, so that even at low brightness, the dimming curve tends to be smooth at the arc top, and the dimming is more gentle and softer. In the first aspect, the PWM threshold value (x%) may be set to a PWM output absolute value, for example, to a PWM value of 30% or a PWM value of 60%, or the PWM threshold value (x%) may be set to a certain ratio, for example, 30% or 60%, of the PWM dimming upper limit MAX value of the first cycle with reference to the PWM dimming upper limit MAX value of the first cycle, and the setting is not particularly limited, and a person skilled in the art can appropriately select the setting.
Of course, the setting of the value of x% of the threshold point in the present invention is not limited to the above two modes, and those skilled in the art can appropriately select the value of x% of the threshold point according to the actual lighting scene needs.
In addition, the selection method and definition of the value of x% of the threshold point depends on the specific selection of the driving IC in the LED lighting device. The selection of different driver ICs is reasonably selected through actual debugging and theoretical data, is not limited to a fixed threshold value x% of the MCU, can update the threshold value x% through the UI, and also comprises the acquisition of x% through other detection means.
In order to make the whole generated dimming curve relatively smooth and consistent in precision, the collected data amount may be different in each of the curves AB, BCD and DE, and more data are usually collected in a low-brightness or dimming-sensitive region (dimming-sensitive region) where a user is sensitive to dimming response, so as to ensure that dimming in the low-brightness or dimming-sensitive region is smoother.
In this regard, as shown in fig. 3, the segment AB of the curve is a segment M1, the number of dimming segments of the curve AB (i.e., the dimming curve portion of the segment T0-tm 1) is a segment M1, the dimming segments of the curve BCD (i.e., the segment where the PWM output returns to the PWM threshold x% after passing through the PWM dimming upper limit MAX from the PWM threshold x%, i.e., the dimming curve portion of the segment tm1-tm 2) are a segment N, and the segment DE of the curve (i.e., the segment where the PWM output falls from the PWM threshold x% to the PWM second lower limit MAX, i.e., the dimming curve portion of the segment tm MIN 2-T) is a segment M2, and the dimming curve within one cycle is divided into segments M1+ N + M2, where M2M 1> N, and M1, M2, N are positive integers. The points can be selected in a mode of evenly dividing curve segments or in a mode of not evenly dividing curve segments, and in practical application, the points can be distinguished again according to the rising trend and the falling trend of the PWM. For example, for a sleep-aid LED lighting device product, the downward trend in the dimming stage is to select more points to achieve finer dimming.
The dimming curve generation method of the embodiment of the invention specifically comprises the following operations:
collecting time values of M1+ M2+ N +1 time points and PWM value data corresponding to the time values, and storing the time values as Tk、PWMkWherein k is an integer, and k is not less than 0 and not more than M1+ M2+ N, wherein T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NBy collecting M1+1 time points (including time point T ═ T)0、TM1) The number of dimming segments of the dimming curve starting from the start point time t0 to the time tm1 of the first operation to the PWM threshold x% is divided into M1 sections; the method comprises the steps that time values of N-1 time points and PWM value data corresponding to the time values are collected, and the number of dimming stages of a dimming curve from time tm1 when the first time operation is carried out to a PWM threshold value x% to time tm2 when the second time operation is carried out to the PWM threshold value is divided into N intervals; by collecting M2+1 time points (including time point T)M1+M2、TM1+M2+N) And the number of PWM values corresponding to these time pointsAccordingly, the number of dimming segments of the dimming curve from the time tm2 of the second operation to the PWM threshold to the time of one full period T is divided into M2 intervals.
The data parameters can be fixedly stored in the control unit, and can also be input, edited and adjusted through a User Interface (UI) Interface of the upper computer, and after being edited, the data parameters are updated to the control unit through a communication mode.
Those skilled in the art will appreciate that the present invention is not limited to the curve shown in fig. 3, and other irregular curves can be optimized by setting and refining the data points and the number of segments according to the method.
FIG. 4 is a detailed schematic diagram of a UI interface according to an embodiment of the invention.
As shown in fig. 4, the data parameters may be quickly edited and imported into the MCU through the UI, so as to facilitate debugging of the data. Fig. 4 contains two tables, top and bottom. The upper table of fig. 4 exemplifies values of each data parameter in a cycle, where "first MIN point" represents a PWM value when the PWM output is the first lowest value of the cycle, "MAX point (%)" represents a PWM value when the PWM output reaches a peak value, "second MIN point" represents a PWM value when the PWM output is the second lowest value of the cycle, "T0" is a starting point when the PWM output corresponds to the value of "first MIN point", "tm 1" is a time when the PWM output is first operated from the starting point "T0" to "threshold%", tn "is a time when the PWM output is operated from the starting point" T0 "to" MAX point (%) "via" threshold% "," tm2 "is a time when the PWM output is second operated from the starting point" T0 "via" MAX point (%) "to" threshold% ", and" is a time period of the cycle. The numbers in the table below represent the corresponding values of the above data parameters entered for the first cycle.
After the values MI, N, M2 of each segment number are set and input, the number and content of data to be input corresponding to the set segment number can be automatically popped up in the lower table shown in fig. 4, so as to avoid missing the data to be collected. For example, in the lower table of fig. 4, when M1 is set to 5 segments, the table portion displays six data points corresponding to the 5 segments, expressed in terms of (time, PWM value), i.e., (0, 1%), (30ms, 6%), (60ms, 15%), (90ms, 19%), (120ms, 26%), (150ms, 30%) that need to be set and input. The same is true for the N segment and the M2 segment, and the description is omitted.
According to the data input and statistics, the variation trend of each time node in a period T and the calculation formula obtained according to the data points can be obtained. As can be seen from the UI interface, the data volume collected in different intervals is different, for example, the M1 segment collects 6 data points, the N segment collects 3 data points, and the M2 is also set to collect 6 data. Thus, more data can be collected, for example, in low brightness or dimming sensitive areas, and less data can be collected in areas where the dimming is not bright to relatively high brightness users, as desired.
Fig. 5a is a schematic diagram of a dimming curve in a first period generated from the data in the table of fig. 4, and as shown in fig. 5a, based on the data in the table in fig. 4, the generated dimming curve may be divided into three curves of a 'B' (T0-tm 1), B 'C' D '(tm 1-tm 2), and D' E '(tm 2-T) by five points a' -E 'in terms of time nodes, the coordinates of the five points being a' (0ms, 1%), B '(150 ms, 30%), C' (300ms, 50%), D '(500 ms, 30%), and E' (600ms, 10%), and the enlarged views of the curves are respectively shown in fig. 5B-5D.
As shown in fig. 5a to 5D, according to the above-set number of the segments of M1, N, and M2, the curve a ' B ' is divided into 5 sections, the curve B ' C ' D ' is divided into 2 sections, and the curve D ' E ' is divided into 5 sections. In other words, the first period of the PWM dimming curve is divided into M1+ M2+ N segments, and the PWM value is a function of the corresponding time t in each segment.
Fig. 6 is a schematic diagram of a PWM dimming curve for one of the M1+ M2+ N intervals shown in fig. 5a-5 d.
As shown in fig. 6, any PWM value PWM in the interval is corresponding to a function of the time point t, and the PWM dimming curve of the interval starts from the point Mk(Tk,PWMk) End at point Mk+1(Tk+1,PWMk+1) A segment of arc of (1), wherein Tk<t<Tk+1PWM between PWMkAnd PWMk+1And k is more than or equal to 0 and less than or equal to M1+ M2+ N.
In order to further simplify the dimming curve, the dimming curve is further processed by using a linear interpolation method in this embodiment, using a point (T)k,PWMk) And a point (T)k+1,PWMk+1) The two-point straight line approximately replaces the original arc line characteristic, and then passes through MkAnd Mk+1The linear equation of the coordinates of the two points is:
pwm=PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk)。
in this way, as long as it is known in which section the current time point t is, Points (PWM) that are both end points of the section are acquiredk,Tk) And dot (PWM)k+1,Tk+1) The required PWM output can be calculated.
The above is a method for processing the first cycle of the irregular PWM dimming curve, and other cycles may be processed by the same method.
Fig. 7 is a flow chart of a method of forming a dimming curve according to an embodiment of the present invention, the method comprising the steps of:
s701: determining a PWM dimming upper limit MAX, a PWM first lower limit MIN, a PWM second lower limit MIN, a PWM threshold value x%, a single operation period T, time tm1 from the first operation to the PWM threshold value x%, time tn from the operation to the PWM dimming upper limit MAX, time tm2 from the second operation to the PWM threshold value x%, and starting point time T0 of the current period;
s702: collecting time values of M1+ M2+ N +1 time points and corresponding PWM value data, and storing the time values and the corresponding PWM value data as Tk、PWMkWherein k is an integer, and k is not less than 0 and not more than M1+ M2+ N, wherein T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NT, by collecting including the time point T0、TM1M1+1 time points, from a start time t0 to a time tm of x% of the first run to the PWM thresholdThe number of dimming stages of the dimming curve between 1 is divided into M1 sections, the number of dimming stages of the dimming curve from the time tm1 of the first operation to the PWM threshold x% to the time tm2 of the second operation to the PWM threshold x% is divided into N sections by collecting time values of N-1 time points and corresponding PWM value data, and the number of dimming stages of the dimming curve including the time point T is divided into N sections by collecting the time value TM1+M2、TM1+M2+NThe time values of M2+1 time points and the corresponding PWM value data divide the dimming segment number of the dimming curve from the time tm2 of the second operation to the PWM threshold value x% to the time of one complete period T into M2 intervals, wherein M1, M2 and N are positive integers, and M2 is a positive integer>=M1>N; the data points corresponding to the PWM threshold x% at the connection point between the MI section and the N section are shared by the M1 section and the N section, and the data points corresponding to the PWM threshold x% at the connection point between the N section and the M2 section are shared by the N section and the M2 section, which is not described again.
S703: judging the time point T is in the fourth interval of M1+ M2+ N intervals, and acquiring the coordinates of two end points in the interval, wherein the coordinates of the two end points are respectively (T)k、PWMk)、(Tk+1、PWMk+1) (ii) a Specifically, by comparing the time point T with the previously acquired M1+ M2+ N +1 time points TkTo determine that the time point t is located in the several intervals.
S704: generating a fitting curve in a coordinate system, and calculating a PWM value PWM corresponding to a time point t, wherein PWM is PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Thus, the dimming curve in the current period is obtained.
And repeating the steps until dimming curves of all periods are generated.
Fig. 8 is a demonstration mode of the tm2-T period controlling the dimming portion of the LED dimming ramp within a cycle. After the operation of the period is finished, the next period is started, and the like is repeated until the lamp is extinguished.
In this embodiment, the processing flow defaults to set the cycle number CYCLENumber to 24, the set data point number DATANumber to 6(6 data points, 5 data intervals), and the setting
PWMTable[Cnumber][DATAnumber]={};
COUNTTable[Cnumber][DATAnumber]={};
I.e., PWMTable and COUNTTable, are initially set to null.
Step S801, the system receives a demonstration mode command;
step S802, the system executes initialization action and initializes data;
step S803, the demonstration mode starts, and the process proceeds to step S804;
step S804, judging whether the Startfig parameter is TRUE, if not, directly switching to step S821, if the judgment result of the S804 is YES, switching to step S805;
step S805, starting counting by the timer, increasing Tcount, and turning to step S806;
step S806, judging whether Tcount is larger than COUNTTable [ Cnumber ] [0] and smaller than or equal to COUNTTable [ Cnumber ] [1], if yes, indicating that the current t is in the 0 th interval, and turning to step S807, otherwise, turning to step S808;
step S807, setting the interval flag Dnumber to 0, and proceeding to step S820 to calculate PWM output;
step S808, judging whether Tcount is larger than COUNTTable [ Cnumber ] [1] and smaller than or equal to COUNTTable [ Cnumber ] [2], if yes, indicating that the current t is in the 1 st interval, and turning to step S809, otherwise, turning to step S810;
step 809, setting an interval identifier Dumber equal to 1, and going to step 820 to calculate PWM output;
step S810, judging whether Tcount is larger than COUNTTable [ Cnumber ] [2] and smaller than or equal to COUNTTable [ Cnumber ] [3], if yes, indicating that the current t is in the 2 nd interval, and turning to step S811, otherwise, turning to step S812;
step S811, setting the interval flag Dnumber to 2, and proceeding to step S820 to calculate PWM output;
step S812, judging whether Tcount is larger than COUNTTable [ Cnumber ] [3] and smaller than or equal to COUNTTable [ Cnumber ] [4], if yes, indicating that the current t is in the 3 rd interval, and turning to step S813, otherwise, turning to step S814;
step S813, setting an interval flag Dnumber to 3, and proceeding to step S820 to calculate PWM output;
step S814, judging whether Tcount is larger than COUNTTable [ Cnumber ] [4] and smaller than or equal to COUNTTable [ Cnumber ] [5], if yes, indicating that the current t is in the 4 th interval, and turning to step S815, otherwise, turning to step S816;
step S815, setting an interval flag Dnumber to 4, and proceeding to step S820 to calculate PWM output;
step S816, the operation of the next period is started, Cnumber is increased, Tcount is set to be 0, and the process goes to step S817;
step S817, judge Cnumber whether it is greater than or equal to CYCLENumber, if yes, go to step S818, if no, go to step S821;
step S818, a light extinction process, and a transition to step S819;
in step S819, the process proceeds to step S821 after the data is reinitialized.
Step S820, PWM according to the linear interpolation equation PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Calculating the PWM output, specifically calculating as follows:
PWM=PWMTable[Cnumber][Dnumber]+
(PWMTable[Cnumber][Dnumber+1]-PWMTable[Cnumber][Dnumber])*
(Ccount-COUNTTable[Cnumber][Dnumber])/
(COUNTTable[Cnumber][Dnumber+1])-(COUNTTable[Cnumber][Dnumber]);
step S821 ends.
According to the technical scheme, the PWM curve generation mode can simply and conveniently generate a smooth dimming curve without collecting a large number of PWM-current relation data points, and the universal effect is good.
It will be appreciated by those of ordinary skill in the art that in the embodiments described above, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solutions claimed in the claims of the present application can be basically implemented without these technical details and various changes and modifications based on the above-described embodiments. Accordingly, in actual practice, various changes in form and detail may be made to the above-described embodiments without departing from the spirit and scope of the invention.

Claims (19)

1. A dimming curve generation method for dimming an LED load in an LED lighting device, the dimming curve generation method comprising the steps of:
s1: determining a PWM dimming upper limit MAX, a PWM first lower limit MIN, a PWM second lower limit MIN, a PWM threshold value x%, a single operation period T, time tm1 from the first operation to the PWM threshold value x%, time tn from the operation to the PWM dimming upper limit MAX, time tm2 from the second operation to the PWM threshold value x%, and starting point time T0 of the current period;
s2: collecting time values of M1+ M2+ N +1 time points and corresponding PWM value data, and storing the time values and the corresponding PWM value data as Tk、PWMkK is an integer, and k is more than or equal to 0 and less than or equal to M1+ M2+ N, wherein T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NIncluding time point T by acquisition0、TM1The number of dimming segments of the dimming curve from the starting point time T0 to the time tm1 of the first operation to the PWM threshold x% is divided into M1 intervals, the number of dimming segments of the dimming curve from the time tm1 of the first operation to the PWM threshold x% to the time tm2 of the second operation to the PWM threshold x% is divided into N intervals by collecting the time values of N-1 time points and the corresponding PWM value data, and the dimming segment number of the dimming curve including the time TM1+M2、TM1+M2+NThe time values of the M2+1 time points and the corresponding PWM value data divide the number of dimming segments of the dimming curve from the time tm2 of the second operation to the PWM threshold x% to the time of one complete period T into M2 intervals, wherein M1, M2, N are positive integers;
s3: judging the time point T is positioned at the interval position in M1+ M2+ N intervals, and acquiring the coordinates of two end points of the interval, wherein the coordinates of the two end points are respectively (T)k、PWMk)、(Tk+1、PWMk+1);
S4: calculating a PWM value PWM corresponding to the time point t, and generating a fitting curve to obtain a dimming curve of the current interval, wherein the fitting curve is expressed in the form of a curve equation;
and repeating the steps S1-S4 until the dimming curve of the period is generated.
2. The dimming curve generation method of claim 1,
the curve equation is generated by linear interpolation.
3. The dimming curve generation method of claim 1,
the curve equation is PWM ═ PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Wherein T is more than or equal to 0 and less than or equal to T.
4. The method of claim 1,
the relationship among M1, N and M2 satisfies that M2 is more than or equal to M1 and more than N.
5. The dimming curve generation method of claim 1,
setting a PWM threshold value x% based on the selected drive IC;
alternatively, the first and second electrodes may be,
setting a PWM threshold value x% based on a fixed threshold value of a control unit in the LED lighting device;
alternatively, the first and second electrodes may be,
the PWM threshold x% is set according to data input by the user through the user interface.
6. The dimming curve generation method of claim 1,
the PWM threshold value x% is a specified proportional value of the PWM dimming upper limit MAX.
7. The dimming curve generation method of claim 1,
in step S3, the time T is compared with the previously acquired M1+ M2+ N +1 time points TkTo determine that the time point t is located at a section position among the M1+ M2+ N sections.
8. The dimming curve generation method of claim 1,
the PWM dimming upper limit MAX, the PWM first lower limit MIN, the PWM second lower limit MIN, the PWM threshold value x%, T, tm1, tn, tm2, t0, M1, M2 and N, Tk、PWMkThe LED illumination device can be stored in a control unit of the LED illumination device, and can also be input through a user interface and then sent to the control unit for updating.
9. The dimming curve generation method of claim 8,
the control unit is a master control MCU.
10. A dimming curve generation apparatus for dimming an LED load in an LED lighting apparatus, the apparatus comprising:
the data parameter setting unit is used for determining a PWM dimming upper limit MAX, a PWM first lower limit MIN, a PWM second lower limit MIN, a PWM threshold value x%, a single operation period T, time tm1 from the first operation to the PWM threshold value x%, time tn from the operation to the PWM dimming upper limit MAX, time tm2 from the second operation to the PWM threshold value x%, and starting point time T0 of the current period;
collecting time values of M1+ M2+ N +1 time points and corresponding PWM value data and storing the time values and the corresponding PWM value data as Tk、PWMkThe data acquisition unit of (1), wherein k is an integer, and k is more than or equal to 0 and less than or equal to M1+ M2+ N, T0=t0、TM1=tm1、TM1+M2=tm2、TM1+M2+NT, the unit contains the time point T by the acquisition0、TM1M1+1 time points, the number of dimming segments of the dimming curve starting from the start point time t0 to the time tm1 of the first run to the PWM threshold x% is divided into M1 zonesDividing the dimming segment number of the dimming curve from the time tm1 from the first operation to the PWM threshold x% to the time tm2 from the second operation to the PWM threshold x% into N sections by collecting the time values of N-1 time points and the corresponding PWM value data, and collecting the dimming segment number including the time point TM1+M2、TM1+M2+NThe time values of the M2+1 time points and the corresponding PWM value data divide the number of dimming segments of the dimming curve from the time tm2 of the second operation to the PWM threshold x% to the time of one complete period T into M2 intervals, wherein M1, M2, N are positive integers;
a judging and point-taking unit for judging the position of the time point T in the M1+ M2+ N intervals and obtaining the coordinates of two end points of the interval, wherein the coordinates of the two end points are respectively (T)k、PWMk)、(Tk+1、PWMk+1);
Calculating a PWM value PWM corresponding to the time point t, and generating a fitting curve to obtain a dimming curve generation unit of the dimming curve in the current period, wherein the fitting curve is expressed in the form of a curve equation;
the device operates on each cycle until a dimming curve is generated for all cycles.
11. The dimming curve generation apparatus of claim 10,
the curve equation is generated by linear interpolation.
12. The dimming curve generating apparatus of claim 10,
the curve equation is PWM ═ PWMk+(PWMk+1-PWMk)*(t-Tk)/(Tk+1-Tk) Wherein T is more than or equal to 0 and less than or equal to T.
13. The dimming curve generation apparatus of claim 10,
the relationship among M1, N and M2 satisfies that M2 is more than or equal to M1 and more than N.
14. The dimming curve generation apparatus of claim 10,
setting a PWM threshold value x% based on the selected drive IC;
alternatively, the first and second electrodes may be,
setting a PWM threshold value x% based on a fixed threshold value of a control unit in the LED lighting device;
alternatively, the first and second electrodes may be,
the PWM threshold x% is set according to data input by the user through the user interface.
15. The dimming curve generation apparatus of claim 10,
the PWM threshold value x% is a specified proportional value of the PWM dimming upper limit MAX.
16. The dimming curve generating apparatus of claim 10,
the section position where the time point t is located in the M1+ M2+ N sections is judged by comparing the time point t with the previously acquired M1+ M2+ N +1 time points Tk.
17. The dimming curve generation apparatus of claim 10,
the PWM dimming upper limit MAX, the PWM first lower limit MIN, the PWM second lower limit MIN, the PWM threshold value x%, T, tm1, tn, tm2, t0, M1, M2 and N, Tk、PWMkThe method can be stored in a control unit in the LED lighting device, and can also be input through a user interface and then sent to the control unit for updating.
18. The dimming curve generating apparatus of claim 17,
the control unit is a main control MCU.
19. An LED lighting device, which executes the dimming curve generation method according to any one of claims 1 to 9 to generate a dimming curve.
CN201910098404.1A 2019-01-31 2019-01-31 Dimming curve generation method, dimming curve generation device and LED lighting device Active CN111511077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910098404.1A CN111511077B (en) 2019-01-31 2019-01-31 Dimming curve generation method, dimming curve generation device and LED lighting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910098404.1A CN111511077B (en) 2019-01-31 2019-01-31 Dimming curve generation method, dimming curve generation device and LED lighting device

Publications (2)

Publication Number Publication Date
CN111511077A CN111511077A (en) 2020-08-07
CN111511077B true CN111511077B (en) 2022-07-08

Family

ID=71875649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910098404.1A Active CN111511077B (en) 2019-01-31 2019-01-31 Dimming curve generation method, dimming curve generation device and LED lighting device

Country Status (1)

Country Link
CN (1) CN111511077B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114585132B (en) * 2020-11-30 2023-11-24 松下电气机器(北京)有限公司 Lighting device, lighting system, and dimming control method for lighting device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9769898B1 (en) * 2016-12-08 2017-09-19 Nxp B.V. Adjusted pulse width modulation (PWM) curve calculations for improved accuracy
JP2018125119A (en) * 2017-01-31 2018-08-09 ミネベアミツミ株式会社 Light source driving device and light source driving method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006028670B4 (en) * 2006-06-22 2018-10-25 Tridonic Gmbh & Co Kg Dimmable control gear with internal dimming characteristic, method for compensating tolerances of operating diodes controlled by a control gear and method for configuring a control gear for bulbs
KR101319352B1 (en) * 2009-12-11 2013-10-16 엘지디스플레이 주식회사 Method for driving local dimming of liquid crystal display device and apparatus thereof
CN102548090A (en) * 2010-12-12 2012-07-04 杨铁军 Method for improving dimming curve of LED lamp
CN102438367B (en) * 2011-10-25 2014-04-02 复旦大学 Linear dimming system based on brightness perceived by human eyes
SG11201401954UA (en) * 2011-11-03 2014-05-29 Schneider Electric South East Asia Hq Pte Ltd Dimmer arrangement
CN106028511B (en) * 2016-05-30 2017-12-29 上海典芯半导体有限公司 A kind of LED stepless dimmings system
CN106658833A (en) * 2016-11-25 2017-05-10 上海航空电器有限公司 Dimming method and device according with human eye comfort and table lamp

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9769898B1 (en) * 2016-12-08 2017-09-19 Nxp B.V. Adjusted pulse width modulation (PWM) curve calculations for improved accuracy
JP2018125119A (en) * 2017-01-31 2018-08-09 ミネベアミツミ株式会社 Light source driving device and light source driving method

Also Published As

Publication number Publication date
CN111511077A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN104206024B (en) The relation control method of lamp, control unit and illuminator
US8922134B2 (en) Device for generating light
CN103501560B (en) Control method, device and system of LED (Light Emitting Diode) lighting equipment
CN101137262A (en) Light emitting element driver and light emitting element driving method
EP1113709A2 (en) Light control for led lighting equipment
JP6516178B2 (en) Dimming control unit, lighting system, and equipment
CN111511077B (en) Dimming curve generation method, dimming curve generation device and LED lighting device
US8300853B2 (en) Audio mixing console capable of adjusting brightness of LED operator, and method of operating the same
CN104932184B (en) Drive device, light source drive device, light supply apparatus, projection arrangement and driving method
WO2016104071A1 (en) Brightness control device and brightness control method
CN105636304A (en) Method, device and system for adjusting vehicle backlight brightness
EP3550938B1 (en) Light source actuating apparatus
CN106163024A (en) A kind of PWM light-dimming method and PWM light modulating device
JP2016136487A (en) Cabin interior lighting system
JP2011040227A (en) Lighting device, lighting system, and control method of lighting device
JP2020016340A (en) Air conditioner
CN103763811B (en) Light source dynamically changes the method for control, terminal and controller
CN103886840B (en) Brightness of display screen controls device, air-conditioning and luminance control method for display screen
CN113260110B (en) Brightness control method, device, equipment and storage medium
CN108064099A (en) Intelligent lighting system, control method and intelligent illuminating system
JP2006293143A (en) Lighting control system
JP5312266B2 (en) LIGHTING DEVICE, LIGHTING SYSTEM, AND LIGHTING DEVICE CONTROL METHOD
JP2008298926A (en) Display device
EP3169143A1 (en) System and method for controlling led lighting by distributed pwm
CN105652650A (en) Method and device for controlling brightness of watch strap of intelligent watch and intelligent watch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant