Fan voltage control method and device, storage medium, electronic device and circuit

By dynamically adjusting the duty cycle based on real-time monitoring of the fan's power source and battery level, the problem of unstable fan speed during power switching is solved, achieving smooth fan operation and reduced noise, thus improving device stability and user experience.

CN122014658APending Publication Date: 2026-05-12GUANGDONG HONGQIN COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG HONGQIN COMM TECH CO LTD
Filing Date
2026-03-30
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, fans experience unstable speeds and noise problems due to sudden power changes during power switching, and existing solutions often come at the cost of cost, space, and energy efficiency.

Method used

By monitoring the fan's power supply and battery level in real time, the system dynamically determines the switching needs of different operating scenarios and adjusts the duty cycle synchronously during the switching process to achieve a smooth and gradual transition in fan power and ensure stable speed.

Benefits of technology

It effectively avoids fan speed fluctuations and noise problems caused by power switching, improves fan operation stability and lifespan, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122014658A_ABST
    Figure CN122014658A_ABST
Patent Text Reader

Abstract

The invention discloses a fan voltage control method and device, a storage medium, an electronic device and a circuit. The method comprises the steps that a power supply source of a fan and the battery capacity of the fan are detected in the working process of the fan; determining whether the working scene of the fan needs to be switched according to the power supply source of the fan and the battery power of the fan; under the condition that it is determined that the working scene of the fan needs to be switched, target voltage under the target working scene of the fan is determined; and the first voltage of the fan in the current working scene is adjusted to be the target voltage, and the duty ratio of the fan is adjusted so that the rotating speed of the fan can be kept consistent with the current working scene in the target working scene. Severe fluctuation and instability of the rotating speed of the fan are restrained, and it is ensured that the rotating speed of the fan is kept stable in the scene switching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fan management, and more specifically, to a method and apparatus for controlling fan voltage, a storage medium, an electronic device, and a circuit. Background Technology

[0002] In the thermal management system of modern equipment, the fan is a key heat dissipation component, and its stable operation directly affects the overall performance and user experience.

[0003] In related technologies, a buck circuit is typically used to directly step down the battery voltage (nominal 14.8V, minimum approximately 12V) to output 12V, or to output 5V from the system main power supply, and then a boost circuit is used to boost the 5V to 12V to power the fan.

[0004] However, the solutions in the relevant technologies have the problem of unstable fan speed leading to noise when the output voltage drops or switches. Summary of the Invention

[0005] This application provides a method and apparatus for controlling fan voltage, a storage medium, an electronic device, and a computer program product.

[0006] According to one aspect of the embodiments of this application, a method for controlling fan voltage is provided, comprising: detecting the power source of the fan and detecting the battery level of the fan during the operation of the fan; determining whether the operating scene of the fan needs to be switched based on the power source of the fan and the battery level of the fan; if it is determined that the operating scene of the fan needs to be switched, determining a target voltage for the target operating scene of the fan; adjusting a first voltage of the fan in the current operating scene to the target voltage, and adjusting the duty cycle of the fan so that the fan speed is consistent with the current operating scene in the target operating scene.

[0007] In an exemplary embodiment, adjusting the first voltage of the fan in the current working scenario to a target voltage and adjusting the fan's duty cycle to keep the fan speed consistent with the current working scenario in the target working scenario includes: determining the first speed of the fan in the current working scenario based on the first voltage and the first duty cycle of the fan in the current working scenario; determining the second duty cycle required by the fan to maintain the first speed under the target voltage; and synchronously adjusting the fan's duty cycle during the process of switching the first voltage to the target voltage, so that the fan's duty cycle is adjusted from the first duty cycle to the second duty cycle.

[0008] In an exemplary embodiment, during the process of switching the first voltage to the target voltage, the duty cycle of the fan is synchronously adjusted to change the fan's duty cycle from the first duty cycle to the second duty cycle. This includes: obtaining the current duty cycle of the fan during the adjustment process; determining a deviation value based on the difference between the current duty cycle and the second duty cycle; adjusting the current duty cycle based on the deviation value; and if the current duty cycle has not reached the second duty cycle, returning to the step of obtaining the current duty cycle of the fan during the adjustment process until the current duty cycle reaches the second duty cycle.

[0009] In an exemplary embodiment, adjusting the current duty cycle based on the deviation value includes: inputting the current duty cycle and the second duty cycle into a proportional-integral-derivative (PID) controller; calculating the proportional coefficient of the PPD controller based on the deviation value between the current duty cycle and the second duty cycle; determining the integral coefficient of the PPD controller based on the remaining time proportion of a preset adjustment time window; determining the derivative coefficient of the PPD controller based on the deviation value between the current duty cycle and the second duty cycle and the time interval between each adjustment; updating the parameters of the PPD controller based on the proportional coefficient, integral coefficient, and derivative coefficient; determining the output limit based on the remaining time of the adjustment time window; and outputting the duty cycle adjustment amount of the current duty cycle using the updated PPD controller, wherein the duty cycle adjustment amount is less than or equal to the output limit.

[0010] In an exemplary embodiment, determining whether the operating scenario of the fan needs to be switched based on the power source and battery level of the fan includes: determining that the target operating scenario of the fan is a high-voltage scenario when the power source of the fan is determined to be AC ​​mains power, or when the power source of the fan is determined to be the fan's battery and the battery level is greater than or equal to a preset threshold; and determining that the operating scenario of the fan needs to be switched when the current operating scenario of the fan is a low-voltage scenario.

[0011] In an exemplary embodiment, determining whether the operating scenario of the fan needs to be switched based on the power source of the fan and the battery level of the fan further includes: if the power source of the fan is determined to be the fan's battery and the battery level is less than the preset threshold, determining that the target operating scenario of the fan is a low-voltage scenario; and if the current operating scenario of the fan is a high-voltage scenario, determining that the operating scenario of the fan needs to be switched.

[0012] According to another aspect of the embodiments of this application, a fan voltage control circuit is also provided, comprising:

[0013] A step-down chip is connected to the fan's battery and used to connect to external AC mains power, for converting the electrical energy provided by the battery or the electrical energy provided by the AC mains power into a supply voltage to be supplied to the fan;

[0014] A voltage divider circuit is connected to the output terminal of the step-down chip and is used to adjust the power supply voltage output by the step-down chip.

[0015] A control circuit, connected to the step-down chip and the voltage divider circuit, is used to detect the power source and battery level of the fan during its operation; determine whether the fan's operating mode needs to be switched based on the power source and battery level; if the operating mode needs to be switched, determine the target voltage for the target operating mode; adjust the first voltage of the fan in the current operating mode to the target voltage, and adjust the fan's duty cycle to keep the fan speed consistent between the target and current operating modes.

[0016] According to another aspect of the embodiments of this application, a fan voltage control device is also provided, the device comprising:

[0017] The detection module is used to detect the power source of the fan and the battery level of the fan during the operation of the fan;

[0018] The status determination module is used to determine whether the working mode of the fan needs to be switched based on the power source of the fan and the battery level of the fan.

[0019] The target determination module is used to determine the target voltage of the fan under the target operating scenario when it is determined that the operating scenario of the fan needs to be switched.

[0020] The control module is used to adjust the first voltage of the fan in the current working scenario to the target voltage, and to adjust the duty cycle of the fan so that the fan speed is consistent with the current working scenario in the target working scenario.

[0021] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described fan voltage control method when running.

[0022] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described fan voltage control method through the computer program.

[0023] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of this application.

[0024] The aforementioned fan voltage control method monitors the power source and battery level in real time during fan operation. Based on their states, it dynamically determines whether a switching of operating scenarios is necessary. Upon confirming the switching requirement, it accurately determines the target voltage corresponding to the target operating scenario. By gradually adjusting the current fan duty cycle, it achieves a smooth and gradual transition in fan power, effectively avoiding voltage surges caused by adapter plugging / unplugging or battery level changes. This fundamentally suppresses drastic fluctuations and instability in fan speed, ensuring stable fan operation during scenario switching. Therefore, it solves the problem of fan speed fluctuations, increased noise, or even shutdown caused by power surges during power switching in related technologies, achieving the effects of improving fan operational stability, extending service life, and enhancing user experience. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a hardware structure block diagram of the fan voltage control method according to an embodiment of this application;

[0028] Figure 2 This is a flowchart of a fan voltage control method according to an embodiment of this application;

[0029] Figure 3 This is a second flowchart of a fan voltage control method according to an embodiment of this application;

[0030] Figure 4 This is a flowchart of a fan voltage control method according to an embodiment of this application;

[0031] Figure 5 This is a flowchart of a fan voltage control method according to an embodiment of this application;

[0032] Figure 6 This is the fifth flowchart of a fan voltage control method according to an embodiment of this application;

[0033] Figure 7 This is a structural diagram of a fan voltage control circuit according to an embodiment of this application;

[0034] Figure 8 This is a structural block diagram of a fan voltage control device according to an embodiment of this application. Detailed Implementation

[0035] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 used in this way can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover 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.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0038] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0039] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the invention. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.

[0040] It should be noted that when one element is considered to be "connected" to another element, it can be directly connected to the other element or connected to the other element through an intermediary element. Furthermore, in the following embodiments, "connection" should be understood as "electrical connection," "communication connection," etc., if there is transmission of electrical signals or data between the connected objects.

[0041] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, step, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof.

[0042] As described in the background section, traditional laptop fan power supply solutions directly switch the output voltage of the Buck power supply (such as switching between 12V and 10V) when the adapter is plugged in or unplugged, or when the battery power exceeds a threshold. However, the duty cycle of the fan's pulse width modulation (PWM) is not adjusted synchronously, causing the fan motor to experience drastic speed jumps due to sudden changes in the supply voltage, resulting in mechanical noise and audio interference. Although existing technologies can solve the voltage stability problem by adding a Buck-Boost circuit or an independent power supply, these methods come at the cost of cost, space, and energy efficiency.

[0043] After extensive research, the inventors discovered that the root cause of the aforementioned noise problem lies in the fundamental decoupling between voltage switching behavior and the fan speed response mechanism. Existing technology treats "power supply voltage regulation" and "fan speed control" as two independent, asynchronous system behaviors. The power module passively outputs a fixed voltage based solely on the power supply scenario (AC / DC, power threshold), while the fan control module independently adjusts the PWM duty cycle based solely on temperature feedback. The two lack timing coordination. Therefore, when a sudden step change occurs in the voltage, the fan motor is forced to reconstruct its speed within milliseconds due to the sudden change in input power, resulting in uncontrollable mechanical inertial oscillations. The essence of this contradiction is treating "voltage as a static setpoint" rather than a "dynamic control variable," ignoring the fact that voltage changes themselves are a source of speed disturbance, leading to the system's inability to achieve continuous matching between energy input and mechanical response during scenario switching.

[0044] Based on the above findings, the inventors proposed a concept that binds voltage switching and duty cycle adjustment into a unified dynamic process: when a change in the working environment is detected, the output power is not changed immediately, but the duty cycle of the fan power supply is adjusted synchronously and stepwise with a preset time window as the control cycle, so that the duty cycle gradually changes from the current value to the target value, thereby transforming the originally abrupt power jump into a smooth ramp change, allowing the fan motor to complete the speed transition under controllable power increments.

[0045] This embodiment provides a method for controlling fan voltage. Figure 1 This is a flowchart of an optional fan voltage control method according to an embodiment of this application, the process including the following steps S100-S130:

[0046] Step S100: During the operation of the fan, the power source of the fan and the battery level of the fan are detected.

[0047] Specifically, the system continuously monitors the fan's power source during operation to identify whether the current power supply comes from an AC adapter or a DC battery. Simultaneously, it collects battery power information to obtain real-time data on the remaining battery charge. Through these two parallel detections, the system can understand the fan's energy supply status and the corresponding battery charge level, providing a foundational state awareness for subsequent voltage regulation and speed control. This detection process does not involve direct intervention in the power conversion circuitry; it focuses solely on acquiring power supply path and power data, ensuring an objective record of the fan's operating environment.

[0048] Step S110: Determine whether the fan's operating mode needs to be switched based on the fan's power source and battery level.

[0049] Specifically, the power source refers to whether the system is currently powered by an AC adapter or relies on battery power, while the battery level reflects the remaining energy level under the current power supply condition. By comprehensively judging these two physical parameters, it is possible to identify whether the operating environment of the fan has changed, and then decide whether to trigger the power supply output voltage adjustment logic to match the stable operation requirements under different power supply conditions.

[0050] Step S120: If it is determined that the working scenario of the fan needs to be switched, determine the target voltage under the target working scenario of the fan.

[0051] Specifically, when the fan's operating scenario needs to be switched, the system determines the stable operating voltage that the fan should maintain in the new scenario based on the changes in the current operating environment. This voltage determination is based on the difference in power supply requirements before and after the scenario switch. By identifying changes in external conditions (such as AC power connection or disconnection, changes in battery charge level), the target voltage value is clarified to ensure that the fan obtains an appropriate power supply basis in the new scenario, thereby establishing a clear voltage target for subsequent voltage regulation and smooth speed control.

[0052] Step S130: Adjust the first voltage of the fan in the current working scenario to the target voltage, and adjust the duty cycle of the fan so that the fan speed is consistent with the current working scenario in the target working scenario.

[0053] Specifically, firstly, the initial voltage of the fan under the current working environment is adjusted to the target voltage. That is, the power supply voltage supplied to the fan is adjusted according to the changes in the actual operating environment, so that it changes from the original value to another preset value. Then, the duty cycle of the fan is adjusted synchronously to keep the fan speed consistent before and after the voltage switch. By changing the pulse width to control the average input power of the fan motor, the direct impact of voltage change on the speed is offset, thereby achieving stable speed output and avoiding speed fluctuations caused by voltage changes.

[0054] In this embodiment, the power supply source and battery status are monitored in real time during fan operation. Based on the coordinated changes of the two, it is intelligently determined whether the working scene needs to be switched. When the switch is triggered, the target voltage corresponding to the target scene is accurately determined. Then, by gradually adjusting the fan's duty cycle, the fan power is smoothly transitioned, avoiding sudden changes in fan power caused by plugging and unplugging the adapter or switching between high and low battery levels. This effectively suppresses drastic fluctuations and instability in fan speed, ensuring that the fan can maintain a stable and continuous operating state during the switching of different power supply modes, ultimately improving the stability of system heat dissipation and the reliability of user experience.

[0055] In one embodiment, such as Figure 2As shown, step S130 involves adjusting the fan's first voltage under the current operating scenario to the target voltage, and adjusting the fan's duty cycle to ensure that the fan speed remains consistent between the target operating scenario and the current operating scenario. This includes steps S200-S220:

[0056] Step S200: Determine the first speed of the fan in the current working scenario based on the first voltage and the first duty cycle of the fan in the current working scenario.

[0057] Specifically, this step aims to establish the physical correspondence between fan speed, supply voltage, and PWM duty cycle. Before the fan supply voltage changes, the system needs to calculate the fan's current actual rotational speed (first speed) based on the current supply voltage (first voltage) and the current PWM signal duty cycle driving the fan (first duty cycle). This process is a prerequisite for maintaining stable speed during subsequent voltage switching, ensuring that the fan's airflow changes before and after voltage adjustment are controllable, and avoiding mechanical noise or heat dissipation imbalance caused by sudden speed changes. The fan speed has a non-linear positive correlation with the supply voltage and PWM duty cycle, and its characteristic curve can be obtained through experimental calibration. The system has a built-in fan speed mapping table that records the measured speed under different combinations of voltages (e.g., 8V, 9V, 10V, 12V) and different PWM duty cycles (e.g., 30%, 40%...100%).

[0058] Step S210: Determine the second duty cycle required by the fan to maintain the first speed under the target voltage.

[0059] In step S220, during the process of switching the first voltage to the target voltage, the duty cycle of the fan is adjusted synchronously so that the duty cycle of the fan is adjusted from the first duty cycle to the second duty cycle.

[0060] Specifically, voltage switching is instantaneous, but the actual drive power switching of the fan motor requires a certain transition time. By dynamically and smoothly adjusting the duty cycle during the power switching transition, the fan speed is kept on a preset stable path, avoiding the superposition effect of power change and duty cycle change, thereby eliminating mechanical noise and airflow impact.

[0061] In this embodiment, when the fan needs to adjust its operating environment due to power source switching or battery charge changes, the actual fan speed is first calculated based on the power supply voltage and duty cycle under the current operating environment. Then, the new duty cycle required to maintain the speed under the target voltage is calculated in reverse. Thus, the duty cycle is adjusted synchronously and collaboratively during voltage regulation, so that the fan speed remains continuous and stable during the transient process of voltage switching. This avoids speed fluctuations and mechanical noise caused by power surges, effectively solving the problem of unstable fan speed caused by the lack of voltage-duty cycle-speed linkage control when plugging and unplugging the adapter or switching between high and low battery charge levels. This achieves smooth transition, low-noise operation, and improves system heat dissipation stability and user experience.

[0062] In one embodiment, such as Figure 3 As shown, in step S220, during the process of switching the first voltage to the target voltage, the fan's duty cycle is simultaneously adjusted so that the fan's duty cycle is adjusted from the first duty cycle to the second duty cycle. This includes steps S300-S320:

[0063] Step S300: Obtain the current duty cycle of the fan during the process of adjusting the fan's duty cycle.

[0064] Specifically, during the gradual adjustment of the PWM duty cycle, the actual duty cycle value currently used by the fan is collected in real time and used as feedback input for the adjustment process. This feedback mechanism enables the system to perceive the real-time difference between the actual control output and the theoretical target, providing a data basis for subsequent dynamic adjustments and enhancing the system's adaptability to environmental disturbances or device tolerances.

[0065] For example, before performing PWM adjustment at each timed interrupt (e.g., 10ms), the embedded controller reads the register value of the PWM output module, which represents the current duty cycle being output. This register value is directly provided by the EC's PWM controller hardware, requiring no additional sensors, and is considered an internal system status read. The read current duty cycle is denoted as D_current, in percentage (%). This value is used for real-time comparison with the calculated second duty cycle D2 as the basis for deviation calculation. To ensure data accuracy, the embedded controller immediately performs software filtering (e.g., taking the average of two consecutive readings) after reading the register to eliminate transient bus interference.

[0066] Step S310: Determine the deviation value based on the difference between the current duty cycle and the second duty cycle.

[0067] Step S320: Adjust the current duty cycle based on the deviation value.

[0068] Step S330: Determine whether the current duty cycle has reached the second duty cycle. If the current duty cycle has not reached the second duty cycle, return to step S300 until the current duty cycle reaches the second duty cycle.

[0069] In this embodiment, during the process of switching the fan's power supply voltage from the first voltage to the target voltage, the fan's duty cycle is dynamically adjusted simultaneously to achieve a smooth speed transition. By continuously collecting the fan's current duty cycle during the duty cycle adjustment process, calculating the deviation between it and the target second duty cycle, and correcting the adjustment amount of the current duty cycle in real time based on the deviation value, a closed-loop feedback control mechanism is formed. When the current duty cycle has not yet converged to the target value, the system automatically and repeatedly executes the collection, calculation, and adjustment steps until the current duty cycle precisely matches the second duty cycle. This effectively suppresses speed fluctuations, overshoot, or response hysteresis caused by open-loop regulation under complex operating conditions with sudden power changes, ensuring that the fan maintains a stable speed when switching between different power supply scenarios. Ultimately, this solves the problem of heat dissipation performance fluctuations caused by insufficient control accuracy due to voltage switching, improving the reliability of equipment operation and user experience.

[0070] In one embodiment, such as Figure 4 As shown, step S320 adjusts the current duty cycle based on the deviation value. This includes steps S400-S450:

[0071] Step S400: Input the current duty cycle and the second duty cycle into the proportional-integral-derivative controller, and calculate the proportional coefficient of the proportional-integral-derivative controller based on the deviation between the current duty cycle and the second duty cycle.

[0072] Specifically, based on the instantaneous deviation between the current duty cycle and the target duty cycle, the gain of the proportional control term is dynamically calculated, ensuring that the controller's response to the current error is proportional to the magnitude of the deviation. The introduction of the proportional coefficient enables the system to respond quickly to larger errors, avoiding overly slow adjustments.

[0073] For example, the embedded controller reads the current duty cycle D1 (i.e., the current duty cycle) and the target duty cycle D2 (i.e., the second duty cycle). The current error e is calculated as e = D2 - D1.

[0074] The proportionality coefficient Kp is set to be a non-linear positive correlation function with the absolute value of the error e, for example:

[0075] Kp = Kp0 × (1 + α × |e| / e_max).

[0076] Where: Kp0 is the reference proportional gain (e.g., 0.8), calibrated by the system. α is the sensitivity coefficient (e.g., 1.5). e_max is the maximum permissible error (e.g., 20%).

[0077] When e=0, Kp=Kp0. When |e|=e_max, Kp=Kp0×(1+α).

[0078] This calculation is performed dynamically within each control cycle (e.g., 10ms).

[0079] Among them, the proportional-integral-derivative controller (PID controller) is an error-based feedback control algorithm that includes a proportional term (P), an integral term (I), and a derivative term (D) to achieve stable, fast, and zero steady-state error control.

[0080] Proportional coefficient: refers to the gain parameter of the proportional term in a PID controller, which determines the instantaneous response strength of the controller to the current error.

[0081] Step S410: Determine the integral coefficient of the proportional-integral-derivative controller based on the remaining time of the preset adjustment time window.

[0082] Specifically, the strength of the integral term is dynamically adjusted based on the remaining available adjustment time of the system. The integral term is used to eliminate static error, but in time-constrained scenarios, if the integral is too strong, it can easily lead to excessive accumulated error, causing overshoot or delay. This step ensures that the integral effect only takes effect when there is sufficient time, and automatically suppresses integral accumulation near the deadline.

[0083] Among them, the integral coefficient refers to the gain parameter of the integral term in the PID controller, which determines the controller's ability to compensate for accumulated historical errors. The remaining time of the preset time window refers to the available time from the current moment until the final moment when the voltage switching must be completed.

[0084] Step S420: Determine the derivative coefficients of the proportional-integral-derivative controller based on the deviation between the current duty cycle and the second duty cycle, as well as the time interval between each adjustment.

[0085] Specifically, the derivative term gain is dynamically adjusted based on the error change rate and the control cycle. The derivative term can predict error trends, suppress rapid changes, and prevent overshoot caused by system inertia or delay. This step matches the derivative action with the control rhythm, avoiding misjudgment of trends due to a fixed sampling frequency.

[0086] Among them, the derivative coefficient refers to the gain parameter of the derivative term in the PID controller, which determines the controller's predictive response capability to changes in error trends. The step interval refers to the time interval between two PWM adjustments, measured in milliseconds (ms), and is fixed by the system timer.

[0087] Step S430: Update the parameters of the proportional-integral-derivative controller based on the proportional coefficient, integral coefficient, and derivative coefficient.

[0088] Specifically, the three parameters Kp, Ki, and Kd dynamically calculated in the first three steps are written into the internal register of the PID controller in real time, enabling the controller to operate adaptively according to the current system state (error, time, rate of change), thus achieving intelligent control with "non-fixed parameters and nonlinear response".

[0089] For example, the embedded controller performs a PID parameter update process once every control cycle (Δt=10ms):

[0090] i. Read the previously calculated Kp, Ki, and Kd.

[0091] ii. Write the three coefficients into the registers of the PID controller (e.g., PID_REG_KP, PID_REG_KI, PID_REG_KD).

[0092] iii. Perform PID calculation: u(t) = Kp × e(t) + Ki × e(t)dt+Kd×de(t) / dt.

[0093] The output result is used as the duty cycle increment ΔD for this adjustment, which is then used to update the fan PWM output.

[0094] Step S440: Determine the output limit based on the remaining time of the adjustment time window.

[0095] Specifically, this step is the final safety constraint step for the control output. The adjustment amount calculated by the controller may exceed the hardware safety range or cause drastic fluctuations in speed. Therefore, it is necessary to set a dynamic output limit based on the remaining time to ensure that the adjustment action is always within a safe and acceptable range.

[0096] Step S450: The updated proportional-integral-derivative controller outputs the duty cycle adjustment amount of the current duty cycle.

[0097] Among them, the duty cycle adjustment is less than or equal to the output limit.

[0098] In this embodiment, the current duty cycle of the fan and the second duty cycle under the target working scenario are input to the proportional-integral-derivative controller. The proportional coefficient is dynamically calculated based on the difference between the two to respond to the instantaneous deviation during voltage switching. The integral coefficient is adaptively adjusted based on the remaining time of a preset time window to eliminate steady-state error and avoid cumulative overshoot. The derivative coefficient is calculated by combining the difference and the step interval to suppress oscillation trends during the adjustment process, thereby updating the controller parameters in real time. At the same time, the output limit is dynamically set based on the remaining time to ensure that the duty cycle adjustment of the controller output is always constrained within a safe range. Voltage switching is completed instantaneously, but the actual drive power switching of the fan motor requires a certain transition time. By dynamically and smoothly adjusting the duty cycle during the power switching transition, the fan speed is kept on a preset stable path, avoiding the superposition effect of power change and duty cycle change, thereby eliminating mechanical noise and airflow impact, and achieving a silent and smooth transition during power supply scenario switching.

[0099] In one embodiment, such as Figure 5 As shown, step S110 determines whether the fan's operating mode needs to be switched based on the fan's power source and battery level. This includes steps S500-S510:

[0100] In step S500, if it is determined that the power source of the fan is AC mains power, or if it is determined that the power source of the fan is the fan's battery and the battery power is greater than or equal to a preset threshold, the target operating scenario of the fan is determined to be a high-voltage scenario.

[0101] Specifically, this step is a crucial decision-making step in the system's decision-making logic. When the system is connected to an external AC power source, it forces the fan's power supply target to be set to the highest performance mode, i.e., high voltage output (e.g., 12V), to ensure the fan operates at maximum cooling capacity. This judgment does not depend on the battery status, but only on the power source, ensuring the user receives optimal cooling when the adapter is plugged in. If the fan's power source is determined to be its battery and the battery charge is greater than or equal to a preset threshold, it indicates that the battery has sufficient charge and can meet the conditions for high-voltage operation. Therefore, the target operating scenario for the fan is determined to be a high-voltage scenario.

[0102] Step S510: If the current operating scenario of the fan is a low voltage scenario, determine that the operating scenario of the fan needs to be switched.

[0103] Specifically, this step is used to determine whether the current operating state is inconsistent with the target state, thereby triggering the voltage switching process. The system only initiates the switching process when the current scenario is a low voltage (e.g., 10V) and there are conditions for switching to a high voltage (12V), avoiding invalid operations and improving system energy efficiency and lifespan.

[0104] In this embodiment, by real-time detection of the fan's power source and battery level, combined with preset scene switching logic, when the power source is detected to be AC ​​mains, the target operating scene of the fan is forcibly determined to be a high-voltage scene. At the same time, when the current operating scene is a low-voltage scene, a working scene switching request is actively triggered. The duty cycle is adjusted at the same time as the voltage switching to avoid sudden changes in fan power caused by plugging and unplugging the adapter or switching between high and low battery levels. This ensures that the fan can maintain a stable speed under different power supply conditions, effectively solving the problem of delayed or misjudged voltage switching due to unclear switching trigger conditions, and improving the accuracy of system response and the stability of operation.

[0105] In one embodiment, such as Figure 6 As shown, step S110 determines whether the fan's operating mode needs to be switched based on the fan's power source and battery level. It also includes steps S600-S610:

[0106] Step S600: If it is determined that the power source of the fan is the fan's battery and the battery power is less than a preset threshold, the target operating scenario of the fan is determined to be a low-voltage scenario.

[0107] Specifically, when the fan is powered by a battery, the current battery charge level determines whether a high-performance high-voltage power supply mode can be maintained. If the battery charge level is less than a preset threshold (e.g., 70%), it means that the battery voltage is too low and cannot maintain the output in a high-voltage scenario. Therefore, the target operating scenario for the fan is determined to be a low-voltage scenario.

[0108] Step S610: If the current operating scenario of the fan is a high-voltage scenario, determine that the operating scenario of the fan needs to be switched.

[0109] Specifically, this step determines whether the current operating state matches the target state, thereby deciding whether to initiate the voltage switching process. The fan's current operating scenario is a high-voltage scenario, and the target operating scenario is determined to be a low-voltage scenario; therefore, the fan's operating scenario needs to be switched. Whenever there is a difference between the current and target operating scenarios, a switching of the operating scenario is required.

[0110] In this embodiment, by real-time detection of the fan's battery level and combined with preset scene switching logic, the working scene is switched when it is determined that the current working scene is inconsistent with the target working scene. The duty cycle is adjusted at the same time as the voltage switching to avoid sudden changes in fan power caused by plugging and unplugging the adapter or switching between high and low battery levels. This ensures that the fan can maintain a stable speed under different power supply conditions, effectively solving the problem of delayed or misjudged voltage switching timing caused by unclear switching trigger conditions, and improving the accuracy of system response and the stability of operation.

[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0112] This embodiment also provides a fan voltage control device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0113] In one embodiment, such as Figure 7 As shown, this application also provides a fan voltage control circuit, including: a step-down chip 10, a voltage divider circuit 20, and a control circuit 30, wherein:

[0114] The step-down chip 10 is connected to the battery of the fan 40 and is used to connect to external AC mains power, and is used to convert the power provided by the battery or the power provided by the AC mains into the power supply voltage to the fan 40.

[0115] Specifically, the buck converter 10 is the core power device in this system that performs voltage conversion. Its input is directly connected to the laptop's battery pack and the output of the external AC adapter, providing dual input capability. The function of this chip is to stably step down the input DC voltage (from the battery or the DC voltage converted by the adapter) to the operating voltage required by the fan 40 (such as 12V or 10V) and continuously output it to the fan 40 load.

[0116] For example, the step-down chip 10 includes:

[0117] BOOT: Bootstrap pin, connected to external capacitor C1, provides gate drive voltage for the high-side switching transistor inside the chip, ensuring that the switching transistor can still conduct reliably when the SW node is at high voltage. It is an essential auxiliary for the normal operation of buck DC-DC switching power supply circuits.

[0118] SW: Switching node, external power inductor L1. The internal switching transistor controls the charging and discharging of the inductor through the SW pin: when turned on, the inductor stores energy; when turned off, the inductor continuously discharges to the load, completing energy transfer and voltage reduction.

[0119] FB: Feedback pin, receives the voltage signal after voltage division. The chip automatically adjusts the switching duty cycle to stabilize the output voltage by comparing the FB voltage with the internal reference voltage Vref (typically 0.6V / 1.2V).

[0120] L1: Power inductor, the core energy storage component of Buck, smooths the output current and ensures continuous power supply to the load.

[0121] C2: Output capacitor, which, together with L1, forms an LC filter network to filter out output voltage ripple, prevent fan 40 from generating noise due to power supply fluctuations, and provide transient current to the load.

[0122] The voltage divider circuit 20 is connected to the output terminal of the step-down chip 10 and is used to adjust the power supply voltage output by the step-down chip 10.

[0123] Specifically, the voltage divider circuit 20 is a resistor network connected between the output terminal of the buck chip 10 and the feedback pin. Its function is to dynamically adjust the target output voltage value of the buck chip 10 by changing the voltage division ratio of the feedback resistor. This circuit does not generate power, but only provides a voltage sampling signal, enabling the buck chip 10 to automatically adjust the switching duty cycle according to the feedback voltage, thereby achieving precise control of the output voltage.

[0124] For example, R1: upper voltage divider resistor, connecting the output voltage VOUT node (fan 40) and the FB node.

[0125] R2: Lower voltage divider resistor, connected in series between the FB node and ground, forming the basic voltage divider path.

[0126] The control circuit 30 is connected to the step-down chip 10 and the voltage divider circuit 20, and is used to detect the power source and battery level of the fan 40 during its operation. Based on the power source and battery level of the fan 40, it determines whether the operating mode of the fan 40 needs to be switched. If it is determined that the operating mode of the fan 40 needs to be switched, the target voltage for the target operating mode of the fan 40 is determined. The first voltage of the fan 40 in the current operating mode is adjusted to the target voltage, and the duty cycle of the fan 40 is adjusted to ensure that the speed of the fan 40 is consistent with that in the target operating mode.

[0127] Specifically, the control circuit 30 is implemented by an embedded controller (EC), which is responsible for coordinating the entire process of sensing, decision-making, and execution. It obtains power status and battery information in real time through a hardware interface, determines whether a voltage switching scenario is needed based on a preset strategy, and if a switching is needed, it switches the output voltage and synchronously adjusts the PWM duty cycle of the fan 40 to achieve a smooth power transition, thereby avoiding sudden speed changes and noise generation. The specific control method has been described in the above embodiments and will not be repeated here.

[0128] For example, Q1 is a Metal-Oxide-Semiconductor Field-Effect Transistor (MOS). Its drain (D) is connected to the FB pin via resistor R5, its source (S) is connected to GND2, and its gate (G) is connected to the control signal Vin (the GPIO output of EC) via resistor R3. R5 is connected in series between the drain of Q1 and the FB pin for current limiting and voltage matching. When Q1 is on, the R5 branch is connected to the voltage divider network in parallel with R2. The equivalent resistance after parallel connection, together with the upper voltage divider resistor R1, forms a new voltage division ratio, resulting in a Buck output of 12V, suitable for high-voltage scenarios. R3 is connected in series between the EC GPIO interface (Vin) and the gate of Q1 to suppress oscillations during MOS switching, ensuring a clean switching edge and avoiding electromagnetic interference. R4 is connected to Vin at one end and GND3 at the other. When EC GPIO is in a high-impedance state, it reliably pulls the gate of Q1 low, ensuring Q1 is turned off, preventing malfunctions, and improving circuit reliability. Vin is a GPIO signal output by EC, used to control the on / off state of Q1.

[0129] With Q1 off, the R5 branch is disconnected, and the equivalent resistance of the voltage divider is only R2, resulting in a Buck output of 10V. This is suitable for low-voltage scenarios.

[0130] When Q1 is turned on, the R5 branch is connected to the voltage divider network in parallel with R2. The equivalent resistance of the lower voltage divider is the parallel connection of R2 and R5, thus reducing the equivalent lower voltage divider resistance. The Buck output is 12V, suitable for high-voltage scenarios.

[0131] In this embodiment, the buck converter chip serves as the core of power conversion, providing a unified fan power supply voltage platform with a single structure compatible with both battery and AC mains input sources. The voltage divider circuit, as a low-cost voltage regulation unit, enables two-level switching of the output voltage without requiring replacement of the power supply chip. The control circuit, as the intelligent decision-making hub, senses the power source and battery level in real time, determines whether to switch based on a strategy, and completes the voltage transition within a preset time window by precisely controlling the gradual change of the PWM duty cycle in conjunction with the hardware switching timing of the voltage divider circuit.

[0132] Figure 8 This is a structural block diagram of an optional fan voltage control device according to an embodiment of this application. Figure 8 As shown, it includes:

[0133] The detection module 801 is used to detect the power source of the fan and the battery level of the fan during the operation of the fan.

[0134] The status determination module 802 is used to determine whether the fan's operating mode needs to be switched based on the fan's power source and battery level.

[0135] The target determination module 803 is used to determine the target voltage of the fan in the target operating scenario when it is determined that the fan's operating scenario needs to be switched.

[0136] The control module 804 is used to adjust the first voltage of the fan in the current working scenario to the target voltage, and to adjust the duty cycle of the fan so that the fan speed remains consistent between the current working scenario and the target working scenario.

[0137] In an exemplary embodiment, the above-described apparatus is further configured to: determine a first rotational speed of the fan in the current operating scenario based on a first voltage and a first duty cycle of the fan in the current operating scenario; determine a second duty cycle required by the fan to maintain the first rotational speed under a target voltage; and synchronously adjust the fan's duty cycle during the process of switching the first voltage to the target voltage, so that the fan's duty cycle is adjusted from the first duty cycle to the second duty cycle.

[0138] In an exemplary embodiment, the above-described apparatus is further configured to: obtain the current duty cycle of the fan during the process of adjusting the fan's duty cycle; determine a deviation value based on the difference between the current duty cycle and the second duty cycle; adjust the current duty cycle based on the deviation value; and, if the current duty cycle has not reached the second duty cycle, return to the step of obtaining the current duty cycle of the fan during the process of adjusting the fan's duty cycle until the current duty cycle reaches the second duty cycle.

[0139] In an exemplary embodiment, the above-described apparatus is further configured to: input the current duty cycle and the second duty cycle into a proportional-integral-derivative (PID) controller; calculate the proportional coefficient of the PPD controller based on the deviation between the current duty cycle and the second duty cycle; determine the integral coefficient of the PPD controller based on the remaining time proportion of a preset adjustment time window; determine the derivative coefficient of the PPD controller based on the deviation between the current duty cycle and the second duty cycle and the time interval between each adjustment; update the parameters of the PPD controller based on the proportional coefficient, integral coefficient, and derivative coefficient; determine the output limit based on the remaining time of the adjustment time window; and output the duty cycle adjustment amount of the current duty cycle using the updated PPD controller, wherein the duty cycle adjustment amount is less than or equal to the output limit.

[0140] In an exemplary embodiment, the above-described apparatus is further configured to: determine that the target operating scenario of the fan is a high-voltage scenario when it is determined that the power source of the fan is AC mains power, or when it is determined that the power source of the fan is the fan's battery and the battery power is greater than or equal to a preset threshold; and determine that the operating scenario of the fan needs to be switched when the current operating scenario of the fan is a low-voltage scenario.

[0141] In an exemplary embodiment, the above-described apparatus is further configured to: determine that the target operating scenario of the fan is a low-voltage scenario when it is determined that the power source of the fan is the fan's battery and the battery power is less than a preset threshold; and determine that the operating scenario of the fan needs to be switched when the current operating scenario of the fan is a high-voltage scenario.

[0142] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0143] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0144] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0145] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0146] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium storing the computer program product, wherein the computer program, when executed by a processor, implements the steps of the methods described in various embodiments of this application.

[0147] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0148] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0149] In the description of this specification, references to terms such as "some embodiments," "other embodiments," and "ideal embodiments" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative descriptions of the above terms do not necessarily refer to the same embodiments or examples.

[0150] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0151] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for controlling fan voltage, characterized in that, include: The power source and battery level of the fan are detected during its operation. Based on the power source and battery level of the fan, determine whether the operating mode of the fan needs to be switched. If it is determined that the operating scenario of the fan needs to be switched, the target voltage under the target operating scenario of the fan is determined; The first voltage of the fan in the current working scenario is adjusted to the target voltage, and the duty cycle of the fan is adjusted so that the fan speed is consistent with that in the target working scenario and the current working scenario.

2. The fan voltage control method according to claim 1, characterized in that, The step of adjusting the first voltage of the fan in the current working scenario to the target voltage, and adjusting the duty cycle of the fan to make the fan speed consistent with the current working scenario in the target working scenario, includes: Based on the first voltage and the first duty cycle of the fan in the current working scenario, the first speed of the fan in the current working scenario is determined; Determine the second duty cycle required by the fan to maintain the first speed under the target voltage; During the process of switching the first voltage to the target voltage, the duty cycle of the fan is simultaneously adjusted so that the duty cycle of the fan is adjusted from the first duty cycle to the second duty cycle.

3. The fan voltage control method according to claim 2, characterized in that, The step of simultaneously adjusting the fan's duty cycle during the process of switching the first voltage to the target voltage, so that the fan's duty cycle is adjusted from the first duty cycle to the second duty cycle, includes: The current duty cycle of the fan is obtained during the adjustment of the fan's duty cycle; The deviation value is determined based on the difference between the current duty cycle and the second duty cycle; Adjust the current duty cycle based on the deviation value; If the current duty cycle has not reached the second duty cycle, return to the step of obtaining the current duty cycle of the fan during the adjustment of the fan's duty cycle, until the current duty cycle reaches the second duty cycle.

4. The fan voltage control method according to claim 3, characterized in that, The step of adjusting the current duty cycle based on the deviation value includes: The current duty cycle and the second duty cycle are input into the proportional-integral-derivative controller, and the proportional coefficient of the proportional-integral-derivative controller is calculated based on the deviation between the current duty cycle and the second duty cycle. The integral coefficient of the proportional-integral-derivative controller is determined based on the remaining time proportion of the preset adjustment time window; The derivative coefficient of the proportional-integral-derivative controller is determined based on the deviation between the current duty cycle and the second duty cycle, as well as the time interval between each adjustment. The parameters of the proportional-integral-derivative controller are updated based on the proportional coefficient, the integral coefficient, and the derivative coefficient. The output limit is determined based on the remaining time of the adjustment time window; The updated proportional-integral-derivative controller outputs the duty cycle adjustment amount of the current duty cycle, wherein the duty cycle adjustment amount is less than or equal to the output limit.

5. The fan voltage control method according to any one of claims 1-4, characterized in that, The step of determining whether the operating mode of the fan needs to be switched based on the power source and battery level of the fan includes: If it is determined that the power source of the fan is AC mains power, or if it is determined that the power source of the fan is the fan's battery and the battery power is greater than or equal to a preset threshold, the target operating scenario of the fan is determined to be a high-voltage scenario. If the current operating scenario of the fan is a low-voltage scenario, it is determined that the operating scenario of the fan needs to be switched.

6. The fan voltage control method according to claim 5, characterized in that, The step of determining whether the operating mode of the fan needs to be switched based on the power source and battery level of the fan further includes: If it is determined that the power source of the fan is the fan's battery, and the battery power is less than the preset threshold, then the target operating scenario of the fan is determined to be a low-voltage scenario. If the current operating scenario of the fan is a high-voltage scenario, it is determined that the operating scenario of the fan needs to be switched.

7. A fan voltage control circuit, characterized in that, include: A step-down chip is connected to the fan's battery and used to connect to external AC mains power, for converting the electrical energy provided by the battery or the electrical energy provided by the AC mains power into a supply voltage to be supplied to the fan; A voltage divider circuit is connected to the output terminal of the step-down chip and is used to adjust the power supply voltage output by the step-down chip. A control circuit, connected to the step-down chip and the voltage divider circuit, is used to detect the power source and battery level of the fan during its operation; determine whether the fan's operating mode needs to be switched based on the power source and battery level; if the operating mode needs to be switched, determine the target voltage for the target operating mode; adjust the first voltage of the fan in the current operating mode to the target voltage, and adjust the fan's duty cycle to keep the fan speed consistent with the current operating mode in the target operating mode.

8. A fan voltage control device, characterized in that, The device includes: The detection module is used to detect the power source of the fan and the battery level of the fan during the operation of the fan; The status determination module is used to determine whether the working mode of the fan needs to be switched based on the power source of the fan and the battery level of the fan. The target determination module is used to determine the target voltage of the fan under the target operating scenario when it is determined that the operating scenario of the fan needs to be switched. The control module is used to adjust the first voltage of the fan in the current working scenario to the target voltage, and to adjust the duty cycle of the fan so that the fan speed is consistent with the current working scenario in the target working scenario.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 6.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.