Intelligent lighting control method and system based on scene perception

By constructing scene feature vectors and calculating current ratio and PWM duty cycle, the constant current drive and dimming of warm and cool light sources are independently controlled, solving the problems of insufficient scene perception and color temperature illuminance coupling in existing intelligent lighting systems. This achieves precise lighting control in multiple scenarios and improves the system's lighting consistency and visual comfort.

CN121968400APending Publication Date: 2026-05-01SHENZHEN BIAOMEI LIGHTING DESIGN ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN BIAOMEI LIGHTING DESIGN ENG CO LTD
Filing Date
2026-03-25
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing intelligent lighting control systems cannot integrate ambient illuminance levels and time-of-day information for multi-dimensional comprehensive judgment at the scene perception level. This results in coarse-grained switching of lighting levels, coupled color temperature and illuminance control, and an inability to output independently and accurately, affecting lighting consistency and visual comfort.

Method used

Scene feature vectors are constructed using PIR sensors, illuminance sensors, and time-period coding. Based on scene labels, the current ratio and PWM duty cycle of the cool white channel and warm white channel are calculated. The constant current drive and dimming of the cool and warm light sources are controlled independently. An incremental PID algorithm is used for illuminance closed-loop correction to achieve coordinated and precise control of color temperature and illuminance.

Benefits of technology

It achieves accurate identification and matching of lighting requirements for various usage scenarios, eliminates color temperature switching and current drift issues, ensures stable convergence of illuminance on the work surface to the target value, and improves lighting consistency and visual comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968400A_ABST
    Figure CN121968400A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent lighting control, and discloses an intelligent lighting control method and system based on scene perception, and the method comprises the steps: determining a scene label according to a personnel existence signal of a PIR sensor, an environment illumination original value of an illumination sensor, and a time period code of a current moment; calculating a cold white channel current proportion and a warm white channel current proportion according to the scene label, and respectively writing the cold white channel current proportion and the warm white channel current proportion into the reference control ends of the cold white constant current driving channel and the warm white constant current driving channel; according to the method, the problem of color point jump caused by the fact that color temperature switching depends on mechanical gears in the prior art is solved, the problem of current drift caused by power supply fluctuation is solved, it is ensured that the illumination of the working face is stably converged to a target value under all scenes, and the working efficiency is improved. Therefore, the cooperative accurate control of the color temperature and the illumination is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Scene-aware intelligent lighting control method and system Technical Field

[0001] This invention relates to the field of intelligent lighting control technology, and in particular to an intelligent lighting control method and system based on scene perception. Background Technology

[0002] With the continuous development of LED driving technology and embedded control systems, intelligent lighting control systems are being used more and more widely in commercial and public spaces, and the automation and refined control of lighting systems has become an important research direction in this field.

[0003] However, existing lighting control systems have significant shortcomings in scene perception. They generally rely on a single PIR sensor to output a Boolean signal indicating whether someone is present or not. They cannot integrate ambient illuminance levels and time of day information to make a multi-dimensional comprehensive judgment on the current usage scenario. As a result, the system can only switch between fixed lighting levels in a coarse-grained manner, which cannot match the actual lighting needs of the space.

[0004] At the drive control level, existing systems generally use a single-channel PWM method to uniformly drive cool white and warm white LEDs. Color temperature adjustment relies on fixed-level mechanical switching. The current of the cool and warm channels lacks an independent constant current reference control mechanism. When adjusting the illuminance, the duty cycle of the cool and warm channels is scaled synchronously and proportionally, causing the mixed color temperature to drift unexpectedly with changes in illuminance. The two control dimensions of color temperature and illuminance are coupled with each other and cannot be output independently and accurately. It is difficult to guarantee both lighting consistency and visual comfort. Summary of the Invention

[0005] This invention provides a scene-aware intelligent lighting control method and system. This invention eliminates the color point jump problem caused by the reliance on mechanical gears for color temperature switching in the prior art, as well as the current drift problem caused by power fluctuations, ensuring that the illuminance of the working surface in each scene is stably converged to the target value, thereby realizing the coordinated and precise control of color temperature and illuminance.

[0006] In a first aspect, the present invention provides a scene-aware intelligent lighting control method, the scene-aware intelligent lighting control method comprising: determining a scene label based on the presence signal of personnel from a PIR sensor, the original ambient illuminance value from an illuminance sensor, and the time period code of the current moment; querying the corresponding target color temperature value and target illuminance value based on the scene label, calculating the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and writing the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively; calculating a first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel.

[0007] In conjunction with the first aspect, in a first implementation of the first aspect of the present invention, determining the scene label based on the presence signal of the PIR sensor, the original ambient illuminance value of the illuminance sensor, and the time period code of the current moment includes: reading the presence signal of the PIR sensor, the original ambient illuminance value of the illuminance sensor, and the current moment of the RTC module, and converting the current moment into a time period code; performing linear normalization processing on the original ambient illuminance value and the time period code respectively to construct a scene feature vector; when the presence signal of the personnel is in an unoccupied state, determining the scene label as an idle standby scene; when the presence signal of the personnel is in an occupied state, calculating the matching score of each candidate scene based on the scene feature vector, and taking the candidate scene with the largest matching score as the scene label.

[0008] In conjunction with the first aspect, in a second implementation of the first aspect of the present invention, the step of calculating the matching score of each candidate scene based on the scene feature vector when the personnel presence signal indicates an occupied state, and using the candidate scene with the largest matching score as the scene label, includes: calculating the illuminance response mapping value of each candidate scene based on the normalized illuminance value in the scene feature vector when the personnel presence signal indicates an occupied state; calculating the time period contribution value of each candidate scene based on the normalized time period encoding in the scene feature vector; weighted summing the illuminance response mapping value and the time period contribution value to obtain the matching score of each candidate scene, and using the candidate scene with the largest matching score as the scene label.

[0009] In conjunction with the first aspect, in the third implementation of the first aspect of the present invention, the step of querying the corresponding target color temperature value and target illuminance value according to the scene label, calculating the cool white channel current ratio and warm white channel current ratio corresponding to the target color temperature value, and writing the cool white channel current ratio and warm white channel current ratio into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively, includes: querying the corresponding target color temperature value and target illuminance value according to the scene label, and using the upper limit value of the cool white light source color temperature and the lower limit value of the warm white light source color temperature as the color temperature adjustment range; calculating the cool white channel current ratio according to the target color temperature value and the lower limit value of the warm white light source color temperature, and determining the warm white channel current ratio as the complement value of the cool white channel current ratio, so that the sum of the cool white channel current ratio and the warm white channel current ratio is always the full load current reference; and writing the cool white channel current ratio and warm white channel current ratio into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively.

[0010] In conjunction with the first aspect, in the fourth implementation of the first aspect of the present invention, the step of writing the current ratio of the cold white channel and the current ratio of the warm white channel into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel respectively includes: multiplying the current ratio of the cold white channel and the current ratio of the warm white channel with the full-scale control word of the DAC and rounding them down to obtain the DAC control word of the cold white channel and the DAC control word of the warm white channel; writing the DAC control word of the cold white channel and the DAC control word of the warm white channel into the DAC register of the cold white constant current drive channel and the warm white constant current drive channel respectively to obtain the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel; processing the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel respectively through a voltage divider circuit and writing them into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel; and locking the output current of the cold white constant current drive channel and the warm white constant current drive channel to the constant current value corresponding to the current ratio of the cold white channel and the current ratio of the warm white channel respectively.

[0011] In conjunction with the first aspect, in the fifth implementation of the first aspect of the present invention, the step of calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel, includes: calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value; multiplying the first PWM duty cycle by the PWM timer auto-reload value and rounding it to obtain the PWM comparison register value; synchronously writing the PWM comparison register value into the comparison registers of the cool white PWM channel and the warm white PWM channel, so that the cool white PWM channel and the warm white PWM channel synchronously output PWM signals with the same first PWM duty cycle.

[0012] In conjunction with the first aspect, in the sixth implementation of the first aspect of the present invention, the step of calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value includes: multiplying the current ratio of the cool white channel by the rated luminous flux of the cool white channel to obtain the current luminous flux of the cool white channel; multiplying the current ratio of the warm white channel by the rated luminous flux of the warm white channel to obtain the current luminous flux of the warm white channel; adding the current luminous flux of the cool white channel to the current luminous flux of the warm white channel to obtain the target total luminous flux; multiplying the target total luminous flux by the luminous utilization coefficient of the luminaire to obtain the effective total luminous flux; and performing a division operation with the product of the target illuminance value and the effective irradiation area as the numerator and the effective total luminous flux as the denominator to obtain the first PWM duty cycle.

[0013] In conjunction with the first aspect, in the seventh implementation of the first aspect of the present invention, after synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel, the method further includes: reading the measured illuminance of the working surface output by the illuminance sensor; subtracting the target illuminance value from the measured illuminance of the working surface to obtain the illuminance deviation value of the i-th control cycle; multiplying the difference between the illuminance deviation value of the i-th control cycle and the illuminance deviation value of the (i-1)-th control cycle by a proportional coefficient, multiplying the product of the illuminance deviation value of the i-th control cycle and the preset control cycle by an integral coefficient, and summing the illuminance deviation value of the i-th control cycle minus the sum of twice the illuminance deviation value of the (i-1)-th control cycle and the illuminance deviation value of the (i-2)-th control cycle by the preset control cycle and multiplying by a differential coefficient to obtain the PWM duty cycle correction amount; and adding the PWM duty cycle correction amount to the PWM duty cycle of the (i-1)-th control cycle to obtain the second PWM duty cycle.

[0014] In conjunction with the first aspect, in the eighth implementation of the first aspect of the present invention, when the scene label is switched, the color temperature switching difference and the illuminance switching difference corresponding to the switched scene label are calculated; the color temperature switching difference and the illuminance switching difference are divided by a preset number of transition steps to obtain the color temperature increment and the illuminance increment per step; the updated cool white channel current ratio and the updated warm white channel current ratio are calculated based on the color temperature increment per step and written to the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel; the third PWM duty cycle is calculated based on the illuminance increment per step and the updated PWM comparison register value is synchronously written to the comparison registers of the cool white PWM channel and the warm white PWM channel.

[0015] Secondly, the present invention provides a scene-aware intelligent lighting control system, comprising: a scene analysis module, used to determine a scene label based on the presence signal of personnel from a PIR sensor, the original ambient illuminance value from an illuminance sensor, and the time period code of the current moment; a current calculation module, used to query the corresponding target color temperature value and target illuminance value based on the scene label, calculate the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and write the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively; and a lighting control module, used to calculate a first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously write the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel.

[0016] The technical solution provided by this invention constructs a scene feature vector through multi-dimensional fusion of PIR sensor signals, illuminance sensor sampling values, and time-period encoding. This vector is then used for hierarchical weighted matching to output scene labels. This solves the technical problem of insufficient scene classification granularity caused by relying on a single sensor in existing technologies. It enables the lighting system to accurately identify various usage scenarios such as idle standby, single-person focus, multi-person meetings, natural light compensation, leisure and relaxation, and emergency lighting. For each scenario, it outputs target color temperature and target illuminance values ​​that match actual needs. At the drive control level, this invention decomposes the target color temperature value into the current ratio of the cool white channel and the current ratio of the warm white channel based on a linear proportional color mixing relationship. A DAC control word is independently written to the reference control terminal of the cool white and warm white constant current drive channels, locking the two output currents to the constant current values ​​corresponding to the target ratios. This eliminates the color point jump problem caused by mechanical gear switching in existing technologies, as well as the current drift problem caused by power fluctuations. At the level of coordinated dimming, this invention calculates the first PWM duty cycle based on the current luminous flux of the warm and cool channels and the luminous utilization coefficient of the lamps, and writes it synchronously into the dual PWM channels, so that the color temperature adjustment and illuminance adjustment are completely decoupled. Then, the incremental PID algorithm continuously corrects the deviation between the measured illuminance of the working surface and the target illuminance value through closed loop, eliminating the steady-state illuminance error introduced by factors such as lamp aging, ensuring that the illuminance of the working surface in each scenario is stably converged to the target value, and realizing the coordinated and precise control of color temperature and illuminance.

[0017] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] Figure 1 is a schematic diagram of an embodiment of the scene-aware intelligent lighting control method of the present invention; Figure 2 is a schematic diagram of determining scene labels in an embodiment of the present invention; Figure 3 is a schematic diagram of calculating the current ratio of the cool white channel and the current ratio of the warm white channel in an embodiment of the present invention; Figure 4 is a schematic diagram of calculating the first PWM duty cycle in an embodiment of the present invention; Figure 5 is a schematic diagram of an embodiment of the scene-aware intelligent lighting control system of the present invention. Detailed Implementation

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

[0021] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0022] To facilitate understanding of this embodiment, a scene-aware intelligent lighting control method disclosed in this embodiment of the invention will first be described in detail. As shown in Figure 1, the method includes the following steps: 101. Determine the scene label based on the presence signal of the person from the PIR sensor, the original ambient illuminance value from the illuminance sensor, and the time period code of the current moment; 102. Query the corresponding target color temperature value and target illuminance value based on the scene label, calculate the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and write the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively; 103. Calculate the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously write the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel.

[0023] In a specific embodiment, as shown in Figure 2, the process of executing step 101 may specifically include the following steps: 201. Read the personnel presence signal from the PIR sensor, the original ambient illuminance value from the illuminance sensor, and the current time from the RTC module, and convert the current time into a time period code; 202. Perform linear normalization processing on the original ambient illuminance value and the time period code respectively to construct a scene feature vector; 203. When the personnel presence signal is in an unoccupied state, determine the scene label as an idle standby scene; 204. When the personnel presence signal is in an occupied state, calculate the matching score of each candidate scene based on the scene feature vector, and take the candidate scene with the largest matching score as the scene label.

[0024] Specifically, the main control unit simultaneously reads data from the PIR sensor, illuminance sensor, and RTC module within each sampling cycle, and the PIR sensor outputs a personnel presence signal. ,in This indicates that human activity has been detected. This indicates that the current space is unoccupied; the ambient illuminance is output by the illuminance sensor as the raw value. , The unit is lux, used to characterize the intensity of natural light or background light in the current space; the current time is output by the RTC module and converted into time-segment code according to the preset time-segmentation rules. ,in to correspond , to correspond , to correspond , By the next day correspond The three data streams are acquired synchronously within the same sampling period, and the sampling period is [missing information]. To ensure a unified time reference for personnel status, lighting status, and temporal semantics, and to avoid scene misjudgment caused by asynchronous sampling, the main control unit performs linear normalization processing on the raw ambient illuminance values ​​and time period codes, compressing data of different dimensions into a unified numerical range. The normalization relationship for the raw ambient illuminance values ​​is as follows: ,in This represents the normalized illuminance value, with a range of values ​​of [value missing]. , This indicates the upper limit of the illuminance sensor's measurement range; the normalization relationship for the time period encoding is... ,in This represents the normalized time period value, and the set of values ​​is: , This indicates the maximum value for the time period encoding. , as well as The data are jointly written into the buffer to form a scene feature vector. The presence signal of people serves as a pre-shunting element, the normalized illuminance value represents the ambient brightness, and the time-period encoding provides temporal semantic constraints. An unmanned state determination is then performed. This is used as the highest priority condition for preliminary screening. When When the current sampling period indicates that no personnel are detected, there is no need to continue calculating the matching scores for each candidate scenario; the scenario label is directly determined as an idle standby scenario. Since the idle standby scenario is directly triggered by the presence of personnel, even in low ambient light or at night, it will not be misjudged as a scenario with people using the scene, such as a meeting, focused activity, or relaxation, thus ensuring that the scenario output has clear state boundaries. When the activity is detected, it indicates that there is human activity in the current space. The main control unit performs matching scoring on candidate scenes based on scene feature vectors. Candidate scenes include at least focus scenes, meeting scenes, natural light compensation scenes, and relaxation scenes, and a matching score is calculated for each candidate scene. The matching score formula is as follows: ,in Indicates the first The matching score of each candidate scene. Represents the illuminance feature weights, taking , Represents the time period feature weights, taking , Indicates the first The response mapping value of each candidate scene to the normalized illuminance value Indicates the first The contribution of each candidate scene to the time period coding. For focus scenes, meeting scenes, and relaxation scenes, the illuminance response mapping value adopts... This indicates that the darker the environment, the stronger the demand for artificial lighting and the higher the matching degree; for natural light compensation scenarios, the illuminance response mapping value adopts... This indicates that the more abundant the ambient natural light, the more suitable it is to enter the compensation lighting mode that works in conjunction with natural light. Simultaneously, different candidate scenes also have their own preset contribution values ​​for different time periods. For example, focus scenes and meeting scenes have higher contribution values ​​during the daytime, relaxation scenes have higher contribution values ​​in the evening and late at night, and natural light compensation scenes have higher contribution values ​​in the morning and daytime. Therefore, the scene recognition results are not only affected by spatial brightness but also constrained by the typical usage time patterns. After obtaining the matching score for each candidate scene, the main control unit performs a multi-stage analysis on all Q... k Perform a maximum value comparison and use the candidate scene with the highest matching score as the scene label output for the current sampling period. For example, a focus scene corresponds to a work orientation with higher illuminance and cooler color temperature, a meeting scene corresponds to a communication orientation with balanced illuminance and neutral color temperature, a natural light compensation scene corresponds to the synergistic use of natural lighting, and a relaxation scene corresponds to a comfort orientation with lower illuminance and warmer light environment.

[0025] After the scene label is determined, the process also includes: comparing the scene label output in the current sampling period with the scene labels output in the previous N-1 sampling periods one by one, counting the number of consecutive identical scene labels to obtain a continuous scene label count; comparing the continuous scene label count with a preset continuous confirmation threshold; when the continuous scene label count is less than the preset continuous confirmation threshold, keeping the currently confirmed scene label unchanged and not triggering scene switching; when the continuous scene label count reaches the preset continuous confirmation threshold, updating the current scene label to the confirmed scene label and triggering the subsequent query process for target color temperature value and target illuminance value.

[0026] In one specific embodiment, the process of performing the step of calculating the matching score of each candidate scene based on the scene feature vector when the personnel presence signal indicates that someone is present, and taking the candidate scene with the highest matching score as the scene label, can specifically include the following steps: when the personnel presence signal indicates that someone is present, calculate the illuminance response mapping value of each candidate scene based on the normalized illuminance value in the scene feature vector; calculate the time period contribution value of each candidate scene based on the normalized time period code in the scene feature vector; perform a weighted summation of the illuminance response mapping value and the time period contribution value to obtain the matching score of each candidate scene, and take the candidate scene with the highest matching score as the scene label.

[0027] Specifically, when a presence signal indicates that someone is present, the process enters a candidate scene scoring process based on scene feature vectors. Normalized illuminance values ​​and time-series codes are used as inputs for environmental and temporal dimensions, respectively. Normalized illuminance values ​​are extracted from the scene feature vectors. With time period coding Subsequently, illuminance response mapping values ​​and time-period contribution values ​​were calculated for each candidate scenario. Candidate scenarios could correspond to focus scenarios, meeting scenarios, natural light compensation scenarios, and relaxation scenarios. The illuminance response mapping value reflects the degree of adaptation between the current ambient brightness and the lighting requirements of the corresponding candidate scenario. For focus scenarios, meeting scenarios, and relaxation scenarios, the illuminance response mapping value adopts... This indicates that the darker the environment, the higher the demand for artificial lighting intervention, and the stronger the matching trend of the corresponding candidate scenarios; for natural light compensation scenarios, the illuminance response mapping value adopts... This indicates that the more abundant the ambient natural light, the more pronounced the scene characteristics related to the coordinated regulation of natural light become; therefore, the matching trend strengthens as the normalized illuminance value increases. The main control unit calculates the time-period contribution value of each candidate scene based on the time-period coding. The contribution value for each time period is pre-stored in the controller's configuration table and set according to the typical occurrence patterns of different scenarios at different times. Specifically, the contribution value for a focused scenario is set to... , , , The time-period contribution value for the meeting scenario is set to , , , The time-period contribution value for natural light compensation scenes is set to , , , The contribution value of the relaxation scene during the time period is set to , , , The corresponding settings reflect that daytime hours are more likely to trigger focused and meeting scenarios, early morning to daytime hours are more likely to trigger natural light compensation scenarios, and evening to nighttime hours are more likely to trigger relaxation scenarios. Therefore, the time-period contribution value actually plays a role in temporal semantic constraints, making the candidate scene judgment not only dependent on the instantaneous illuminance state but also conforming to the spatial usage pattern. The main control unit performs a weighted summation operation on the illuminance response mapping value and the time-period contribution value to obtain the matching score of each candidate scene, where the illuminance dimension weight is 0.6 and the time-period dimension weight is 0.4. The weight allocation shows that ambient light has a stronger direct impact on scene recognition, and therefore occupies a higher weight, while time-period semantics participates in the scoring as an auxiliary constraint factor, ensuring better stability and rationality of the output results while maintaining the judgment sensitivity. After calculating the matching score for all candidate scenes, the maximum value is compared, and the candidate scene with the largest matching score is determined as the final scene label and written to the scene register.

[0028] In a specific embodiment, as shown in Figure 3, the process of executing step 102 may specifically include the following steps: 301. Query the corresponding target color temperature value and target illuminance value according to the scene label, and take the upper limit value of the cool white light source color temperature and the lower limit value of the warm white light source color temperature as the color temperature adjustment range; 302. Calculate the current ratio of the cool white channel according to the target color temperature value and the lower limit value of the warm white light source color temperature, and determine the current ratio of the warm white channel as the complement value of the current ratio of the cool white channel, so that the sum of the current ratio of the cool white channel and the current ratio of the warm white channel is always the full load current reference; 303. Write the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively.

[0029] Specifically, the scene tag is used as an index key to access the scene parameter lookup table, and the target color temperature value corresponding to the current scene tag is read from the scene parameter lookup table. and target illuminance value ,in This indicates the target color temperature required for the current scene, in Kelvin (K). This indicates the target illuminance required for the current scene, in lux. It also reads the lower limit of the warm white light source color temperature. upper limit of color temperature of cool white light source ,in Take 2700K, Take 6500K, and thus... The color temperature adjustment range is determined. The main control unit determines the target color temperature value accordingly. Lower limit of color temperature of warm white light source The offset relationship between them is used to calculate the proportion of current in the cold white channel. The calculation relationship is written as ,in This indicates the proportion of current in the cold white channel, with a value ranging from 0 to 1. This indicates the color temperature offset of the target color temperature relative to the warm white reference end. This indicates the color temperature range that the entire warm / cool color mixing system can cover. Since both warm and cool channels work together to form the mixed light output, the current percentage of the warm white channel is... Instead of solving it separately, the proportion of the cold white channel current is directly determined. The complement, i.e. ,in This indicates the current ratio of the warm white channel. After processing according to the complement relationship, the sum of the current ratios of the cool white channel and the warm white channel always remains 1, which is always equal to the full-load current reference ratio. That is, no matter how the dual-channel constant current drive changes, the total output reference current remains constant; only the distribution ratio between the cool white and warm white components changes. Therefore, color temperature adjustment is continuously completed without drifting the total current reference. For example, when the target color temperature value... When the current ratio of the cold white channel is 5500K, warm white channel current ratio This indicates that the cool white component dominates while the warm white component retains a secondary proportion, thus creating a mixed light output state that is slightly cool but not overly harsh. This is achieved by obtaining the current ratio of the cool white channel. The proportion of warm white channel current Then, the main control unit converts the two proportional values ​​into reference control quantities recognizable by the corresponding constant current drive channels, and writes them to the reference control terminals of the cool white and warm white constant current drive channels, respectively. If the constant current drive reference control terminal uses DAC input, the two proportional values ​​are mapped to reference control words according to the 12-bit quantization range, and the mapping relationship is as follows: and ,in This indicates the reference control word for the cold white constant current drive channel. This indicates the reference control word for the warm white constant current drive channel; 4095 represents the 12-bit DAC full-scale value. (The above...) , For example, the reference control word for the cool white constant current drive channel is approximately 3017, and the reference control word for the warm white constant current drive channel is approximately 1077. The main control unit then writes 3017 to the reference control terminal of the cool white constant current drive channel and 1077 to the reference control terminal of the warm white constant current drive channel, enabling the dual constant current drive chips to establish their respective output current references. If the full-load current reference is set to 300mA, the actual output current of the cool white channel is approximately... The actual output current of the warm white channel is approximately Through the above writing process, the target color temperature value is converted into the actual current ratio of the dual-path drive layer for both warm and cool colors.

[0030] In one specific embodiment, the process of writing the current ratio of the cold white channel and the current ratio of the warm white channel into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel, respectively, can specifically include the following steps: multiplying the current ratio of the cold white channel and the current ratio of the warm white channel by the DAC full-scale control word and rounding them to obtain the DAC control word of the cold white channel and the DAC control word of the warm white channel; writing the DAC control word of the cold white channel and the DAC control word of the warm white channel into the DAC register of the cold white constant current drive channel and the warm white constant current drive channel, respectively, to obtain the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel; processing the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel through a voltage divider circuit and writing them into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel, respectively, and locking the output current of the cold white constant current drive channel and the warm white constant current drive channel to the constant current value corresponding to the current ratio of the cold white channel and the current ratio of the warm white channel, respectively.

[0031] Specifically, the main control unit reads the current percentages of the cold white channel and the warm white channel, multiplies them by the DAC full-scale control word, and rounds down the product to obtain the DAC control words for the cold white channel and the warm white channel. The DAC full-scale control word is set to 4095, corresponding to the full range of the 12-bit DAC. Therefore, after quantization, the current percentages of the two channels are mapped to discrete control values ​​between 0 and 4095. Taking the operating condition where the current percentage of the cold white channel is approximately 0.737 and the current percentage of the warm white channel is approximately 0.263 as an example, the calculated DAC control word for the cold white channel is approximately 3017, and the DAC control word for the warm white channel is approximately 1077. The main control unit writes the DAC control word for the cold white channel to the corresponding digital-to-analog converter register of the cold white constant current drive channel, and writes the DAC control word for the warm white channel to the corresponding digital-to-analog converter register of the warm white constant current drive channel, so that the dual digital-to-analog converter modules output analog voltages corresponding to the digital control words. The dual-channel digital-to-analog converter module has a 12-bit resolution and a reference voltage of 3.3V. When the control word for the cold white channel DAC is written as 3017, the output voltage of the cold white channel DAC is (3017 / 4095) × 3.3V, or approximately 2.431V. When the control word for the warm white channel DAC is written as 1077, the output voltage of the warm white channel DAC is approximately (1077 / 4095) × 3.3V, or approximately 0.868V. The two output voltages correspond to the current ratio that should be allocated to the cold white channel and the warm white channel, respectively. Since the reference control terminal of the constant current driver chip does not directly receive the full-scale DAC output in the range of 0 to 3.3V, but requires an analog adjustable voltage in the range of 0 to 1.0V, the two DAC output voltages are further processed by a voltage divider circuit. The hardware layer connects a voltage divider network with a voltage division factor of 1 / 3.3 in series at the DAC output terminal to linearly map the 3.3V full-scale DAC output to the 0 to 1.0V control range. After processing, the approximately 2.431V DAC output voltage of the cold white channel is divided and converted into a reference input voltage of approximately 0.737V. The approximately 0.868V DAC output voltage of the warm white channel is divided and converted into a reference input voltage of approximately 0.263V. The two voltages after voltage division are respectively sent to the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel. Since the voltage value received by the reference control terminal is consistent with the current ratio set by the previous stage, the reference voltage of the cold white channel directly corresponds to the current ratio of the cold white channel, and the reference voltage of the warm white channel directly corresponds to the current ratio of the warm white channel. This allows the dual drive chips to establish their respective constant current output states according to preset ratios. After the voltage is written at the reference control terminal, the cold white constant current drive channel and the warm white constant current drive channel enter the constant current lock state. The hardware layer uses two independent constant current drive chips. The cold white constant current drive channel and the warm white constant current drive channel each set the full-load output current reference through sampling resistors. In this embodiment, the full-load output current reference is set to 300mA.The sampling resistor value is selected based on the current setting relationship of the chosen constant current drive chip, so that the cool white constant current drive channel and the warm white constant current drive channel each output a reference current of 300mA under full load conditions. After the full load output current reference is determined, the output current of the cool white channel is locked to a constant current value corresponding to the current ratio of the cool white channel, and the output current of the warm white channel is locked to a constant current value corresponding to the current ratio of the warm white channel.

[0032] After locking the output currents of the cool white constant current drive channel and the warm white constant current drive channel, the process further includes: sampling the output terminals of the cool white and warm white constant current drive channels using a preset sampling resistor; reading the sampling voltages of the cool white channel and the warm white channel respectively using an ADC; dividing the sampling voltages of the cool white channel and the warm white channel by the preset sampling resistor value to obtain the measured current values ​​of the cool white channel and the warm white channel; obtaining the current deviation of the cool white channel by subtracting the measured current value of the cool white channel from the target current value of the cool white channel; and obtaining the current deviation of the warm white channel by subtracting the measured current value of the warm white channel from the target current value of the warm white channel. The current deviations of the cold white channel and the warm white channel are compared with the preset current deviation thresholds. When the current deviation of either the cold white channel or the warm white channel exceeds the preset current deviation threshold, the current deviation exceeding the threshold is first divided by the full-load current reference to obtain the normalized current deviation of the corresponding channel. Then, the normalized current deviation is multiplied by the DAC full-scale control word and rounded to obtain the DAC control word correction amount. The DAC control word correction amount is added to the current DAC control word of the corresponding channel and rewritten to the corresponding digital-to-analog converter register until the current deviations of both the cold white channel and the warm white channel do not exceed the preset current deviation threshold.

[0033] In a specific embodiment, as shown in Figure 4, the process of executing step 103 may specifically include the following steps: 401. Calculate the first PWM duty cycle based on the current ratio of the cold white channel, the current ratio of the warm white channel, and the target illuminance value; 402. Multiply the first PWM duty cycle by the PWM timer auto-reload value and round it to obtain the PWM comparison register value, and synchronously write the PWM comparison register value into the comparison registers of the cold white PWM channel and the warm white PWM channel, so that the cold white PWM channel and the warm white PWM channel synchronously output PWM signals with the same first PWM duty cycle.

[0034] Specifically, the main control unit reads the current ratio of the cold white channel. Warm white channel current ratio and the target illuminance value corresponding to the current scene. The first PWM duty cycle is calculated based on the luminaire installation parameters. Since the rated luminous flux of the cool white channel and the warm white channel are predetermined, the rated luminous flux of the cool white channel is taken as... The rated luminous flux of the warm white channel is taken as Therefore, the main control unit first multiplies the current ratio of the cool white channel with the rated luminous flux of the cool white channel to obtain the current luminous flux of the cool white channel. Then, it multiplies the current ratio of the warm white channel with the rated luminous flux of the warm white channel to obtain the current luminous flux of the warm white channel. Finally, the two are added together to obtain the target total luminous flux under the current mixed cool and warm light conditions. Since not all of the total luminous flux emitted by the luminaire is effectively projected onto the working surface, it is then multiplied by the luminaire's light utilization coefficient, which is taken as... Effective irradiation area is taken A conversion relationship between dual-path luminous flux and working surface illuminance is established. The first PWM duty cycle is obtained by inverse calculation of working surface illuminance, that is, by dividing the product of the target illuminance value and the effective irradiated area by the total effective luminous flux, the first PWM duty cycle uniformly applied to both the cool white PWM channel and the warm white PWM channel is obtained. ,in, Indicates the duty cycle of the first PWM. This represents the target illuminance value, in lux. Indicates the effective irradiated area, taken as , This indicates the proportion of current in the cold white channel. This indicates the proportion of current in the warm white channel. This represents the rated luminous flux of the cool white channel, taken as... , This represents the rated luminous flux of the warm white channel, taken as... , The light utilization coefficient of a luminaire is represented by the value of 100. First, the total luminous flux reference that can be provided under the current mixed lighting conditions is determined by the ratio of warm and cold channel currents. Then, the required PWM modulation depth is derived from the target illuminance value. Therefore, PWM control only affects the total light output amplitude and does not change the warm and cold channel ratio already established in the previous stage. Taking focused lighting scenarios as an example, when... , Target illuminance value At that time, substituting into the calculation, the first PWM duty cycle is approximately The result falls on Within the allowable range, where the lower limit is This is used to prevent the driver chip from entering an abnormal cutoff state due to an excessively low PWM duty cycle; upper limit. This corresponds to the physical full-amplitude output boundary. After obtaining the first PWM duty cycle, the main control unit performs register write conversion, multiplying the first PWM duty cycle by the PWM timer auto-reload value and rounding down to obtain the PWM compare register value. ,in, This indicates the value of the PWM compare register. Indicates the duty cycle of the first PWM. This indicates the PWM timer auto-reload value. The PWM timer auto-reload value is 1000, so when the first PWM duty cycle is 0.931, the PWM comparison register value is 931. After the register value conversion, the main control unit synchronously writes the same PWM comparison register value into the comparison registers of both the cool white PWM channel and the warm white PWM channel, ensuring that the cool white PWM channel and the warm white PWM channel output PWM signals synchronously with the same first PWM duty cycle. "Synchronous writing" and "same duty cycle" have clear control significance: the duty cycles of the cool white PWM channel and the warm white PWM channel remain consistent. The only change is the magnitude of the cool and warm currents already set in the pre-amplifier constant current reference, rather than the PWM layer independently trimming the two channels. In this way, the cool white channel and the warm white channel always meet the same duty cycle modulation condition during PWM dimming. Therefore, although the instantaneous luminous flux of the two channels rises and falls synchronously, the ratio between them remains determined by the pre-amplifier current ratio, and the overall color temperature does not drift with illuminance adjustment. That is, the front-end constant current writing stage is responsible for determining the color temperature, and the current PWM synchronous output stage is responsible for determining the illuminance. The two control dimensions are independent of each other but cooperate with each other, thus forming a collaborative control structure in which color temperature and illuminance are decoupled.

[0035] In one specific embodiment, the process of calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value can specifically include the following steps: multiplying the current ratio of the cool white channel by the rated luminous flux of the cool white channel to obtain the current luminous flux of the cool white channel; multiplying the current ratio of the warm white channel by the rated luminous flux of the warm white channel to obtain the current luminous flux of the warm white channel; adding the current luminous flux of the cool white channel and the current luminous flux of the warm white channel to obtain the target total luminous flux; multiplying the target total luminous flux by the luminous utilization coefficient of the luminaire to obtain the effective total luminous flux; and performing a division operation with the product of the target illuminance value and the effective irradiation area as the numerator and the effective total luminous flux as the denominator to obtain the first PWM duty cycle.

[0036] Specifically, the current luminous flux of the cool white channel is calculated based on its current ratio and rated luminous flux. Then, the current luminous flux of the warm white channel is calculated based on its current ratio and rated luminous flux. Since the rated luminous flux of the cool white channel is 3200 lm and that of the warm white channel is 2700 lm, and the actual operating currents of both channels are locked at their respective ratios, the current luminous flux of both channels is directly converted using the method of "ratio multiplied by rated luminous flux". This transforms the cool-warm ratio, which originally reflected the current distribution relationship, into a luminous flux distribution relationship that reflects the actual luminous emission capacity, so that illuminance calculation no longer stops at the driving quantity level but enters the lighting output level. The current luminous flux of the cool white channel and the current luminous flux of the warm white channel are added together to obtain the target total luminous flux, which is the sum of the actual mixed luminous flux that can be provided under the current cool-warm current ratio conditions. Based on the target total luminous flux, adjustments are made according to the actual light output utilization conditions of the luminaire, because the entire luminous flux emitted by the luminaire will not be applied to the target working surface without loss. Therefore, the main control unit multiplies the target total luminous flux by the luminous utilization coefficient of the luminaire to obtain the effective total luminous flux, where the luminous utilization coefficient is taken as 0.7 and the effective illumination area is taken as 4m². 2 The main control unit uses the product of the target illuminance value and the effective illuminance area as the demand-side luminous flux and the total effective luminous flux as the supply-side luminous flux, performing a division operation to obtain the first PWM duty cycle. The first PWM duty cycle is a uniform dimming amount that simultaneously applies to both the cool white PWM channel and the warm white PWM channel. Therefore, it only synchronously amplifies or reduces the total output of the two channels without disrupting the established cool / warm ratio relationship from the preceding stage. For example, under the conditions of a cool white channel current ratio of approximately 0.737, a warm white channel current ratio of approximately 0.263, and a target illuminance value of 500 lux, the calculated first PWM duty cycle is approximately 0.931. This indicates that under the current mixing ratio and luminaire utilization conditions, simply adjusting the two PWM channels to a uniform duty cycle of approximately 93.1% is sufficient to bring the illuminance on the working surface close to the target illuminance value.

[0037] When the scene label is natural light compensation scene, before incremental PID correction, the following steps are also included: continuously reading the original ambient illuminance value output by the illuminance sensor at a preset control cycle; subtracting the original ambient illuminance value of the current control cycle from the original ambient illuminance value of the previous control cycle and dividing by the preset control cycle to obtain the ambient illuminance change rate; multiplying the ambient illuminance change rate by the preset illuminance change rate gain coefficient to obtain the feedforward compensation duty cycle correction amount; adding the feedforward compensation duty cycle correction amount to the PWM duty cycle of the current control cycle, and limiting the sum to between the preset duty cycle lower limit and the full amplitude value to obtain the feedforward corrected PWM duty cycle; using the feedforward corrected PWM duty cycle as the initial input value for incremental PID correction, adding it to the PWM duty cycle correction amount, and synchronously writing it into the comparison registers of the cool white PWM channel and the warm white PWM channel.

[0038] In one specific embodiment, after synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel, the method further includes: reading the measured illuminance of the working surface output by the illuminance sensor, subtracting the target illuminance value from the measured illuminance of the working surface to obtain the illuminance deviation value of the i-th control cycle; multiplying the difference between the illuminance deviation value of the i-th control cycle and the illuminance deviation value of the (i-1)-th control cycle by a proportional coefficient, multiplying the product of the illuminance deviation value of the i-th control cycle and the preset control cycle by an integral coefficient, and subtracting the sum of the illuminance deviation value of the i-th control cycle minus twice the illuminance deviation value of the (i-1)-th control cycle and the illuminance deviation value of the (i-2)-th control cycle by the preset control cycle and multiplying by a differential coefficient to obtain the PWM duty cycle correction amount; and adding the PWM duty cycle correction amount to the PWM duty cycle of the (i-1)-th control cycle to obtain the second PWM duty cycle.

[0039] Specifically, given a fixed ratio of warm to cool light, the uniform PWM duty cycle is periodically adjusted to compensate for disturbances in actual illuminance caused by factors such as changes in environmental reflection, device temperature rise, power supply fluctuations, and human obstruction. The controller operates on a preset control cycle. Enter cyclic sampling, preset control period is taken And read the measured illuminance of the working surface output by the illuminance sensor in each control cycle. ,in Indicates the first The measured illuminance of the working surface during the control cycle is displayed in lux; simultaneously, the target illuminance value corresponding to the current scene is read. ,in This represents the target illuminance value, in lux. The controller will display the target illuminance value. Measured illuminance at the working surface By taking the difference, we get the first... Illuminance deviation during control period ,Right now The illuminance deviation value actually represents the remaining difference between the current lighting output and the target illuminance. A positive value indicates that the current illuminance is too low, and the PWM duty cycle needs to be increased. A negative value indicates that the current illuminance is too high, requiring a reduction in the PWM duty cycle. Therefore, the illuminance deviation value directly drives the entire closed-loop correction process. The controller calls the... Illuminance deviation during control period and the Illuminance deviation during control period The PWM duty cycle correction is calculated using an incremental PID calculation method. The corresponding calculation formula is written as: ,in, Indicates the first PWM duty cycle correction amount in the control cycle This represents the proportionality coefficient, taken as... , Denotes the integral coefficient, taking... , Denotes the differential coefficient, taking... , Indicates the preset control period, take In the operational structure, the first term This reflects the immediate impact of deviation change trends on the duty cycle, used to improve the system's response speed to changes in control accuracy deviation; the second item The cumulative correction effect reflects the current deviation and is used to reduce long-term steady-state errors; the third term. This reflects the suppressive effect of the second-order deviation trend on the system, used to mitigate overshoot during rapid adjustments. Since all three results are dimensionless duty cycle increments, the PWM duty cycle correction obtained after summation is directly used for duty cycle updates. The controller then combines the PWM duty cycle correction with the first... PWM duty cycle of the control cycle Add them together to get the first one. The second PWM duty cycle corresponding to the control cycle ,Right now ,in, Indicates the first The second PWM duty cycle after the control cycle update Indicates the first The PWM duty cycle of the control period, This represents the amplitude limiting function. This indicates the preset duty cycle lower limit. This indicates the upper limit of the duty cycle at full speed. The lower limit of the duty cycle is set to... To prevent the driver chip from entering the abnormal cutoff region when the PWM duty cycle is too low, an upper limit value is set. This is used to ensure that the output duty cycle does not exceed the physical full-amplitude boundary. The controller converts the second PWM duty cycle into a new PWM comparator register value and writes it synchronously to the cool white PWM channel and the warm white PWM channel, so that the duty cycles of the two PWM channels always remain strictly equal. Since the constant current references of the cool white channel and the warm white channel have been locked to the corresponding current ratios in the previous stage, the closed-loop correction stage only synchronously increases or decreases the uniform PWM duty cycle, and no longer changes the proportional relationship between the cool and warm channels.

[0040] In one specific embodiment, when a scene label changes, the color temperature switching difference and illuminance switching difference corresponding to the changed scene label are calculated; the color temperature switching difference and illuminance switching difference are divided by a preset number of transition steps to obtain the color temperature increment and illuminance increment for each step; the updated cool white channel current ratio and the updated warm white channel current ratio are calculated based on the color temperature increment for each step and written to the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel; the third PWM duty cycle is calculated based on the illuminance increment for each step and the updated PWM comparison register value is synchronously written to the comparison registers of the cool white PWM channel and the warm white PWM channel.

[0041] Specifically, the main control unit reads the original target color temperature and illuminance values ​​corresponding to the scene label before the switch, and simultaneously reads the new target color temperature and illuminance values ​​corresponding to the scene label after the switch. Then, it determines the color temperature switching difference and illuminance switching difference based on the difference between the old and new parameters. The preset transition step count is 10 steps, meaning that a scene switch is not completed within a single control cycle, but rather gradually approaches the new target output state over 10 consecutive transition sub-cycles. The main control unit divides the color temperature switching difference by the preset transition step count to obtain the color temperature increment per step, and also divides the illuminance switching difference by the preset transition step count to obtain the illuminance increment per step. The single-step transition cycle is 0.2 seconds, therefore the complete scene transition time is 2.0 seconds. Taking the switch from the original scene target color temperature of 3500K to the new scene target color temperature of 5500K as an example, the color temperature switching difference is 2000K, corresponding to a color temperature increment of 200K per step. If the original scene target illuminance is 200 lux and the new scene target illuminance is 500 lux, the illuminance switching difference is 300 lux, corresponding to an illuminance increment of 30 lux per step. The main control unit recalculates the current ratio of the cool white channel and the current ratio of the warm white channel based on the intermediate color temperature value corresponding to the current transition step, and writes the two updated results to the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel. First, the new cool white ratio is determined based on the intermediate color temperature value, and then the new warm white ratio is obtained by the complement method, so that the sum of the two ratios always remains at the full load current reference. Since the ratio calculation relationship has been determined, it is not necessary to change the calculation model during the scene switching stage. It is only necessary to change the original method of directly using the target color temperature value to gradually using the intermediate color temperature value corresponding to each transition step. After processing, the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel are continuously updated step by step. The cool white component gradually increases or decreases, while the warm white component synchronously changes in the opposite direction through complementary values. Therefore, the overall color temperature will not jump abruptly, but will smoothly transition along a trajectory that gradually approaches the color temperature value of the new scene. If the original scene color temperature is 3500K and the new scene color temperature is 5500K, then the intermediate color temperature value after the first update is 3700K, the intermediate color temperature value after the fifth update is 4500K, and the intermediate color temperature value after the tenth update is 5500K. The cool and warm dual-channel constant current reference will then gradually transition to the new proportional state. After completing the step-by-step writing of the cool and warm dual-channel constant current reference, the main control unit calculates the third PWM duty cycle based on the illuminance increment of each step and synchronously writes the corresponding updated PWM comparison register value into the comparison registers of the cool white PWM channel and the warm white PWM channel. The third PWM duty cycle is calculated using the intermediate target illuminance value corresponding to the current transition step as input, following the previously established unified PWM duty cycle calculation method, and then converted into a new PWM comparison register value.Because the cool white PWM channel and the warm white PWM channel always load the same updated comparison register value, the two PWM channels still output synchronously with the same duty cycle. Only the total light output amplitude changes, not the ratio of cool to warm colors. Color temperature transitions are achieved by dual-channel constant current reference step control, while illuminance transitions are achieved by unified PWM step control. Both advance synchronously within each transition sub-cycle, ensuring that the entire scene switching process maintains both the continuous evolution of the target overall color temperature and the continuous evolution of the working surface illuminance. For example, under certain low-illuminance warm light scene parameters, the unified PWM duty cycle corresponding to the original scene can be approximately 0.372, while under high-illuminance cool light scene parameters, the unified PWM duty cycle corresponding to the new scene can be approximately 0.931. The controller updates the duty cycle difference between the two in steps according to the preset transition steps. In the 10-step transition, the duty cycle increment for each step is approximately 0.0559. The controller can then gradually increase the duty cycle of the third PWM from 0.372, 0.428, and 0.484 in sequence until it reaches approximately 0.931 in the tenth step. In each step, the converted PWM comparison register value is synchronously written to the cool white PWM channel and the warm white PWM channel.

[0042] The above describes the scene-aware intelligent lighting control method in the embodiments of the present invention. The following describes the scene-aware intelligent lighting control system in the embodiments of the present invention. Please refer to Figure 5. One embodiment of the scene-aware intelligent lighting control system in the embodiments of the present invention includes: a scene analysis module 501, used to determine a scene label based on the presence signal of people from the PIR sensor, the original ambient illuminance value from the illuminance sensor, and the time period code of the current moment; a current calculation module 502, used to query the corresponding target color temperature value and target illuminance value based on the scene label, calculate the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and write the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively; and a lighting control module 503, used to calculate the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously write the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel.

[0043] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0044] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0045] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A scene-aware intelligent lighting control method, characterized in that, include: The scene label is determined based on the presence signal from the PIR sensor, the raw ambient illuminance value from the illuminance sensor, and the time period code of the current moment. The corresponding target color temperature value and target illuminance value are queried based on the scene label. The current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value are calculated, and the current ratios of the cool white channel and the warm white channel are written to the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively. A first PWM duty cycle is calculated based on the current ratios of the cool white channel, the warm white channel, and the target illuminance value, and the first PWM duty cycle is synchronously written to the cool white PWM channel and the warm white PWM channel.

2. The scene-aware intelligent lighting control method according to claim 1, characterized in that, The step of determining the scene label based on the presence signal of the PIR sensor, the raw ambient illuminance value of the illuminance sensor, and the time period code of the current moment includes: reading the presence signal of the PIR sensor, the raw ambient illuminance value of the illuminance sensor, and the current moment of the RTC module, and converting the current moment into a time period code; performing linear normalization processing on the raw ambient illuminance value and the time period code respectively to construct a scene feature vector; when the presence signal of the person is unoccupied, determining the scene label as an idle standby scene; when the presence signal of the person is present, calculating the matching score of each candidate scene based on the scene feature vector, and taking the candidate scene with the largest matching score as the scene label.

3. The scene-aware intelligent lighting control method according to claim 2, characterized in that, When the presence signal indicates that someone is present, the matching score of each candidate scene is calculated based on the scene feature vector, and the candidate scene with the highest matching score is used as the scene label. This includes: when the presence signal indicates that someone is present, calculating the illuminance response mapping value of each candidate scene based on the normalized illuminance value in the scene feature vector; calculating the time period contribution value of each candidate scene based on the normalized time period encoding in the scene feature vector; weighted summing the illuminance response mapping value and the time period contribution value to obtain the matching score of each candidate scene, and using the candidate scene with the highest matching score as the scene label.

4. The scene-aware intelligent lighting control method according to claim 1, characterized in that, The step of querying the target color temperature value and target illuminance value corresponding to the scene label, calculating the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and writing the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively, includes: querying the target color temperature value and target illuminance value corresponding to the scene label, and using the upper limit value of the cool white light source color temperature and the lower limit value of the warm white light source color temperature as the color temperature adjustment range; calculating the current ratio of the cool white channel based on the target color temperature value and the lower limit value of the warm white light source color temperature, and determining the current ratio of the warm white channel as the complement value of the current ratio of the cool white channel, so that the sum of the current ratio of the cool white channel and the current ratio of the warm white channel is always the full load current reference; and writing the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively.

5. The scene-aware intelligent lighting control method according to claim 4, characterized in that, The step of writing the current ratio of the cold white channel and the current ratio of the warm white channel into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel, respectively, includes: multiplying the current ratio of the cold white channel and the current ratio of the warm white channel by the full-scale control word of the DAC and rounding down to obtain the DAC control word of the cold white channel and the DAC control word of the warm white channel; writing the DAC control word of the cold white channel and the DAC control word of the warm white channel into the DAC register of the cold white constant current drive channel and the warm white constant current drive channel, respectively, to obtain the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel; processing the DAC output voltage of the cold white channel and the DAC output voltage of the warm white channel through a voltage divider circuit and writing them into the reference control terminals of the cold white constant current drive channel and the warm white constant current drive channel, respectively; and locking the output current of the cold white constant current drive channel and the warm white constant current drive channel to the constant current value corresponding to the current ratio of the cold white channel and the current ratio of the warm white channel, respectively.

6. The scene-aware intelligent lighting control method according to claim 1, characterized in that, The step of calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel, includes: calculating the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value; multiplying the first PWM duty cycle by the PWM timer auto-reload value and rounding it to obtain the PWM comparison register value; and synchronously writing the PWM comparison register value into the comparison registers of the cool white PWM channel and the warm white PWM channel, so that the cool white PWM channel and the warm white PWM channel output PWM signals synchronously with the same first PWM duty cycle.

7. The scene-aware intelligent lighting control method according to claim 6, characterized in that, The calculation of the first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value includes: multiplying the current ratio of the cool white channel by the rated luminous flux of the cool white channel to obtain the current luminous flux of the cool white channel; multiplying the current ratio of the warm white channel by the rated luminous flux of the warm white channel to obtain the current luminous flux of the warm white channel; adding the current luminous flux of the cool white channel to the current luminous flux of the warm white channel to obtain the target total luminous flux; multiplying the target total luminous flux by the luminous utilization coefficient of the luminaire to obtain the effective total luminous flux; and performing a division operation with the product of the target illuminance value and the effective irradiation area as the numerator and the effective total luminous flux as the denominator to obtain the first PWM duty cycle.

8. The scene-aware intelligent lighting control method according to claim 1, characterized in that, After synchronously writing the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel, the method further includes: reading the measured illuminance of the working surface output by the illuminance sensor; subtracting the target illuminance value from the measured illuminance of the working surface to obtain the illuminance deviation value of the i-th control cycle; multiplying the difference between the illuminance deviation value of the i-th control cycle and the illuminance deviation value of the (i-1)-th control cycle by a proportional coefficient, multiplying the product of the illuminance deviation value of the i-th control cycle and the preset control cycle by an integral coefficient, and summing the illuminance deviation value of the i-th control cycle minus the sum of twice the illuminance deviation value of the (i-1)-th control cycle and the illuminance deviation value of the (i-2)-th control cycle by the preset control cycle and multiplying by a differential coefficient to obtain the PWM duty cycle correction amount; and adding the PWM duty cycle correction amount to the PWM duty cycle of the (i-1)-th control cycle to obtain the second PWM duty cycle.

9. The scene-aware intelligent lighting control method according to claim 8, characterized in that, When the scene label changes, the color temperature switching difference and illuminance switching difference corresponding to the changed scene label are calculated; the color temperature switching difference and the illuminance switching difference are divided by a preset number of transition steps to obtain the color temperature increment and illuminance increment per step; the updated cool white channel current ratio and the updated warm white channel current ratio are calculated based on the color temperature increment per step and written to the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel; the third PWM duty cycle is calculated based on the illuminance increment per step and the updated PWM comparison register value is synchronously written to the comparison registers of the cool white PWM channel and the warm white PWM channel.

10. A scene-aware intelligent lighting control system, characterized in that, The method for executing scene-aware intelligent lighting control as described in any one of claims 1-9 includes: a scene analysis module, configured to determine a scene label based on the presence signal of personnel from a PIR sensor, the original ambient illuminance value from an illuminance sensor, and the time period code of the current moment; a current calculation module, configured to query the corresponding target color temperature value and target illuminance value based on the scene label, calculate the current ratio of the cool white channel and the current ratio of the warm white channel corresponding to the target color temperature value, and write the current ratio of the cool white channel and the current ratio of the warm white channel into the reference control terminals of the cool white constant current drive channel and the warm white constant current drive channel, respectively; and a lighting control module, configured to calculate a first PWM duty cycle based on the current ratio of the cool white channel, the current ratio of the warm white channel, and the target illuminance value, and synchronously write the first PWM duty cycle into the cool white PWM channel and the warm white PWM channel.