A lamp brightness control method based on artificial intelligence

By using an AI-based lighting brightness control method, a pre-trained model is used to generate uniform trajectory points and combined with PID control. This solves the problems of sudden brightness changes and visual fatigue during lighting brightness adjustment, achieves smooth adaptation to changes in ambient light, and improves visual comfort and energy saving.

CN122138312APending Publication Date: 2026-06-02SHANDONG HI LIGHT PHOTOELECTRIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG HI LIGHT PHOTOELECTRIC TECH CO LTD
Filing Date
2026-02-24
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for controlling the brightness of lighting fixtures are difficult to adapt to changes in ambient light quickly and smoothly, leading to sudden changes in brightness that cause visual fatigue. Furthermore, they fail to take into account the characteristics of human eye perception, resulting in poor uniformity of perception during the adjustment process and failing to meet the needs of high-quality lighting.

Method used

An AI-based lighting brightness control method is adopted. Discrete reference trajectory points are generated through a pre-trained perceptual uniform trajectory point generation model. Combined with PID control and curvature adaptive parameter adjustment, the brightness is smoothly adjusted. Ambient light disturbances are monitored in real time to trigger trajectory replanning. The least squares method is used to smoothly connect the old and new trajectories.

Benefits of technology

It achieves stable brightness matching of lamps, improves visual comfort, avoids sudden brightness changes and visual fatigue, takes into account energy-saving requirements, and is suitable for various scenarios such as smart homes and office venues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138312A_ABST
    Figure CN122138312A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of control technology, and particularly relates to an artificial intelligence-based method for controlling the brightness of lighting fixtures. It aims to solve the problem of abrupt brightness changes in traditional lighting control. The method includes: responding to a light-on trigger event, acquiring the ambient light brightness value, setting a target brightness, and calculating the initial brightness; calling a pre-trained perceptual uniform trajectory point generation model to generate discrete trajectory points, and obtaining a continuous trajectory sequence through time-domain interpolation; achieving dimming through curvature adaptive PID control; monitoring ambient light disturbances, triggering trajectory replanning, and smoothly connecting the old and new trajectories using the least squares method. This invention achieves smooth brightness adjustment, improves visual comfort, dynamically adapts to environmental changes, and meets high-quality lighting requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of control technology, and in particular relates to a method for controlling the brightness of lighting fixtures based on artificial intelligence. Background Technology

[0002] In smart home, office lighting, and public venue lighting scenarios, luminaire brightness needs to dynamically adapt to changes in ambient light to ensure visual comfort and energy efficiency. Current luminaire brightness control largely relies on manual adjustment or simple threshold triggering modes. When external ambient light fluctuates, such as sunlight intensity or illuminance during cloudy or rainy weather, it is difficult to achieve rapid and stable brightness switching. Sudden brightness changes can easily cause visual fatigue. Furthermore, traditional control methods do not consider the human eye's perception of brightness, resulting in poor uniformity in the adjustment process and failing to meet the demands of high-quality lighting. Summary of the Invention

[0003] In view of the technical problems existing in the background art described above, the present invention proposes a lighting brightness control method based on artificial intelligence.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0005] In response to the light-on trigger event, the system obtains the current ambient light level and sets the target brightness level for the luminaire; based on the current ambient light level, it calculates the initial brightness level for the luminaire.

[0006] The pre-trained perceptual uniform trajectory point generation model is invoked to generate L discrete reference trajectory points from the initial brightness value to the target brightness value.

[0007] Interpolate L discrete reference trajectory points in the time domain to generate a continuous time domain reference trajectory sequence;

[0008] For the brightness at each moment in the continuous time domain reference trajectory sequence, brightness adjustment is achieved through PID control.

[0009] Continuously monitor ambient light intensity time-series data and calculate the amplitude of ambient light intensity change within a sliding time window; if the amplitude of change is greater than the set threshold and exceeds H times, it is determined to be a valid change disturbance.

[0010] When a valid change disturbance is detected, trajectory replanning is triggered. The current ambient light value is reacquired and the target brightness value is updated. The current brightness value of the lamp is used as the starting point of the new trajectory and a new reference trajectory sequence is generated. Then, the least squares method is used to smoothly connect the old and new trajectories, which facilitates the PID to complete smooth lamp brightness control.

[0011] Preferably, based on the current ambient light intensity value, the initial brightness value of the luminaire is calculated to satisfy the following relationship:

[0012] ,in, This is the initial brightness value of the lamp. To the maximum brightness of the lamp, This is the minimum brightness of the light fixture. The exponential decay coefficient is... This represents the current ambient light level. The maximum threshold for ambient light. This is a range constraint function that constrains the range of the initial brightness values ​​to within a certain range. and between.

[0013] As a preferred approach, the specific implementation of calling a pre-trained perceptual uniform trajectory point generation model to generate L discrete reference trajectory points from the initial brightness value to the target brightness value is as follows:

[0014] A perceptual uniform trajectory point generation model is constructed using a lightweight deep learning network, comprising a three-level network structure: a feature encoding layer, a perceptual mapping layer, and a trajectory generation layer.

[0015] The model for generating uniform trajectory points is pre-trained using a training set.

[0016] The pre-trained perceptual uniform trajectory point generation model is invoked. The input feature vector specifically includes: the currently calculated initial brightness value of the lamp, the target brightness value of the lamp, and the upper and lower limits of the physical range of the current brightness adjustment of the lamp. The output is a preliminary L-dimensional discrete brightness value sequence.

[0017] The initial L-dimensional discrete brightness numerical sequence is post-processed by performing adjacent point value difference verification and removing redundant points in the sequence whose brightness value difference between two adjacent points is less than the minimum adjustment step size of the lamp. If the number of trajectory points after removal is less than L, discrete points are added at the position of the largest brightness value difference between two adjacent points in the sequence by averaging, until L discrete points are restored.

[0018] Preferably, the implementation of generating a continuous time-domain reference trajectory sequence by interpolating L discrete reference trajectory points in the time domain includes:

[0019] Preset the total duration T for adjusting the brightness of the lamps, and calculate the total change in brightness. And the percentage change in brightness between adjacent trajectory points: , ;in, This represents the percentage change in brightness between adjacent trajectory points. The brightness change for each adjacent trajectory point;

[0020] Dynamically allocate time steps and calculate the time step for a single interval: And based on the time step of a single interval, a time axis grid is generated by accumulating the data to satisfy the following conditions: , ;

[0021] A continuous time-domain reference trajectory sequence is obtained by fitting all adjacent sensing trajectory points using the least squares method.

[0022] Preferably, for the brightness at each moment in the continuous time domain reference trajectory sequence, the specific implementation of brightness adjustment through PID control is as follows:

[0023] Set up a PID controller and initialize the proportional, integral, and derivative coefficients.

[0024] Define a sliding time window with a length of three sampling periods. For a continuous time domain reference trajectory sequence, at each sampling time t, calculate the local curvature based on the trajectory points sampled within the sliding time window. And set a curvature threshold;

[0025] when Adjust the differential coefficients: ,in, The differential coefficient value from the previous sampling time is used as the reference value for the current adjustment. The value of the differential coefficient at the current sampling time. The first adjustment is the gain coefficient. Curvature threshold;

[0026] when Adjust the scaling factor: ,in, The value of the scaling factor at the previous sampling time is taken. The value of the scaling factor at the current sampling time. This is the second adjustment gain factor;

[0027] Add a soft-switching factor before the integral term coefficient. To achieve a continuous transition of integral action, the output of the PID controller is constructed as follows: ;

[0028] The brightness is adjusted at each moment using a pre-built PID controller.

[0029] Preferably, the soft switching factor The calculation method satisfies:

[0030] ,in, The adaptive threshold is calculated using the error gradient.

[0031] Compared with existing technologies, the advantages and positive effects of this invention are as follows: relying on a pre-trained perceptual uniform trajectory point generation model, it avoids the problem of sudden brightness changes in traditional adjustment, thus improving visual comfort; it adopts a curvature adaptive PID control strategy, combined with an integral soft switching factor, to solve the overshoot and oscillation defects caused by fixed parameters, achieving precise dimming; it can monitor ambient light disturbances in real time, trigger trajectory replanning, and smoothly connect the old and new trajectories through the least squares method, dynamically adapting to environmental changes; it requires no large amount of manual intervention, takes into account energy-saving needs and high-quality lighting experience, and is suitable for various scenarios such as smart homes and office venues. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating an artificial intelligence-based method for controlling the brightness of lighting fixtures. Detailed Implementation

[0034] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0035] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0036] This invention discloses an artificial intelligence-based method for controlling the brightness of lighting fixtures, as illustrated in the following embodiment. Figure 1 .

[0037] First, respond to the light-on trigger event, obtain the current ambient light intensity value, and set the target brightness value of the lamp; based on the current ambient light intensity value, calculate the initial brightness value of the lamp.

[0038] Specifically, when the system detects a light-on trigger event (such as a user pressing a physical switch, a human infrared sensor detecting activity, a voice command "turn on the light," or a preset timer signal), the central controller immediately activates the ambient light sensor module to obtain a stable and reliable current ambient light brightness value. Then, the setting of the target brightness value for the lamps employs an intelligent multi-strategy fusion mechanism: if the user has preset scene modes via the app, such as reading mode or sleep mode, the corresponding value is directly invoked; if no preset mode is available, the target brightness base value is set to 3.5 times the ambient light value; simultaneously, user historical preferences are incorporated: the average value of manual dimming under similar ambient light conditions during the same time period over the past 7 days is extracted and weighted 30% to form the target brightness base value with a 70% weight, resulting in the final target brightness value. When 3.5 times the ambient light value is greater than the lamp's maximum brightness, the target brightness base value is adjusted to the lamp's maximum brightness.

[0039] To address the issue of poor initial brightness adaptation to ambient light in traditional lighting fixtures, leading to excessively high or low brightness upon switching on, an initial brightness calculation scheme based on an exponential decay model and value range constraints is adopted. This achieves a stable initial brightness adaptation to the current ambient light, avoiding sudden brightness changes upon switching on. Based on the current ambient light brightness value, the calculated initial brightness value of the lighting fixture satisfies the following relationship:

[0040] ,in, This is the initial brightness value of the lamp. To the maximum brightness of the lamp, This is the minimum brightness of the light fixture. The exponential decay coefficient is... This represents the current ambient light level. The maximum threshold for ambient light. This is a range constraint function that constrains the range of the initial brightness values ​​to within a certain range. and In this scheme, the initial brightness value decreases exponentially with changes in ambient light intensity; the brighter the ambient light, the higher the initial brightness, effectively improving visual comfort at the moment the lights are turned on. If the initial brightness value exceeds the set brightness value or reaches the maximum brightness value, subsequent processing steps will not be considered.

[0041] Then, considering that traditional brightness adjustment trajectory point generation does not take into account the characteristics of human eye perception, the brightness change perception is uneven during the adjustment process, which can easily cause visual fatigue, a pre-trained perceptual uniform trajectory point generation model is called to generate L discrete reference trajectory points from the initial brightness value to the target brightness value.

[0042] Specifically, a perceptual uniform trajectory point generation model is constructed using a lightweight deep learning network, comprising a three-level network structure: a feature encoding layer, a perceptual mapping layer, and a trajectory generation layer. The feature encoding layer employs a combination of a 1D convolutional neural network (1D-CNN) and a channel attention mechanism, with an overall lightweight design. It contains two convolutional layers: the first layer has a kernel size of 3 and a stride of 1, and the second layer has a kernel size of 2 and a stride of 1. No pooling layers are used to avoid feature information loss, and the standard ReLU activation function is employed. The channel attention mechanism module is connected after the two convolutional layers to dynamically adjust the weight ratio of the feature channels. The input is a 4-dimensional low-dimensional feature vector, specifically including: the initial brightness value of the lamp, the target brightness value of the lamp, the upper limit of the physical range of lamp brightness adjustment, and the lower limit of the physical range of lamp brightness adjustment. The output is a 64-dimensional high-dimensional feature vector, which integrates deep correlation information of the input features. The perceptual mapping layer uses a fully connected layer and a ReLU non-linear activation function. The fully connected layer has one hidden layer with 128 neurons. The input dimension is a 64-dimensional vector from the feature encoding layer, and the output dimension is a 32-dimensional feature vector matching the perceptual space. The trajectory generation layer uses a Temporal Generative Network (TGN) as its core architecture, with an integrated perceptual uniformity constraint module. The network contains two Long Short-Term Memory (LSTM) units. The input is the 32-dimensional perceptual space feature vector output from the perceptual mapping layer, and the output is an L-dimensional discrete brightness numerical sequence.

[0043] Then, the perceptual uniform trajectory point generation model is pre-trained using a training set. Training set samples are input into the perceptual uniform trajectory point generation model, which outputs a predicted trajectory point sequence through its three-level network structure. The loss value between the predicted trajectory point sequence and the label set is calculated. The loss function is a hybrid loss function, consisting of perceptual uniformity loss, endpoint constraint loss, and numerical bias loss. The perceptual uniformity loss is calculated based on the human eye's perceived brightness error and is used to constrain the uniformity of the predicted sequence in the perceptual dimension. The endpoint constraint loss ensures that the first point of the predicted sequence perfectly matches the initial brightness value, and the last point perfectly matches the target brightness value. The numerical bias loss constrains the numerical error between the predicted sequence and the label sequence. Every 10 training epochs, the model is validated using a validation set, and the validation set loss value is calculated. If the validation set loss value does not decrease for 20 consecutive epochs, an early stopping strategy is used to stop training to avoid overfitting. Simultaneously, every 50 training epochs, the model is tested using a test set, and the model's prediction accuracy, perceptual uniformity, and trajectory point generation speed are calculated. If the test metrics do not meet the preset requirements, the model parameters are adjusted, and training is repeated.

[0044] The pre-trained perceptual uniform trajectory point generation model is called to output an initial L-dimensional discrete brightness value sequence. The initial L-dimensional discrete brightness value sequence is then post-processed, and adjacent point value difference verification is performed. Redundant points in the sequence whose brightness value difference between two adjacent points is less than the minimum adjustment step size of the lamp are removed. If the number of trajectory points after removal is less than L, discrete points are added at the position of the largest brightness value difference between two adjacent points in the sequence by averaging, until L discrete points are restored.

[0045] Time-domain interpolation is performed on L discrete reference trajectory points to generate a continuous time-domain reference trajectory sequence. Specifically, the total duration T for adjusting the brightness of the lamps is preset, and the total change in brightness is calculated. And the percentage change in brightness between adjacent trajectory points: , ;in, This represents the percentage change in brightness between adjacent trajectory points. The brightness change for each adjacent trajectory point; dynamically allocate time steps and calculate the time step for a single interval: And based on the time step of a single interval, a time axis grid is generated by accumulating the data to satisfy the following conditions: , A continuous time-domain reference trajectory sequence is obtained by fitting all adjacent sensing trajectory points using the least squares method.

[0046] Brightness adjustment is achieved through PID control at each moment in the continuous time-domain reference trajectory sequence. Specifically, considering that traditional PID control parameters are fixed and cannot adapt to the curvature changes of the continuous trajectory sequence, and that the integral action is prone to saturation leading to dimming overshoot and oscillation, a curvature adaptive parameter adjustment and integral soft-switching PID control scheme is adopted. This is implemented by building a PID controller, initializing the proportional, integral, and derivative coefficients; defining a sliding time window with a window length of three sampling periods; and calculating the local curvature based on the trajectory points sampled within the sliding time window for each sampling moment t of the continuous time-domain reference trajectory sequence. And set a curvature threshold. When Adjust the differential coefficients: ,in, The differential coefficient value from the previous sampling time is used as the reference value for the current adjustment. The value of the differential coefficient at the current sampling time. The first adjustment is the gain coefficient. This is the curvature threshold. When... Adjust the scaling factor: ,in, The value of the scaling factor at the previous sampling time is taken. The value of the scaling factor at the current sampling time. This is the second adjustment gain coefficient. A soft-switching factor is added before the integral term coefficient. To achieve a continuous transition of integral action, the output of the PID controller is constructed as follows: Finally, the constructed PID controller is used to adjust the brightness at each moment.

[0047] The soft switching factor The calculation method satisfies:

[0048] ,in, The adaptive threshold is calculated using the error gradient. The adaptive threshold is calculated by first calculating the brightness error at the current moment. And further obtained the brightness error change rate Calculate the error gradient based on the rate of change of error: ,in To prevent the denominator from being zero, use an extremely small constant. Utilize the error gradient. Calculate the adaptive threshold: ,in, This is the maximum allowable error set.

[0049] Finally, the ambient light intensity time series data is continuously monitored, and the amplitude of ambient light intensity change within the sliding time window is calculated. If the amplitude of change is greater than the set threshold and exceeds H times, it is determined to be a valid change disturbance.

[0050] When a valid disturbance is detected, trajectory replanning is triggered. The current ambient light intensity value is reacquired and the target intensity value is updated. A new reference trajectory sequence is generated, using the current intensity value of the luminaire as the starting point. Then, the least squares method is used to smoothly connect the old and new trajectories, facilitating smooth luminaire intensity control by the PID controller. Specifically, when a valid disturbance is detected, the system acquires the current real-time ambient light intensity value. Subsequently, the target intensity is updated through an intelligent multi-strategy fusion mechanism. Simultaneously, the actual intensity of the luminaire at this moment is locked as the starting point of the new trajectory.

[0051] A pre-trained perceptual uniform trajectory point generation model is invoked, inputting the new starting point brightness, the updated target brightness, and the upper and lower limits of the lamp brightness adjustment range to generate L discrete reference trajectory points. After time-domain interpolation, a new reference trajectory sequence in the continuous time domain is obtained. After determining a valid change disturbance and triggering trajectory replanning, to completely eliminate the discontinuities at the junction of the old and new trajectories and ensure the brightness change curve is continuous without abrupt changes, a smooth fitting process is performed on the data segments at the end of the old trajectory and the beginning of the new trajectory using the least squares method. Specifically, firstly, M consecutive sampling points at the end of the old trajectory and the beginning of the new trajectory are accurately extracted to match the system sampling frequency, ensuring that the extracted data segments can completely cover the change characteristics at the end and beginning of the trajectory, providing effective and representative sample data for subsequent fitting. Subsequently, a quadratic polynomial is selected as the fitting basis function. This model can adapt to the smooth change characteristics of the brightness trajectory and avoid the overfitting problem easily caused by high-order polynomials. With the core objective of minimizing the sum of squared errors between the fitted curve and the sampling points, an error function is constructed, and the partial derivatives of the coefficients are calculated and set to zero to obtain a system of normal equations. Optimal coefficients are then solved using matrix operations to determine the transition trajectory equations. The solved transition equations generate a transition segment brightness sequence, forming a complete and continuous brightness control trajectory. Finally, the brightness value at each moment on the fused trajectory is used as the target brightness input to the PID controller, achieving smooth dimming without overshoot or oscillation. This ensures good perceived uniformity during the adjustment process, meeting the requirements of high-quality lighting.

[0052] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for controlling the brightness of lighting fixtures based on artificial intelligence, characterized in that, Includes the following steps: In response to the light-on trigger event, obtain the current ambient light level and set the target brightness level for the light fixture; Calculate the initial brightness value of the luminaire based on the current ambient light value; The pre-trained perceptual uniform trajectory point generation model is invoked to generate L discrete reference trajectory points from the initial brightness value to the target brightness value. Interpolate L discrete reference trajectory points in the time domain to generate a continuous time domain reference trajectory sequence; For the brightness at each moment in the continuous time domain reference trajectory sequence, brightness adjustment is achieved through PID control. Continuously monitor the time-series data of ambient light intensity and calculate the amplitude of ambient light intensity change within the sliding time window; If the change amplitude is greater than the set threshold and exceeds H times, it is determined to be a valid change disturbance; When a valid change disturbance is detected, trajectory replanning is triggered. The current ambient light value is reacquired and the target brightness value is updated. The current brightness value of the lamp is used as the starting point of the new trajectory and a new reference trajectory sequence is generated. Then, the least squares method is used to smoothly connect the old and new trajectories, which facilitates the PID to complete smooth lamp brightness control.

2. The method for controlling lamp brightness based on artificial intelligence according to claim 1, characterized in that, Based on the current ambient light level, the initial luminance of the luminaire is calculated to satisfy the following relationship: ,in, This is the initial brightness value of the lamp. To the maximum brightness of the lamp, This is the minimum brightness of the light fixture. The exponential decay coefficient is... This represents the current ambient light level. The maximum threshold for ambient light. This is a range constraint function that constrains the range of the initial brightness values ​​to within a certain range. and between.

3. The method for controlling lamp brightness based on artificial intelligence according to claim 1, characterized in that, The specific implementation of calling the pre-trained perceptual uniform trajectory point generation model to generate L discrete reference trajectory points from the initial brightness value to the target brightness value is as follows: A perceptual uniform trajectory point generation model is constructed using a lightweight deep learning network, comprising a three-level network structure: a feature encoding layer, a perceptual mapping layer, and a trajectory generation layer. The model for generating uniform trajectory points is pre-trained using a training set. The pre-trained perceptual uniform trajectory point generation model is invoked. The input feature vector specifically includes: the currently calculated initial brightness value of the lamp, the target brightness value of the lamp, and the upper and lower limits of the physical range of the current brightness adjustment of the lamp. The output is a preliminary L-dimensional discrete brightness value sequence. The initial L-dimensional discrete brightness numerical sequence is post-processed by performing adjacent point value difference verification and removing redundant points in the sequence whose brightness value difference between two adjacent points is less than the minimum adjustment step size of the lamp. If the number of trajectory points after removal is less than L, discrete points are added at the position of the largest brightness value difference between two adjacent points in the sequence by averaging, until L discrete points are restored.

4. The method for controlling lamp brightness based on artificial intelligence according to claim 1, characterized in that, The implementation of generating a continuous time-domain reference trajectory sequence by interpolating L discrete reference trajectory points in the time domain includes: Preset the total duration T for adjusting the brightness of the lamps, and calculate the total change in brightness. And the percentage change in brightness between adjacent trajectory points: , ;in, This represents the percentage change in brightness between adjacent trajectory points. The brightness change for each adjacent trajectory point; Dynamically allocate time steps and calculate the time step for a single interval: And based on the time step of a single interval, a time axis grid is generated by accumulating the data to satisfy the following conditions: , ; A continuous time-domain reference trajectory sequence is obtained by fitting all adjacent sensing trajectory points using the least squares method.

5. The method for controlling lamp brightness based on artificial intelligence according to claim 1, characterized in that, For the brightness at each moment in the continuous time domain reference trajectory sequence, the specific implementation of brightness adjustment through PID control is as follows: Set up a PID controller and initialize the proportional, integral, and derivative coefficients. Define a sliding time window with a length of three sampling periods. For a continuous time domain reference trajectory sequence, at each sampling time t, calculate the local curvature based on the trajectory points sampled within the sliding time window. And set a curvature threshold; when Adjust the differential coefficients: ,in, The differential coefficient value from the previous sampling time is used as the reference value for the current adjustment. The value of the differential coefficient at the current sampling time. The first adjustment is the gain coefficient. Curvature threshold; when Adjust the scaling factor: ,in, The value of the scaling factor at the previous sampling time is taken. The value of the scaling factor at the current sampling time. This is the second adjustment gain factor; Add a soft-switching factor before the integral term coefficient. To achieve a continuous transition of integral action, the output of the PID controller is constructed as follows: ; The brightness is adjusted at each moment using a pre-built PID controller.

6. The method for controlling lamp brightness based on artificial intelligence according to claim 5, characterized in that, The soft switching factor The calculation method satisfies: ,in, The adaptive threshold is calculated using the error gradient.