Dimming method and system based on grid voltage fluctuation feedback and related equipment
Patent Information
- Application Number
- CN202611013834.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-09-22
AI Technical Summary
[0002]当前市电供电的调光照明系统(如可控硅调光、0-10V调光、DALI调光等),普遍存在调光输出稳定性差的问题,核心原因在于:电网电压易受负载切换、用电高峰、线路损耗等因素影响,出现实时波动(电压偏高/偏低、瞬时压降、纹波干扰等),而现有调光电路大多直接采用电网电压作为输入电源,未对电网电压波动进行监测与补偿,导致调光驱动电路的输出电流、输出功率随电网电压同步变化
[0017]Beneficial Effects: This invention provides a dimming method, system, and related equipment based on grid voltage fluctuation feedback. The method includes real-time acquisition of the mains input voltage signal of the dimming system; determination of the current grid voltage state; and generation of a dimming compensation signal using a dual-loop control algorithm combining feedforward and feedback. During compensation, a lookup table-based feedforward compensation algorithm is used to obtain a basic PWM compensation value based on the input voltage for coarse adjustment; and a PID feedback control algorithm is used to calculate a dynamic PWM fine-tuning value based on the error between the actual output power and the target power for fine-tuning. Then, the user-set value, the feedforward basic compensation value, and the feedback fine-tuning value are superimposed to form the final PWM output signal, which is sent to the constant current drive circuit. Real-time sampling of the output power is used to form a closed-loop calibration. By constructing a dynamic closed loop of feedforward and feedback, this invention can more accurately offset grid fluctuation interference, achieve constant power output, effectively eliminate flicker, and improve the stability of the dimming system.
Smart Images

Figure CN122803135A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting control technology, and in particular to a dimming method, system and related equipment based on grid voltage fluctuation feedback. Background Technology
[0002] Current mains-powered dimming lighting systems (such as SCR dimming, 0-10V dimming, DALI dimming, etc.) generally suffer from poor dimming output stability. The core reason is that the mains voltage is easily affected by factors such as load switching, peak electricity consumption, and line losses, resulting in real-time fluctuations (voltage too high / too low, instantaneous voltage drop, ripple interference, etc.). Most existing dimming circuits directly use the mains voltage as the input power supply without monitoring and compensating for mains voltage fluctuations, causing the output current and output power of the dimming drive circuit to change synchronously with the mains voltage.
[0003] The main defects of the existing technology are as follows: when the voltage fluctuates, the brightness of the lamps flickers significantly, and the dimming accuracy drops drastically, making it impossible to maintain the set brightness value; under low voltage conditions, the dimming circuit cannot reach the rated driving power, resulting in dimming failure and low brightness flickering problems; under high voltage conditions, it is easy to cause overload of the driving components, reducing the lifespan of the lamps; when multiple lamps are dimmed in parallel, uneven voltage leads to inconsistent brightness of each lamp, affecting the overall lighting effect; and transient interference from the power grid can cause dimming signal distortion, resulting in dimming pauses and jumps.
[0004] While some voltage regulator-assisted dimming solutions exist, they only achieve overall voltage regulation and do not provide specific feedback for the dimming control logic. This makes it impossible to accurately match the correlation between dimming parameters and voltage fluctuations, resulting in limited dimming stability optimization.
[0005] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0006] This invention provides a dimming method, system, and related equipment based on grid voltage fluctuation feedback. The main objective of this invention is to solve the technical problems mentioned in the background section of the prior art.
[0007] The first aspect of this invention provides a dimming method based on grid voltage fluctuation feedback, comprising: The voltage signal at the mains input terminal of the dimming system is acquired in real time and converted into a digital voltage signal to extract the current input voltage value; The current input voltage value is compared with a preset voltage parameter library to calculate the voltage deviation value and voltage change rate, and to determine the current grid voltage state, which includes normal, high voltage, low voltage or instantaneous fluctuation. Based on the determined grid voltage state, a dual-loop control algorithm combining feedforward and feedback is used to generate a dimming compensation signal. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value through a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power through a PID feedback control algorithm. The user-defined base PWM value, the base PWM compensation value, and the dynamic PWM fine-tuning value are superimposed to generate the final PWM target output signal and sent to the constant current drive circuit. The output voltage, output current, and actual output power of the constant current drive circuit are sampled in real time, the error is continuously updated, and closed-loop calibration is performed until the actual output power stabilizes at the target output power.
[0008] In an optional embodiment of the first aspect of the present invention, the voltage parameter library includes a high-voltage threshold and a low-voltage threshold, the voltage parameter library is dynamically generated using an environment-adaptive method, and the method for generating the voltage parameter library includes: Input voltage data is continuously collected during the preset time period before the system is powered on; Calculate the average voltage value and standard deviation of the input voltage within the preset time period; According to the formula: The high voltage threshold = The average voltage + K × the standard deviation, the low-voltage threshold = the average voltage - K × the standard deviation, where K This is the preset sensitivity coefficient.
[0009] In an optional embodiment of the first aspect of the present invention, the method for determining instantaneous fluctuations includes: Get the current sampled voltage ( V (n) ), the voltage of the previous sampling period ( V (n-1) ) and sampling period time ( Δt ); Calculate the voltage change amplitude | ΔV |=| V (n) - V (n-1) | and voltage change rate| d V / d t |=| V (n) - V (n-1) | / Δ t ; When | ΔV |≥First preset threshold and| d V / d t When the threshold value is greater than or equal to the second preset threshold, it is determined that the power grid has experienced the instantaneous fluctuation.
[0010] In an optional embodiment of the first aspect of the present invention, the step of generating a dimming compensation signal using a dual-loop control algorithm combining feedforward and feedback based on the determined grid voltage state includes: When the determined grid voltage state is the instantaneous fluctuation, the dual-loop control algorithm enters the fast response mode. The fast response mode includes: prioritizing the use of the lookup table feedforward compensation algorithm to output the basic PWM compensation value for fast power correction, while temporarily freezing the accumulation of the integral term in the PID feedback control algorithm to prevent error mutations from causing integral saturation and overshoot, and increasing the weight of the derivative term in the PID feedback control algorithm to improve the response capability to fast voltage disturbances. After the grid voltage state returns to normal and continues for a preset number of sampling periods, the fast response mode is exited, and the control of the integral term and the derivative term is restored to the state before entering the fast response mode.
[0011] In an optional embodiment of the first aspect of the present invention, obtaining the basic PWM compensation value based on the current input voltage value using a lookup table feedforward compensation algorithm includes: Determine the current input voltage value ( V in Does it completely match the discrete sampling nodes in the lookup table database? If not a perfect match, then obtain the value relative to the current input voltage ( V in The first voltage of two adjacent nodes ( V 1) Second voltage ( V 2), and the first voltage ( V 1) and the second voltage ( V 2) The corresponding first PWM compensation values ( PWM 1) and the second PWM compensation value ( PWM 2); The current input voltage value is calculated using a linear interpolation algorithm. V in The corresponding basic PWM compensation value ( Δ PWM _LUT The calculation formula is: ΔPWM _LUT = PWM 1+(V in - V 1)×( PWM 2- PWM 1)÷( V 2- V 1).
[0012] In an optional embodiment of the first aspect of the present invention, the target output power is dynamically generated based on a user dimming command, and the method for generating the target output power includes: Receive the user's current brightness setting ratio ( Brightness _Set ); Read the rated power of the currently connected light source load from the parameter library. P _rated ); Calculate the target output power ( P _ref ), P _ref = Brightness _Set × P _rated and the target output power ( P _ref ) and the actual output power ( P _out The difference is calculated to obtain the real-time control error used for PID calculation.
[0013] In an optional embodiment of the first aspect of the present invention, the control parameters of the PID feedback control algorithm are generated by a self-tuning method, wherein the method for generating the control parameters includes: When any of the following conditions are met: first run, replacement of light source load, or receipt of calibration instruction, the system enters self-tuning mode. Within the safe range of the current output power, apply a stepped PWM perturbation signal; Real-time monitoring of the power change rate, response delay time, overshoot, and steady-state error caused by the applied PWM disturbance signal; The PID feedback control algorithm is automatically calculated and updated based on the extracted system response characteristics to generate new proportional parameters. K p ), Integral parameters ( K i ), differential parameters ( K d And save it to the parameter library for later use.
[0014] A second aspect of the present invention provides a dimming system based on grid voltage fluctuation feedback, the dimming system comprising: The voltage signal acquisition module is used to acquire the mains input voltage signal of the dimming system in real time and convert it into a digital voltage signal to extract the current input voltage value; The power grid voltage status determination module is used to compare the current input voltage value with a preset voltage parameter library, calculate the voltage deviation value and voltage change rate, and determine the current power grid voltage status, which includes normal, high voltage, low voltage or instantaneous fluctuation. The dual-loop compensation module is used to generate a dimming compensation signal based on the determined grid voltage state using a dual-loop control algorithm that combines feedforward and feedback. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value through a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power through a PID feedback control algorithm. The PWM signal output module is used to superimpose the user-defined basic PWM value, the basic PWM compensation value, and the dynamic PWM fine-tuning value to generate the final PWM target output signal and send it to the constant current drive circuit. The closed-loop calibration module is used to sample the output voltage, output current and actual output power of the constant current drive circuit in real time, continuously update the error and perform closed-loop calibration until the actual output power stabilizes at the target output power.
[0015] A third aspect of the present invention provides a dimming device, the dimming device comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected via a circuit; The at least one processor invokes the instructions in the memory to cause the dimming device to perform a dimming method based on grid voltage fluctuation feedback as described in any one of the first aspects of the invention.
[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the dimming method based on grid voltage fluctuation feedback as described in any one of the first aspects of the present invention.
[0017] Beneficial Effects: This invention provides a dimming method, system, and related equipment based on grid voltage fluctuation feedback. The method includes real-time acquisition of the mains input voltage signal of the dimming system; determination of the current grid voltage state; and generation of a dimming compensation signal using a dual-loop control algorithm combining feedforward and feedback. During compensation, a lookup table-based feedforward compensation algorithm is used to obtain a basic PWM compensation value based on the input voltage for coarse adjustment; and a PID feedback control algorithm is used to calculate a dynamic PWM fine-tuning value based on the error between the actual output power and the target power for fine-tuning. Then, the user-set value, the feedforward basic compensation value, and the feedback fine-tuning value are superimposed to form the final PWM output signal, which is sent to the constant current drive circuit. Real-time sampling of the output power is used to form a closed-loop calibration. By constructing a dynamic closed loop of feedforward and feedback, this invention can more accurately offset grid fluctuation interference, achieve constant power output, effectively eliminate flicker, and improve the stability of the dimming system. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of an embodiment of the hardware architecture of a dynamic dimming control system according to the present invention; Figure 2 This is a schematic diagram of an embodiment of a dimming method based on grid voltage fluctuation feedback according to the present invention; Figure 3 This is a schematic diagram of an embodiment of a data frame structure exemplified by the present invention; Figure 4 This is a schematic diagram of an embodiment of a PID feedback control process exemplified by the present invention; Figure 5 This is a schematic diagram of an embodiment of the power grid voltage state determination logic of the present invention; Figure 6 This is a schematic diagram illustrating an embodiment of the calculation process of a PWM target output signal according to an exemplary method of the present invention; Figure 7 This is a schematic diagram of an embodiment of an exception protection logic of the present invention; Figure 8 This is a schematic diagram of an embodiment of the software modules of a dimming system based on grid voltage fluctuation feedback, which is an exemplary embodiment of the present invention. Figure 9 This is a schematic diagram of an embodiment of a dimming device according to an example of the present invention. Detailed Implementation
[0019] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] The first aspect of this invention provides a dimming method based on grid voltage fluctuation feedback. The core of this method lies in constructing a dynamic dimming control system that includes real-time grid voltage monitoring, fluctuation signal feedforward compensation, and output power closed-loop feedback. This system aims to eliminate the adverse effects of grid voltage fluctuations on the stability of the dimming output. For example, see [link to relevant documentation]. Figure 1 The hardware architecture of the dynamic dimming control system mainly includes: (1) Input filtering and surge suppression circuit: including rectifier filter circuit and surge suppression circuit, used to rectify, filter and suppress the input AC mains power.
[0021] (2) Input voltage and power sampling circuit: including input voltage and power sampling circuit, with built-in high-precision power statistics chip and optocoupler isolation circuit, used to collect parameters such as voltage, current and power of mains input terminal in real time and at high frequency.
[0022] (3) Control processing unit: The core controller of the system can be an MCU microcontroller, which can be embedded with voltage fluctuation analysis algorithm, dimming compensation logic program and multi-parameter database (including LUT compensation database, PID parameter library, etc.) and is responsible for generating the final PWM (pulse width modulation) dimming signal.
[0023] (4) Constant current drive circuit: including dimming drive chip, power adjustment circuit and PWM dimming circuit, used to receive PWM signal from control processing unit and adjust output current according to PWM signal to drive light source load.
[0024] (5) Output and detection circuit: including output filtering circuit and output detection circuit, used to sample the output terminal of the light source driver, obtain the output voltage, output current and actual output power in real time, and feed these data back to the control processing unit to form a closed-loop calibration.
[0025] See Figure 2 The dimming method based on grid voltage fluctuation feedback includes: S100: Real-time acquisition of the AC input voltage signal of the dimming system and conversion into a digital voltage signal to extract the current input voltage value. Taking the hardware architecture of the dynamic dimming control system in the example above as an example, in this step, the power statistics chip in the input voltage and power sampling circuit will continuously sample the AC input (e.g., acquire the input voltage...). V in or V (n) ), output voltage ( V out ), output current ( I out ), output power ( P _out ), power factor ( PF ) and frequency ( Freq Key operating parameters such as voltage fluctuations and PWM dynamic compensation are collected to provide a better data foundation for subsequent voltage fluctuation analysis and PWM dynamic compensation. Afterwards, the power statistics chip internally performs RMS calculation, active power calculation, filtering, and analog-to-digital conversion (A / D). Finally, it encapsulates the precise digital voltage signal, along with power, frequency, and other data, into data frames according to a preset communication protocol (such as UART). (An exemplary data frame format of this invention is as follows...) Figure 3 As shown, the data is sent to the control processing unit (MCU) after being isolated by an optocoupler. After receiving the data, the control processing unit performs CRC verification, validity judgment and data parsing to extract the input voltage value of the current cycle (i.e. the current input voltage value).
[0026] S200. The current input voltage value is compared with a preset voltage parameter library to calculate the voltage deviation value and voltage change rate, and the current grid voltage state is determined. The grid voltage state includes normal, high voltage, low voltage, or instantaneous fluctuation. In this step of the invention, the control processing unit internally stores a voltage parameter library, which defines the normal operating voltage range of the system (e.g., 198V to 242V) and the determination thresholds for high and low voltage. The control processing unit compares the real-time acquired current input voltage value with these thresholds and simultaneously calculates the difference between the current voltage and the voltage of the previous sampling period (| ΔV |) and rate of change (| d V / d t|), thereby determining that the current power grid is in one of the following four states: normal state, high voltage state, low voltage state, or instantaneous fluctuation state. For example, one way to determine the power grid voltage state of the present invention can be as follows: when the input voltage is within the rated range and changes slowly, it is determined to be a normal state; when it is higher than the high voltage threshold, it is determined to be a high voltage state; when it is lower than the low voltage threshold, it is determined to be a low voltage state; when the rate of change is too fast, it is determined to be an instantaneous fluctuation state.
[0027] In this invention, to enable the system to adapt to the characteristics of power grids in different regions around the world (such as long-term low and fluctuating voltage in some areas), a dynamic threshold adaptive mechanism is also designed. That is, in the first 30 minutes after the system is first powered on or after restoring factory settings, the system will enter a learning mode. In this mode, the system will continuously collect input voltage data and calculate the average voltage during this period. μ ) and standard deviation ( σ After the learning period, the system will automatically generate and store the high and low voltage thresholds for the current environment according to the following formula, where the high voltage threshold = μ + K × σ Low-pressure threshold = μ - K × σ , K For the preset sensitivity coefficient (e.g.) K =2 or 3), standard deviation ( σ This objectively reflects the severity of fluctuations in the current power grid. In this way, the system of the present invention can intelligently adapt to the local power grid environment, avoiding misjudgments or untimely compensation due to improper threshold settings. (That is, in an optional embodiment of the first aspect of the present invention, the voltage parameter library includes a high-voltage threshold and a low-voltage threshold. The voltage parameter library is dynamically generated using an environment-adaptive method. The generation method of the voltage parameter library includes: continuously collecting input voltage data during a preset time period before the system is powered on; calculating the average voltage value and standard deviation of the input voltage during the preset time period; and applying the formula: the high-voltage threshold = the average voltage + ...) K × the standard deviation, the low-voltage threshold = the average voltage - K × the standard deviation, where K (This is the preset sensitivity coefficient).
[0028] S300. Based on the determined grid voltage state, a dimming compensation signal is generated using a dual-loop control algorithm combining feedforward and feedback. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value using a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power using a PID feedback control algorithm.
[0029] In this invention, the core innovation lies in the dual-loop control algorithm combining feedforward and feedback. The control processing unit generates a dimming compensation signal based on the grid state determined in the previous step S200 using the dual-loop algorithm. For lookup table (LUT) feedforward compensation: the control processing unit (MCU) will use the current input voltage as an index to quickly look up the corresponding basic PWM compensation value in the pre-stored LUT compensation database. ΔPWM _LUT This feedforward mechanism, based on pre-calibration of system characteristics, enables rapid, coarse yet effective compensation during large-scale voltage fluctuations, significantly improving the system's response speed. An exemplary LUT lookup table compensation algorithm of this invention is shown in Table 1 below: Table 1. An exemplary lookup table of the present invention
[0030] For PID feedback control: the control processing unit (MCU) will acquire the actual output power fed back by the detection unit in real time. P _out and the target output power currently set by the user. P _ref By comparison, the control error is obtained. e ( k )= P _ref - P _out Subsequently, the PID (proportional-integral-derivative) controller calculates a dynamic PWM fine-tuning value based on this error. Δ PWM _PID A feedback loop is implemented to eliminate any steady-state errors that may exist after LUT feedforward compensation, ensuring that the output power is precisely locked at the target value. In this invention, for example, the proportional term... P= K p × e ( k ); Integral term I=I prev + K i × e ( k )× d t I prev The integral value of the previous sampling period; the differential term D = K d ×(( e ( k )- e ( k- 1)) / dt Dynamic PWM fine-tuning value Δ PWM _PID =P+I+D Finally, the PWM output is dynamically adjusted based on the PID calculation results, thereby further improving the stability of output brightness and dimming accuracy. An exemplary PID feedback control process of this invention can be described as follows: Figure 4 As shown.
[0031] In this invention, when a high-power inductive load (such as an air conditioner or elevator) starts or stops in the power grid, it will cause a momentary (millisecond-level) voltage drop or spike. Traditional PID controllers are prone to integral saturation under such severe disturbances, leading to serious overshoot. This invention constructs a special handling mechanism for such instantaneous fluctuation events: Instantaneous fluctuation determination: The control processing unit (MCU) identifies instantaneous fluctuation events by calculating the voltage change amplitude and rate of change (the instantaneous fluctuation determination method includes: obtaining the current sampled voltage ( V (n) ), the voltage of the previous sampling period ( V (n-1) ) and sampling period time ( Δt ); Calculate the voltage change amplitude | ΔV |=| V (n) - V (n-1) | and voltage change rate| d V / d t |=| V (n) - V (n-1) | / Δt When | ΔV |≥First preset threshold (Th1) and| d V / d t When |≥ the second preset threshold (Th2), it is determined that the power grid has experienced the instantaneous fluctuation. The sampling period is set to Δt For example, when the condition is met | ΔV |≥8V and| d V / d t When the voltage fluctuation is ≥5V / ms, the system determines that a transient fluctuation event has occurred and immediately enters a fast response mode. An exemplary power grid voltage state determination logic of this invention can be as follows: Figure 5 As shown.
[0032] Control logic in fast response mode: When the determined grid voltage state is an instantaneous fluctuation, the dual-loop control algorithm enters fast response mode. The fast response mode includes: prioritizing the use of the lookup table feedforward compensation algorithm to output the basic PWM compensation value for fast power correction, while temporarily freezing the accumulation of the integral term in the PID feedback control algorithm to prevent error mutations from causing integral saturation and overshoot, and increasing the weight of the derivative term in the PID feedback control algorithm to improve the response capability to fast voltage disturbances; after the grid voltage state recovers to normal and continues for a preset number of sampling periods, the fast response mode is exited, and the control of the integral term and the derivative term is restored to the state before entering the fast response mode.
[0033] Specifically, in this invention, the main functions of the fast response mode include: Suppressing integral saturation: The system temporarily freezes the accumulation of the integral term (I term) in the PID controller, keeping its current value unchanged. This effectively prevents the integral value from growing uncontrollably due to large instantaneous errors.
[0034] Strengthening the role of differentiation: Simultaneously, the system will increase the weight of the differential term (term D) (i.e., increase its weight). K d The coefficient is used to quickly suppress drastic voltage changes by utilizing the sensitivity of the differential element to the rate of error change.
[0035] Reliance on feedforward compensation: In this mode, the main compensation task of the system is undertaken by the LUT feedforward module with extremely fast response speed, which quickly corrects most of the power deviation.
[0036] Smooth Exit: When the control processing unit (MCU) detects that the input voltage has stabilized after several consecutive sampling cycles (e.g., 10 cycles), the system automatically exits the fast response mode, resumes the normal accumulation of the integral term and the regular PID parameters, and smoothly returns control to the regular dual-loop control algorithm.
[0037] Furthermore, in the actual operation of the system of this invention, the input voltage acquired in real time is usually not exactly equal to the integer node in the preset database. If rounding is used, it may cause step-like stuttering in the dimming process. Therefore, this invention introduces lookup table (LUT) linear interpolation and dynamic target power calculation: (1) For LUT linear interpolation: In an optional embodiment of the first aspect of the present invention, obtaining the basic PWM compensation value based on the current input voltage value through the lookup table feedforward compensation algorithm includes: determining the current input voltage value ( V in Whether it completely matches the discrete sampling node in the lookup table database; if it does not completely match, then obtain the value relative to the current input voltage value (V in The first voltage of two adjacent nodes ( V 1) Second voltage ( V 2), and the first voltage ( V 1) and the second voltage ( V 2) The corresponding first PWM compensation values ( PWM 1) and the second PWM compensation value ( PWM 2) The current input voltage value is calculated using a linear interpolation algorithm. V in The corresponding basic PWM compensation value ( ΔPWM _LUT The calculation formula is: ΔPWM _LUT = PWM 1+( V in - V 1)×( PWM 2- PWM 1)÷( V 2- V 1).
[0038] Specifically, the LUT database stores discrete "voltage-PWM compensation value" correspondences. To achieve smooth compensation, when the input voltage is collected in real time... V in It falls on two database nodes V 1 and V When the value is between 2 and 2, the system uses a linear interpolation algorithm to calculate the corresponding compensation value. ΔPWM _LUT ): ΔPWM _LUT = PWM 1+( V in - V 1)×( PWM 2- PWM 1)÷( V 2- V 1), among which, PWM 1 and PWM 2 is V 1 and V The compensation value corresponding to 2 avoids abrupt changes in the compensation value, ensuring the visual smoothness of the dimming process.
[0039] (2) For dynamic target power ( P _ref) Calculation: In an optional embodiment of the first aspect of the present invention, the target output power is dynamically generated based on a user dimming command, and the method for generating the target output power includes: receiving the user's current brightness setting ratio value ( Brightness _Set ); Read the rated power of the currently connected light source load from the parameter library ( P _rated ); Calculate the target output power ( P _ref ), P _ref = Brightness _Set × P _rated and the target output power ( P _ref ) and the actual output power ( P _out The difference is calculated to obtain the real-time control error used for PID calculation.
[0040] Specifically, to ensure accurate dimming at any brightness level, the target value of PID control is... P _ref It is not fixed, but dynamically linked to the user's dimming command. The control processing unit (MCU) first reads the rated power of the current lamp (i.e., the light source load). P _rated (e.g., 50W), and then receive the user's brightness setting ratio value. Brightness _Set (For example, 80% from the DALI signal), then calculate the current target output power: P _ref = Brightness _Set × P _rated =80% × 50W = 40W, this is dynamic. P _ref This will serve as the benchmark for calculating the error of the PID controller, ensuring that the system can accurately stabilize at the corresponding power regardless of whether the user dims the light to 5% or 100%.
[0041] Furthermore, to adapt to different driver and lamp load characteristics, this invention also includes a PID parameter self-tuning function. When triggering conditions are met (such as first-time operation, replacement of the light source load (lamp), or receipt of a calibration command from the host computer), the system starts the self-tuning program: the system applies a small PWM step disturbance near the current operating point (for example, the PWM duty cycle changes abruptly from 50% to 55%), and monitors the output power at high frequency. P _outThe response curve is obtained. By analyzing the characteristics of the response curve (such as rise time, overshoot, and settling time), the system automatically calculates a set of optimal values using mature control theory algorithms (such as the Ziegler-Nichols method). K p , K i and K d The parameters are stored in the corresponding parameter library. This function greatly improves the product's versatility and ease of use. (The control parameters of the PID feedback control algorithm are generated through a self-tuning method, which includes: entering self-tuning mode when any of the following conditions are met: first run, replacement of light source load, or receipt of calibration command; applying a stepped PWM disturbance signal within the safe range of the current output power; real-time monitoring of the power change rate, response delay time, overshoot, and steady-state error caused by the applied PWM disturbance signal; automatically calculating and updating the PID feedback control algorithm based on the extracted system response characteristics to generate new proportional parameters.) K p ), Integral parameters ( K i ), differential parameters ( K d (and save it to the parameter library for later use).
[0042] S400: The user-defined base PWM value, the base PWM compensation value, and the dynamic PWM fine-tuning value are superimposed to generate the final PWM target output signal and sent to the constant current drive circuit. In this step of the invention, the control processing unit (MCU) superimposes the user-defined base PWM value (…) through the dimming interface… PWM _user or PWM _base ), LUT feedforward compensation value ( Δ PWM _LUT or PWM _LUT ) and PID feedback fine-tuning value ( ΔPWM _PID or ΔPWM The three components are algebraically superimposed to generate the final target PWM output signal: PWM _target = PWM _user + ΔPWM _LUT + ΔPWM _PID After that PWM _targetThe signal is sent to the constant current drive circuit of the light source. The entire calculation process of the PWM target output signal, as exemplified by this invention, can be described as follows: Figure 6 As shown.
[0043] S500: Real-time sampling of the output voltage, output current, and actual output power of the constant current drive circuit; continuous updating of the error and closed-loop calibration until the actual output power stabilizes at the target output power. In this invention, the constant current drive circuit performs... PWM _target Upon receiving the signal command, the output and detection unit will immediately measure the new output power. P _out This information is then fed back to the control processing unit (MCU), which will then use this new information in the next control cycle. P _out Recalculate the error e ( k The system continuously executes steps S300 and S400, and this high-speed closed-loop process ensures that the output power is always dynamically and accurately stabilized at the target value, regardless of changes in the input voltage.
[0044] See Figure 7 To improve system operational safety, this invention also incorporates a complete anomaly detection and protection mechanism: During system operation, the MCU continuously monitors the input voltage, output current, output power, and communication status. When input overvoltage, input undervoltage, output overcurrent, output short circuit, communication anomaly, or temperature anomaly is detected, the system automatically enters a protection state. In this state, the system can perform operations such as power reduction, output limiting, current protection, PWM output shutdown, and fault alarm, and record the current fault information. After the abnormal state is restored, the system re-verifies communication and initializes parameters, and automatically resumes normal operation. This protection mechanism effectively improves the reliability and long-term stability of the LED driver system.
[0045] In summary, this invention relates to a dimming method based on grid voltage fluctuation feedback. The core of this method lies in constructing a closed-loop feedback control system. This system monitors the grid input voltage in real time through an input voltage and power sampling unit, transmitting fluctuating data to a control processing unit. The control processing unit compares this data with a preset voltage threshold, generates a compensation control signal, and outputs it to the dimming circuit. This dynamically corrects the dimming drive parameters, stabilizing the dimming output power and brightness. The main implementation steps are as follows: 1. Real-time acquisition of grid voltage: An input voltage and power sampling circuit is set at the mains input terminal of the dimming system. A high-precision voltage sampling circuit is used to acquire the AC input voltage signal of the grid in real time. The voltage signal is rectified, filtered and analog-to-digital converted to convert the analog voltage signal into a digital voltage signal. The real-time value, fluctuation frequency and fluctuation amplitude parameters of the grid voltage are acquired simultaneously.
[0046] 2. Voltage fluctuation signal processing and judgment: The collected digital voltage signal is transmitted to the control processing unit. The control processing unit has a built-in voltage reference database that stores the rated voltage range and the optimal dimming voltage threshold for normal operation of the dimming system. The control unit compares the collected voltage with the rated voltage threshold in real time, quickly calculates the voltage deviation value and fluctuation trend, determines whether the grid voltage is too high, too low or in normal operating condition, and generates the corresponding fluctuation feedback command.
[0047] 3. Dynamic Compensation and Control of Dimming Parameters: Based on voltage fluctuation feedback commands, the control processing unit outputs compensation control signals to the constant current dimming drive circuit (e.g., LED constant current dimming drive circuit), and executes corresponding control logic for different voltage fluctuation conditions: When the mains voltage is higher than the rated threshold, the control processing unit reduces the PWM dimming duty cycle of the dimming circuit and reduces the drive current output to offset the power increase caused by high voltage and maintain constant output power; when the mains voltage is lower than the rated threshold, the control processing unit improves the drive efficiency of the dimming circuit and increases the effective drive current to compensate for the power deficiency caused by low voltage and ensure that the dimming brightness does not decrease; when there is a momentary fluctuation / interference in the mains voltage, the control processing unit quickly outputs a voltage stabilization compensation signal to suppress voltage ripple and avoid momentary distortion of the dimming signal.
[0048] 4. Closed-loop calibration and stable output: After the constant current dimming circuit performs compensation and regulation, the input voltage and power sampling circuit continuously and in real time samples the grid voltage and the dimming output voltage to form a closed-loop calibration. The control processing unit continuously fine-tunes the compensation parameters until the dimming output power and brightness are stable at the set value, realizing dynamic voltage stabilization dimming with no delay and high precision.
[0049] In summary, the dimming method based on grid voltage fluctuation feedback of this invention can bring at least the following technical effects: 1. Improve system dimming stability: Solve the problems of brightness flickering, strobe, and uneven brightness of LED lights caused by power grid voltage fluctuations; 2. Adaptable to complex power environments: It can be used normally in industrial, civil, and remote areas where the power grid voltage is unstable, thus broadening the application scenarios of dimming lighting systems; 3. Optimize user experience: Achieve seamless and smooth dimming, with no flicker or stuttering, improving lighting comfort; 4. Reduce system costs: By generating a reference voltage and current database through power matching in the early stage, the number of external detection circuits can be reduced, thereby reducing product costs.
[0050] See Figure 8 A second aspect of the present invention provides a dimming system based on grid voltage fluctuation feedback, the dimming system comprising: The voltage signal acquisition module 10 is used to acquire the mains input voltage signal of the dimming system in real time and convert it into a digital voltage signal to extract the current input voltage value; The power grid voltage status determination module 20 is used to compare the current input voltage value with a preset voltage parameter library, calculate the voltage deviation value and voltage change rate, and determine the current power grid voltage status, which includes normal, high voltage, low voltage or instantaneous fluctuation. The dual-loop compensation module 30 is used to generate a dimming compensation signal based on the determined grid voltage state using a dual-loop control algorithm combining feedforward and feedback. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value through a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power through a PID feedback control algorithm. The PWM signal output module 40 is used to superimpose the user-set basic PWM value, the basic PWM compensation value and the dynamic PWM fine-tuning value to generate the final PWM target output signal and send it to the constant current drive circuit. The closed-loop calibration module 50 is used to sample the output voltage, output current and actual output power of the constant current drive circuit in real time, continuously update the error and perform closed-loop calibration until the actual output power stabilizes at the target output power.
[0051] In an optional embodiment of the second aspect of the present invention, the voltage parameter library includes a high-voltage threshold and a low-voltage threshold, the voltage parameter library is dynamically generated using an environment-adaptive method, and the method for generating the voltage parameter library includes: Input voltage data is continuously collected during the preset time period before the system is powered on; Calculate the average voltage value and standard deviation of the input voltage within the preset time period; According to the formula: The high voltage threshold = The average voltage + K × the standard deviation, the low-voltage threshold = the average voltage - K × the standard deviation, where K This is the preset sensitivity coefficient.
[0052] In an optional embodiment of the second aspect of the present invention, the power grid voltage state determination module 20 includes an instantaneous fluctuation determination unit, the instantaneous fluctuation determination unit being used to acquire the current sampled voltage ( V (n) ), the voltage of the previous sampling period ( V (n-1) ) and sampling period time ( Δt ); Calculate the voltage change amplitude | ΔV |=| V (n) - V (n-1) | and voltage change rate| d V / d t |=| V (n) - V (n-1) | / Δt When | ΔV |≥First preset threshold and| d V / d t When the threshold value is greater than or equal to the second preset threshold, it is determined that the power grid has experienced the instantaneous fluctuation.
[0053] In an optional embodiment of the second aspect of the present invention, the dual-ring compensation module 30 includes: A fast response unit is configured to, when the determined grid voltage state is an instantaneous fluctuation, initiate a fast response mode for the dual-loop control algorithm. The fast response mode includes: prioritizing the use of the lookup table feedforward compensation algorithm to output the basic PWM compensation value for rapid power correction; simultaneously, temporarily freezing the accumulation of the integral term in the PID feedback control algorithm to prevent error mutations from causing integral saturation and overshoot; and increasing the weight of the derivative term in the PID feedback control algorithm to enhance the response capability to rapid voltage disturbances. After the grid voltage state returns to normal and continues for a preset number of sampling periods, the fast response mode is exited, and the control of the integral and derivative terms is restored to the state before entering the fast response mode.
[0054] In an optional embodiment of the second aspect of the present invention, the dual-loop compensation module 30 further includes a feedforward compensation processing unit for determining the current input voltage value ( V in Whether it completely matches the discrete sampling node in the lookup table database; if it does not completely match, then obtain the value relative to the current input voltage value ( V in The first voltage of two adjacent nodes ( V 1) Second voltage (V 2), and the first voltage ( V 1) and the second voltage ( V 2) The corresponding first PWM compensation values ( PWM 1) and the second PWM compensation value ( PWM 2); and the current input voltage value is calculated using a linear interpolation algorithm. V in The corresponding basic PWM compensation value ( ΔPWM _LUT The calculation formula is: ΔPWM _LUT = PWM 1+( V in - V 1)×( PWM 2- PWM 1)÷( V 2- V 1).
[0055] In an optional embodiment of the second aspect of the present invention, the target output power is dynamically generated based on a user dimming command, and the method for generating the target output power includes: Receive the user's current brightness setting ratio ( Brightness _Set ); Read the rated power of the currently connected light source load from the parameter library. P _rated ); Calculate the target output power ( P _ref ), P _ref = Brightness _Set × P _rated and the target output power ( P _ref ) and the actual output power ( P _out The difference is calculated to obtain the real-time control error used for PID calculation.
[0056] In an optional embodiment of the second aspect of the present invention, the control parameters of the PID feedback control algorithm are generated by a self-tuning method, wherein the method for generating the control parameters includes: When any of the following conditions are met: first run, replacement of light source load, or receipt of calibration instruction, the system enters self-tuning mode. Within the safe range of the current output power, apply a stepped PWM perturbation signal; Real-time monitoring of the power change rate, response delay time, overshoot, and steady-state error caused by the applied PWM disturbance signal; The PID feedback control algorithm is automatically calculated and updated based on the extracted system response characteristics to generate new proportional parameters. K p ), Integral parameters ( K i ), differential parameters ( K d And save it to the parameter library for later use.
[0057] Figure 9 This is a schematic diagram of a dimming device according to an embodiment of the present invention. The dimming device can vary significantly due to differences in configuration or performance, and may include one or more processors 60 (central processing units, CPUs) (e.g., one or more processors) and a memory 70, and one or more storage media 80 (e.g., one or more mass storage dimming devices) for storing recording programs or data. The memory and storage media can be short-term or persistent storage. The program stored in the storage media may include one or more modules (not shown in the figure), each module including a series of instruction operations on the dimming device. Furthermore, the processor may be configured to communicate with the storage media and execute the series of instruction operations in the storage media on the dimming device.
[0058] The dimming device of this embodiment may further include one or more power supplies 90, one or more wired or wireless network interfaces 100, one or more input / output interfaces 110, and / or one or more operating systems, such as Windows Server, Mac OS, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The dimming device structure shown does not constitute a limitation on the dimming device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0059] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the dual-microphone-based noise reduction recording method.
[0060] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system, module, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0061] If the integrated unit is implemented as a software functional unit or a combination of software and hardware 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 embodiments 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 dimming device (which may be a personal computer, server, or network dimming 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.
[0062] The above 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 dimming method based on grid voltage fluctuation feedback, characterized in that, include: The voltage signal at the mains input terminal of the dimming system is acquired in real time and converted into a digital voltage signal to extract the current input voltage value; The current input voltage value is compared with a preset voltage parameter library to calculate the voltage deviation value and voltage change rate, and to determine the current grid voltage state, which includes normal, high voltage, low voltage or instantaneous fluctuation. Based on the determined grid voltage state, a dual-loop control algorithm combining feedforward and feedback is used to generate a dimming compensation signal. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value through a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power through a PID feedback control algorithm. The user-defined base PWM value, the base PWM compensation value, and the dynamic PWM fine-tuning value are superimposed to generate the final PWM target output signal and sent to the constant current drive circuit. The output voltage, output current, and actual output power of the constant current drive circuit are sampled in real time, the error is continuously updated, and closed-loop calibration is performed until the actual output power stabilizes at the target output power.
2. The dimming method based on grid voltage fluctuation feedback according to claim 1, characterized in that, The voltage parameter library includes high voltage thresholds and low voltage thresholds. The voltage parameter library is dynamically generated using an environment-adaptive method. The generation method of the voltage parameter library includes: Input voltage data is continuously collected during the preset time period before the system is powered on; Calculate the average voltage value and standard deviation of the input voltage within the preset time period; According to the formula: The high voltage threshold = The average voltage + K × the standard deviation, the low-voltage threshold = the average voltage - K × the standard deviation, where K This is the preset sensitivity coefficient.
3. The dimming method based on grid voltage fluctuation feedback according to claim 1, characterized in that, The method for determining instantaneous fluctuations includes: Get the current sampled voltage ( V (n) ), the voltage of the previous sampling period ( V (n-1) ) and sampling period time ( Δt ); Calculate the voltage change amplitude | ΔV |=| V (n) - V (n-1) | and voltage change rate| d V / d t |=| V (n) - V (n-1) | / Δt ; When | ΔV |≥First preset threshold and| d V / d t When the threshold value is greater than or equal to the second preset threshold, it is determined that the power grid has experienced the instantaneous fluctuation.
4. The dimming method based on grid voltage fluctuation feedback according to claim 3, characterized in that, The generation of the dimming compensation signal based on the determined grid voltage state, using a dual-loop control algorithm combining feedforward and feedback, includes: When the determined grid voltage state is the instantaneous fluctuation, the dual-loop control algorithm enters the fast response mode. The fast response mode includes: prioritizing the use of the lookup table feedforward compensation algorithm to output the basic PWM compensation value for fast power correction, while temporarily freezing the accumulation of the integral term in the PID feedback control algorithm to prevent error mutations from causing integral saturation and overshoot, and increasing the weight of the derivative term in the PID feedback control algorithm to improve the response capability to fast voltage disturbances. After the grid voltage state returns to normal and continues for a preset number of sampling periods, the fast response mode is exited, and the control of the integral term and the derivative term is restored to the state before entering the fast response mode.
5. The dimming method based on grid voltage fluctuation feedback according to claim 1, characterized in that, The step of obtaining the basic PWM compensation value based on the current input voltage value using the lookup table feedforward compensation algorithm includes: Determine the current input voltage value ( V in Does it completely match the discrete sampling nodes in the lookup table database? If not a perfect match, then obtain the value relative to the current input voltage ( V in The first voltage of two adjacent nodes ( V 1) Second voltage ( V 2), and the first voltage ( V 1) and the second voltage ( V 2) The corresponding first PWM compensation values ( PWM 1) and the second PWM compensation value ( PWM 2); The current input voltage value is calculated using a linear interpolation algorithm. V in The corresponding basic PWM compensation value ( Δ PWM _LUT The calculation formula is: ΔPWM _LUT = PWM 1+( V in - V 1)×( PWM 2- PWM 1)÷( V 2- V 1).
6. The dimming method based on grid voltage fluctuation feedback according to claim 1, characterized in that, The target output power is dynamically generated based on user dimming commands, and the method for generating the target output power includes: Receive the user's current brightness setting ratio ( Brightness _Set ); Read the rated power of the currently connected light source load from the parameter library. P _rated ); Calculate the target output power ( P _ref ), P _ref = Brightness _Set × P _rated and the target output power ( P _ref ) and the actual output power ( P _out The difference is calculated to obtain the real-time control error used for PID calculation.
7. The dimming method based on grid voltage fluctuation feedback according to claim 1, characterized in that, The control parameters of the PID feedback control algorithm are generated through a self-tuning method, which includes: When any of the following conditions are met: first run, replacement of light source load, or receipt of calibration instruction, the system enters self-tuning mode. Within the safe range of the current output power, apply a stepped PWM perturbation signal; Real-time monitoring of the power change rate, response delay time, overshoot, and steady-state error caused by the applied PWM disturbance signal; The PID feedback control algorithm is automatically calculated and updated based on the extracted system response characteristics to generate new proportional parameters. K p ), Integral parameters ( K i ), differential parameters ( K d And save it to the parameter library for later use.
8. A dimming system based on grid voltage fluctuation feedback, characterized in that, The dimming system includes: The voltage signal acquisition module is used to acquire the mains input voltage signal of the dimming system in real time and convert it into a digital voltage signal to extract the current input voltage value; The power grid voltage status determination module is used to compare the current input voltage value with a preset voltage parameter library, calculate the voltage deviation value and voltage change rate, and determine the current power grid voltage status, which includes normal, high voltage, low voltage or instantaneous fluctuation. The dual-loop compensation module is used to generate a dimming compensation signal based on the determined grid voltage state using a dual-loop control algorithm that combines feedforward and feedback. The dual-loop control algorithm includes: obtaining a basic PWM compensation value based on the current input voltage value through a lookup table feedforward compensation algorithm; and calculating a dynamic PWM fine-tuning value based on the error between the target output power and the real-time acquired actual output power through a PID feedback control algorithm. The PWM signal output module is used to superimpose the user-defined basic PWM value, the basic PWM compensation value, and the dynamic PWM fine-tuning value to generate the final PWM target output signal and send it to the constant current drive circuit. The closed-loop calibration module is used to sample the output voltage, output current and actual output power of the constant current drive circuit in real time, continuously update the error and perform closed-loop calibration until the actual output power stabilizes at the target output power.
9. A dimming device, characterized in that, The dimming device includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the dimming device to perform the dimming method based on grid voltage fluctuation feedback as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the dimming method based on grid voltage fluctuation feedback as described in any one of claims 1-7.