A multi-level stable power consumption control method and device, electronic equipment and storage medium
By constructing an approximate load combination and closed-loop control, combined with PID algorithm and dynamic voltage and frequency adjustment, the problem of power consumption fluctuation in computer systems under the influence of dynamic factors is solved, and precise power consumption stability and multi-level control are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CIX TECH (SUZHOU) CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies struggle to achieve precise power stability in computer system power consumption tuning and power consumption target approximation scenarios. This is especially true due to the influence of dynamic factors such as temperature changes, power supply voltage fluctuations, and manufacturing process differences, making it difficult to precisely stabilize power consumption fluctuations under load at a specific target value.
By pre-constructing and calibrating the approximate load combination, a mapping relationship between the target power consumption and the load is established. Closed-loop control with power consumption sensor feedback is adopted, and a PID algorithm is used to generate control signals and drive a dynamic voltage and frequency adjustment actuator for fine-tuning, thereby achieving convergence and stable output of multi-level power consumption.
It effectively suppresses power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, improves the accuracy and stability of multi-level power consumption control, and ensures stable power output under multiple discrete target power consumption levels.
Smart Images

Figure CN121541771B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer system power consumption control technology, and more specifically, to a multi-level stable power consumption control method, apparatus, electronic device, and storage medium. Background Technology
[0002] In scenarios involving power consumption debugging and power consumption target approximation in computer systems, existing technologies typically employ a fixed load approach to achieve an approximate output of the target power consumption. This involves continuously running a certain stress testing software or its fixed combination to make the system power consumption roughly fall near the desired target power consumption. When the deviation is large, repeated experiments are conducted by changing the load or adjusting the load parameters until an approximate result is obtained.
[0003] However, the above-mentioned fixed load approximation method is essentially an open-loop control. The load intensity is fixed after startup, while the actual power consumption of the system is affected by dynamic factors such as temperature changes, power supply voltage fluctuations, and manufacturing process differences. This causes the power consumption under the same load to fluctuate with the operating state, making it difficult to accurately stabilize the power consumption at a specific target value. Summary of the Invention
[0004] This disclosure provides at least one multi-level stable power consumption control method, device, electronic device, and storage medium. By pre-constructing and calibrating an approximate load combination and establishing a mapping relationship between target power consumption and load, and based on closed-loop control using power consumption sensing feedback, a control signal is generated using a PID algorithm within the control cycle and driven by a dynamic voltage and frequency adjustment actuator for fine-tuning. This enables power consumption convergence and stable output at multiple discrete target power consumption levels, and effectively suppresses power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, thereby improving the accuracy and stability of multi-level power consumption control.
[0005] This disclosure provides a multi-level stable power consumption control method, including:
[0006] Set a set of multi-level target power consumption levels that need to be stably output, wherein the target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values;
[0007] For each target power consumption value, a corresponding approximation load combination is constructed, and a mapping relationship between the target power consumption value and the approximation load combination is established, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value.
[0008] In response to the selection of any of the target power consumption values, the approximation load combination mapped to the selected target power consumption value is invoked and started, so that the system power consumption enters the neighborhood of the target power consumption value;
[0009] The system executes the following steps in a preset control cycle: it collects the current power consumption value of the system, determines the power consumption error between the target power consumption value and the current power consumption value, converts the power consumption error into a control signal through a PID algorithm, and drives the DVFS actuator to adjust the working state of at least one processing unit according to the control signal until the current power consumption value converges and stabilizes at the target power consumption value.
[0010] In one optional implementation, for each target power consumption value, a corresponding approximation load combination is constructed, specifically including:
[0011] For each target power consumption level, a corresponding composite workload is constructed, wherein the composite workload is set as a load combination consisting of processor load and graphics processor load;
[0012] Specifically, a computationally intensive benchmark program was selected as the processor load, and the processor power consumption level was adjusted by binding different numbers of processor cores; a graphics stress test tool was selected as the graphics processor load.
[0013] In one optional implementation, for each target power consumption value, a corresponding approximation load combination is constructed, specifically further including:
[0014] The load parameters of the composite workload are fine-tuned through actual testing. The load parameters include at least the number of cores bound to the processor load and the rendering resolution of the graphics processor load.
[0015] The finely tuned composite workload is run in the initial cold state of the system so that its actual power consumption is close to and higher than the corresponding target power consumption level, thus forming the approximation load combination.
[0016] In one optional implementation, in response to the selection of any of the target power consumption values, the approximation load combination mapped to the selected target power consumption value is invoked and activated, specifically including:
[0017] Establish a pre-calibration library and store the mapping relationship between the target power consumption value and the composite workload in the pre-calibration library;
[0018] In response to the target power consumption value selected by the user's selection operation, the composite workload corresponding to the target power consumption value is retrieved from the precalibration library;
[0019] The composite workload is initiated, and the system power consumption is rapidly increased to the level of the composite workload. This composite workload serves as the power consumption ceiling, causing the system power consumption to fall into the neighborhood of the target power consumption value, which has a power adjustment margin for DVFS downscaling.
[0020] In one optional implementation, the current power consumption value of the system is collected, the power consumption error between the target power consumption value and the current power consumption value is determined, and the power consumption error is converted into a control signal using a PID algorithm, specifically including:
[0021] Power consumption measurement is performed under the preset control cycle, and the actual total power consumption of the system is measured by the power consumption sensor as the current power consumption value.
[0022] The difference between the current power consumption value and the target power consumption value is determined as the power consumption error, and the power consumption error is received by the PID controller;
[0023] The control signal is determined based on the sum of the proportional, integral, and derivative terms of the PID controller.
[0024] In one optional implementation, the DVFS actuator is driven to adjust the operating state of at least one processing unit according to the control signal, specifically including:
[0025] When the current power consumption value is higher than the target power consumption value, the DVFS actuator is controlled to reduce the voltage or frequency to reduce power consumption.
[0026] When the current power consumption value is lower than the target power consumption level, the DVFS actuator is controlled to increase the voltage or frequency to increase the power consumption.
[0027] In one optional implementation, the DVFS actuator is driven to adjust the operating state of at least one processing unit according to the control signal, specifically further including:
[0028] When the current power consumption value is higher than the target power consumption value, the power consumption error is made negative, and the control signal is reduced;
[0029] When the current power consumption value is lower than the target power consumption level, the power consumption error is made positive, and the control signal is increased.
[0030] This disclosure also provides a multi-level stable power consumption control device, including:
[0031] The power consumption level definition module is used to set a set of multi-level target power consumption levels that need to be stably output. The target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values.
[0032] An approximation load combination construction module is used to construct a corresponding approximation load combination for each target power consumption value and establish a mapping relationship between the target power consumption value and the approximation load combination, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value.
[0033] A coarse adjustment module is configured to, in response to the selection of any of the target power consumption values, invoke and initiate the approximation load combination mapped to the selected target power consumption value, so as to bring the system power consumption into the neighborhood of the target power consumption value;
[0034] The fine-tuning module is used to perform the following cyclic executions at a preset control cycle: acquiring the current power consumption value of the system, determining the power consumption error between the target power consumption value and the current power consumption value, converting the power consumption error into a control signal through a PID algorithm, and driving the DVFS actuator to adjust the working state of at least one processing unit according to the control signal, until the current power consumption value converges and stabilizes at the target power consumption value.
[0035] This disclosure also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the above-described multi-level stable power consumption control method, or any possible implementation of the above-described multi-level stable power consumption control method.
[0036] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the above-described multi-level stable power consumption control method, or any possible implementation of the above-described multi-level stable power consumption control method.
[0037] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-described multi-level stable power consumption control method, or the steps in any possible implementation of the above-described multi-level stable power consumption control method.
[0038] This disclosure provides a multi-level stable power consumption control method, device, electronic device, and storage medium. By pre-constructing and calibrating an approximate load combination and establishing a mapping relationship between target power consumption and load, and based on closed-loop control using power consumption sensing feedback, a PID algorithm is used to generate control signals within the control cycle and drive a dynamic voltage and frequency adjustment actuator for fine-tuning. This enables power consumption convergence and stable output at multiple discrete target power consumption levels, and effectively suppresses power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, thereby improving the accuracy and stability of multi-level power consumption control.
[0039] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0041] Figure 1 A flowchart of a multi-level stable power consumption control method provided by an embodiment of this disclosure is shown;
[0042] Figure 2 A flowchart of another multi-level stable power consumption control method provided by an embodiment of this disclosure is shown;
[0043] Figure 3 A schematic diagram of a multi-level stable power consumption control device provided in an embodiment of this disclosure is shown;
[0044] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0046] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0047] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0048] Research has revealed that in scenarios involving power consumption tuning and approximation of target power consumption in computer systems, existing technologies typically employ a fixed load approach to approximate the target power consumption. This involves continuously running a stress testing software or a fixed combination thereof to bring the system power consumption roughly close to the desired target. When the deviation is significant, repeated experiments are conducted by changing the load or adjusting load parameters until an approximate result is obtained. However, this fixed load approximation method is essentially open-loop control. The load intensity is fixed after startup, while the actual system power consumption is affected by dynamic factors such as temperature changes, power supply voltage fluctuations, and manufacturing process differences. This causes the power consumption under the same load to fluctuate with changes in operating conditions, making it difficult to precisely stabilize the power consumption at a specific target value.
[0049] Based on the above research, this disclosure provides a multi-level stable power consumption control method, device, electronic device, and storage medium. By pre-constructing and calibrating the approximate load combination and establishing the mapping relationship between the target power consumption and the load, and based on closed-loop control with power consumption sensing feedback, the control signal is generated by the PID algorithm within the control cycle and driven by the dynamic voltage and frequency adjustment actuator for fine-tuning. This enables power consumption convergence and stable output under multiple discrete target power consumption levels, and effectively suppresses power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, thereby improving the accuracy and stability of multi-level power consumption control.
[0050] To facilitate understanding of this embodiment, a multi-level stable power consumption control method disclosed in this disclosure will first be described in detail. The executing entity of the multi-level stable power consumption control method provided in this disclosure is generally a computer device with a certain computing capability. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, this multi-level stable power consumption control method can be implemented by the processor calling computer-readable instructions stored in memory.
[0051] See Figure 1The diagram shows a flowchart of a multi-level stable power consumption control method provided in an embodiment of this disclosure. The method includes steps S101 to S104, wherein:
[0052] S101. Set a multi-level target power consumption level set that needs to be stably output, wherein the target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values.
[0053] In practical implementation, to achieve stable operation of the system at multiple power consumption levels, a set of multi-level target power consumption levels that need to be stably output is first set before the control process begins. This set of target power consumption levels characterizes the set of power consumption levels that the system needs to reach and maintain subsequently. It includes target power consumption levels composed of multiple discrete target power consumption values, thus providing a basis for setting multi-level, discrete, stable power consumption output.
[0054] Specifically, the multiple discrete target power consumption values can be determined according to actual application requirements. For example, in scenarios such as heat dissipation design verification and energy efficiency evaluation of computer systems, it may be necessary for the system to operate stably at multiple specific power consumption levels. The discrete target power consumption values may include multiple power consumption levels such as 6 watts, 7 watts, 8 watts, and 9 watts. By pre-setting these power consumption levels, the subsequent control process can select between different target power consumption levels and perform stable control.
[0055] In terms of implementation, the target power consumption level set can be configured by the user or the upper-level control program and written into the configuration parameters of the control module before the test or control task is started. Alternatively, it can be pre-fixed into several default power consumption levels for selection. When the user selects any target power consumption level during operation, the selected target power consumption value is used as the set target for subsequent load approximation and closed-loop control, thereby triggering the subsequent power consumption approximation and stabilization control process.
[0056] S102. For each target power consumption value, construct a corresponding approximation load combination and establish a mapping relationship between the target power consumption value and the approximation load combination, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value.
[0057] In practical implementation, in order to enable the system to quickly enter the target power consumption neighborhood for multiple discrete target power consumption values and provide a good initial operating point for subsequent closed-loop fine-tuning, for each target power consumption value in the target power consumption level set, a corresponding approximate load combination is constructed, and a mapping relationship between the target power consumption value and the approximate load combination is established.
[0058] Specifically, the approximation load combination can be configured as a composite workload, consisting of a processor load and a graphics processor load, so that under this composite workload, the overall system power consumption can be increased to a range close to the target power consumption value. As an optional implementation, the processor load can employ a compute-intensive benchmark program, and the processor power consumption level can be roughly adjusted by binding different numbers of processor cores; the graphics processor load can employ a graphics stress testing tool to provide a stable high load on the graphics processor side.
[0059] Furthermore, after constructing the composite workload, in order to match it with the corresponding target power consumption value and form an approximation characteristic, this invention fine-tunes the load parameters of the composite workload through actual testing. These load parameters include, for example, the number of cores bound to the processor load and the rendering resolution of the graphics processor load. By adjusting these load parameters, when running the composite workload under preset initial conditions, the initial actual power consumption generated by the system is close to and slightly higher than the corresponding target power consumption value.
[0060] The preset initial operating condition can be optionally the initial cold operating condition of the system, that is, the calibration test is performed in the initial operation stage when the system has not experienced a significant temperature rise and the processor and graphics processor have not triggered thermal protection strategies such as frequency reduction due to temperature rise. Under this preset initial operating condition, the initial actual power consumption generated by the approximate load combination is required to be higher than the corresponding target power consumption value. The purpose is to provide a power adjustment margin for subsequent downward adjustment through the dynamic voltage and frequency adjustment actuator, thereby avoiding the problem that the load's natural power consumption is lower than the target power consumption during the fine-tuning stage and cannot be adjusted to the target.
[0061] After constructing and calibrating the aforementioned approximation load combinations, this invention further establishes a mapping relationship between target power consumption values and approximation load combinations. Specifically, each target power consumption value and its corresponding approximation load combination can be pre-calibrated and stored in a pre-calibration library. In subsequent operation phases, when the user selects any target power consumption value, the approximation load combination corresponding to that target power consumption value can be retrieved from the pre-calibration library and activated based on the mapping relationship. This allows the system power consumption to quickly enter the neighborhood of the target power consumption value, laying the foundation for accurate convergence of closed-loop control.
[0062] As one possible implementation method, see Figure 2 The diagram shows a flowchart of another multi-level stable power consumption control method provided in this disclosure embodiment. The method includes steps S1021 to S1024, wherein:
[0063] S1021. Construct a corresponding composite workload for each target power consumption level, wherein the composite workload is set as a load combination consisting of processor load and graphics processor load.
[0064] S1022, wherein a computationally intensive benchmark program is selected as the processor load, and the processor power consumption level is adjusted by binding different numbers of processor cores; a graphics stress test tool is selected as the graphics processor load.
[0065] S1023. Fine-tune the load parameters of the composite workload through actual testing. The load parameters include at least the number of cores bound to the processor load and the rendering resolution of the graphics processor load.
[0066] S1024. Run the finely tuned composite workload in the initial cold state of the system so that its actual power consumption is close to and higher than the corresponding target power consumption level, forming the approximation load combination.
[0067] In practical implementation, to ensure that the system can quickly reach and maintain a high-power operating range near the target power consumption before entering closed-loop fine-tuning, a corresponding composite workload is constructed for each target power consumption level. This composite workload applies a stable and repeatable high-intensity load to the system under preset initial operating conditions, thereby raising the system power consumption to a level close to and slightly above the target power consumption level. This provides a power adjustment margin for subsequent downward stabilization through dynamic voltage and frequency adjustments.
[0068] Specifically, the composite workload is configured as a load combination consisting of processor load and graphics processor load. By simultaneously introducing computationally intensive pressure on the processor side and graphics rendering pressure on the graphics processor side, a higher and more stable total power output base can be formed at the system level, and it is also beneficial to achieve coarse-grained power matching by adjusting the load combination parameters under different target power consumption levels.
[0069] Here, in terms of processor load selection, computationally intensive benchmark programs are preferably selected as the processor load, and the processor power consumption level is adjusted by binding different numbers of processor cores. By changing the number of cores participating in the execution of the benchmark program, the processor-side power consumption contribution can be adjusted in stages to form processor load bases of different intensities at different target power consumption levels.
[0070] Here, regarding the selection of graphics processor load, a graphics stress testing tool is preferably chosen as the graphics processor load. The graphics stress testing tool can output a stable high graphics processor load through rendering parameter configuration, thereby forming the overall power consumption characteristics of the composite workload together with the processor load.
[0071] In a more specific implementation, the computationally intensive benchmark program can be Linpack, the graphics stress test tool can be Furmark, and the intensity of the composite workload can be fine-tuned by adjusting the number of cores bound to the benchmark program and the rendering resolution of the graphics stress test tool, so as to obtain a composite workload configuration that matches each target power consumption level.
[0072] Furthermore, in one embodiment of the present invention, in order to enable the composite workload constructed for different target power consumption levels to more closely approximate the target power consumption and provide sufficient downward adjustment space for subsequent dynamic voltage and frequency adjustments, it is necessary to perform parameter fine-tuning on the composite workload based on actual tests. The parameter fine-tuning aims to make the actual power consumption generated by the composite workload under preset initial operating conditions close to and higher than the corresponding target power consumption level, thereby enabling the composite workload to approach the target power consumption level and ultimately forming a corresponding approximation load combination.
[0073] Specifically, the load parameters include at least the number of cores bound to the processor load and the rendering resolution of the graphics processor load. During implementation, an initial set of load parameters can be selected for the target power consumption level, and the composite workload can be started to apply combined pressure from both the processor and graphics processor sides to the system. Subsequently, the actual total power consumption of the system under this parameter configuration is obtained through power consumption measurement. Based on the deviation between the actual total power consumption and the target power consumption level, the number of cores bound or the rendering resolution is gradually adjusted so that the power consumption level output by the composite workload gradually approaches the target power consumption level.
[0074] In this way, different composite workload configurations can be formed under different target power consumption levels, thereby achieving a coarse-grained matching basis for multi-level power output.
[0075] The initial cold state of the system refers to the initial operating phase after startup or under preset cold conditions. In this phase, the processor and graphics processor have not yet experienced significant temperature rise due to continuous high load, nor have they triggered frequency reduction and power limiting strategies caused by temperature rise. By running a finely tuned composite workload under the initial cold state of the system and performing power consumption measurements, the interference of temperature rise factors on the calibration results can be reduced, making the load parameter configurations corresponding to each target power consumption level more repeatable and portable.
[0076] Here, after fine-tuning, the finely tuned composite workload is run in the initial cold state of the system, causing its actual power consumption to approach and exceed the corresponding target power consumption level, thus forming the approximation load combination. Since the actual power consumption of this approximation load combination is higher than the target power consumption level in the initial operating condition, the voltage and / or frequency can be lowered using a dynamic voltage and frequency adjustment actuator in the subsequent closed-loop fine-tuning stage. This allows the system power consumption to converge from a state slightly higher than the target power consumption and stabilize at the target power consumption level, avoiding the problem of initial power consumption being lower than the target power consumption, which would make it difficult to achieve precise stability through adjustment.
[0077] S103. In response to the selection of any of the target power consumption values, the approximation load combination mapped to the selected target power consumption value is invoked and started, so that the system power consumption enters the neighborhood of the target power consumption value.
[0078] In practice, after setting up a set of multi-level target power consumption levels and constructing and mapping relationships for the approximation load combinations corresponding to each target power consumption value, when the system needs to stably output a certain target power consumption level, the system will respond to the selection operation of any target power consumption value by calling and starting the approximation load combination mapped to the selected target power consumption value, so that the system power consumption can quickly enter the neighborhood of the target power consumption value, creating suitable initial working conditions for subsequent closed-loop fine-tuning.
[0079] Specifically, the target power consumption value can be selected by the user in the interface, or it can be automatically selected by the upper-level control program according to the test task or operation strategy. Upon receiving the selection operation, the control module retrieves the approximate load combination corresponding to the target power consumption value according to the pre-established mapping relationship, and loads the approximate load combination into the execution environment for operation.
[0080] The approximation load combination may include a combination of processor-side load and graphics processor-side load, and has been calibrated under a preset initial operating condition so that it can generate an initial actual power consumption close to and higher than the target power consumption value during operation, thereby enabling the system power consumption to be rapidly increased from a lower power consumption state to a range near the target power consumption.
[0081] Here, after the approach load combination starts, the system power consumption increases with the applied load and enters the neighborhood of the target power consumption value. The neighborhood of the target power consumption value can be understood as a preset power consumption range around the target power consumption value, within which the system power consumption has an adjustment margin for fine-grained reduction and stable control through dynamic voltage and frequency adjustment.
[0082] It should be noted that since the output power consumption of the approximating load combination under the preset initial operating conditions is set to be slightly higher than the target power consumption value, after entering the neighborhood of the target power consumption value, the voltage and / or frequency of the processing unit can be reduced by the dynamic voltage and frequency adjustment actuator to achieve the convergence process of power consumption from slightly higher than the target to precisely stabilizing at the target.
[0083] In this way, after the target power consumption value is selected, the present invention can use the approximation load combination that is pre-calibrated and matched with the target power consumption value to achieve rapid power consumption approximation, avoiding the problems of slow response and long stabilization time caused by relying solely on closed-loop adjustment to make a large power consumption increase at a low power consumption starting point, while providing a stable and controllable power consumption adjustment space for subsequent closed-loop fine-tuning.
[0084] In one possible implementation, in response to the target power consumption value selected by the user's selection operation, a composite workload corresponding to the target power consumption value is called from the precalibration library; the composite workload is started, the system power consumption is adjusted to rise rapidly to the composite workload, and the composite workload is used as the power consumption ceiling so that the system power consumption enters the neighborhood of the target power consumption value with power adjustment margin for DVFS down-adjustment.
[0085] In one embodiment of the present invention, in order to achieve rapid switching between different target power consumption levels and repeatable power consumption approximation control, the system pre-establishes a pre-calibration library to store the correspondence between target power consumption values and composite workloads. After the pre-calibration library is built, when the user performs a selection operation to select a target power consumption value during operation, the control module will search the pre-calibration library based on the target power consumption value, call the composite workload corresponding to the target power consumption value from the pre-calibration library, and load the composite workload into the runtime environment to prepare for startup and execution.
[0086] Specifically, the composite workload stored in the pre-calibration library can include a combination of processor load and graphics processor load. This composite workload has undergone parameter fine-tuning through actual testing, ensuring that it generates an actual power output close to and higher than the target power consumption value when running under preset initial conditions. Therefore, when the composite workload is retrieved from the pre-calibration library, the system starts the composite workload, and the load intensity of the processor and graphics processor increases accordingly. The total system power consumption rapidly rises to the power consumption level corresponding to the composite workload under the preset initial conditions within a short period.
[0087] In this embodiment, the actual power consumption generated by the composite workload under the preset initial operating conditions is used as the power consumption ceiling. That is, after starting the composite workload, the system first uses this workload to raise the power consumption to a level slightly higher than the target power consumption value, bringing the system power consumption into the neighborhood of the target power consumption value, and providing a power consumption adjustment margin within this neighborhood that can be used for dynamic voltage and frequency adjustment. Since the initial system power consumption is raised to a range higher than the target power consumption value, the voltage and / or frequency of the processing unit can be lowered in the subsequent closed-loop fine-tuning stage using a dynamic voltage and frequency adjustment actuator. This allows the power consumption to converge and stabilize from near the power consumption ceiling towards the target power consumption value, avoiding the problem that the initial power consumption is lower than the target power consumption value, making precise stabilization impossible to achieve solely through adjustment.
[0088] Thus, through the above-mentioned call and startup mechanism based on the precalibration library, the present invention can quickly and repeatedly load and run the corresponding composite workload after the user selects any target power consumption value, so that the system power consumption can enter the neighborhood of the target power consumption value with adjustment margin at a relatively fast speed, thereby significantly reducing the initial error and convergence time of power consumption stability control, and providing a stable power consumption control basis for subsequent closed-loop fine-tuning.
[0089] S104. Execute cyclically with a preset control cycle: Collect the current power consumption value of the system, determine the power consumption error between the target power consumption value and the current power consumption value, convert the power consumption error into a control signal through a PID algorithm, and drive the DVFS actuator to adjust the working state of at least one processing unit according to the control signal until the current power consumption value converges and stabilizes at the target power consumption value.
[0090] In practice, once the system enters the neighborhood of the target power consumption value under the influence of the approximate load combination, a closed-loop fine-tuning process is initiated. This process involves cyclically performing power consumption acquisition, error calculation, control signal generation, and dynamic voltage and frequency adjustment within a preset control cycle, thereby gradually converging the current power consumption value of the system and stabilizing it at the target power consumption value.
[0091] Specifically, the preset control cycle is the execution cycle of the closed-loop control, and the control module repeatedly executes the control loop according to this preset control cycle. Within each control cycle, the current system power consumption value is first acquired. This current system power consumption value can be obtained by measuring the actual total power consumption of the system using a power sensor, and is used as feedback for the closed-loop control to reflect the system's true power output state at the current moment.
[0092] After generating the control signal, the control module drives a dynamic voltage and frequency adjustment actuator to adjust the operating state of at least one processing unit according to the control signal. The processing unit may include power-consuming units such as processors and / or graphics processors, and the adjustment of the operating state may be reflected in the dynamic adjustment of the operating voltage and / or operating frequency of the processing unit.
[0093] In this way, through the above-mentioned dynamic voltage and frequency adjustment, the system power consumption can be finely reduced or compensated by adjusting the power consumption to be slightly higher than the target value provided by the load, so that the current power consumption value of the system gradually approaches the target power consumption value.
[0094] It should be noted that during the closed-loop fine-tuning process, the above control loop continues to execute under the preset control period. The power consumption change after dynamic voltage and frequency adjustment serves as the feedback input for the next control cycle, forming a continuous closed-loop adjustment. As the control loop iterates continuously, the power consumption error gradually decreases, and the current power consumption value of the system eventually converges and stabilizes near the target power consumption value, thereby achieving stable output control at the target power consumption level.
[0095] Thus, by introducing closed-loop PID control that operates according to the control cycle, this invention can effectively combat power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, and improve the stability and control accuracy of multi-level target power consumption output.
[0096] As one possible implementation, power consumption measurement is performed under a preset control cycle. The actual total power consumption of the system is measured by a power consumption sensor as the current power consumption value. The difference between the current power consumption value and the target power consumption value is determined as the power consumption error, and the power consumption error is received by a PID controller. The control signal is determined based on the sum of the proportional, integral, and derivative terms of the PID controller.
[0097] In one embodiment of the present invention, in order to achieve closed-loop stable control of the target power consumption level, power consumption measurement, power consumption error determination and control signal generation processes are performed under a preset control cycle, thereby providing real-time control input for the dynamic voltage and frequency adjustment actuator.
[0098] Here, regarding power consumption measurement, the control module triggers a power consumption measurement operation during the preset control cycle. A power consumption sensor measures the actual total power consumption of the system, and the measured actual total power consumption is used as the current power consumption value. By acquiring the current power consumption value at a fixed period, the system can continuously reflect the power consumption trend under near-load combination operation and dynamic voltage and frequency adjustments, providing a stable and continuous feedback data source for closed-loop control.
[0099] Here, regarding the determination of power consumption error, the control module compares the current power consumption value with the target power consumption value, determines the difference between the two as the power consumption error, and inputs the power consumption error to the PID controller. The power consumption error characterizes the direction and degree of deviation of the current power consumption output relative to the target power consumption. By receiving the power consumption error, the PID controller can adjust the power consumption deviation in subsequent control calculations to gradually converge the power consumption to the target power consumption value.
[0100] Here, in terms of control signal generation, the PID controller generates a control signal based on the power consumption error. Specifically, the PID controller calculates the proportional, integral, and derivative terms related to the power consumption error, and sums these terms to obtain the control signal. The proportional term enables a rapid response to the current deviation, the integral term compensates for long-term deviations to reduce steady-state error, and the derivative term suppresses overshoot and oscillations caused by power consumption changes. This allows the generated control signal to balance response speed and stability, providing an effective control basis for subsequently driving the dynamic voltage and frequency adjustment actuator to adjust the operating state of the processing unit.
[0101] As one possible implementation, when the current power consumption value is higher than the target power consumption value, the DVFS actuator is controlled to reduce the voltage or frequency to decrease the power consumption; when the current power consumption value is lower than the target power consumption level, the DVFS actuator is controlled to increase the voltage or frequency to increase the power consumption.
[0102] In one embodiment of the present invention, after obtaining the control signal output by the PID controller, the control module drives a dynamic voltage-frequency adjustment actuator to adjust the operating state of at least one processing unit according to the control signal, so as to achieve convergence and stabilization of system power consumption towards the target power consumption value. During this adjustment process, the control direction of the dynamic voltage-frequency adjustment actuator corresponds to the direction of power consumption deviation, thereby giving the power consumption adjustment a clear trend towards the target.
[0103] Here, when the current power consumption value is higher than the target power consumption value, it indicates that the actual output power consumption of the system exceeds the target power consumption level. To reduce the power consumption and converge it towards the target value, the control module controls the dynamic voltage and frequency adjustment actuator to reduce the voltage or frequency, or both simultaneously. By reducing the operating voltage and / or operating frequency of the processing unit, the dynamic and static power consumption contributions of the processing unit can be reduced, causing the actual total power consumption of the system to gradually decrease, thereby reducing power consumption errors and suppressing power consumption overshoot.
[0104] Specifically, when the current power consumption value is lower than the target power consumption level, it indicates that the actual output power consumption of the system is lower than the target power consumption level. To increase the power consumption and converge it towards the target value, the control module controls the dynamic voltage and frequency adjustment actuator to increase the voltage or frequency, or both simultaneously. By increasing the operating voltage and / or operating frequency of the processing unit, the power consumption output capability of the processing unit can be enhanced, causing the actual total power consumption of the system to gradually increase, thereby reducing the power consumption error and achieving approximation and stabilization of the power consumption to the target level.
[0105] Thus, by employing the aforementioned dynamic voltage and frequency adjustment strategy based on the direction of power consumption deviation, in conjunction with a closed-loop control process executed according to a preset control cycle, the present invention can promptly lower the power consumption when it exceeds the target and appropriately raise it when it falls below the target, enabling the power consumption to continuously converge toward the target power consumption level and remain stable under disturbance conditions.
[0106] As another positive implementation method, when the current power consumption value is higher than the target power consumption value, the power consumption error is made negative and the control signal is reduced; when the current power consumption value is lower than the target power consumption level, the power consumption error is made positive and the control signal is increased.
[0107] In one embodiment of the present invention, in order to keep the control direction in the closed-loop control process consistent with the power consumption adjustment target, the control module introduces an error sign rule when determining the power consumption error, and after the PID control calculation, makes the change direction of the control signal match the power consumption deviation direction, thereby facilitating the dynamic voltage and frequency adjustment actuator to adjust the working state of the processing unit according to the control signal.
[0108] Here, when the current power consumption value is higher than the target power consumption value, it indicates that the system power consumption is exceeding the target level. In this case, the control module sets the power consumption error to a negative value to indicate that the power consumption needs to be adjusted downwards. When the power consumption error is negative, the PID controller outputs a corresponding control signal based on the comprehensive calculation of the proportional, integral, and derivative terms, and makes the control signal decrease relative to the previous control cycle to reflect the adjustment requirement of "reducing voltage and / or frequency." This drives the dynamic voltage and frequency adjustment actuator to perform a power consumption reduction operation, causing the system power consumption to converge towards the target power consumption value.
[0109] Here, when the current power consumption value is lower than the target power consumption level, it indicates that the system power consumption is below the target level and needs to be compensated upwards. At this time, the control module sets the power consumption error to a positive value to indicate that the power consumption needs to be adjusted upwards. When the power consumption error is positive, the control signal output by the PID controller shows an increasing trend compared to the previous control cycle to reflect the adjustment demand of "increasing voltage and / or frequency," thereby driving the dynamic voltage and frequency adjustment actuator to perform the power consumption upward adjustment operation, so that the system power consumption gradually approaches and stabilizes at the target power consumption level.
[0110] In this way, by setting the power consumption error sign and constraining the increase and decrease of the control signal as described above, the present invention can maintain the consistency of the control direction during the closed-loop control process, so that the positive and negative signs of the power consumption error can intuitively represent the adjustment direction, thereby improving the interpretability and stability of the control process, reducing the risk of reverse adjustment in power consumption adjustment, and helping the system power consumption to converge to the target power consumption level faster and more smoothly.
[0111] This disclosure provides a multi-level stable power consumption control method. By pre-constructing and calibrating an approximate load combination and establishing a mapping relationship between target power consumption and load, and based on closed-loop control using power consumption sensor feedback, a control signal is generated using a PID algorithm within the control cycle and driven by a dynamic voltage and frequency adjustment actuator for fine-tuning. This method can achieve power consumption convergence and stable output under multiple discrete target power consumption levels, and can effectively suppress power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, thereby improving the accuracy and stability of multi-level power consumption control.
[0112] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0113] Based on the same inventive concept, this disclosure also provides a multi-level stable power consumption control device corresponding to the multi-level stable power consumption control method. Since the principle of the device in this disclosure for solving the problem is similar to the multi-level stable power consumption control method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0114] Please see Figure 3 , Figure 3 This is a schematic diagram of a multi-level stable power consumption control device provided in an embodiment of this disclosure. Figure 3 As shown in the figure, the multi-level stable power consumption control device 300 provided in this embodiment includes:
[0115] The power consumption level definition module 310 is used to set a set of multi-level target power consumption levels that need to be stably output. The target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values.
[0116] The approximation load combination construction module 320 is used to construct a corresponding approximation load combination for each target power consumption value and establish a mapping relationship between the target power consumption value and the approximation load combination, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value.
[0117] The coarse adjustment module 330 is configured to, in response to the selection of any of the target power consumption values, invoke and initiate the approximation load combination mapped to the selected target power consumption value, so as to bring the system power consumption into the neighborhood of the target power consumption value.
[0118] The fine-tuning module 340 is used to perform the following cyclically in a preset control cycle: collect the current power consumption value of the system, determine the power consumption error between the target power consumption value and the current power consumption value, convert the power consumption error into a control signal through a PID algorithm, and drive the DVFS actuator to adjust the working state of at least one processing unit according to the control signal until the current power consumption value converges and stabilizes at the target power consumption value.
[0119] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0120] This disclosure provides a multi-level stable power consumption control device. By pre-constructing and calibrating an approximate load combination and establishing a mapping relationship between the target power consumption and the load, and based on closed-loop control using power consumption sensor feedback, a control signal is generated using a PID algorithm within the control cycle and driven by a dynamic voltage and frequency adjustment actuator for fine-tuning. This enables power consumption convergence and stable output at multiple discrete target power consumption levels, and effectively suppresses power consumption disturbances caused by factors such as temperature changes and voltage fluctuations, thereby improving the accuracy and stability of multi-level power consumption control.
[0121] Corresponding to Figure 1 and Figure 2 In addition to the multi-level stable power consumption control method, this disclosure also provides an electronic device 400, such as... Figure 4 The diagram shown is a structural schematic of an electronic device 400 provided in an embodiment of this disclosure, including:
[0122] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including main memory 421 and external memory 422; the main memory 421, also called internal memory, is used to temporarily store the computational data in processor 41, as well as the data exchanged with external memory 422 such as hard disk. Processor 41 exchanges data with external memory 422 through main memory 421. When the electronic device 400 is running, processor 41 and memory 42 communicate through bus 43, enabling processor 41 to execute... Figure 1 and Figure 2 The steps of the multi-level stable power consumption control method.
[0123] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the multi-level stable power consumption control method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0124] This disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, they can perform the steps of the multi-level stable power consumption control method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0125] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0127] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0129] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A multi-level stable power consumption control method, characterized in that, include: Set a set of multi-level target power consumption levels that need to be stably output, wherein the target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values; For each target power consumption value, a corresponding approximation load combination is constructed, and a mapping relationship between the target power consumption value and the approximation load combination is established, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value. In response to the selection of any of the target power consumption values, the approximation load combination mapped to the selected target power consumption value is invoked and started, so that the system power consumption enters the neighborhood of the target power consumption value; The system executes the following steps in a preset control cycle: it collects the current power consumption value of the system, determines the power consumption error between the target power consumption value and the current power consumption value, converts the power consumption error into a control signal through a PID algorithm, and drives the DVFS actuator to adjust the working state of at least one processing unit according to the control signal until the current power consumption value converges and stabilizes at the target power consumption value.
2. The method according to claim 1, characterized in that, For each of the target power consumption values, a corresponding approximate load combination is constructed, specifically including: For each target power consumption level, a corresponding composite workload is constructed, wherein the composite workload is set as a load combination consisting of processor load and graphics processor load; Specifically, a computationally intensive benchmark program was selected as the processor load, and the processor power consumption level was adjusted by binding different numbers of processor cores; a graphics stress test tool was selected as the graphics processor load.
3. The method according to claim 2, characterized in that, For each of the target power consumption values, a corresponding approximation load combination is constructed, which specifically includes: The load parameters of the composite workload are fine-tuned through actual testing. The load parameters include at least the number of cores bound to the processor load and the rendering resolution of the graphics processor load. The finely tuned composite workload is run in the initial cold state of the system so that its actual power consumption is close to and higher than the corresponding target power consumption level, thus forming the approximation load combination.
4. The method according to claim 2, characterized in that, In response to the selection of any of the target power consumption values, the approximation load combination mapped to the selected target power consumption value is invoked and initiated, specifically including: Establish a pre-calibration library and store the mapping relationship between the target power consumption value and the composite workload in the pre-calibration library; In response to the target power consumption value selected by the user's selection operation, the composite workload corresponding to the target power consumption value is retrieved from the precalibration library; The composite workload is initiated, and the system power consumption is rapidly increased to the level of the composite workload. This composite workload serves as the power consumption ceiling, causing the system power consumption to fall into the neighborhood of the target power consumption value, which has a power adjustment margin for DVFS downscaling.
5. The method according to claim 1, characterized in that, The system acquires its current power consumption value, determines the power consumption error between the target power consumption value and the current power consumption value, and converts the power consumption error into a control signal using a PID algorithm, specifically including: Power consumption measurement is performed under the preset control cycle, and the actual total power consumption of the system is measured by the power consumption sensor as the current power consumption value. The difference between the current power consumption value and the target power consumption value is determined as the power consumption error, and the power consumption error is received by the PID controller; The control signal is determined based on the sum of the proportional, integral, and derivative terms of the PID controller.
6. The method according to claim 1, characterized in that, The control signal drives the DVFS actuator to adjust the working state of at least one processing unit, specifically including: When the current power consumption value is higher than the target power consumption value, the DVFS actuator is controlled to reduce the voltage or frequency to reduce power consumption. When the current power consumption value is lower than the target power consumption level, the DVFS actuator is controlled to increase the voltage or frequency to increase the power consumption.
7. The method according to claim 1, characterized in that, The control signal drives the DVFS actuator to adjust the working state of at least one processing unit, specifically including: When the current power consumption value is higher than the target power consumption value, the power consumption error is made negative, and the control signal is reduced; When the current power consumption value is lower than the target power consumption level, the power consumption error is made positive, and the control signal is increased.
8. A multi-level stable power consumption control device, characterized in that, include: The power consumption level definition module is used to set a set of multi-level target power consumption levels that need to be stably output. The target power consumption level set includes target power consumption levels composed of multiple discrete target power consumption values. An approximation load combination construction module is used to construct a corresponding approximation load combination for each target power consumption value and establish a mapping relationship between the target power consumption value and the approximation load combination, wherein the initial actual power consumption generated by the approximation load combination when running under a preset initial operating condition is higher than the corresponding target power consumption value. A coarse adjustment module is configured to, in response to the selection of any of the target power consumption values, invoke and initiate the approximation load combination mapped to the selected target power consumption value, so as to bring the system power consumption into the neighborhood of the target power consumption value; The fine-tuning module is used to perform the following cyclic executions at a preset control cycle: acquiring the current power consumption value of the system, determining the power consumption error between the target power consumption value and the current power consumption value, converting the power consumption error into a control signal through a PID algorithm, and driving the DVFS actuator to adjust the working state of at least one processing unit according to the control signal, until the current power consumption value converges and stabilizes at the target power consumption value.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the multi-level stable power consumption control method as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the multi-level stable power consumption control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and equipment for dynamically adjusting power consumption of video card component
CN120215668A
Energy consumption optimization adjustment method for variable frequency motor of shot blasting machine
CN120729127A