Intelligent lighting method, system and device based on Mamdani fuzzy reasoning and storage medium
By employing the Mamdani fuzzy inference method and combining ambient light and human activity signals, the intelligent lighting system achieves refined and smooth adaptive adjustment, resolving the contradiction between user comfort and energy efficiency in traditional systems, thereby improving user experience and reducing energy consumption.
Patent Information
- Application Number
- CN202511834778.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-03
AI Technical Summary
Existing intelligent lighting systems struggle to balance user comfort and energy efficiency in achieving refined, human-centered, and adaptive lighting control. Traditional control strategies are too rigid or rely on precise mathematical models, making it difficult to effectively handle fuzzy information such as the intensity of human activity.
The Mamdani fuzzy inference method is adopted to collect ambient light and human activity signals in real time, quantify the intensity of human activity, make intelligent decisions using a fuzzy rule base, generate smooth brightness adjustment commands, and achieve precise adjustment of lamp brightness by combining PWM control.
It achieves precise and smooth adaptive adjustment of lighting brightness, improves user experience and reduces energy consumption, and avoids the rigid control and energy efficiency imbalance problems of traditional systems.
Smart Images

Figure CN121793196A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent lighting control technology, and in particular to an intelligent lighting method, system, device and storage medium based on Mamdani fuzzy inference. Background Technology
[0002] With the rapid development of IoT and AI technologies, smart lighting systems are gradually replacing traditional lighting, becoming key facilities for achieving energy conservation, environmental protection, and improving the living experience. However, existing systems still face significant challenges in achieving refined, user-friendly, and adaptive lighting control, and their control strategies often struggle to balance user comfort and energy efficiency.
[0003] While the commonly used threshold control method is simple, its rigid control can easily lead to visual fatigue and frequent switching of lights. Traditional PID (Proportional-Integral-Derivative) control, on the other hand, relies excessively on precise mathematical models, making it difficult to handle crucial, fuzzy, and unquantifiable information such as "personal activity intensity" in the lighting environment. Although some solutions incorporate fuzzy control concepts, they often employ Sugeno-type inference with poor interpretability and rely on a single input variable. They fail to fully quantify and utilize "personal activity intensity," a core dimension reflecting real user needs, resulting in insufficiently refined control strategies that cannot differentiate lighting requirements across various activity scenarios. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention provides a smart lighting method, system, device and storage medium based on Mamdani fuzzy inference.
[0005] Therefore, the technical problem solved by this invention is: how to provide an intelligent lighting method that can perform refined, smooth, and adaptive adjustment based on ambient light and the intensity of human activity.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides an intelligent lighting method based on Mamdani fuzzy inference, comprising: Real-time acquisition of raw ambient light intensity signals and human activity signals, and quantification of human activity intensity; Based on the current ambient illuminance and the quantified value of human activity intensity, the fuzzy vectors of illuminance and activity intensity are calculated according to the predefined fuzzy set and the corresponding membership function. The fuzzy vectors based on illumination and activity intensity are matched with preset rules in the knowledge base, the credibility of each rule is calculated, and the corresponding output fuzzy set is cropped. All the cropped output fuzzy sets generated by the activated rules are merged into a single comprehensive output fuzzy set and then converted into precise brightness values. The precise brightness value is converted into a PWM control signal that can drive the dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
[0007] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The real-time acquisition of raw ambient light intensity signals and human activity signals, and the quantification of human activity intensity, includes: Collect the ambient light intensity of the target area; Sensors capable of sensing dynamic characteristics are used to detect the presence status of people within the target area; Based on the signals output by the sensor that reflect the dynamics of the person, a quantified activity intensity value is generated, wherein the activity intensity value is a single-value parameter within a predetermined scale range used to continuously represent different levels of the person from a static state to a high-intensity activity state.
[0008] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The illumination-based fuzzy vector and the activity intensity-based fuzzy vector are matched with preset rules in the knowledge base, the credibility of each rule is calculated, and the corresponding output fuzzy set is pruned, including: The blurred vectors of illumination and activity intensity are matched with a preset fuzzy rule library. For each matched rule, the activation strength of the rule is calculated based on the degree to which the fuzzing results of the lighting and activity conditions in the rule premise are satisfied.
[0009] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The process of matching the illumination-based fuzzy vector and the activity intensity-based fuzzy vector with preset rules in the knowledge base, calculating the credibility of each rule, and cropping the corresponding output fuzzy set also includes: Based on the calculated activation intensity, the brightness fuzzy subset defined in the rule conclusion is clipped to obtain the clipped output fuzzy set corresponding to the rule.
[0010] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The process of merging all the cropped output fuzzy sets generated by the activated rules into a single comprehensive output fuzzy set and converting it into precise brightness values includes: The cropped fuzzy sets generated by multiple rule-based reasoning are aggregated to obtain a comprehensive output fuzzy set. The comprehensive output fuzzy set is defuzzified to obtain the accurate brightness control value.
[0011] The beneficial effects of this preferred technical solution are as follows: through aggregation and defuzzification, suggestions from multiple rules that are fuzzy, potentially overlapping or complementary, are merged and transformed into a single, explicit, and directly executable brightness command. This step is a key bridge connecting fuzzy logic reasoning and precise physical control, ensuring that intelligent decisions can ultimately be implemented as continuous and smooth actual dimming actions, achieving stable convergence from "multi-source suggestions" to "unique command".
[0012] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The process of defuzzifying the comprehensive output fuzzy set to obtain precise brightness control values includes: Defuzzification is achieved by determining the representative equilibrium point of the comprehensive output fuzzy set on the corresponding output universe of discourse.
[0013] The beneficial effects of this preferred technical solution are as follows: By using a method that determines a "representative equilibrium point" (such as the center of gravity) for defuzzification, the overall shape distribution of the output fuzzy set can be fully considered. The precise value output by this method is not sensitive to small fluctuations in the input signal, ensuring the smoothness and continuity of brightness adjustment, effectively eliminating the brightness abruptness and flicker that may occur with traditional segmented dimming, and significantly improving the visual comfort and user experience of lighting.
[0014] As a preferred embodiment of a smart lighting method based on Mamdani fuzzy reasoning, wherein: The process of converting precise brightness values into PWM control signals that can drive a dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time, includes: Based on the precise brightness value, a corresponding dimming control signal is generated; The dimming control signal is output to the driving unit of the lighting equipment to drive the lighting equipment to adjust the actual luminous brightness to the target brightness.
[0015] Secondly, the present invention provides an intelligent lighting system based on Mamdani fuzzy inference, comprising: The signal sensing and quantization module is used to collect raw ambient light intensity signals and personnel activity signals in real time, and to quantify the intensity of personnel activity. The fuzzification preprocessing module is used to calculate the fuzzification vector of illumination and the fuzzification vector of activity intensity based on the current ambient light intensity and the quantified value of human activity intensity, according to the predefined fuzzy set and the corresponding membership function. The rule-based reasoning and decision-making module is used to match the fuzzy vectors based on illumination and activity intensity with the preset rules in the knowledge base, calculate the credibility of each rule, and prune the corresponding output fuzzy set. The defuzzification module is used to merge the cropped output fuzzy sets generated by all activated rules into a comprehensive output fuzzy set and convert it into a precise brightness value. The drive control execution module is used to convert precise brightness values into PWM control signals that can drive the dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
[0016] Thirdly, the present invention provides a computer device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the smart lighting method based on Mamdani fuzzy inference.
[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of a smart lighting method based on Mamdani fuzzy inference.
[0018] The beneficial effects of this invention are as follows: By sensing the intensity of human activity and ambient light, this invention achieves precise, stepless adjustment of lighting brightness. The system can automatically distinguish between high-activity scenarios such as users sitting or walking, and output a comfortable brightness that matches these scenarios, avoiding the rigid control and frequent on / off switching problems of traditional systems. While ensuring visual comfort, it provides high-brightness lighting only when necessary, thus significantly improving the user experience and achieving further energy savings in real-world scenarios such as offices, corridors, and warehouses. Compared to existing solutions, its control logic is intuitive and easy to understand, and can be flexibly adjusted later according to different scenario requirements by modifying the rules, without changing the underlying code, greatly reducing deployment and maintenance costs. Attached Figure Description
[0019] 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 only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an overall flowchart of an intelligent lighting method based on Mamdani fuzzy inference provided by the present invention.
[0021] Figure 2 This is a schematic diagram of the membership function of the input variable "ambient illuminance (E)" in a simulation example of an intelligent lighting method based on Mamdani fuzzy inference provided by the present invention.
[0022] Figure 3 This is a schematic diagram of the membership function of the input variable "personnel activity intensity (A)" in a simulation example of an intelligent lighting method based on Mamdani fuzzy reasoning provided by the present invention.
[0023] Figure 4 This is a schematic diagram of the membership function of the output variable "dimming level (D)" in a simulation example of an intelligent lighting method based on Mamdani fuzzy inference provided by the present invention.
[0024] Figure 5 This is a fuzzy inference surface diagram in a simulation example of an intelligent lighting method based on Mamdani fuzzy inference provided by the present invention. Detailed Implementation
[0025] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0026] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides intelligent lighting based on Mamdani fuzzy inference, including: S1: Real-time acquisition of raw ambient light intensity signals and human activity signals, and quantification of human activity intensity; S2: Based on the current ambient light intensity and the quantified human activity intensity value, calculate the fuzzy vector of light intensity and the fuzzy vector of activity intensity according to the predefined fuzzy set and the corresponding membership function; S3: Based on the fuzzy vectors of illumination and activity intensity, match them with the preset rules in the knowledge base, calculate the credibility of each rule, and prune the corresponding output fuzzy set; S4: Combine all the cropped output fuzzy sets generated by the activated rules into a single comprehensive output fuzzy set, and convert it into precise brightness values; S5: Converts precise brightness values into PWM control signals that can drive a dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
[0027] It should be noted that through steps S1-S5, a fully closed-loop control process is completed, from multi-source physical signal perception to intelligent decision-making and smooth execution. This successfully integrates the two key variables—ambient light intensity and the intensity of human activity—which are difficult to model precisely, into continuous, stepless brightness control commands. Ultimately, without the need for precise mathematical models, adaptive and refined adjustment of lighting brightness is achieved, effectively solving the core technical problems of traditional intelligent lighting control, such as rigidity, poor scene adaptability, and difficulty in balancing energy efficiency and comfort.
[0028] Example 2, refer to Figure 1 As one embodiment of the present invention, based on the previous embodiment, a smart lighting method based on Mamdani fuzzy inference is provided, comprising: In this embodiment, the real-time acquisition of raw ambient light intensity signals and human activity signals in step S1, and the quantification of human activity intensity, includes: The current light intensity (unit: Lux) of the target area is detected in real time using a photoresistor or illuminance sensor.
[0029] High-performance passive infrared (PIR) sensors (capable of detecting movement frequency and amplitude) or millimeter-wave radar are used to detect the presence of people in the area and quantify the intensity of their activity, that is, to express the degree from "stationary" to "high-intensity activity" with a numerical value.
[0030] In another possible implementation, the quantitative output of human activity intensity can be achieved through PIR (Passive Infrared) signal processing based on movement frequency and amplitude: A passive infrared sensor is used to collect infrared variation signals within the area, and the signals are filtered to eliminate noise interference; then, the number of valid motion pulses within a unit time window is counted as the movement frequency, and the average amplitude of these pulses is calculated to reflect the movement amplitude; finally, the movement frequency and average amplitude are weighted and fused, and the fused value is mapped to a quantitative activity intensity value in the range of 0 to 10 through a preset linear or nonlinear scaling function. For example, a stationary state is mapped to 0, slow movement to 2-4, normal walking to 5-7, and fast running to 8-10.
[0031] In another possible implementation, the quantitative output of human activity intensity can be achieved through millimeter-wave radar processing based on Doppler feature analysis: a millimeter-wave radar sensor emits electromagnetic waves and receives their echoes, and the Doppler spectrum of the echo signal is analyzed by fast Fourier transform; the Doppler frequency shift and its spectral energy of the main moving targets are extracted from them, with the magnitude of the frequency shift corresponding to the movement speed and the energy reflecting the target size or movement amplitude; then, the speed characteristics and energy characteristics are combined into a comprehensive dynamic index according to preset weights, and then the index is mapped to a quantitative activity intensity level of 0-10 through an empirically calibrated lookup table, so that different activity modes such as standing still, pacing, walking, and running can obtain clearly distinguishable intensity scores.
[0032] In another possible implementation, the quantification of human activity intensity can also be achieved by analyzing the video stream sequence captured by the camera: using lightweight image processing algorithms or miniature vision sensors, differential calculations or optical flow analysis are performed on consecutive frames of images to detect the size, speed, and trajectory length of moving targets; then, these visual features (such as the percentage of moving pixels and the average displacement vector) are weighted and fused, and mapped to a calibrated activity intensity level.
[0033] In another possible implementation, the quantification of the intensity of human activity can also be achieved by deploying a distributed piezoelectric sensor or vibration sensor array: by detecting the vibration signals generated on the ground or work surface by human movement and operation, the amplitude spectrum, dominant frequency energy and event trigger frequency of the vibration signals are analyzed; based on the preset threshold and pattern recognition results, slight vibrations (such as sitting adjustment), regular step frequency vibrations (such as walking) and severe impact vibrations (such as running and carrying) are distinguished, thereby outputting the corresponding quantified intensity value.
[0034] In this embodiment, step S2 above, based on the current ambient illuminance and the quantized human activity intensity value, calculates the fuzzy vectors of illuminance and activity intensity according to a predefined fuzzy set and its corresponding membership function, including: After preprocessing the obtained current ambient light intensity value (E) and the quantified human activity intensity value (A), the values are converted into corresponding fuzzy linguistic values and their membership degrees by querying the preset membership function, thereby completing the mapping from precise values to fuzzy concepts.
[0035] Specifically, the membership function is defined and calculated as follows: For ambient light intensity (E), its universe of discourse (range of values) is in lux. The preset set of fuzzy linguistic values is {Dark, Medium, Bright}. Each linguistic value is characterized by a continuous triangular or trapezoidal membership function.
[0036] For example, when E=150Lux, its membership in both "dark" and "moderate" will be calculated simultaneously, possibly yielding 0.5 and 0.5 respectively, indicating that the light level is exactly in the transition zone between the two concepts.
[0037] For the intensity of human activity (A), its universe of discourse is normalized to a 0-10 scale. The preset set of fuzzy linguistic values is {None, Low, Medium, High}. Each linguistic value is also defined by overlapping triangular membership functions.
[0038] For example, when A=5, the system may calculate that its membership degree belonging to "low" is 0.2, its membership degree belonging to "medium" is 0.8, and its membership degree belonging to "high" is 0, thus accurately describing the "moderately high" activity state.
[0039] It should be noted that the output of this step is two fuzzy vectors. For example, the fuzzification result of E can be represented as {(Dark,0.5), (Medium,0.5), (Bright,0)}; the fuzzification result of A can be represented as {(None,0), (Low,0.2), (Medium,0.8), (High,0)}. These vectors quantitatively describe the degree to which the precise input value belongs to each fuzzy concept, providing direct input for subsequent fuzzy inference.
[0040] In another possible implementation, the fuzzy vector of illumination can be calculated by defining an asymmetric membership function. Specifically, for the three fuzzy sets "dark," "moderate," and "bright," the membership function can not be a symmetrical triangle. Instead, it can use a trapezoidal or Gaussian function, with different inflection points and spans, based on human visual perception characteristics or the lighting standards of specific application scenarios (such as classrooms or warehouses). For example, the membership function for the "moderate" interval can be appropriately extended towards "bright," making the system more inclined to maintain a lower artificial lighting brightness when natural light is sufficient.
[0041] In another possible implementation, the calculation of the fuzzy vector of illumination can also be achieved by introducing an adaptive adjustment mechanism. Specifically, the system can learn and record the typical illumination range of a space over a long period and dynamically adjust the universe of discourse parameters of the membership functions of each fuzzy subset. For example, for a west-facing room, the membership function threshold for "bright" in the afternoon can be automatically increased, allowing the system to more accurately determine "bright" under the same external illumination, thereby more actively reducing the brightness of the lights to save energy.
[0042] In this embodiment, step S3 above, which involves matching the fuzzy vector based on illumination and the fuzzy vector based on activity intensity with preset rules in the knowledge base, calculating the credibility of each rule, and cropping the corresponding output fuzzy set, includes: A Mamdani-type fuzzy rule base is pre-defined, built upon expert knowledge. Each rule uses the natural language format "IF (premise) THEN (conclusion)" to intuitively express the lighting strategy to be adopted in a specific scenario. The premise consists of fuzzy propositions combining input variables (ambient light E, human activity intensity A) using logical "AND" statements, describing the current overall situation. The conclusion is a fuzzy proposition representing the output variable (brightness), specifying the expected lighting level in this scenario. Examples of core rules in the rule base are as follows: R1: IF (E IS Dark) AND (A IS None) THEN (Brightness IS Off) Meaning: Turn off the lights when the environment is dark and no one is present to save energy.
[0043] R2: IF (E IS Dark) AND (A IS Low) THEN (Brightness IS Low) Meaning: The environment is dark, but people are sitting quietly or engaging in low-intensity activities (such as resting). Low-brightness lighting is provided to meet basic needs and maintain ambiance.
[0044] R3: IF (E IS Dark) AND (A IS Medium) THEN (Brightness IS Medium) Meaning: In dark environments with moderate levels of human activity (such as normal walking or working), provide moderate brightness to ensure sufficient visual clarity and comfort.
[0045] R4: IF (E IS Dark) AND (A IS High) THEN (Brightness IS High) Meaning: In dark environments where personnel are engaged in high-intensity activities (such as movement or carrying), high-brightness lighting is provided to ensure safety and operational accuracy.
[0046] R5: IF (E IS Medium) AND (A IS Medium) THEN (Brightness IS Medium) Meaning: The ambient lighting is moderate and the intensity of human activity is moderate, maintaining a moderate brightness, supplemented by natural light.
[0047] R6: IF (E IS Bright) AND (A IS Low) THEN (Brightness IS Very_Low) Meaning: When there is sufficient ambient light and low human activity, only very low brightness or the lights are turned off to make full use of natural light and achieve maximum energy saving.
[0048] R7: IF (E IS Bright) AND (A IS High) THEN (Brightness IS Medium) Meaning: Even if the ambient light is sufficient, if people are engaged in high-intensity activities, medium-brightness lighting should still be provided to eliminate visual hazards that may be caused by shadows or light angles, and to ensure the safety of the activity.
[0049] The reasoning process is as follows: The fuzzy vector obtained in step S2 is matched with all rules in the rule base. For each rule, its activation strength is calculated: the minimum value (min operation) of the membership degree corresponding to each fuzzy proposition in the premise of the rule is taken, which represents the confidence of this rule under the current input. Then, the fuzzy implication operation is performed: the calculated activation strength is used to truncate (prune) the membership function of the output fuzzy set corresponding to the conclusion of the rule. Finally, this step will output a set of pruned output fuzzy sets, each set corresponding to an activated rule.
[0050] In another possible implementation, the activation strength of a rule can be calculated by replacing the minimum value operation with an algebraic product operation: instead of taking the minimum value of the membership degrees of the "lighting condition" and "activity condition" in the rule premises, the minimum value of the two membership degrees is not taken, but the two membership degree values are multiplied together, and the product is used as the activation strength of the rule. This method makes the activation strength more sensitive to the satisfaction of both premises; a lower satisfaction of either condition will significantly weaken the activation strength of the rule.
[0051] In another possible implementation, the activation intensity of a rule can be calculated by assigning different weight factors to different conditions in the rule's premise: a weight can be defined for each rule in the rule base. For example, in a rule where safety is the primary objective, the weight of the condition "high activity intensity" can be set higher than the weight of "ambient lighting." When calculating the activation intensity, the membership degree of each condition is first weighted, and then a combination operation is performed (such as taking the minimum weighted value), thereby reflecting the relative importance of different conditions under a specific rule.
[0052] In this embodiment, step S4 above, which involves merging all the cropped output fuzzy sets generated by the activated rules into a single comprehensive output fuzzy set and converting it into a precise brightness value, includes: Rule aggregation is performed: All independent output fuzzy sets are merged into a complex, integrated output fuzzy set by taking the maximum value (max operation). This set incorporates the suggestions of all activated rules. Subsequently, defuzzification is performed: To obtain precise values directly usable for control, this embodiment preferably uses the centroid method to calculate the centroid of the integrated output fuzzy set. Specifically, the precise brightness value D is calculated using the following formula: in, This represents the membership value of the i-th sampling point or sub-region in the aggregated fuzzy set. Let n be the brightness value (x-axis) corresponding to that point, and n be the total number of sampling points. The centroid method ensures a smooth and continuous output brightness, avoiding abrupt changes. The final output of this step is a precise target brightness value (D) between 0% and 100%.
[0053] In this embodiment, step S5 above, which converts the precise brightness value into a PWM control signal capable of driving a dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time, includes: Based on the precise target brightness value D obtained after deblurring, the microcontroller calculates the corresponding pulse width modulation duty cycle through linear mapping or other predetermined transformation relationships.
[0054] For example, if D=70%, a PWM signal with a duty cycle of 70% will be generated.
[0055] Final execution: The PWM control signal is output to the downstream LED constant current driver or dimmer, driving it to adjust the output current, thereby steplessly and smoothly adjusting the actual luminous brightness of the lamp to the target level. This completes one full control cycle, and the system then returns to step S1 to begin a new round of data acquisition and adjustment.
[0056] Example 3: The above is an illustrative scheme of an intelligent lighting method based on Mamdani fuzzy reasoning according to this embodiment. It should be noted that the technical solution of an intelligent lighting system based on Mamdani fuzzy reasoning and the technical solution of the intelligent lighting method based on Mamdani fuzzy reasoning described above belong to the same concept. Details not described in detail in the technical solution of the intelligent lighting system based on Mamdani fuzzy reasoning in this embodiment can be found in the description of the technical solution of the intelligent lighting method based on Mamdani fuzzy reasoning described above.
[0057] This embodiment also provides an intelligent lighting system based on Mamdani fuzzy inference, including: The signal sensing and quantization module is used to collect raw ambient light intensity signals and personnel activity signals in real time, and to quantify the intensity of personnel activity. The fuzzification preprocessing module is used to calculate the fuzzification vector of illumination and the fuzzification vector of activity intensity based on the current ambient light intensity and the quantified value of human activity intensity, according to the predefined fuzzy set and the corresponding membership function. The rule-based reasoning and decision-making module is used to match the fuzzy vectors based on illumination and activity intensity with the preset rules in the knowledge base, calculate the credibility of each rule, and prune the corresponding output fuzzy set. The defuzzification module is used to merge the cropped output fuzzy sets generated by all activated rules into a comprehensive output fuzzy set and convert it into a precise brightness value. The drive control execution module is used to convert precise brightness values into PWM control signals that can drive the dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
[0058] This embodiment also provides an electronic device applicable to a smart lighting method based on Mamdani fuzzy inference, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a smart lighting method based on Mamdani fuzzy inference as described in the above embodiments.
[0059] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements an intelligent lighting method based on Mamdani fuzzy inference as proposed in the above embodiments.
[0060] The storage medium proposed in this embodiment belongs to the same inventive concept as the intelligent lighting method based on Mamdani fuzzy inference proposed in the above embodiment. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0061] Example 4, refer to Figures 2-5 As an embodiment of the present invention, a smart lighting method based on Mamdani fuzzy inference is provided. To verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0062] Depend on Figure 2 and Figure 4As can be seen, this overlapping and continuous membership function design ensures that the system will not produce drastic changes in output when the input changes slightly, thus providing a very comfortable and natural user experience and avoiding the abruptness brought by traditional segmented dimming.
[0063] Figure 3 In China, controlling activity based on the intensity of personnel activities has the following advantages: Distinguishing between static and dynamic states: The core value of this design lies in its ability to effectively distinguish between "someone is present but stationary" and "someone is present and active," which is something that traditional "present / no one is present" binary sensors cannot achieve, thus enabling more precise on-demand lighting.
[0064] Interference resistance: Overlapping membership functions make the system insensitive to accidental false triggers of sensors (such as a pet passing by or curtains swaying). Brief, weak signals do not immediately change the system's overall judgment, thus improving stability.
[0065] Natural transition: Changes in activity intensity (such as from sitting to standing and walking) result in a smooth transition in output brightness, avoiding sudden jumps in light and providing a better user experience.
[0066] Figure 5 This is a direct manifestation of the "intelligence" of the Mamdani fuzzy control system. It is not a simple linear mapping, but a complex nonlinear surface defined by a fuzzy rule base that cleverly balances "ambient lighting" and "human needs." It perfectly simulates the human decision-making process: "If it is dark and someone is working, turn on the lights; if it is light and no one is around, turn off the lights," and all decisions are smooth, continuous, and without abrupt changes.
[0067] In summary, the method proposed in this invention can achieve the expected results. Figure 2 , Figure 3 , Figure 4 The membership function design shown ensures the system's robustness to minor fluctuations in the input signal and its ability to finely distinguish personnel states. Ultimately, by... Figure 5 The smooth, abrupt inference surface shown demonstrates that the system successfully simulates the human intelligent decision-making process. It can output continuous, natural, and reasonable brightness adjustment commands under various combinations of lighting and human activities, fundamentally overcoming the problems of brightness jumps and poor scene adaptability caused by traditional threshold control or simple fuzzy control. Simulation has confirmed its significant advantages in improving comfort and energy saving.
[0068] It should be noted that 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A smart lighting method based on Mamdani fuzzy reasoning, characterized in that, include: Real-time acquisition of raw ambient light intensity signals and human activity signals, and quantification of human activity intensity; Based on the current ambient illuminance and the quantified value of human activity intensity, the fuzzy vectors of illuminance and activity intensity are calculated according to the predefined fuzzy set and the corresponding membership function. The fuzzy vectors based on illumination and activity intensity are matched with preset rules in the knowledge base, the credibility of each rule is calculated, and the corresponding output fuzzy set is cropped. All the cropped output fuzzy sets generated by the activated rules are merged into a single comprehensive output fuzzy set and then converted into precise brightness values. The precise brightness value is converted into a PWM control signal that can drive the dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
2. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 1, characterized in that, The real-time acquisition of raw ambient light intensity signals and human activity signals, and the quantification of human activity intensity, includes: Collect the ambient light intensity of the target area; Sensors capable of sensing dynamic characteristics are used to detect the presence status of people within the target area; Based on the signals output by the sensor that reflect the dynamics of the person, a quantified activity intensity value is generated, wherein the activity intensity value is a single-value parameter within a predetermined scale range used to continuously represent different levels of the person from a static state to a high-intensity activity state.
3. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 2, characterized in that, The illumination-based fuzzy vector and the activity intensity-based fuzzy vector are matched with preset rules in the knowledge base, the credibility of each rule is calculated, and the corresponding output fuzzy set is pruned, including: The blurred vectors of illumination and activity intensity are matched with a preset fuzzy rule library. For each matched rule, the activation strength of the rule is calculated based on the degree to which the fuzzing results of the lighting and activity conditions in the rule premise are satisfied.
4. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 3, characterized in that, The process of matching the illumination-based fuzzy vector and the activity intensity-based fuzzy vector with preset rules in the knowledge base, calculating the credibility of each rule, and cropping the corresponding output fuzzy set also includes: Based on the calculated activation intensity, the brightness fuzzy subset defined in the rule conclusion is clipped to obtain the clipped output fuzzy set corresponding to the rule.
5. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 4, characterized in that, The process of merging all the cropped output fuzzy sets generated by the activated rules into a single comprehensive output fuzzy set and converting it into precise brightness values includes: The cropped fuzzy sets generated by multiple rule-based reasoning are aggregated to obtain a comprehensive output fuzzy set. The comprehensive output fuzzy set is defuzzified to obtain the accurate brightness control value.
6. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 5, characterized in that, The process of defuzzifying the comprehensive output fuzzy set to obtain precise brightness control values includes: Defuzzification is achieved by determining the representative equilibrium point of the comprehensive output fuzzy set on the corresponding output universe of discourse.
7. The intelligent lighting method based on Mamdani fuzzy inference as described in claim 6, characterized in that, The process of converting precise brightness values into PWM control signals that can drive a dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time, includes: Based on the precise brightness value, a corresponding dimming control signal is generated; The dimming control signal is output to the driving unit of the lighting equipment to drive the lighting equipment to adjust the actual luminous brightness to the target brightness.
8. A smart lighting system based on Mamdani fuzzy inference, using the method described in any one of claims 1 to 7, characterized in that, include: The signal sensing and quantization module is used to collect raw ambient light intensity signals and personnel activity signals in real time, and to quantify the intensity of personnel activity. The fuzzification preprocessing module is used to calculate the fuzzification vector of illumination and the fuzzification vector of activity intensity based on the current ambient light intensity and the quantified value of human activity intensity, according to the predefined fuzzy set and the corresponding membership function. The rule-based reasoning and decision-making module is used to match the fuzzy vectors based on illumination and activity intensity with the preset rules in the knowledge base, calculate the credibility of each rule, and prune the corresponding output fuzzy set. The defuzzification module is used to merge the cropped output fuzzy sets generated by all activated rules into a comprehensive output fuzzy set and convert it into a precise brightness value. The drive control execution module is used to convert precise brightness values into PWM control signals that can drive the dimming power supply, thereby adjusting the actual luminous brightness of the lamp in real time.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.