Method and device for adjusting rotation speed, electronic equipment and storage medium
By acquiring the server's state and perturbation vector, and using MPC and deep reinforcement learning algorithms to adjust the fan speed, the problem of inaccurate server fan speed adjustment was solved, achieving high-precision temperature control and low energy consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2025-07-02
- Publication Date
- 2026-07-24
Smart Images

Figure CN120798850B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a method, apparatus, electronic device and storage medium for adjusting rotation speed. Background Technology
[0002] In current cloud computing and data center operations, efficient server cooling has become a key factor in ensuring continuous service quality and extending equipment lifespan. Traditional server fan speed control methods often rely on simple threshold feedback control or preset speed curves. While these methods can respond to changes in the server's internal temperature to some extent, their control accuracy and efficiency significantly decrease when faced with complex operating environments and dynamic loads.
[0003] Many servers rely on proportional-integral-derivative (PID) controllers to control temperature. While PID has its advantages in control theory, it faces challenges in server fan speed regulation. Due to the significant nonlinear characteristics of server thermodynamics, such as thermal inertia and the uncertainty of load thermal effects, PID control often struggles to achieve ideal control accuracy, especially under conditions of rapid changes in load or environmental conditions. This can easily lead to over- or under-adjustment, resulting in temperature fluctuations and unnecessary energy waste.
[0004] There is currently no effective solution to the problem of low accuracy in adjusting fan speed in existing technologies.
[0005] Therefore, it is necessary to improve the relevant technology to overcome the aforementioned defects. Summary of the Invention
[0006] This application provides a method, apparatus, electronic device, and storage medium for adjusting rotation speed, in order to at least solve the problem of low accuracy in adjusting fan speed in related technologies.
[0007] According to one aspect of the embodiments of this application, a method for adjusting rotation speed is provided, comprising: acquiring a state vector and a disturbance vector of a server, wherein the state information is a vector corresponding to the state information of the server, and the disturbance vector is a vector corresponding to the disturbance information of the server; determining a first control vector of an air outlet device in the control time domain by an optimization algorithm and the state vector, and determining a correction amount of the first control vector according to the state vector and the disturbance vector, wherein the air outlet device is located in the server; determining a second control vector according to the first control vector and the correction amount, and adjusting the rotation speed of the air outlet device according to the second control vector.
[0008] According to another aspect of the embodiments of this application, a rotation speed adjustment device is provided, comprising: an acquisition module, configured to acquire a state vector and a disturbance vector of a server, wherein the state information is a vector corresponding to the state information of the server, and the disturbance vector is a vector corresponding to the disturbance information of the server; a first determination module, configured to determine a first control vector of the air outlet device in the control time domain through an optimization algorithm and the state vector, and to determine a correction amount of the first control vector based on the state vector and the disturbance vector, wherein the air outlet device is located in the server; and a second determination module, configured to determine a second control vector based on the first control vector and the correction amount, and to adjust the rotation speed of the air outlet device based on the second control vector.
[0009] According to another aspect of the embodiments of this application, an electronic device is provided, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described methods for adjusting rotation speed.
[0010] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, in which a computer program is stored, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described methods for adjusting rotation speed.
[0011] 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 any of the above-described methods for adjusting rotational speed.
[0012] This application's embodiments obtain a server's state vector and disturbance vector, where the state information is the vector corresponding to the server's state information, and the disturbance vector is the vector corresponding to the server's disturbance information. A first control vector for the air outlet device in the control time domain is determined using an optimization algorithm and the state vector, and a correction amount for the first control vector is determined based on the state vector and disturbance vector, wherein the air outlet device is located within the server. A second control vector is determined based on the first control vector and the correction amount, and the rotation speed of the air outlet device is adjusted based on the second control vector. Thus, this application outputs a first control vector through an optimization algorithm and generates a correction amount for the first control vector. The final control vector is generated based on the first control vector and the correction amount. This dynamic correction mechanism helps improve control accuracy, thereby solving the problem of low accuracy in adjusting fan speed in related technologies. Attached Figure Description
[0013] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the 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.
[0014] Figure 1 This is a hardware structure block diagram of a computer device for a method of adjusting rotation speed according to an embodiment of this application;
[0015] Figure 2 This is a flowchart (a) of a method for adjusting rotation speed according to an embodiment of this application;
[0016] Figure 3 This is a flowchart (II) of a method for adjusting rotation speed according to an embodiment of this application;
[0017] Figure 4 This is a flowchart (III) of a method for adjusting rotation speed according to an embodiment of this application;
[0018] Figure 5 This is a flowchart (IV) of the method for adjusting the rotation speed according to an embodiment of this application;
[0019] Figure 6 This is a flowchart (V) of the method for adjusting the rotation speed according to an embodiment of this application;
[0020] Figure 7 This is a structural block diagram of a rotation speed adjustment device according to an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. 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 of ordinary skill in the art without creative effort are within the protection scope of this application.
[0022] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0023] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] The methods and embodiments provided in this application can be executed in a computer device or similar computing device. Taking running on a computer device as an example, Figure 1This is a hardware structure block diagram of a computer device for a method of adjusting rotation speed according to an embodiment of this application. For example... Figure 1 As shown, a computer device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MPU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The computer device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer device described above. For example, the computer device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0025] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the rotation speed adjustment method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to computer devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer equipment. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0027] This embodiment provides a method for adjusting the rotation speed. Figure 2 This is a flowchart (a) of a method for adjusting rotation speed according to an embodiment of this application, as shown below. Figure 2 As shown, the process includes the following steps:
[0028] Step S202: Obtain the server's state vector and disturbance vector, wherein the state vector is the vector corresponding to the server's state information, and the disturbance vector is the vector corresponding to the server's disturbance information;
[0029] The state vector includes key thermal state parameters of the server, such as the temperatures of the CPU, GPU, and storage units, as well as the internal ambient temperature of the server; while the disturbance vector covers load current, changes in external ambient temperature, etc. By comprehensively capturing the server's thermal state and external disturbances, the control strategy is ensured to make decisions based on the most accurate system information, thereby improving control accuracy and response speed.
[0030] Step S204: Determine the first control vector of the air outlet device in the control time domain through the optimization algorithm and the state vector, and determine the correction amount of the first control vector according to the state vector and the disturbance vector, wherein the air outlet device is located in the server;
[0031] After acquiring the server's current state and disturbance information, the MPC optimization algorithm is first used to predict the server's future thermal state based on the state vector, and an optimal fan speed control sequence, i.e., the first control vector, is determined. The MPC algorithm can consider the system dynamics and constraints in the prediction time domain, thereby achieving forward-looking, globally optimized control decisions. Through a deep reinforcement learning algorithm, the correction amount to the first control vector is dynamically calculated based on the server's state vector and disturbance vector. This correction, based on real-time system feedback and long-term performance learning, optimizes the control strategy to cope with nonlinear changes in system characteristics and unknown disturbances, improving the flexibility and accuracy of control.
[0032] Optionally, the state vector and the perturbation vector are input into the Actor network, wherein,
[0033] Input: state s k =[x k w k ], where x k Let w be the state vector. k This is the perturbation vector.
[0034] Output: Correction amount Δu k ∈[-10%, 10%].
[0035] Step S206: Determine a second control vector based on the first control vector and the correction amount, and adjust the rotation speed of the air outlet device based on the second control vector.
[0036] Through the above steps, the server's state vector and disturbance vector are obtained, where the state information is the vector corresponding to the server's state information, and the disturbance vector is the vector corresponding to the server's disturbance information. A first control vector for the air outlet device in the control time domain is determined using an optimization algorithm and the state vector, and a correction amount for the first control vector is determined based on the state vector and disturbance vector, wherein the air outlet device is located within the server. A second control vector is determined based on the first control vector and the correction amount, and the rotation speed of the air outlet device is adjusted based on the second control vector. Therefore, this application outputs a first control vector through an optimization algorithm and generates a correction amount for the first control vector. The final control vector is generated based on the first control vector and the correction amount. This dynamic correction mechanism helps improve control accuracy, thereby solving the problem of low accuracy in adjusting fan speed in related technologies.
[0037] In an exemplary embodiment, determining the first control vector of the air outlet device in the control time domain through an optimization algorithm and the state vector includes:
[0038] The first control vector of the air outlet device in the control time domain is determined by the cost function, constraints, and the state vector:
[0039] Cost function:
[0040] Constraints:
[0041] Where, N p For prediction in the time domain, N c To control the time domain, Let y be the first control vector in the control time domain. k Let y be the predicted state vector of the server at time k. ref Let u be the desired state vector of the server. k Let u be the control vector at time k. k-1 Let Q be the control vector at time k-1, R be the first weight matrix, A be the first system matrix, B be the second system matrix, D be the third system matrix, and x be the control vector at time k-1. k+1 Let w be the state vector at time k+1. k Let u be the perturbation vector at time k. min u is the lower limit of the control vector. max This is the upper limit of the control vector.
[0042] It should be noted that the cost function is a core component of the MPC framework, used to quantify the deviation between the control target and the actual output, as well as the energy consumption or cost of the control operation. In this embodiment, the mathematical form of the cost function is as follows:
[0043] The cost function consists of two parts: one part is the predicted state vector y k With the desired state vector y ref The sum of squared deviations between the two values, one part weighted by matrix Q, aims to minimize the difference between the server's actual temperature and the target temperature; the other part is the rate of change of the control vector Δu. k The sum of squares, weighted by matrix R, aims to reduce drastic fluctuations in control operation, thereby reducing energy consumption and mitigating mechanical fatigue.
[0044] The effectiveness of MPC depends not only on a reasonable cost function but also on the constraints of the actual system. In the embodiments of this application, the constraints include:
[0045] 1. System dynamic constraints: The system's state vector x at time k+1 k+1 From the current state x k Control input u k and disturbance w k The equations are calculated based on the dynamic evolution equations of system matrices A, B, and D. This ensures that control decisions are based on an accurate model of system behavior.
[0046] 2. Control Limit Constraints: Each control vector u k [u] must be satisfied min ,u max The range limitation ensures that the control signal does not exceed the physical capabilities of the PWM controller and does not cause damage to the hardware.
[0047] 3. Control rate of change constraint: By defining the rate of change Δu of the control vector. k =u k -u k-1 This limits drastic changes in control signals, thereby achieving smooth control and avoiding excessive impact and power consumption on the server caused by sudden changes in fan speed.
[0048] By setting the cost function and constraints described above, the MPC strategy can predict N in the time domain. p Internal rolling optimization is performed to find a series of control vectors. This approach minimizes the aforementioned cost function. It considers future system states while limiting energy consumption and mechanical damage during control operations, achieving high-precision and low-energy-consumption temperature control.
[0049] Specifically, by minimizing the deviation between the predicted state vector and the expected value, MPC ensures that the server temperature closely follows the target value, enhancing the accuracy of control. By penalizing the rate of change of the control vector, it promotes the smoothness of the control sequence, reduces unnecessary energy waste, and also reduces wear and tear on hardware such as fans, extending the lifespan of the equipment.
[0050] In one exemplary embodiment, the cost function further includes:
[0051] Where S is the third weight matrix, Δ 2 u k =Δu k -Δu k-1 =u k -2u k-1 +u k-2 .
[0052] Alternatively, the cost function can also be defined as:
[0053] This expression contains three main optimization objectives, thereby achieving comprehensive optimization of fan speed control:
[0054] 1. Minimize temperature tracking error:
[0055] The goal of this cost function is to minimize the degree of temperature deviation from the reference value, that is, to ensure that the temperature of the internal components of the server can closely track the preset temperature target, thereby improving the accuracy and stability of temperature control.
[0056] 2. Minimize energy consumption due to changes in rotational speed:
[0057] The goal of this cost function is to reduce drastic changes in fan speed, avoid unnecessary energy consumption, and reduce mechanical wear, as frequent sudden changes in speed will accelerate the aging of fan bearings and affect their lifespan.
[0058] 3. Smoothness of second-order rotational speed variation:
[0059] It is the second difference of the speed change. The goal of this cost function is to address the oscillations that may occur during fan speed regulation, ensuring a smoother control process, avoiding additional power consumption and mechanical damage caused by rapid fluctuations in the control signal, and also enhancing the robustness of the control strategy so that it can better cope with uncertainties in the system.
[0060] The cost function in this embodiment not only focuses on the accuracy of temperature control but also emphasizes energy consumption and fan lifespan. By cleverly incorporating penalty terms for speed changes and second-order speed changes into the control algorithm, a good balance between efficiency, durability, and stability is achieved in the control strategy. This cost function design, combined with the model predictive control (MPC) framework, can effectively guide the controller to make more economical and sustainable fan speed decisions while meeting temperature control requirements.
[0061] In an exemplary embodiment, after determining the first control vector of the air outlet device in the control time domain through the cost function, constraints, and the state vector, the method further includes:
[0062] The first system matrix and the second system matrix are modified according to the target formula, wherein the target formula is:
[0063]
[0064] Where, θ k Let K be the parameter vector at time k. k Let P be the gain matrix at time k. k Let λ be the parameter error covariance matrix at time k, λ be the forgetting factor, γ be the learning rate, and φ be the learning rate. k Let θ be the regression vector at time k. k = [vec(A) / vec(B)].
[0065] This application embodiment defines how to continuously optimize the parameters of the system model through a recursive update mechanism to improve the accuracy and adaptability of control. Optionally,
[0066] θ k Update: This step ensures that the system model evolves over time to progressively approximate the real server's thermodynamic characteristics. Wherein, θ k-1 It is the parameter estimate from the previous time step, while y k φ represents the actual measurement data at time k. k It is the regression vector at time k, containing a linear combination of a series of observations or system states at the current time point. The parameter vector θ k The calculation takes into account the difference between model predictions and actual measurements, using the gain matrix K. k To adjust the model parameters so that the model more closely resembles the behavior of the real-world system, θ k = [vec(A) / vec(B)].
[0067] Gain matrix K k It determines the magnitude and direction of model parameter updates. This is achieved through the parameter error covariance matrix P. k-1 and regression vector φ k The calculation uses information from the model and also considers a forgetting factor λ to balance the influence of old and new data. A higher forgetting factor means that the system "forgets" old data more quickly and updates parameters more based on new data, thereby enhancing the model's real-time adaptability.
[0068] Parameter error covariance matrix P k The parameter vector θ is constrained. kUncertainty. Through P k The recursive update can reflect the confidence level of the model parameter estimates and the model error after the parameter update in real time. In the update formula, the learning rate γ controls the update speed and stability of the model, while The sub-items reflect the changes in covariance before and after parameter updates, ensuring a smooth transition and stability during the model parameter update process.
[0069] The aforementioned target formula enables continuous online optimization of model parameters in server thermal control. This means that even if the system encounters unknown interference sources or changes in operating conditions during operation, it can quickly self-correct based on the latest data, improving control accuracy. Specifically, real-time model parameter correction based on recursive least squares continuously optimizes model parameters, enhancing the accuracy of MPC layer control and the overall intelligent response capability of the system.
[0070] In an exemplary embodiment, the method of adjusting the rotation speed of the air outlet device according to the second control vector further includes: determining the temperature value and total load rate of the server, and determining the temperature range in which the temperature value is located and the load rate range in which the total load rate is located; adjusting the second control vector according to the temperature range in which the temperature value is located and the load rate range in which the total load rate is located to obtain a third control vector; and adjusting the rotation speed of the air outlet device according to the third control vector.
[0071] Server temperature and load rate are two key parameters affecting fan speed control strategies. Defining temperature and load rate ranges allows control algorithms to more accurately identify the server's current operating state, thereby adopting more appropriate speed control strategies. For example, a server's temperature range might include "low temperature," "suitable temperature," and "high temperature," while the load rate range might cover a range from "low load" to "high load."
[0072] After determining the server's temperature and load ranges, this information is used to adjust the second control vector, generating a more optimized third control vector. This is achieved by considering the specific needs of the current temperature and load state based on the second control vector. For example, when the server is in a "high temperature" and "high load" range, the third control vector may further increase or maintain the fan speed to cope with urgent cooling needs; while under "low temperature" and "low load" conditions, the third control vector may reduce the fan speed to reduce unnecessary energy consumption and extend fan life.
[0073] In one exemplary embodiment, adjusting the second control vector according to the temperature range in which the temperature value is located and the load rate range in which the total load rate is located to obtain a third control vector includes: determining the third control quantity based on the second control vector and a first preset value when the temperature value is located in a first temperature range and the total load rate is located in a first load rate range; determining the third control quantity based on the second control vector and a second preset value when the temperature value is located in a second temperature range and the total load rate is located in a second load rate range; and determining the third control quantity based on the second control vector and a third preset value when the temperature value is located in a third temperature range and the total load rate is located in a third load rate range, wherein the first preset value is less than the second preset value, the second preset value is less than the third preset value, the maximum value of the first temperature range is less than the minimum value of the second temperature range, the maximum value of the second temperature range is less than the minimum value of the third temperature range, the maximum value of the first load rate range is less than the minimum value of the second load rate range, and the maximum value of the second load rate range is less than the minimum value of the third load rate range.
[0074] The server's temperature and total load rate are divided into three ranges: the first, second, and third temperature ranges, and the first, second, and third load rate ranges. The first temperature range and the first load rate range represent low-risk, low-power operating conditions, while the third temperature range and the third load rate range correspond to high-load, high-risk scenarios.
[0075] Based on the server's temperature and total load rate ranges, the second control vector is adjusted to generate a third control vector. The second control vector is an initial fan speed control command obtained through the combined action of MPC and deep reinforcement learning. When the temperature and total load rate fall within different ranges, different adjustment strategies are applied. These strategies include preset values used to fine-tune the second control vector to adapt to the server's current operating conditions. The magnitude of the preset values is directly related to the server's thermal risk; the higher the temperature and load rate ranges, the larger the preset values, meaning the fan speed adjustment will tend to be higher to cope with the higher thermal load.
[0076] The preset values increase progressively with the temperature and load rate ranges, meaning the first preset value is less than the second, and the second is less than the third. This progressive relationship ensures that under low-risk operating conditions (such as the first temperature and load rate ranges), fan speed adjustments will be more conservative to reduce energy consumption and maintenance costs; while under high-risk conditions (such as the third temperature and load rate ranges), a more aggressive adjustment strategy will be adopted, such as increasing fan speed, to quickly reduce server temperature and avoid performance degradation and hardware damage that may result from overheating.
[0077] The above-mentioned hierarchical control strategy can not only effectively address the thermal management challenges of servers under different operating conditions, but also dynamically adjust the fan speed according to real-time temperature values and total load rate, achieving high precision and energy efficiency in temperature control and extending hardware lifespan.
[0078] Optionally, adjusting the rotation speed of the air outlet device according to the third control vector includes: when the temperature value is in a first temperature range and the total load rate is in a first load rate range, determining a first number of air outlet devices in the air outlet device and adjusting the rotation speed of the first number of air outlet devices according to the third control vector; when the temperature value is in a second temperature range and the total load rate is in a second load rate range, determining a second number of air outlet devices in the air outlet device and adjusting the rotation speed of the second number of air outlet devices according to the third control vector; when the temperature value is in a third temperature range and the total load rate is in a third load rate range, determining a third number of air outlet devices in the air outlet device and adjusting the rotation speed of the third number of air outlet devices according to the third control vector, wherein the first number is less than the second number, the second number is less than or equal to the third number, and the value of the second number and the third number is less than or equal to the total number of air outlet devices.
[0079] For example, when the temperature value is in the first temperature range and the total load rate is in the first load rate range (low mode): only half of the fans are enabled (e.g., 3 out of 6), and the rest are in sleep mode; the enabled fans are selected based on their health scores, and the fans with health scores that are half higher than the health scores are automatically selected based on the fan health status values.
[0080] When the temperature value is in the second temperature range and the total load rate is in the second load rate range, and when the temperature value is in the third temperature range and the total load rate is in the third load rate range (medium-high speed mode), all fans are running, but the load is dynamically allocated according to the fan health status. The PWM allocation for fans with high fan health status values is slightly higher than the target value, while the PWM allocation for fans with low fan health status values is slightly lower than the target value.
[0081] In an exemplary embodiment, adjusting the rotation speed of the air outlet device according to the third control vector includes: acquiring operating parameters of each air outlet device, and determining a health value of each air outlet device according to the operating parameters, wherein the operating parameters include: vibration speed, current, and operating time of each air outlet device; adjusting the third control vector according to the health value, and adjusting the rotation speed of the air outlet device according to the adjusted third control vector.
[0082] First, the system collects operating parameters for each fan, including vibration speed, current, and operating time. These parameters are key indicators for assessing fan health. Vibration speed reflects the integrity of the fan's mechanical structure; abnormal vibration may indicate bearing wear or other structural problems. Current is directly related to the fan's electrical performance; abnormal current changes may be a sign of motor aging or internal short circuits. Operating time is an important indicator of fan lifespan; prolonged continuous operation accelerates fan aging. By comprehensively analyzing these parameters, the health value of each fan can be calculated.
[0083] Next, the system adjusts the original control vector (usually the control vector obtained through MPC+DDPG optimization) based on the health value of each fan, generating an adjusted third control vector. When a fan's health value falls below a certain threshold, its load is reduced, decreasing its speed to prevent further damage. Conversely, for fans in good health, their speed can be appropriately increased to compensate for the decreased heat dissipation capacity caused by other unhealthy fans.
[0084] Specifically, for fans with low health values, the PWM duty cycle may be set below the normal control level to reduce the mechanical and electrical load on the fan. For fans with high health values, the PWM duty cycle may be moderately increased to ensure that the overall heat dissipation effect is not affected. This application's embodiments not only respond instantly to changes in fan health but also allow for pre-planning of fan maintenance and replacement, preventing a single fan failure from impacting the cooling performance of the entire server or data center.
[0085] Optionally, the health value can be determined using the following formula:
[0086] Where H∈[0,1], H is the health value, v RMS I is the effective value of the vibration velocity. ripple The motor current ripple coefficient is given by α = 0.002, β = 0.05, and δ = 1.2 × 10⁻⁶. -5 α, β, and δ are identification parameters, and t is time.
[0087] To better understand the process of the above-mentioned method for adjusting the rotation speed, the implementation flow of the above-mentioned method for adjusting the rotation speed will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.
[0088] This embodiment provides a method for adjusting rotation speed. Fault prediction first predicts the probability of an impending fault. However, this prediction mechanism often predicts the point in time when a fault will occur or is about to occur. If the prediction accuracy is low, the prediction efficiency will decrease, potentially leading to false alarms and reducing customer trust in the prediction solution. To address the problems of low accuracy, false alarms, and reduced customer trust in existing fault prediction mechanisms, this application divides fault prediction into multi-stage prediction. Three different fault prediction levels are set: general, important, and urgent, representing different probabilities of hard drive failure. The "general" level indicates that the hard drive may fail, and the system will remind the customer to pay attention to hard drive error messages and take necessary preventative measures. The "important" level indicates a higher probability of hard drive failure, and the system will prompt the customer to prepare in advance. The "urgent" level means that the hard drive will definitely fail, and the system will immediately issue an alarm, reminding the customer to replace the hard drive or contact a professional technician for assistance.
[0089] To achieve multi-stage prediction, operational data of the hard drive is collected at different times. Through observation and analysis of large amounts of data, the patterns of data change at different times are studied, and the relationship between data performance at different times and the probability of hard drive failure at a certain time is calculated. The probability of hard drive failure is divided into three key nodes: 30%, 60%, and 90%. The corresponding data is divided into three categories for in-depth data analysis and modeling. By constructing three different prediction models, the specific time points when the probability of hard drive failure is 30%, 60%, and 90% can be accurately calculated. This provides customers with more targeted and timely failure warning information, helping them to formulate response strategies in advance and effectively reduce the risk of data loss.
[0090] To better understand the process of the above-mentioned method for adjusting rotational speed, the implementation flow of the above-mentioned method for adjusting rotational speed will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.
[0091] To address the issue of insufficient control precision in current fan speed regulation, a hybrid control architecture that combines MPC and deep reinforcement learning (DDPG) for collaborative optimization is proposed.
[0092] Outer MPC (Model Predictive Control): Based on a thermodynamic model, rolling time-domain optimization is performed to solve the macroscopic thermal inertia problem and ensure long-term temperature stability;
[0093] Inner DDPG (Deep Deterministic Policy Gradient): Dynamically adjusts the control policy through reinforcement learning to optimize micro-transient response and improve dynamic adaptability.
[0094] The two are combined: MPC provides global optimization goals, and DDPG performs real-time policy fine-tuning, forming a two-layer control mechanism of "prediction + learning".
[0095] Specifically, such as Figure 3 As shown, Figure 3 This is a flowchart (II) of the method for adjusting the rotation speed according to an embodiment of this application, as follows: Figure 3 As shown, the specific steps are as follows:
[0096] Step S301: Obtain temperature data;
[0097] Step S302: Thermodynamic state estimation;
[0098] Optionally, the server thermal dynamics are described using discrete state-space equations:
[0099]
[0100] State vectors (such as CPU / GPU temperature, internal ambient temperature, hard drive temperature, network card temperature, etc.);
[0101] Control input (fan PWM duty cycle, range 0-100%);
[0102] Unmeasurable disturbances (server load current, external ambient temperature);
[0103] y k : Predicted output;
[0104] A, B, C, D: System matrix (initialized through system identification - server configuration);
[0105] Step S303: MPC scrolling optimization;
[0106] Optionally, the MPC layer design optimization problem (solved every 100ms):
[0107]
[0108] N p Prediction time domain (default is 30, corresponding to 5 minutes);
[0109] N c Controls the time domain (default is 15);
[0110] R: Weight matrix (prioritizes CPU temperature control);
[0111] Among them, y k+i y represents the predicted output at time (k+i). refΔu is the expected output at time (k+i), where Q is the weight matrix used to emphasize the importance of different output variables. k+i =u k+i -u k+i-1 R is the change in control input (u) over time (k+i), and R is the weight matrix used to control the smoothness of the input change, avoiding drastic changes in the control input. MPC obtains the optimal control sequence over a future time period by solving the above optimization problem. Where Nc is called the control time domain, representing the desired future time step to control; and Np is called the prediction time domain, representing the predicted future time step to predict the system's behavior. Typically, MPC only applies the first value u of the control sequence. k The optimization problem is then resolved in the system, and the new state information is used as the initial state in the next control cycle. This process is called rolling optimization.
[0112] In the context of model predictive control (MPC), This represents the control input sequence for the next Nc time steps, starting from the current time step (k).
[0113] MPC obtains this sequence by solving an optimization problem. Its purpose is to pre-plan an optimal control strategy based on the system's dynamic model and constraints over a predicted future period, thereby achieving optimal control of the system. However, typically, MPC only applies the first control input u in this sequence. k Once the system is in place, at the next time step k+1, the entire control sequence is recalculated based on the latest state of the system. This is a rolling optimization process that can adapt to the dynamic changes of the system and external disturbances in real time, thereby maintaining the accuracy and stability of the control.
[0114] Step S304: Fine-tune and train DDPG;
[0115] The DDPG layer includes: an Actor network and a Critic network;
[0116] Actor Network:
[0117] Input: state s k =[x k w k ];
[0118] Output: Control correction amount Δa k ∈[-10%, 10%];
[0119] Critic Network:
[0120] Input: state s k and action a k =umpc +Δa k ;
[0121] Output: Action value assessment;
[0122] Reward function:
[0123]
[0124] Where α = 1.0 (temperature error dominates), β = 0.01 (suppressing high power consumption), and γ = 0.1 (smoothing control);
[0125] Step S305: Calibrate the digital twin environment based on a thermodynamic model;
[0126] Among them, DDPG is trained based on simulation data in a digital twin environment;
[0127] Step S306: Perform action a k The input is fed into the PWM controller.
[0128] The schematic diagram of the collaborative mechanism of the above-mentioned MPC model, DDPG model, PWM controller, and digital twin environment is shown below. Figure 4 As shown.
[0129] To address the trade-off between energy efficiency and lifespan in current fan speed control and temperature control technologies, a graded speed regulation and intelligent redundancy control strategy is proposed. For example... Figure 5 As shown, it includes:
[0130] Three speed settings (low, medium, high): Low: Only 50% of the fans are activated, running at low speed, suitable for low load or low temperature environments, saving energy and extending lifespan; Medium: All fans run at medium speed, balancing heat dissipation and energy consumption; High: All fans run at high speed, to cope with high load or high temperature emergencies.
[0131] Redundancy and fault tolerance mechanism: At low speeds, unstarted fans are in standby mode and can automatically fill in if some fans fail; combined with health status monitoring (such as vibration and current signals), fan lifespan is predicted, and backup fans are switched in advance. When a fan failure is detected, the speed of other fans is automatically increased (e.g., if one of five fans fails, the remaining four are sped up to compensate).
[0132] PWM controller logic:
[0133]
[0134] Among them, T low =50℃, T high =75℃ (adjustable), P load Total server load rate.
[0135] To address the hardware reliability challenges of current fan speed control and temperature control technologies, a smooth control and health management strategy is proposed, such as... Figure 6 As shown, it includes:
[0136] Step S601: Add speed smoothing constraint;
[0137] A second-order differential penalty term is added to the MPC cost function to avoid abrupt changes.
[0138]
[0139] Where, Δ 2 u(k)=Δu(k)-Δu(k-1)=u(k)-2u(k-1)+u(k-2) is the second-order difference of the control input, and S is the weight matrix of the second-order difference term.
[0140] Step S602: Generate PWM duty cycle;
[0141] Step S603: Establish the RUL model;
[0142] The RUL model is used to predict the remaining lifespan of a fan, specifically:
[0143] Establish a fan remaining life (RUL) prediction model:
[0144] Where H∈[0,1], is the health index, v RMS I is the effective value of the vibration velocity. ripple The motor current ripple coefficient is given by α = 0.002, β = 0.05, and δ = 1.2 × 10⁻⁶. -5 , where is the identification parameter, and ∈(t) is Gaussian white noise.
[0145] Step S604: Calculate the fan's health score H (i.e., the health value in the above embodiment) based on the RUL prediction model;
[0146] Step S605: Determine health status based on health score;
[0147] Step S606: If H < 0.6, switch to the backup fan;
[0148] Step S607: When 0.6 ≤ H < 0.8, the rotational speed is limited to 90%;
[0149] Step S608: Normal speed regulation control when 0.8≤H.
[0150] To address the current limitations of intelligent technology in fan speed control and temperature management, this application provides an online learning and digital twin strategy, including:
[0151] Digital twin-assisted training: Construct a high-fidelity thermal simulation environment to generate extreme operating condition data (such as -20℃ to 50℃); recalibrate model parameters every 24 hours to adapt to hardware aging or dust accumulation.
[0152] Multiscale thermo-mechanical coupling equations:
[0153] Where k is the thermal conductivity of the heat sink, τ load For load torque, K t This is the motor torque constant.
[0154] Incremental RLS update: Employs a sliding window recursive least squares (RLS) method to continuously update the state matrix. Least squares methods include:
[0155]
[0156] Wherein, the forgetting factor is λ = 0.95, and the update frequency is to adjust the parameters of matrices A and B every 5 minutes, θ k =[vec(A)\vec(B)].
[0157] This application's embodiments comprehensively enhance the thermal management efficiency of servers. First, the system significantly improves temperature control accuracy and response speed. Through precise control strategies, it effectively reduces temperature fluctuations, ensuring that internal server components operate within ideal temperature ranges. The accelerated response time also means faster handling of sudden heat loads, enhancing control stability. Second, it achieves a major breakthrough in energy utilization and maintenance costs. Compared to traditional control methods, this system achieves over 30% overall energy savings. Simultaneously, fan lifespan is significantly extended, and bearing wear is reduced by 60%. This not only reduces fan replacement frequency but also minimizes maintenance downtime due to fan failures, directly lowering server operating costs. Third, the improved system reliability and fault tolerance are attributed to intelligent redundancy design. Even in the event of a single fan failure, the remaining fans' speeds are dynamically adjusted to maintain normal heat dissipation, ensuring continuous server operation. Furthermore, the application of digital twin technology enables the system to automatically calibrate online every 24 hours, adapting to a wide range of ambient temperature variations (from -30°C to 60°C), greatly enhancing the server's adaptability to different operating conditions. Finally, this application promotes the intelligent and automated advancement of server thermal management. By integrating online learning capabilities, the model update cycle is significantly shortened, enabling automatic response to untrained conditions, such as sudden load peaks. Simultaneously, the fully automatic control capability in edge scenarios enables unattended operation, greatly simplifying daily server management. The rapid deployment feature, leveraging simulation-physical transfer learning technology (MMD loss function), significantly reduces the debugging time and cost of new models, making the popularization and application of the technology more convenient and efficient.
[0158] 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 described in the various embodiments of this application.
[0159] This embodiment also provides a rotation speed adjustment device for implementing 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 devices described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0160] Figure 7 This is a structural block diagram of a rotation speed adjustment device according to an embodiment of this application, such as... Figure 7 As shown, the device includes:
[0161] The acquisition module 72 is used to acquire the state vector and disturbance vector of the server, wherein the state vector is the vector corresponding to the state information of the server, and the disturbance vector is the vector corresponding to the disturbance information of the server;
[0162] The first determining module 74 is used to determine a first control vector of the air outlet device in the control time domain through an optimization algorithm and the state vector, and to determine a correction amount of the first control vector based on the state vector and the disturbance vector, wherein the air outlet device is located in the server;
[0163] The second determining module 76 is used to determine a second control vector based on the first control vector and the correction amount, and to adjust the rotation speed of the air outlet device based on the second control vector.
[0164] Using the aforementioned device, the state vector and disturbance vector of the server are acquired, where the state information is the vector corresponding to the server's state information, and the disturbance vector is the vector corresponding to the server's disturbance information. A first control vector for the air outlet device in the control time domain is determined using an optimization algorithm and the state vector, and a correction amount for the first control vector is determined based on the state vector and the disturbance vector, wherein the air outlet device is located within the server. A second control vector is determined based on the first control vector and the correction amount, and the rotation speed of the air outlet device is adjusted based on the second control vector. Therefore, this application outputs a first control vector through an optimization algorithm and generates a correction amount for the first control vector. The final control vector is generated based on the first control vector and the correction amount. This dynamic correction mechanism helps improve control accuracy, thereby solving the problem of low accuracy in adjusting fan speed in related technologies.
[0165] In an exemplary embodiment, the first determining module 74 is configured to determine a first control vector of the air outlet device in the control time domain through a cost function, constraints, and the state vector:
[0166] Cost function:
[0167] Constraints:
[0168] Where, N p For prediction in the time domain, N c To control the time domain, Let y be the first control vector in the control time domain. k Let y be the predicted state vector of the server at time k. ref Let u be the desired state vector of the server. k Let u be the control vector at time k. k-1 Let Q be the control vector at time k-1, R be the first weight matrix, A be the first system matrix, B be the second system matrix, D be the third system matrix, and x be the control vector at time k-1. k+1 Let w be the state vector at time k+1. k Let u be the perturbation vector at time k. min u is the lower limit of the control vector. max This is the upper limit of the control vector.
[0169] In one exemplary embodiment, the cost function further includes:
[0170] Where S is the third weight matrix, Δ 2 u k =Δu k -Δu k-1 =u k -2u k-1 +u k-2 .
[0171] In an exemplary embodiment, the first determining module 74 is configured to modify the first system matrix and the second system matrix according to a target formula, wherein the target formula is:
[0172]
[0173] Where, θ k Let K be the parameter vector at time k. k Let P be the gain matrix at time k. k Let λ be the parameter error covariance matrix at time k, λ be the forgetting factor, γ be the learning rate, and φ be the learning rate. k Let θ be the regression vector at time k. k = [vec(A) / vec(B)].
[0174] In one exemplary embodiment, the second determining module 76 is configured to determine the temperature value and total load rate of the server, and to determine the temperature range in which the temperature value is located, and the load rate range in which the total load rate is located;
[0175] The second control vector is adjusted according to the temperature range in which the temperature value is located and the load rate range in which the total load rate is located to obtain the third control vector;
[0176] The rotation speed of the air outlet device is adjusted according to the third control vector.
[0177] In an exemplary embodiment, the second determining module 76 is configured to determine the third control quantity based on the second control vector and the first preset value when the temperature value is within a first temperature range and the total load rate is within a first load rate range;
[0178] When the temperature value is within the second temperature range and the total load rate is within the second load rate range, the third control quantity is determined based on the second control vector and the second preset value.
[0179] When the temperature value is in the third temperature range and the total load rate is in the third load rate range, the third control quantity is determined according to the second control vector and the third preset value, wherein the first preset value is less than the second preset value, the second preset value is less than the third preset value, the maximum value of the first temperature range is less than the minimum value of the second temperature range, the maximum value of the second temperature range is less than the minimum value of the third temperature range, the maximum value of the first load rate range is less than the minimum value of the second load rate range, and the maximum value of the second load rate range is less than the minimum value of the third load rate range.
[0180] In an exemplary embodiment, the second determining module 76 is configured to acquire the operating parameters of each air outlet device and determine the health value of each air outlet device based on the operating parameters, wherein the operating parameters include: the vibration speed, current, and operating time of each air outlet device;
[0181] The third control vector is adjusted based on the health value, and the rotation speed of the air outlet device is adjusted based on the adjusted third control vector.
[0182] It should be noted that the description of the features of the embodiment corresponding to the rotation speed adjustment device can be found in the relevant description of the embodiment corresponding to the rotation speed adjustment method, and will not be repeated here.
[0183] 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 embodiments of the rotation speed adjustment method.
[0184] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the rotation speed adjustment method when it is run.
[0185] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0186] An embodiment of this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described methods for adjusting rotational speed.
[0187] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above embodiments of the rotation speed adjustment method.
[0188] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0189] The foregoing has provided a detailed description of a method, apparatus, electronic device, and storage medium for adjusting rotation speed provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for adjusting rotational speed, characterized in that, include: Obtain the server's state vector and perturbation vector, wherein the state vector is the vector corresponding to the server's state information, and the perturbation vector is the vector corresponding to the server's perturbation information; The first control vector of the air outlet device in the control time domain is determined by an optimization algorithm and the state vector, and the correction amount of the first control vector is determined according to the state vector and the disturbance vector, wherein the air outlet device is located in the server; A second control vector is determined based on the first control vector and the correction amount, and the rotation speed of the air outlet device is adjusted based on the second control vector. The determination of the first control vector of the air outlet device in the control time domain through an optimization algorithm and the state vector includes: The first control vector of the air outlet device in the control time domain is determined by the cost function, constraints, and the state vector: Cost function: ; ; in, To predict the time domain, To control the time domain, Let this be the first control vector in the control time domain. Let k be the predicted state vector of the server at time k. Let be the desired state vector of the server. Let k be the control vector at time k. Let Q be the control vector at time k-1, Q be the first weight matrix, and R be the second weight matrix. A is the first system matrix, B is the second system matrix, and D is the third system matrix. Let k be the state vector at time k+1. Let be the perturbation vector at time k. This is the lower limit value of the control vector. This represents the upper limit of the control vector; The cost function further includes: Where S is the third weight matrix, ; After determining the first control vector of the air outlet device in the control time domain through the cost function, constraints, and the state vector, the method further includes: The first system matrix and the second system matrix are modified according to the target formula, wherein the target formula is: ; ; ;in, Let k be the parameter vector. Let k be the gain matrix at time k. Let k be the parameter error covariance matrix. Forgetting factor, For learning rate, Let be the regression vector at time k. .
2. The method for adjusting rotational speed according to claim 1, characterized in that, The method further includes adjusting the rotational speed of the air outlet device according to the second control vector: Determine the temperature value and total load rate of the server, and determine the temperature range in which the temperature value falls, and the load rate range in which the total load rate falls; The second control vector is adjusted according to the temperature range in which the temperature value is located and the load rate range in which the total load rate is located to obtain the third control vector; The rotation speed of the air outlet device is adjusted according to the third control vector.
3. The method for adjusting rotational speed according to claim 2, characterized in that, The second control vector is adjusted based on the temperature range in which the temperature value lies and the load rate range in which the total load rate lies, to obtain a third control vector, including: When the temperature value is within the first temperature range and the total load rate is within the first load rate range, the third control vector is determined based on the second control vector and the first preset value. When the temperature value is within the second temperature range and the total load rate is within the second load rate range, the third control vector is determined based on the second control vector and the second preset value. When the temperature value is within the third temperature range and the total load rate is within the third load rate range, the third control vector is determined based on the second control vector and the third preset value, wherein the first preset value is less than the second preset value, the second preset value is less than the third preset value, the maximum value of the first temperature range is less than the minimum value of the second temperature range, the maximum value of the second temperature range is less than the minimum value of the third temperature range, the maximum value of the first load rate range is less than the minimum value of the second load rate range, and the maximum value of the second load rate range is less than the minimum value of the third load rate range.
4. The method for adjusting the rotation speed according to claim 2, characterized in that, Adjusting the rotation speed of the air outlet device according to the third control vector includes: The operating parameters of each air outlet device are obtained, and the health value of each air outlet device is determined based on the operating parameters. The operating parameters include the vibration velocity, current, and operating time of each air outlet device. The third control vector is adjusted based on the health value, and the rotation speed of the air outlet device is adjusted based on the adjusted third control vector.
5. A device for adjusting rotational speed, characterized in that, include: The acquisition module is used to acquire the server's state vector and disturbance vector, wherein the state vector is the vector corresponding to the server's state information, and the disturbance vector is the vector corresponding to the server's disturbance information; The first determining module is used to determine a first control vector of the air outlet device in the control time domain through an optimization algorithm and the state vector, and to determine a correction amount of the first control vector based on the state vector and the disturbance vector, wherein the air outlet device is located in the server; The second determining module is used to determine a second control vector based on the first control vector and the correction amount, and to adjust the rotation speed of the air outlet device based on the second control vector. The device is used to implement the steps of the method for adjusting the rotational speed according to any one of claims 1 to 4.
6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for adjusting the rotational speed according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the method for adjusting the rotational speed according to any one of claims 1 to 4.