CN-122014658-A - Fan voltage control method and device, storage medium, electronic device and circuit
Abstract
The application discloses a control method and device of fan voltage, a storage medium, an electronic device and a circuit, wherein the method comprises the steps of detecting a power supply source of a fan and detecting battery power of the fan in the working process of the fan; the method comprises the steps of determining whether a working scene of a fan needs to be switched according to a power supply source of the fan and the battery power of the fan, determining target voltage in a target working scene of the fan under the condition that the working scene of the fan needs to be switched, adjusting first voltage of the fan in a current working scene to be the target voltage, and adjusting the duty ratio of the fan to enable the rotating speed of the fan to be consistent with the current working scene in the target working scene. The phenomenon of severe fluctuation and instability of the rotation speed of the fan is restrained, and the stable rotation speed of the fan is ensured in the scene switching process.
Inventors
- ZHANG ZHIWEI
- LI KUI
- XIAO XUNYU
Assignees
- 广东虹勤通讯技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260330
Claims (10)
- 1. A method for controlling fan voltage, comprising: Detecting a power supply source of a fan and detecting battery power of the fan 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 electric quantity of the fan; Under the condition that the working scene of the fan is determined to need to be switched, determining the target voltage of the fan under the target working scene; And adjusting the first voltage of the fan in the current working scene to be the target voltage, and adjusting the duty ratio of the fan to enable the rotating speed of the fan to be consistent with the current working scene in the target working scene.
- 2. The method of claim 1, wherein adjusting the first voltage of the fan in the current operation scenario to the target voltage and adjusting the duty cycle of the fan to keep the rotational speed of the fan consistent with the current operation scenario in the target operation scenario comprises: determining a first rotating speed of the fan in the current working scene according to the first voltage and a first duty ratio of the fan in the current working scene; determining a second duty cycle required by the fan in the event that the fan is caused to maintain the first rotational speed at the target voltage; and in the process of switching the first voltage to the target voltage, synchronously adjusting the duty ratio of the fan so as to adjust the duty ratio of the fan from the first duty ratio to the second duty ratio.
- 3. The method of controlling a fan voltage according to claim 2, wherein the step of synchronously adjusting the duty cycle of the fan to adjust the duty cycle of the fan from the first duty cycle to the second duty cycle during the step of switching the first voltage to the target voltage includes: Acquiring the current duty ratio of the fan in the process of adjusting the duty ratio of the fan; Determining an offset value according to the difference between the current duty cycle and the second duty cycle; adjusting the current duty cycle according to the deviation value; And returning to the step of acquiring the current duty cycle of the fan in the process of adjusting the duty cycle of the fan until the current duty cycle reaches the second duty cycle under the condition that the current duty cycle does not reach the second duty cycle.
- 4. A control method of a fan voltage according to claim 3, wherein said adjusting the current duty cycle according to the deviation value comprises: inputting the current duty ratio and the second duty ratio into a proportional-integral-derivative controller, and calculating a proportional coefficient of the proportional-integral-derivative controller according to a deviation value of the current duty ratio and the second duty ratio; Determining an integral coefficient of the proportional-integral-derivative controller according to the residual time proportion of a preset adjusting time window; Determining a differential coefficient of the proportional-integral-derivative controller according to the deviation value of the current duty cycle and the second duty cycle and the time interval of each adjustment; Updating parameters of the proportional-integral-derivative controller according to the proportional coefficient, the integral coefficient and the derivative coefficient; Determining an output clip based on a remaining time of the adjustment time window; and outputting the duty cycle adjustment quantity of the current duty cycle by adopting the updated proportional-integral-derivative controller, wherein the duty cycle adjustment quantity is smaller than or equal to the output amplitude limit.
- 5. The method of any one of claims 1-4, wherein determining whether the operating scenario of the fan requires switching based on the power source of the fan and the battery level of the fan comprises: Under the condition that the power supply source of the fan is determined to be alternating current commercial power, or under the condition that the power supply source of the fan is determined to be a battery of the fan and the electric quantity of the battery is greater than or equal to a preset threshold value, determining that a target working scene of the fan is a high-voltage scene; And under the condition that the current working scene of the fan is a low-voltage scene, determining that the working scene of the fan needs to be switched.
- 6. The method of claim 5, wherein determining whether the operation scenario of the fan needs to be switched according to the power supply source of the fan and the battery power of the fan, further comprises: Determining that a target working scene of the fan is a low-voltage scene under the condition that the power supply source of the fan is determined to be a battery of the fan and the electric quantity of the battery is smaller than the preset threshold value; and under the condition that the current working scene of the fan is a high-voltage scene, determining that the working scene of the fan needs to be switched.
- 7. A control circuit for fan voltage, comprising: the step-down chip is connected with a battery of the fan and is used for being connected with external alternating current commercial power, and the step-down chip is used for converting electric energy provided by the battery or electric energy provided by the alternating current commercial power into power supply voltage and providing the power supply voltage to the fan; The voltage dividing circuit is connected with the output end of the voltage reduction chip and used for adjusting the power supply voltage output by the voltage reduction chip; The control circuit is connected with the voltage reduction chip and the voltage division circuit and is used for detecting a power supply source of the fan and detecting battery electric quantity of the fan in the working process of the fan, determining whether a working scene of the fan needs to be switched according to the power supply source of the fan and the battery electric quantity of the fan, determining target voltage in a target working scene of the fan under the condition that the working scene of the fan needs to be switched, adjusting first voltage of the fan in the current working scene to the target voltage, and adjusting duty ratio of the fan to enable the rotating speed of the fan to keep consistent with the current working scene in the target working scene.
- 8. A fan voltage control apparatus, the apparatus comprising: The detection module is used for detecting the power supply source of the fan and the battery electric quantity of the fan in the working process of the fan; the state determining module is used for determining whether the working scene of the fan needs to be switched according to the power supply source of the fan and the battery electric quantity of the fan; The target determining module is used for determining target voltage under the target working scene of the fan under the condition that the working scene of the fan is determined to need to be switched; And the control module is used for adjusting the first voltage of the fan in the current working scene to the target voltage and adjusting the duty ratio of the fan so as to keep the rotating speed of the fan consistent with the current working scene in the target working scene.
- 9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run 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 has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 6 by means of the computer program.
Description
Fan voltage control method and device, storage medium, electronic device and circuit Technical Field The present application relates to the field of fan management, and in particular, to a method and apparatus for controlling fan voltage, a storage medium, an electronic apparatus, and a circuit. Background In the thermal management system of modern equipment, the fan is used as a key heat dissipation component, and the stable operation of the fan directly influences the performance of the whole machine and the user experience. In the related art, a Buck (Buck) circuit is generally used to directly Buck and output 12V from a battery voltage (nominal 14.8V, minimum about 12V) or output 5V from a main power supply of the system, and then Boost the 5V to 12V through a Boost (Boost) circuit to supply power to the fan. However, the related art scheme has a problem in that the fan speed is unstable to cause noise when the output voltage drops or the voltage is switched. Disclosure of Invention The embodiment of the application provides a method and a device for controlling fan voltage, a storage medium, an electronic device and a computer program product. According to one aspect of the embodiment of the application, a control method of fan voltage is provided, which comprises the steps of detecting a power supply source of a fan and detecting battery electric quantity of the fan in the working process of the fan, determining whether a working scene of the fan needs to be switched according to the power supply source of the fan and the battery electric quantity of the fan, determining target voltage in a target working scene of the fan under the condition that the working scene of the fan needs to be switched, adjusting first voltage of the fan in the current working scene to the target voltage, and adjusting the duty cycle of the fan to enable the rotating speed of the fan to be consistent with the current working scene in the target working scene. In one exemplary embodiment, adjusting a first voltage of a fan in a current operating scenario to a target voltage and adjusting a duty cycle of the fan to maintain a rotational speed of the fan in the target operating scenario consistent with the current operating scenario includes determining a first rotational speed of the fan in the current operating scenario based on the first voltage and the first duty cycle of the fan in the current operating scenario, determining a second duty cycle required for the fan when the fan is maintained at the first rotational speed at the target voltage, and adjusting the duty cycle of the fan synchronously during switching the first voltage to the target voltage to adjust the duty cycle of the fan from the first duty cycle to the second duty cycle. In an exemplary embodiment, the duty cycle of the fan is synchronously adjusted during the switching of the first voltage to the target voltage such that the duty cycle of the fan is adjusted from the first duty cycle to the second duty cycle, including obtaining a current duty cycle of the fan during the adjustment of the duty cycle of the fan, determining an offset value based on a difference between the current duty cycle and the second duty cycle, adjusting the current duty cycle based on the offset value, and returning to the step of obtaining the current duty cycle of the fan during the adjustment of the duty cycle of the fan until the current duty cycle reaches the second duty cycle if the current duty cycle does not reach the second duty cycle. In an exemplary embodiment, adjusting the current duty cycle according to the deviation value includes inputting the current duty cycle and the second duty cycle into a proportional-integral-derivative controller, calculating a scaling factor of the proportional-integral-derivative controller according to the deviation value of the current duty cycle and the second duty cycle, determining an integral factor of the proportional-integral-derivative controller according to a remaining time proportion of a preset adjustment time window, determining a derivative factor of the proportional-integral-derivative controller according to the deviation value of the current duty cycle and the second duty cycle and a time interval of each adjustment, updating parameters of the proportional-integral-derivative controller according to the scaling factor, the integral factor and the derivative factor, determining an output clipping based on the remaining time of the adjustment time window, and outputting a duty cycle adjustment amount of the current duty cycle using the updated proportional-integral-derivative controller, wherein the duty cycle adjustment amount is less than or equal to the output clipping. In an exemplary embodiment, the determining whether the working scenario of the fan needs to be switched according to the power supply source of the fan and the battery power of the fan includes determining that the target working scenario of the fan is