A fan control system
Patent Information
- Application Number
- CN202511768888.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-11-28
AI Technical Summary
[0003]但随着人工智能的发展,GPGPU芯片功耗越来越高,同时伴随越来越多的大模型应用场景,GPGPU功耗负载会在短时间内(一般为毫秒级)变化剧烈,从而导致芯片的温度也变化异常剧烈,例如在2ms内温度会从60℃陡增至90℃
本申请提供的一种风扇控制系统,由于当前计数值的数值越大,表示在当前的计数周期内所述被监控模块的实际功耗越大,而被监控模块的实际功耗越大就表明其在当前的计数周期内会因功耗较高产生大量的热量。本申请实施例中,通过目标性能计数器的输出触发执行第二风扇转速参数确定任务,且第二风扇转速参数确定任务会在当前计数值大于预设计数阈值直接将风扇转速参数调整为最大值,以使得风扇的转速被调整为最大。从而使得,风扇控制系统在热量还未传导至外部时,即可通过第二风扇转速参数确定任务提前将风扇的转速调整到最大,以快速对被监控模块进行散热,如此避免了若芯片的温度在短时间内陡增,风扇的转速调整会因为温度轮询周期和温度的传导导致的滞后的问题。
Smart Images

Figure CN121349275B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of general-purpose graphics processor heat dissipation, and in particular to a fan control system. Background Technology
[0002] Current GPGPU (General Purpose Graphics Processing Unit) cooling fan speed control designs rely on general-purpose temperature sensing technology, which allows the fan speed to dynamically adjust based on changes in the GPGPU core temperature. The GPGPU has a built-in temperature sensor that monitors the chip temperature in real time and sends the data to the control unit. The control unit then adjusts the fan speed based on preset temperature thresholds and fan performance curves to ensure that the GPGPU temperature remains within a safe range under different loads.
[0003] However, with the development of artificial intelligence, the power consumption of GPGPU chips is increasing. Simultaneously, with the increasing number of large-scale model applications, the power load of GPGPUs can change drastically within a short period (typically milliseconds), leading to abnormally rapid temperature fluctuations. For example, the temperature can jump from 60°C to 90°C within 2ms. Current control methods are limited by the polling cycle (typically 5ms or longer) for acquiring the chip's temperature and adjusting fan speed. Furthermore, temperature conduction causes a lag in temperature sensor detection. In this situation, if the chip temperature increases sharply within a short time, the fan speed adjustment will also lag, resulting in the fan adjusting to a higher speed only after the temperature has already risen or has been rising for some time. Such temperature control is undoubtedly lagging. Summary of the Invention
[0004] To address the aforementioned technical problem, the technical solution adopted in this application is as follows: In one aspect of this application, a fan control system is provided, including a task execution module and a target fan control module; the task execution module is configured to execute a plurality of tasks sequentially in each cycle with a first duration as the period; the plurality of tasks include a first fan speed parameter determination task and a fan speed adjustment task; the first fan speed parameter determination task is executed before the fan speed adjustment task in one cycle.
[0005] The first fan speed parameter determination task is used to adjust the fan speed parameter based on the current temperature of the monitored module; the fan speed adjustment task is used to adjust the fan speed based on the currently acquired fan speed parameter.
[0006] After the task of determining the second fan speed parameter is executed, the following steps are performed: S100: Whenever the current count value output by the target performance counter is received, it is determined whether the current count value is greater than a preset count threshold; the larger the value of the current count value, the greater the actual power consumption of the monitored module in the current counting cycle; the duration of the counting cycle is less than the first duration.
[0007] S110, if the current count value is greater than the preset count threshold, the fan speed parameter is adjusted to the maximum value, and the task execution module is controlled to adjust the fan speed according to the current fan speed parameter.
[0008] This application has at least the following beneficial effects: This application provides a fan control system where a larger current count value indicates a higher actual power consumption of the monitored module within the current counting cycle. Higher actual power consumption indicates that the monitored module will generate a significant amount of heat due to high power consumption within the current counting cycle. In this embodiment, the output of a target performance counter triggers the execution of a second fan speed parameter determination task. This task directly adjusts the fan speed parameter to its maximum value when the current count value exceeds a preset count threshold, thus maximizing the fan speed. This allows the fan control system to adjust the fan speed to its maximum before heat is conducted to the outside, enabling rapid heat dissipation for the monitored module. This avoids the lag in fan speed adjustment caused by temperature polling cycles and heat conduction if the chip temperature increases sharply in a short period. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart illustrating the task of determining the second fan speed parameter in a fan control system provided in an embodiment of this application.
[0011] Figure 2 This is a flowchart illustrating the fan speed adjustment task in a fan control system provided in this application embodiment.
[0012] Figure 3 This is a flowchart illustrating the task of determining the first fan speed parameter in a fan control system provided in an embodiment of this application.
[0013] Figure 4This is a structural block diagram of a fan control system provided in an embodiment of this application.
[0014] Figure 5 This is a diagram illustrating experimental data for a fan control system provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It is worth noting that in the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary details.
[0017] It should be understood that in this application specification and the appended claims, the terms "comprising," "including," "including but not limited to," "including but not limited to," "mainly composed of," or "mainly made of" all indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0018] It should be understood that in this application specification and the appended claims, the use of the terms "consisting of" or "component of" indicates the presence of the described feature, integral, step, operation, element and / or component, but excludes the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0019] It should be understood that in this application specification and the appended claims, the terms "greater than", "less than", "exceeding", etc. are understood to exclude the number itself; and the terms "above", "below", "within", etc. are understood to include the number itself.
[0020] It should be understood that in this application specification and the appended claims, the terms "the," "the," "the," "the," "the," "the described," "the mentioned," etc., may be understood, depending on the context, to refer to the content mentioned above.
[0021] It should be understood that in this application specification and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, nor are they used to describe a specific order or sequence.
[0022] It should be understood that in this application specification and appended claims, the designations such as "S100," "S200," and "S300" are used only for distinguishing descriptions and / or convenience of reference, and should not be construed as indicating or implying a specific order or sequence of execution of steps or processes. For example, "S100, obtain data A; S200, obtain data B; S300, obtain C based on A and B;" is merely an example providing a feasible execution order, not a necessary one. Those skilled in the art can determine the actual and feasible execution order based on the function and internal logic of each step. For example, "Step S100 is executed before step S200, then step S300 is executed," "Step S200 is executed before step S100, then step S300 is executed," or "Steps S100 and S200 are executed in parallel, then step S300 is executed."
[0023] Please refer to Figures 1-4 As shown, this application embodiment provides a fan control system, including a task execution module and a target fan control module; the task execution module is configured to execute several tasks sequentially in each cycle with a first duration as the period; the several tasks include a first fan speed parameter determination task and a fan speed adjustment task; the first fan speed parameter determination task is executed before the fan speed adjustment task in one cycle; wherein, the first duration can be 3ms-15ms, and in this embodiment it is 5ms.
[0024] The first fan speed parameter determination task is used to adjust the fan speed parameter based on the current temperature of the monitored module; the fan speed adjustment task is used to adjust the fan speed based on the currently acquired fan speed parameter.
[0025] After the task of determining the second fan speed parameter is executed, the following steps are performed: S100: Whenever the current count value output by the target performance counter is received, it is determined whether the current count value is greater than a preset count threshold; the larger the value of the current count value, the greater the actual power consumption of the monitored module in the current counting cycle; the duration of the counting cycle can be 1μs-2ms; in this embodiment, the duration of the counting cycle is 1ms.
[0026] Specifically, the target performance counter can be a hardware performance counter (PFC) for the ML ALU busy event. The current count value is the number of clock cycles during which the arithmetic logic unit of the monitored module is in a working state within the counting period.
[0027] S110, if the current count value is greater than a preset count threshold, the fan speed parameter is adjusted to its maximum value, and the task execution module is controlled to adjust the fan speed according to the current fan speed parameter. Specifically, the fan speed parameter can be a percentage, with a maximum value of 100%. It can be used to represent the duty cycle of the fan control signal.
[0028] Specifically, in the implementation process, the task of determining the second fan speed parameter can be implemented using a fixed hardware circuit, that is, steps S100 and S110 can be implemented using fixed hardware. In this way, the speed can be further improved.
[0029] Furthermore, in actual implementation, the fan speed adjustment task can be set to be triggered by the first fan speed parameter determination task and the second fan speed parameter determination task.
[0030] In some embodiments, the monitored module is a SoC (System-on-Chip) chip. The task execution module can be the SCPU (Secondary CPU) firmware within the SoC chip; the target fan control module is a power management module located within the SCPU firmware of the SoC chip, or an MCU (Microcontroller Unit) located outside the SoC chip. In this embodiment, the target fan control module is a power management module located within the SCPU firmware of the SoC chip.
[0031] This application provides a fan control system where a larger current count value indicates a higher actual power consumption of the monitored module within the current counting cycle. Higher actual power consumption indicates that the monitored module will generate a significant amount of heat during the current counting cycle. In this application, a second fan speed parameter determination task is additionally set up, operating independently with a shorter execution cycle. This second task directly adjusts the fan speed parameter to its maximum value when the current count value exceeds a preset counting threshold, ensuring the fan speed is at its maximum. This allows the fan control system to pre-adjust the fan speed to its maximum before heat is conducted to the outside, thus quickly dissipating heat from the monitored module. This avoids the lag in fan speed adjustment caused by temperature polling cycles and heat conduction if the chip temperature increases sharply in a short period.
[0032] In one exemplary embodiment of this application, step S110 includes the following steps: S111, if the current count value is greater than the preset count threshold, then the fan speed parameter is adjusted to the maximum value.
[0033] S112, send an interrupt signal to the task execution module so that after the fan control module receives the interrupt signal, it suspends the execution of all current tasks and adjusts the fan speed according to the current fan speed parameters.
[0034] In this embodiment, the task execution module is triggered to adjust the fan speed by means of an interrupt. This allows the task execution module to adjust the fan speed to the maximum as soon as possible, thereby effectively controlling the rise in chip temperature and minimizing the maximum temperature that the chip can reach, thus extending the chip's lifespan.
[0035] In one exemplary embodiment of this application, the first fan speed parameter determination task is configured such that whenever the fan speed is adjusted to its maximum speed, the fan speed is not adjusted for a second duration; the second duration is longer than the first duration. Specifically, the second duration can be 0.5s-3s. In this embodiment, the second duration is 1s.
[0036] In this embodiment, whenever the fan speed is adjusted to the maximum speed, the fan speed is not adjusted within the second time period. This avoids the situation where the first fan speed parameter determination task reduces the fan speed based on the currently detected temperature before it has been conducted to the temperature sensor, thus making the heat dissipation effect more stable.
[0037] In one exemplary embodiment of this application, the second fan speed parameter determination task is configured to not be executed for at least a third duration after the fan speed parameter is adjusted to its maximum value; the third duration is greater than or equal to the second duration.
[0038] Because the chip may maintain high power consumption for extended periods during operation, if the task to determine the second fan speed parameter is repeatedly executed during this time, it will trigger multiple modifications to the fan speed parameter, thus affecting the overall system performance. Furthermore, if the task to determine the second fan speed parameter uses an interrupt to trigger the task execution module's adjustment of the fan speed, it will further affect the execution of other tasks by the task execution module. Therefore, in this embodiment, the task to determine the second fan speed parameter is set to not be executed for at least a third time interval after the fan speed parameter is adjusted to its maximum value. This avoids the aforementioned problems.
[0039] In one exemplary embodiment of this application, after the fan speed adjustment task is executed, the following steps are performed: S200, determine whether the currently obtained fan speed parameter is the maximum value. If yes, proceed to step S210; otherwise, proceed to step S220.
[0040] S210, adjust the silence counter to a preset value, and proceed to step S220; specifically, the value of the preset value can be determined according to the setting of the second duration. Specifically, it can be the second duration divided by the first duration and then rounded up or down. In this embodiment, the preset value is 200.
[0041] S220 adjusts the fan speed based on the currently obtained fan speed parameters.
[0042] After the task of determining the first fan speed parameter is executed, the following steps are performed: S310: Determine if the current silent value of the silent counter is 0. If yes, proceed to step S320; otherwise, decrement the current silent value of the silent counter by one and end the first fan speed parameter determination task. The current silent value can be understood as the current count value of the silent counter.
[0043] S320: Obtain the current temperature of the monitored module.
[0044] S321, if the current temperature is greater than the first temperature threshold and the current fan speed parameter is less than the maximum value, then the state of the second fan speed parameter determination task is adjusted to the enabled state, and proceed to step S322; otherwise, proceed to step S322. Specifically, the first temperature threshold can be 75℃.
[0045] S322, if the current temperature is less than the second temperature threshold, or the current fan speed parameter is equal to the maximum value, then the state of the second fan speed parameter determination task is adjusted to the disabled state, and proceed to step S330; otherwise, proceed to step S330; the second temperature threshold is less than the first temperature threshold. Specifically, when the state of the second fan speed parameter determination task is disabled, the second fan speed parameter determination task will not be executed. When the state of the second fan speed parameter determination task is enabled, the second fan speed parameter determination task will be executed normally. Specifically, the second temperature threshold can be 60℃.
[0046] S330, adjust the fan speed parameters according to the current temperature, and end the first fan speed parameter determination task.
[0047] Furthermore, after step S112, step S110 also includes the following steps: S113, the status of the second fan speed parameter determination task is adjusted to the disabled state.
[0048] In this embodiment, a silent counter is set, and the execution of the first fan speed parameter determination task is controlled according to the current count value of the silent counter. This ensures that whenever the fan speed is adjusted to the maximum speed, the first fan speed parameter determination task will not adjust the fan speed for a second period of time. Simultaneously, a temperature-controlled second fan speed parameter determination task is set up within the first fan speed parameter determination task to adjust its state, avoiding frequent switching between states. Furthermore, since the second fan speed parameter determination task disables itself after each adjustment of the fan speed parameter to the maximum value, and its state is only readjusted to the enabled state during the execution of the first fan speed parameter determination task, while the first fan speed parameter determination task only determines whether to enable its state when the current silent counter value is 0, this embodiment allows for simultaneous control of the execution of both the first and second fan speed parameter determination tasks using a single silent counter.
[0049] Furthermore, if the current temperature is greater than the first temperature threshold and the current fan speed parameter is less than the maximum value, the state of the second fan speed parameter determination task is adjusted to the enabled state; if the current temperature is less than the second temperature threshold, or the current fan speed parameter is equal to the maximum value, the state of the second fan speed parameter determination task is adjusted to the disabled state. This avoids the second fan speed parameter determination task from repeatedly executing under unnecessary conditions (such as when the current chip temperature is low), thus wasting computing power and generating unnecessary power consumption. Simultaneously, in the above method, if the current temperature is between the first and second temperature thresholds, the state of the second fan speed parameter determination task will not be adjusted, further avoiding the back-and-forth switching of the second fan speed parameter determination task's state.
[0050] Furthermore, to demonstrate the reliability of this embodiment, the following experiment was conducted. This experiment can also be used to determine the target performance counter.
[0051] In this experiment, two events were selected, namely Event0 and Event1.
[0052] Event0: ML ALU busy event, used to count the number of ALU busy cycles. The busier the ALU is, the larger the value of the corresponding hardware performance counter.
[0053] Event 1: ALU instruction count. The more ALU operations, the larger the corresponding hardware performance counter.
[0054] Experimental objective: Among two candidate events, select the one with the strongest linear correlation to chip power consumption as the interrupt trigger source (i.e., the current count value of the target performance counter).
[0055] Methods: Evaluation was performed using a fixed power scan experiment and Pearson correlation coefficient (Pearson r).
[0056] Select computationally intensive, ALU-driven, and stable applications, such as gemm matrix multiplication. Control power consumption by adjusting MNK and batch size, setting target values for each power level (e.g., 50W, 80W, 100W, ..., 300W), for a total of 10-15 levels. This will ultimately yield 10-15 data points (P, F0, F1), covering 50W–300W. P represents the current power, F0 is the count value of Event 0, and F1 is the count value of Event 1.
[0057] Set the target power consumption level (e.g., 50W, 80W, ..., 300W), and run GEMM; Wait for the system to reach steady state: power consumption fluctuation < ±2W (lasting 5s), temperature change < 0.5°C / min; Synchronous data acquisition (data acquisition every 1ms, for 100s): PFC0 (ie F0): ML ALU busy cycles; PFC1 (i.e. F1): Number of ALU instructions; Instantaneous power consumption: P(t); Chip temperature: T(t); Calculate the statistical values for each power level: Average power consumption: P_avg = mean(P(t)); Average PFC0: F0_avg = mean(PFC0); Average PFC1: F1_avg = mean(PFC1); Record the triple: (P_avg, F0_avg, F1_avg); The final collected data is as follows Figure 5 As shown.
[0058] And according to Figure 5 Using the data in the dataset, calculate the Pearson correlation coefficients between Event0 and Event1 and power consumption.
[0059] Thus, the Pearson correlation coefficient between Event0 and power consumption is obtained as r_0 = 0.9987.
[0060] The Pearson correlation coefficient r_1 between Event1 and power consumption is 0.9962.
[0061] This shows that Event0 has a stronger correlation with power consumption and should be prioritized. Simultaneously, it also demonstrates a very strong positive correlation between the hardware performance counter value of Event0 and power consumption, proving the feasibility and rationality of using the current count value of the target performance counter in this embodiment to determine whether to adjust the fan speed to its maximum.
[0062] Furthermore, the preset counting threshold can be determined using the data from this experiment.
[0063] Specifically, it can be based on Figure 5 The data corresponding to Event0 were fitted with a linear model P = 0.002857 × F0 + 31.43, R² = 0.9974.
[0064] With a target power of 300W, a preset counting threshold is calculated to trigger an interrupt when the predicted power consumption reaches 300W. Therefore, the preset counting threshold can be greater than or equal to 94000.
[0065] While specific embodiments of this application have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this application. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this application. The scope of this application is defined by the appended claims.
Claims
1. A fan control system, characterized in that, The system includes a task execution module and a target fan control module. The task execution module is configured to execute several tasks sequentially within each cycle, with a first duration as the period. Among the tasks are a first fan speed parameter determination task and a fan speed adjustment task. Within one cycle, the first fan speed parameter determination task is executed before the fan speed adjustment task. The first fan speed parameter determination task is used to adjust the fan speed parameter based on the current temperature of the monitored module; the fan speed adjustment task is used to adjust the fan speed based on the currently acquired fan speed parameter. After the task of determining the second fan speed parameter is executed, the following steps are performed: S100, whenever the current count value output by the target performance counter is received, it is determined whether the current count value is greater than a preset count threshold; the larger the value of the current count value, the greater the actual power consumption of the monitored module in the current counting cycle; the duration of the counting cycle is less than the first duration. S110, if the current count value is greater than the preset count threshold, the fan speed parameter is adjusted to the maximum value, and the task execution module is controlled to adjust the fan speed according to the current fan speed parameter; The first fan speed parameter determination task is set to not adjust the fan speed for a second duration whenever the fan speed is adjusted to the maximum speed; the second duration is longer than the first duration. The second fan speed parameter determination task is set to not be executed for at least a third time period after the fan speed parameter is adjusted to its maximum value. The third duration is greater than or equal to the second duration.
2. The system according to claim 1, characterized in that, Step S110 includes the following steps: S111, if the current count value is greater than the preset count threshold, then the fan speed parameter is adjusted to the maximum value; S112, send an interrupt signal to the task execution module so that after the fan control module receives the interrupt signal, it suspends the execution of all current tasks and adjusts the fan speed according to the current fan speed parameters.
3. The system according to claim 2, characterized in that, After the fan speed adjustment task is executed, the following steps are performed: S200, determine whether the currently obtained fan speed parameter is the maximum value; if so, proceed to step S210. Otherwise, proceed to step S220; S210, adjust the silent counter to the preset value and proceed to step S220; S220 adjusts the fan speed based on the currently obtained fan speed parameters.
4. The system according to claim 3, characterized in that, After the task of determining the first fan speed parameter is executed, the following steps are performed: S310, determine whether the current silent value of the silent counter is 0. If yes, proceed to step S320; otherwise, decrement the current silent value of the silent counter by one and end the first fan speed parameter determination task. S320, obtain the current temperature of the monitored module; S330, adjust the fan speed parameters according to the current temperature, and end the first fan speed parameter determination task.
5. The system according to claim 4, characterized in that, Between step S320 and step S330, the following step is also included: S321, if the current temperature is greater than the first temperature threshold and the current fan speed parameter is less than the maximum value, then the state of the second fan speed parameter determination task is adjusted to the enabled state, and proceed to step S322; otherwise, proceed to step S322. S322, if the current temperature is less than the second temperature threshold, or the current fan speed parameter is equal to the maximum value, then the state of the second fan speed parameter determination task is adjusted to the disabled state, and proceed to step S330; otherwise, proceed to step S330; the second temperature threshold is less than the first temperature threshold.
6. The system according to claim 4, characterized in that, Following step S112, step S110 further includes the following steps: S113, the status of the second fan speed parameter determination task is adjusted to the disabled state.
7. The system according to claim 1, characterized in that, The monitored module is a SoC chip.
8. The system according to claim 1, characterized in that, The target fan control module is a power management module located within the SCPU firmware of the SoC chip, or an MCU located outside the SoC chip.
Citation Information
Patent Citations
Fan rotating speed detecting and adjusting method and system and storage medium
CN116447156A
Electrical load optimization devicer
CN1185212A