US-12628310-B2 - Method for controlling fan speed, and electronic device
Abstract
The application discloses a method for controlling a fan speed. The method is applied to a server including a power supply unit, a first fan, and a second fan. The method includes: obtaining a first current control data and comparing the first current control data with a second current control data. A next-stage control data of the second fan is determined according to the first current control data and an increment if it is determined that the first current control data is greater than the second current control data. The second current control data is determined to be the next-stage control data if it is determined that the first current control data is less than or equal to the second current control data.
Inventors
- JIA-QING JI
- HAI-XIANG LIN
- HUA-XIN HU
Assignees
- INVENTEC (PUDONG) TECHNOLOGY CORPORATION
- INVENTEC CORPORATION
Dates
- Publication Date
- 20260512
- Application Date
- 20230906
- Priority Date
- 20230602
Claims (13)
- 1 . A method for controlling a fan speed that is applied to an electronic device, the electronic device comprising at least one power supply unit, at least one first fan, and at least one second fan, the at least one first fan being configured to generate airflow passing through the electronic device, the at least one second fan being configured to generate airflow passing through the at least one power supply unit, a speed of the at least one first fan being controlled according to a first current control data, and a speed of the at least one second fan being controlled according to a second current control data, wherein the method comprises: obtaining the first current control data and the second current control data; comparing the first current control data with the second current control data; determining a next-stage control data of the at least one second fan according to the first current control data and an increment if it is determined that the first current control data is greater than the second current control data; and determining the second current control data as the next-stage control data if it is determined that the first current control data is less than or equal to the second current control data; wherein the method further comprises: transmitting the first current control data to the at least one power supply unit; and controlling, after the first current control data is transmitted to the power supply unit, the at least one second fan to run at full speed if it is determined that a communication between the electronic device and the at least one power supply unit is interrupted and an interruption duration is greater than or equal to a preset duration.
- 2 . The method for controlling the fan speed according to claim 1 , wherein the at least one first fan is arranged at a rear side of a chassis of the electronic device, multiple electronic components of the electronic device are located upstream of an airflow generated by the at least one first fan, and the at least one power supply unit is arranged adjacent to the at least one first fan and on the same plane as the at least one first fan.
- 3 . The method for controlling the fan speed according to claim 1 , before the obtaining the first current control data and the second current control data, the method further comprising: obtaining an air inlet temperature of the at least one power supply unit and an air outlet temperature of the at least one power supply unit; and comparing the air inlet temperature of the at least one power supply unit and the air outlet temperature of the at least one power supply unit, and determining whether an air backflow is generated in the at least one power supply unit according to a comparison result, wherein the obtaining the first current control data and the second current control data is performed if it is determined that the air backflow is generated in the at least one power supply unit.
- 4 . The method for controlling the fan speed according to claim 3 , wherein after comparing the air inlet temperature and the air outlet temperature, the method further comprises: determining that the increment is 0% if the air outlet temperature is greater than the air inlet temperature.
- 5 . The method for controlling the fan speed according to claim 1 , wherein the preset duration is 10 seconds.
- 6 . The method for controlling the fan speed according to claim 1 , wherein the first current control data, the second current control data, and the next-stage control data are all pulse width modulation signals.
- 7 . The method for controlling the fan speed according to claim 1 , wherein the controlling the at least one second fan to run at full speed if it is determined that the communication between the electronic device and the at least one power supply unit is interrupted and the interruption duration is greater than or equal to the preset duration comprises: controlling the at least one second fan to run at full speed if it is determined that a system controller of the electronic device is out of order or an upgrade process is performed.
- 8 . An electronic device, comprising: at least one power supply unit; at least one first fan, configured to generate airflow passing through the electronic device, a speed of the at least one first fan being controlled according to a first current control data; at least one second fan, configured to generate airflow passing through the at least one power supply unit, a speed of the at least one second fan being controlled according to a second current control data; and a control chip, configured to execute a method for controlling a fan speed, wherein the method comprises: obtaining the first current control data and the second current control data; comparing the first current control data with the second current control data; determining a next-stage control data of the at least one second fan according to the first current control data and an increment if it is determined that the first current control data is greater than the second current control data; and determining the second current control data as the next-stage control data if it is determined that the first current control data is less than or equal to the second current control data; wherein the method further comprises: transmitting the first current control data to the at least one power supply unit; and controlling, after the first current control data is transmitted to the power supply unit, the at least one second fan to run at full speed if it is determined that a communication between the electronic device and the at least one power supply unit is interrupted and an interruption duration is greater than or equal to a preset duration.
- 9 . The electronic device according to claim 8 , wherein the at least one first fan is arranged at a rear side of a chassis of the electronic device, multiple electronic components of the electronic device are located upstream of an airflow generated by the at least one first fan, and the at least one power supply unit is arranged adjacent to the at least one first fan and on the same plane as the at least one first fan.
- 10 . The electronic device according to claim 8 , wherein the electronic device further comprise temperature sensors arranged at an air inlet and an air outlet of the at least one power supply unit to measure an air inlet temperature and an air outlet temperature of the power supply unit, respectively, wherein before the obtaining the first current control data and the second current control data, the method further comprising: obtaining an air inlet temperature and an air outlet temperature of the at least one power supply unit; and comparing the air inlet temperature and the air outlet temperature, and determining whether air backflow is generated in the at least one power supply unit according to a comparison result, wherein the first current control data and the second current control data are obtained if it is determined that the air backflow is generated in the at least one power supply unit.
- 11 . The electronic device according to claim 10 , wherein after comparing the air inlet temperature and the air outlet temperature, the method further comprises: determining that the increment is 0% if the air outlet temperature is greater than the air inlet temperature.
- 12 . The electronic device according to claim 8 , wherein the first current control data, the second current control data, and the next-stage control data are all pulse width modulation signals.
- 13 . The electronic device according to claim 8 , the controlling the at least one second fan to run at full speed if it is determined that the communication between the electronic device and the at least one power supply unit is interrupted and the interruption duration is greater than or equal to the preset duration comprises: controlling the at least one second fan to run at full speed if it is determined that a system controller of the electronic device is out of order or the electronic device is in an upgrade process.
Description
CROSS-REFERENCE TO RELATED DISCLOSURES This application claims priority to Chinese patent application No. 202310650923.0 filed with the Chinese Patent Office on Jun. 2, 2023, entitled “METHOD FOR CONTROLLING FAN SPEED”, the entire contents of which are incorporated by reference. TECHNICAL FIELD The present disclosure relates to the technical field of control, and in particular, to a method for controlling a fan speed and an electronic device. BACKGROUND Electronic components inside a server will generate heat during operation. If proper heat dissipation is not performed, the increased temperature will affect the performance of the electronic components. Therefore, fans are usually provided in the server to generate airflow within the chassis so as to dissipate heat from the electronic components by thermal convection. In addition, since the power supply unit is a high-power module, an individual fan may be provided in the power supply unit of the existing server to dissipate heat directly from the power supply unit. SUMMARY In a first aspect, the present disclosure provides a method for controlling a fan speed, which can be applied to an electronic device. The electronic device includes at least one power supply unit, at least one first fan, and at least one second fan. The at least one first fan is configured to generate air flow through the electronic device. The at least one second fan is configured to generate airflow through the at least one power supply unit. A speed of the at least one first fan is controlled according to a first current control data, and a speed of the at least one second fan is controlled according to a second current control data. The method includes: obtaining the first current control data and the second current control data; comparing the first current control data and the second current control data; determining a next-stage control data of the at least one second fan according to the first current control data and an increment if it is determined that the first current control data is greater than the second current control data; and determining the second current control data as the next-stage control data if it is determined that the first current control data is less than or equal to the second current control data. In some embodiments, the first current data is transmitted to the at least one power supply unit. After transmitting the first current control data to the power supply unit, the second fan is controlled to run at full speed if it is determined that a communication between the power supply unit and the electronic device is interrupted and an interruption duration is greater than or equal to a preset duration. In some embodiments, the at least one first fan is arranged in a rear side of a chassis of the electronic device, and multiple electronic components of the electronic device are located upstream of the airflow generated by the at least one first fan. The at least one power supply unit is arranged adjacent to the at least one first fan and on the same plane as the at least one first fan. In some embodiments, the method for controlling the fan speed provided by the present disclosure may further include: obtaining an air inlet temperature and an air outlet temperature of the at least one power supply unit; and comparing the air inlet temperature and the air outlet temperature and determining whether air backflow is generated in the power supply unit according to the comparison result. The step of obtaining the first current control data is performed if it is determined that the air backflow is generated in the at least one power supply unit. In some embodiments, after comparing the air inlet temperature and the air outlet temperature, the method for controlling the fan speed provided by the present disclosure further include: determining that the increment is 0% if the air outlet temperature is greater than the air inlet temperature. In some embodiments, the preset duration is 10 seconds. In some embodiments, the first current control data, the second current control data, and the next-stage control data are all PWM signals. In some embodiments, the controlling the second fan to run at full speed if it is determined that the communication between the electronic device and the at least one power supply unit is interrupted and the interruption duration is greater than or equal to a preset duration includes: controlling the second fan to run at full speed if it is determined that a system controller of the electronic device is out of order or an upgrade process is performed. In a second aspect, an electronic device is provided. The electronic device includes at least one power supply unit, at least one first fan, and at least one second fan. The at least one first fan is configured to generate airflow passing through the electronic device. A speed of the at least one first fan is controlled according to a first current control data. The at least one second fan i