Power consumption control method and electronic equipment

Dynamically adjusting power consumption in electronic devices through PID controllers, the problems of accurate and low efficiency of power consumption adjustment in the prior art are solved, and stable maintenance and rapid response of power consumption are achieved.

CN119088194AActive Publication Date: 2024-12-06HONOR DEVICE CO LTD

Patent Information

Application Number
CN202411588833.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2024-12-06
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

When adjusting the power consumption of electronic equipment, the adjustment accuracy and efficiency are low, and the power consumption changes cannot be responded to real-time, resulting in insufficient precision and timely power consumption adjustment.

Method used

Using PID controller, by obtaining the power consumption errors of the current and historical sampling cycles, determining the target value of the parameters to be adjusted, and dynamically adjusting the power consumption to ensure that the power consumption is stable within the set target value, and improving adjustment accuracy and efficiency.

Benefits of technology

It realizes rapid and accurate power consumption adjustment, meets the system's demand for power consumption control, and improves the power consumption management capabilities under various loads or operating states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088194A_ABST
    Figure CN119088194A_ABST
Patent Text Reader

Abstract

The invention provides a power consumption control method and electronic equipment, and relates to the technical field of electronic equipment. The method comprises the steps that a power consumption error of a current sampling period and a power consumption error of a historical sampling period of a target subsystem are acquired, and a PID controller determines a target value of a to-be-adjusted parameter of the target subsystem according to the power consumption error of the current sampling period and the power consumption error of the historical sampling period, and adjusting the to-be-adjusted parameter of the target subsystem according to the target value of the to-be-adjusted parameter. By taking the power consumption error as the input parameter of the PID controller, the to-be-adjusted parameter of the target subsystem can be quickly adjusted, so that the power consumption of the electronic equipment can be stabilized at the target value. The invention aims to improve the problems that the existing method is low in adjustment efficiency and does not meet the delay requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular to a power consumption control method and an electronic device. Background Art

[0002] During the operation of electronic devices, the power consumption of electronic devices can be adjusted to improve user experience and protect electronic devices. By adjusting the power consumption of electronic devices, the battery life of electronic devices can be optimized, heat can be reduced, system freezes or crashes caused by high loads can be avoided, and the life of the device can be extended.

[0003] Currently, when adjusting the power consumption of electronic devices, it is impossible to accurately adjust the power consumption to the expected value, and the adjustment process is long and the adjustment efficiency is low. Summary of the invention

[0004] The embodiments of the present application provide a power consumption control method and an electronic device, which are used to improve the problems of low regulation efficiency and failure to meet delay requirements in existing methods.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a power consumption control method, including: obtaining a power consumption error of a target subsystem in a current sampling period and a power consumption error of a historical sampling period, determining a target value of a parameter to be adjusted of the target subsystem based on the power consumption error of the current sampling period and the power consumption error of the historical sampling period by a proportional, integral, and differential (PID) controller, and adjusting the parameter to be adjusted of the target subsystem based on the target value of the parameter to be adjusted.

[0007] The power consumption control method provided by the present application converts the power consumption error of the target subsystem into a correction factor of the parameter to be adjusted of the subsystem through a PID controller. By real-time monitoring and calculating the error between the current power consumption of the target subsystem and the set target value, a suitable correction factor is generated to ensure that the adjustment process is faster and more accurate. According to the generated correction factor, the target value of the adjustment parameter of the target subsystem is dynamically determined so that it can respond quickly to changes in power consumption and avoid delays or over-corrections. This process effectively optimizes the accuracy and efficiency of power consumption regulation, so that the power consumption of the target subsystem can be stably maintained within the set target value, meeting the system's demand for power consumption control, while improving the power consumption management capabilities of the subsystem under various loads or operating conditions.

[0008] In a possible implementation of the first aspect, the historical sampling period includes an N-1th sampling period and an N-2th sampling period, the Nth sampling period is a current sampling period, and N is an integer greater than or equal to 3.

[0009] In a possible implementation of the first aspect, the power consumption error of the target subsystem is the difference between the target power consumption of the target subsystem and the feedback power consumption, and the target power consumption of the target subsystem is U A =U B * , U A is the target power consumption of the target subsystem, U B is the target power consumption of the electronic device, Assign weights to the target subsystems.

[0010] In a possible implementation of the first aspect, the PID controller obtains the target value of the parameter to be adjusted of the target subsystem based on the power consumption error of the current sampling period and the power consumption error of the historical sampling period, including: inputting the power consumption error of the Nth sampling period, the power consumption error of the N-1th sampling period and the power consumption error of the N-2th sampling period into the PID controller, determining the correction value of the parameter to be adjusted, and determining the target value of the parameter to be adjusted based on the current value of the parameter to be adjusted, the correction value of the parameter to be adjusted and the correction weight.

[0011] In a possible implementation of the first aspect, the power consumption error of the Nth sampling period, the power consumption error of the N-1th sampling period, the power consumption error of the N-2th sampling period, and the correction value of the parameter to be adjusted satisfy:

[0012] ;

[0013] in is the correction value of the parameter to be adjusted, is the power consumption error of the Nth sampling period, is the power consumption error of the N-1th sampling cycle, is the power consumption error of the N-2th sampling cycle, is the proportional coefficient of the PID controller, is the integral coefficient of the PID controller, is the differential coefficient of the PID controller.

[0014] In a possible implementation of the first aspect, the correction value of the parameter to be adjusted, the correction weight, the target value of the parameter to be adjusted, and the current value of the parameter to be adjusted satisfy:

[0015] ;

[0016] in is the correction value of the parameter to be adjusted, To correct the weight, is the current value of the parameter to be adjusted, is the target value of the parameter to be adjusted.

[0017] In a possible implementation of the first aspect, determining the feedback power consumption of the target subsystem includes: acquiring the feedback power consumption of the target subsystem at every preset sampling period, and determining the power consumption error of the target subsystem according to the difference between the target power consumption of the target subsystem and the feedback power consumption.

[0018] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor; the processor is coupled to the memory; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method of the first aspect.

[0019] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes a method in any possible implementation manner of the first aspect described above.

[0020] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes a method as any possible implementation method of the first aspect.

[0021] Among them, the technical effects of the second to fourth aspects refer to the technical effects of the first aspect and any of its embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of the steps of the power consumption control method provided in the embodiment of the present application;

[0024] Figure 3 A control logic block diagram of a power consumption control method provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of a power consumption control process of an electronic device provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of the process flow of adjusting the power consumption of a processor provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include, for example, "one or more" such expressions, unless there is an explicit contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more than two (including two). The character " / " generally represents that the front and back associated objects are a kind of "or" relationship.

[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0029] In the following, the terms "first", "second", etc. are used only for convenience of description and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more. For example, a plurality of processing circuits refers to two or more processing circuits.

[0030] In the embodiments of the present application, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. In addition, the term "electrical connection" can be a direct electrical connection or an indirect electrical connection through an intermediate medium.

[0031] In the embodiments of the present application, the term "module" is generally a functional structure divided according to logic, and the "module" can be implemented by pure hardware, or by a combination of software and hardware. In the embodiments of the present application, "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, B exists alone, and A and B exist at the same time.

[0032] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0033] The embodiment of the present application provides an electronic device, which can be fixed or mobile. In addition, the electronic device can also be called user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal equipment, vehicle-mounted terminal equipment, industrial control terminal equipment, mobile station, remote station, remote terminal equipment, mobile device, wireless communication equipment, terminal agent, etc. Exemplarily, the electronic device can be a mobile phone, a tablet computer (pad), a desktop computer, a laptop computer, an all-in-one computer, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, etc.

[0034] In some embodiments of the present application, the electronic device may also be a device with a transceiver function, such as a chip system, wherein the chip system may include a chip and may also include other discrete devices.

[0035] Taking a mobile phone as an example, Figure 1 A possible structure of an electronic device is shown. The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface (hereinafter referred to as USB interface 130), a power management module 140, a battery 141, a wireless charging coil 142, a first antenna 151, a second antenna 161, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface (hereinafter referred to as SIM card interface 195).

[0036] Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0037] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0038] The processor 110 may include one or more processing units, for example, the processor 110 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SOC), a central processing unit (CPU), an application processor (AP), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a baseband processor, and a neural network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors 110. For example, the processor 110 may be an application processor AP. Alternatively, the processor 110 may be integrated into a system on chip (SoC). Alternatively, the processor 110 may be integrated into an integrated circuit (IC) chip. The processor 110 may include an analog front end (AFE) and a micro-controller unit (MCU) in an IC chip.

[0039] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0040] The processor 110 may also be provided with a memory for storing computer instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store computer instructions or data that the processor 110 has just used or is cyclically using. If the processor 110 needs to use the computer instructions or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0041] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface 195 and / or a USB interface 130, etc.

[0042] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0043] The wireless communication function of the electronic device can be implemented through the first antenna 151, the second antenna 161, the mobile communication module 150, the wireless communication module 160, the modem, and the baseband processor.

[0044] The first antenna 151 and the second antenna 161 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, the first antenna 151 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0045] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied in electronic devices. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied in electronic devices. In some embodiments, the first antenna 151 of the electronic device is coupled to the mobile communication module 150, and the second antenna 161 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0046] The external memory interface 120 can be used to connect an external memory card, such as a micro SanDisk (Micro SD) card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0047] The internal memory 121 may be used to store computer executable program codes, which may include computer instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the computer instructions stored in the internal memory 121. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0048] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, for example, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM) are included. It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0049] The audio module 170 may include a speaker, a receiver, a microphone and an earphone interface. The electronic device may implement audio functions such as music playing and recording through the audio module 170 and the processor 110 .

[0050] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The speaker, also known as the "speaker", is used to convert audio electrical signals into sound signals. The receiver, also known as the "earpiece", is used to convert audio electrical signals into sound signals. The microphone, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. The electronic device can be provided with at least one microphone. The headphone jack is used to connect wired headphones. The headphone jack can be a USB interface 130, or it can be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0051] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The electronic device may receive input from the button 190 and generate key signal input related to the user settings and function control of the electronic device. The motor 191 may generate a vibration prompt. The motor 191 may be used for incoming call vibration prompts or for touch vibration feedback. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card may be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device. The electronic device may support 1 or N SIM card interfaces 195, where N is a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, Micro SIM cards, SIM cards, etc. In some embodiments, the electronic device uses an embedded SIM (eSIM) card, which may be embedded in the electronic device and cannot be separated from the electronic device.

[0052] The electronic device can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the processor 110. The ISP is used to process the data fed back by the camera 193. In some embodiments, the ISP can be set in the camera 193. The camera 193 is used to capture a static image or a video. In some embodiments, the electronic device can include 1 or N cameras 193, where N is a positive integer greater than 1.

[0053] The electronic device can realize the display function through the GPU, the display screen 194 and the processor 110. The GPU is a microprocessor for image processing, which connects the display screen 194 and the processor 110. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute computer instructions to generate or change display information.

[0054] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include one or more display screens 194. In other embodiments, the touch screen in the display screen 194 may be a folding screen.

[0055] The battery 141 may include at least two batteries 141 , and the at least two batteries 141 may be connected in series, in parallel, or the like to supply power to the load.

[0056] The power management module 140 is used to receive charging input from a charger. The charger may be a wireless charger, such as a wireless charging base, or other electronic devices with reverse wireless charging function. The power management module 140 may receive wireless charging input via a wireless charging coil 142 of the electronic device. The charger may also be a wired charger, for example, the power management module 140 may receive charging input from a wired charger via the USB interface 130.

[0057] The present application is described below by taking the electronic device 110 as a mobile phone as an example. During the operation of the electronic device, the power consumption of the electronic device can be adjusted to achieve the effect of improving the user experience and protecting the electronic device. By adjusting the power consumption of the electronic device, the battery life of the electronic device can be optimized and the life of the device can be extended.

[0058] At present, when electronic equipment adjusts power consumption, there are the following deficiencies:

[0059] 1. The adjustment accuracy is poor.

[0060] Current power consumption adjustment methods usually rely on pre-set logical conditions or strategies. For example, when indicators such as temperature and processor utilization reach a certain threshold, the frequency is reduced and power consumption is adjusted. This approach is a discrete decision and cannot accurately match the real-time dynamic needs of the system. For example, when the system load fluctuates slightly but frequently, fixed rules cannot be fine-tuned according to these subtle changes, which may result in too much or too little frequency adjustment, and the optimal balance between power consumption and performance cannot be achieved. In addition, the adjustment value is usually graded, that is, the frequency point is adjusted to a preset gear. This rough frequency adjustment may result in the power consumption adjustment effect not being delicate enough, and accurate power consumption optimization cannot be achieved.

[0061] 2. The real-time performance of adjustment is poor.

[0062] There is a certain lag in triggering this mechanism based on preset conditions. The change of system status is often instantaneous, and the process of the controller determining whether to trigger power consumption adjustment takes time and cannot respond in real time. For example, when the processor utilization of a mobile phone increases rapidly at a certain moment, the controller used for power consumption control may not be able to respond immediately, but wait until the temperature or load continues to exceed a certain threshold before reducing the frequency.

[0063] It can be seen that the power consumption adjustment method in the above implementation has poor accuracy and timeliness in power consumption adjustment due to the limitations of its preset rules and poor trigger hysteresis.

[0064] To solve the above problems, see Figure 2 The present application embodiment provides a power consumption control method, which is applied to an electronic device. The power consumption control method includes:

[0065] S201: Obtain the power consumption error of the target subsystem in the current sampling period and the power consumption error of the historical sampling period.

[0066] The electronic device may include multiple subsystems. For example, the subsystem may include a processor, an audio module, a display screen, a mobile communication module, and a wireless communication module, etc. The specific type of the subsystem is not limited in the embodiments of the present application. The target subsystem refers to a subsystem in which there is a power consumption deviation or energy efficiency needs to be optimized in multiple subsystems, and thus the power consumption needs to be adjusted. The historical sampling period may be a period before the current sampling period, such as two consecutive sampling periods before the current sampling period, that is, the current sampling period and the historical sampling period may be three consecutive sampling periods. As an example, the current sampling period may be the third sampling period, and the historical sampling period may be the first sampling period and the second sampling period. The time period from 0s to 1s is the first sampling period, the time period from 1s to 2s is the second sampling period, and the time period from 2s to 3s is the third sampling period.

[0067] The controller will obtain the power consumption error of the target subsystem in the current sampling cycle and the power consumption error data of the historical sampling cycle in real time. The power consumption error of the current sampling cycle and the power consumption error data of the historical sampling cycle can be stored in the memory. The controller obtains the power consumption error of the target subsystem in the current sampling cycle and the power consumption error of the historical sampling cycle by reading the memory.

[0068] The power consumption error refers to the difference between the target power consumption of the target subsystem and the feedback power consumption, where the target power consumption is based on the expected power consumption value predetermined during system design. The feedback power consumption refers to the actual power consumption of the target subsystem monitored in real time by a sensor or feedback unit. The difference between the two reflects the power consumption deviation of the target subsystem. As an example, taking the target subsystem as a processor, the target power consumption of the processor in the current sampling cycle is 6W, and the feedback power consumption of the processor in the current sampling cycle is 6.7W, then the power consumption error of the processor in the current sampling cycle can be 0.7W.

[0069] S202: The PID controller determines a target value of a to-be-adjusted parameter of a target subsystem according to a power consumption error of a current sampling period and a power consumption error of a historical sampling period.

[0070] After obtaining the power consumption error of the current sampling period and the power consumption error of the historical sampling period of the target subsystem, the power consumption error of the current sampling period and the power consumption error of the historical sampling period of the target subsystem can be input into the PID controller, and the PID controller will determine the target value of the parameter to be adjusted of the target subsystem based on the power consumption error of the current sampling period and the power consumption error of the historical sampling period. The parameter to be adjusted of the target subsystem refers to the parameter that needs to be adjusted in order to achieve the effect of adjusting the power consumption of the target subsystem. The parameters to be adjusted of different subsystems may be different. As an example, the parameter to be adjusted of the processor may be the operating frequency of the processor, the parameter to be adjusted of the audio module may be the volume, the parameter to be adjusted of the display may be the screen brightness, and the parameter to be adjusted of the mobile communication module may be the communication signal strength. The target value of the parameter to be adjusted refers to the corrected parameter to be adjusted.

[0071] S203: Adjust the parameter to be adjusted of the target subsystem according to the target value of the parameter to be adjusted.

[0072] After determining the target value of the parameter to be adjusted, the processor can generate a power consumption adjustment instruction based on the target value of the parameter to be adjusted, and send the power consumption adjustment instruction to the power management module. The power management module executes the power consumption adjustment instruction to adjust the parameter to be adjusted of the target subsystem to the target value, thereby realizing power consumption management of the target subsystem.

[0073] As an example, the target subsystem is a processor, and the parameter to be adjusted is the operating frequency. The current operating frequency of the processor can be 1.3 GHz, and the target value of the processor operating frequency can be 1.5 GHz. By accurately and quickly adjusting the frequency of the processor from 1.3 GHz to 1.5 GHz, the expected power consumption management effect is achieved. As an example, the current operating frequency of the processor can be 1.5 GHz, and the target value of the processor operating frequency can be 1.3 GHz. By accurately and quickly adjusting the frequency of the processor from 1.5 GHz to 1.3 GHz, the expected power consumption management effect is achieved. The controller can generate corresponding control instructions and send them to the power management module. The power management module parses the received instructions and then adjusts the frequency of the processor to the target value by controlling the supply voltage and frequency.

[0074] The power consumption control method provided by the present application converts the power consumption error of the target subsystem into a correction value of the parameter to be adjusted of the subsystem through a PID controller. The corresponding correction value is generated by real-time monitoring and calculating the error between the current power consumption of the target subsystem and the set target value. According to the generated correction value, the target value of the adjustment parameter of the target subsystem is dynamically determined so that it can respond quickly to changes in power consumption and avoid delays or over-corrections. This process effectively optimizes the accuracy and efficiency of power consumption regulation, so that the power consumption of the target subsystem can be stably maintained within the set target value, and the power consumption of the entire electronic device can be quickly and stably adjusted.

[0075] When obtaining the feedback power consumption of the target subsystem, the feedback power consumption can be obtained periodically to reduce resource consumption and optimize data processing efficiency. In a feasible implementation, determining the feedback power consumption of the target subsystem includes: obtaining the feedback power consumption of the target subsystem every preset sampling period, and determining the power consumption error of the target subsystem according to the difference between the target power consumption of the target subsystem and the feedback power consumption.

[0076] By periodically obtaining feedback power consumption, not only can the real-time and accuracy of subsystem power consumption regulation be ensured, but also the system resource consumption and response efficiency can be balanced, thereby achieving an efficient and stable power consumption control solution.

[0077] When determining the target power consumption of the target subsystem, it can be determined based on the target power consumption of the target subsystem and the target power consumption of the electronic device as a whole. In a feasible implementation, the target power consumption of the target subsystem satisfies formula (1):

[0078] U A =U B * (1);

[0079] Among them, U A is the target power consumption of the target subsystem, UB is the target power consumption of the electronic device, Assign weights to the target subsystems.

[0080] The allocation weights of different target subsystems are different, and the allocation weights represent the power consumption priority or resource occupancy weight of the subsystem relative to other subsystems. By setting the allocation weights reasonably, the system can dynamically allocate the overall power consumption according to the importance or priority of each subsystem, ensuring that different subsystems still meet their performance requirements under power consumption control.

[0081] Before the power consumption error of the current sampling period of the target subsystem and the power consumption error of the historical sampling period are input into the PID controller, it is necessary to determine whether to perform the power consumption adjustment operation according to the size relationship between the power consumption error of the current sampling period of the target subsystem and the power consumption error threshold. For example, when the power consumption error of the current sampling period of the target subsystem is less than or equal to the power consumption error threshold, the power consumption adjustment operation does not need to be performed; when the power consumption error of the current sampling period of the target subsystem is greater than the power consumption error threshold, the power consumption adjustment operation needs to be performed.

[0082] See also Figure 3 As shown in the control logic block diagram, when the power consumption adjustment operation needs to be performed, the power consumption error of the current sampling period of the target subsystem and the power consumption error of the historical sampling period are input into the PID controller. The PID controller can be based on the power consumption error of the current sampling period and the power consumption error of the historical sampling period. By combining the proportional adjustment result, the integral adjustment result and the differential adjustment result of the power consumption error, and performing discrete processing on the combined result, the correction value of the parameter to be adjusted is obtained. Then, the current value of the parameter to be adjusted is corrected according to the correction value of the parameter to be adjusted, so as to obtain the target value of the parameter to be adjusted. Since the power consumption error is used as a control condition, the PID controller can be an incremental PID controller. The use of an incremental PID controller can reduce the amount of calculation of the entire system.

[0083] As an example, the power consumption error of the first sampling period, the power consumption error of the second sampling period, and the power consumption error of the third sampling period are input into the PID controller to determine the correction value of the parameter to be adjusted. Then, the power consumption error of the Nth sampling period, the power consumption error of the N-1th sampling period, the power consumption error of the N-2th sampling period, and the correction value of the parameter to be adjusted satisfy formula (2):

[0084] (2);

[0085] in is the correction value of the parameter to be adjusted, is the power consumption error of the third sampling period, is the power consumption error of the second sampling period, is the power consumption error of the first sampling period, is the proportional coefficient of the PID controller, is the integral coefficient of the PID controller, is the differential coefficient of the PID controller.

[0086] When the PID controller determines the correction value to be adjusted, the target value of the parameter to be adjusted can be determined according to the current value of the parameter to be adjusted, the correction value of the parameter to be adjusted, and the correction weight.

[0087] As an example, the correction value of the parameter to be adjusted, the correction weight, the target value of the parameter to be adjusted, and the current value of the parameter to be adjusted satisfy formula (3):

[0088] (3);

[0089] in is the correction value of the parameter to be adjusted, To correct the weight, is the current value of the parameter to be adjusted, The correction weight can be dynamically adjusted according to actual needs, and this embodiment of the present application does not limit this.

[0090] It should be noted that the power consumption adjustment process of each subsystem is independent of each other. Figure 4 The schematic diagram of the power consumption control process of the electronic device shown in the figure, the target subsystem of the electronic device may include a processor, an audio module, a display screen, and a wireless communication module, and the power consumption control of each target subsystem is completed by the corresponding PID controller.

[0091] Take the processor as the target subsystem as an example. The parameter to be adjusted in the target subsystem is the frequency of the processor. Figure 5 The process diagram is shown.

[0092] S501: Determine a sampling period interval, a target power consumption, and a current operating frequency of a processor.

[0093] S502: Obtain the power consumption error of the processor in the current sampling period and the power consumption error of the historical sampling period.

[0094] S503: The processor PID controller determines a target value of the operating frequency of the processor according to the power consumption error of the current sampling period and the power consumption error of the historical sampling period.

[0095] S504: Adjust the operating frequency of the processor according to the target value of the operating frequency.

[0096] First, the sampling cycle interval of the processor and the current operating frequency of the processor are determined, and then the target power consumption of the processor can be determined according to the preset allocation weight and the target power consumption of the electronic device. When the processor is controlled for power consumption, the feedback unit will collect the feedback power consumption of the processor at preset intervals and send it to the processor PID controller. The processor PID controller determines whether to perform a power consumption adjustment operation based on the difference between the feedback power consumption and the target power consumption. If the power consumption adjustment operation needs to be performed, the processor PID controller obtains the historical power consumption error and the current power consumption error, and determines the operating frequency correction value of the processor, and then corrects the current operating frequency of the processor according to the operating frequency correction value of the processor, so that the operating frequency of the processor is adjusted to the target value.

[0097] Taking the display screen as the target subsystem as an example, the parameter to be adjusted of the target subsystem is the display brightness of the display screen. When the power consumption of the display screen is controlled, the feedback unit collects the feedback power consumption of the display screen at preset intervals and sends it to the display screen PID controller. The display screen PID controller determines whether to perform the power consumption adjustment operation based on the difference between the feedback power consumption and the target power consumption. When the power consumption adjustment operation needs to be performed, the display screen PID controller determines the display brightness correction value of the display screen based on the historical power consumption error and the current power consumption error, and then corrects the current display brightness of the display screen according to the display brightness correction value of the display screen, so that the display brightness of the display screen is adjusted to the target value.

[0098] Taking the audio module as the target subsystem as an example, the parameter to be adjusted of the target subsystem is the volume of the audio module. When the audio module is powered on, the feedback unit collects the feedback power consumption of the audio module at preset intervals and sends it to the audio module PID controller. The audio module PID controller determines whether to perform a power consumption adjustment operation based on the difference between the feedback power consumption and the target power consumption. If a power consumption adjustment operation needs to be performed, the audio module PID controller determines the volume correction value of the audio module based on the historical power consumption error and the current power consumption error, and then corrects the current volume of the audio module based on the volume correction value of the audio module, so that the volume of the audio module is adjusted to the target value.

[0099] Taking the wireless communication module as the target subsystem as an example, the parameter to be adjusted of the target subsystem is the working signal strength of the wireless communication module. When the wireless communication module is subjected to power consumption control, the feedback unit collects the feedback power consumption of the wireless communication module at preset intervals and sends it to the wireless communication module PID controller. The wireless communication module PID controller determines whether to perform a power consumption adjustment operation based on the difference between the feedback power consumption and the target power consumption. If a power consumption adjustment operation needs to be performed, the wireless communication module PID controller determines a correction value of the working signal strength of the wireless communication module based on the historical power consumption error and the current power consumption error. Then, the current working signal strength of the wireless communication module is corrected based on the correction value of the working signal strength of the wireless communication module, so that the working signal strength of the wireless communication module is adjusted to the target value.

[0100] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes each function or step in the above method embodiment.

[0101] This embodiment also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute each function or step in the above method embodiment.

[0102] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0103] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0104] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0106] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A power consumption control method, characterized in that: Applied to an electronic device, the electronic device includes a plurality of subsystems, and the method includes: Obtain the power consumption error of the target subsystem in the current sampling period and the power consumption error of the historical sampling period; The proportional, integral, and differential PID controller determines the target value of the to-be-adjusted parameter of the target subsystem according to the power consumption error of the current sampling period and the power consumption error of the historical sampling period; The parameter to be adjusted of the target subsystem is adjusted according to the target value of the parameter to be adjusted.

2. The method according to claim 1, characterized in that The historical sampling period includes the N-1th sampling period and the N-2th sampling period, the Nth sampling period is the current sampling period, and N is an integer greater than or equal to 3.

3. The method according to claim 1, characterized in that The power consumption error of the target subsystem is the difference between the target power consumption of the target subsystem and the feedback power consumption. The target power consumption of the target subsystem is U A =U B * , U A is the target power consumption of the target subsystem, U B is the target power consumption of the electronic device, The assigned weight for the target subsystem.

4. The method according to any one of claims 1 to 3, characterized in that The PID controller obtains the target value of the to-be-adjusted parameter of the target subsystem according to the power consumption error of the current sampling period and the power consumption error of the historical sampling period, including: Inputting the power consumption error of the Nth sampling period, the power consumption error of the N-1th sampling period, and the power consumption error of the N-2th sampling period into the PID controller to determine a correction value of the parameter to be adjusted; The target value of the parameter to be adjusted is determined according to the current value of the parameter to be adjusted, the revised value of the parameter to be adjusted, and the revised weight.

5. The method according to claim 4, characterized in that The power consumption error of the Nth sampling period, the power consumption error of the N-1th sampling period, the power consumption error of the N-2th sampling period, and the correction value of the parameter to be adjusted satisfy: ; in is the correction value of the parameter to be adjusted, is the power consumption error of the Nth sampling period, is the power consumption error of the N-1th sampling cycle, is the power consumption error of the N-2th sampling cycle, is the proportional coefficient of the PID controller, is the integral coefficient of the PID controller, is the differential coefficient of the PID controller.

6. The method according to claim 4, characterized in that The correction value of the parameter to be adjusted, the correction weight, the target value of the parameter to be adjusted, and the current value of the parameter to be adjusted satisfy: ; in is the correction value of the parameter to be adjusted, is the correction weight, is the current value of the parameter to be adjusted, is the target value of the parameter to be adjusted.

7. The method according to claim 3, characterized in that Determining the feedback power consumption of the target subsystem includes: Obtaining the feedback power consumption of the target subsystem at every preset sampling period; The power consumption error of the target subsystem is determined according to the difference between the target power consumption of the target subsystem and the feedback power consumption.

8. An electronic device, characterized in that: The electronic device comprises: a processor, a memory and a computer program stored in the memory; the memory is coupled to the processor; When the electronic device is running, the processor executes the computer program to implement the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor of an electronic device, the method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for performing system power control within an electronic device, and associated apparatus

    CN105765957A

  • Charging current control method and electronic equipment

    CN116885827A

  • Server power consumption management and control method, system and device and computer storage medium

    CN118244874A

Cited By

  • X-ray source dose control method and device

    CN121078603A

  • Throttling control device, method, chip and electronic device

    CN122837549A