Power consumption monitoring circuit and server

By designing a power consumption monitoring system including sampling resistors, parameter storage modules, processing modules and monitoring modules, automated calculation and configuration parameters are realized, and cumbersome problems of manual calculation and configuration parameters in the prior art are solved, and flexibility and efficiency are improved.

CN119576701APending Publication Date: 2025-03-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411748991.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing power consumption detection methods require manual calculation and configuration parameters, which leads to cumbersome operation and insufficient flexibility, and cannot provide unified calculation and configuration methods for different power consumption monitoring circuits.

Method used

A power consumption monitoring system is designed, including sampling resistors, parameter storage modules, processing modules and monitoring modules. The parameter storage module pre-storages the resistor parameters, and the processing module automatically calculates the target parameters and passes them to the monitoring module to achieve accurate monitoring of the actual current and power of the module to be monitored.

Benefits of technology

Through automated calculation and configuration parameters, the complexity of manual operation is eliminated, flexibility and efficiency are improved, and it can provide unified calculation and configuration methods for different power consumption monitoring circuits, solving the problem of inability to solidify the program and cumbersome operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576701A_ABST
    Figure CN119576701A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption monitoring system and a server, relates to the field of hardware monitoring, and is used for solving the problem of tedious manual calculation and parameter configuration. According to the system, related resistance parameters of a sampling resistor are pre-stored by introducing a parameter storage module, so that the condition that the parameters need to be manually input and processed during calculation each time is avoided; the processing module is in communication connection with the parameter storage module so as to automatically calculate target parameters according to the resistance parameters stored in the parameter storage module and transmit the target parameters to the monitoring module. Therefore, the monitoring module can directly calculate the actual current and power of the to-be-monitored module based on the target parameters and the sampling voltage, thereby achieving the precise monitoring of the to-be-monitored module. Through automatic calculation and parameter configuration, complexity of manual operation is eliminated, flexibility and efficiency are improved, a unified calculation and configuration mode can be provided for different power consumption monitoring circuits, and the problems that a program cannot be solidified and operation is tedious are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hardware monitoring, and in particular to a power consumption monitoring system and a server. Background Art

[0002] As server performance increases, ensuring reliability becomes increasingly critical. Power consumption monitoring is a crucial tool for assessing the operating status of various components. Components like hard drives, GPUs, memory, and fans in servers are equipped with power consumption monitoring circuits. These modules measure the current and voltage flowing through sampling resistors to calculate power consumption.

[0003] In current power consumption detection methods, engineers need to provide parameters such as the sampling resistor's resistance and maximum current. Based on this information and the power consumption monitoring module's documentation, they manually calculate the target parameters required by the BMC and / or power consumption monitoring module. These parameters are then manually written into the BMC's control program. Because the parameters of each power consumption monitoring circuit vary, the program must be configured individually for each circuit, without the ability to solidify the program. This results in a cumbersome operation and a lack of flexibility. Summary of the Invention

[0004] The purpose of the present invention is to provide a power consumption monitoring system and server, which eliminates the complexity of manual operation through automatic calculation and configuration of parameters, improves flexibility and efficiency, and can provide a unified calculation and configuration method for different power consumption monitoring circuits, solving the problems of program solidification and cumbersome operation.

[0005] In a first aspect, the present application provides a power consumption monitoring system, comprising:

[0006] Sampling resistor, parameter storage module, processing module, monitoring module;

[0007] The processing module is connected to the parameter storage module and the monitoring module respectively, the monitoring module is connected to the sampling resistor, and the power supply is connected to the module to be monitored through the sampling resistor;

[0008] The parameter storage module is used to pre-store resistance parameters, wherein the resistance parameters include a resistance value of the sampling resistor, a maximum current value allowed to pass through, and a maximum power value, or a combination thereof;

[0009] The processing module is configured to calculate target parameters based on the resistance parameters and send the target parameters to the monitoring module; wherein the target parameters include current resolution, power resolution, and calibration coefficient;

[0010] The monitoring module is used to obtain the sampled voltage across the sampling resistor, and calculate the actual current and actual power of the module to be monitored based on the sampled voltage and the target parameter, so as to monitor the module to be monitored.

[0011] Optionally, the monitoring module includes a baseboard management controller and a power consumption monitoring module;

[0012] The baseboard management controller is connected to the processing module and the power consumption monitoring module respectively, and the power consumption monitoring module is connected to both ends of the sampling resistor respectively;

[0013] The baseboard management controller is configured to receive the target parameter sent by the processing module, send the calibration coefficient to the power consumption monitoring module, and calculate the actual current and actual power of the module to be monitored based on the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution;

[0014] The power consumption monitoring module is configured to obtain the sampled voltage across the sampling resistor and the bus voltage according to the calibration coefficient, and calculate the current value and the power value on the sampling resistor based on the sampled voltage and the bus voltage; the bus voltage is the voltage on the bus between the sampling resistor and the module to be monitored.

[0015] Optionally, calculating the actual current and actual power of the module to be monitored according to the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution includes:

[0016] The product of the current value and the current resolution is calculated to obtain the actual current of the module to be monitored, and the product of the power value and the power resolution is calculated to obtain the actual power of the module to be monitored.

[0017] Optionally, the baseboard management controller is further configured to convert the current value and the power value calculated by the power consumption monitoring module from hexadecimal to decimal, respectively, to obtain a decimal current value and a decimal power value;

[0018] Calculating the actual current and actual power of the module to be monitored according to the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution, including:

[0019] The product of the decimal current value and the current resolution is calculated to obtain the actual current of the module to be monitored, and the product of the power value and the power resolution is calculated to obtain the actual power of the module to be monitored.

[0020] Optionally, calculating the current value and the power value on the sampling resistor according to the sampled voltage and the bus voltage includes:

[0021] Calculating a current value on the sampling resistor according to the sampled voltage and the resistance value of the sampling resistor;

[0022] The power value is calculated according to the current value and the bus voltage.

[0023] Optionally, the power consumption monitoring module is provided with:

[0024] a calibration register, configured to store the calibration coefficient sent by the baseboard management controller;

[0025] a current register, configured to store the calculated current value on the sampling resistor;

[0026] A power register is used to store the calculated power value of the sampling resistor.

[0027] Optionally, also include:

[0028] The communication module is arranged between the parameter storage module and the processing module, and the parameter storage module transmits data with the processing module through the communication module.

[0029] Optionally, also include:

[0030] a protection module, the input end of which is connected to the power supply via the sampling resistor, and the output end of which is connected to the module to be monitored;

[0031] The protection module is used to output the supply voltage to the module to be monitored through its own output end when the voltage at its own input end reaches its own set enable threshold, and to stop outputting the supply voltage to the module to be monitored through its own output end when the voltage at its own input end reaches its own set protection threshold.

[0032] Optionally, calculating the target parameter according to the resistance parameter includes:

[0033] Calculating a minimum current resolution according to the maximum current value and the number of bits representing the current in the monitoring module, and searching a preset corresponding relationship table according to the minimum current resolution to determine an interval where the minimum current resolution is located;

[0034] Determining a current resolution corresponding to the interval according to the preset correspondence table; wherein the current resolution is greater than the minimum current resolution, and a difference between the current resolution and the minimum current resolution is within a preset range;

[0035] According to the current resolution and the resistance of the sampling resistor, the formula CAL=trunc(0.04096 / (Current_LSB×R SHUNT ) calculates the decimal calibration coefficient, where trunc is the truncation function, CAL is the decimal calibration coefficient, Current_LSB is the current resolution, R SHUNT is the resistance of the sampling resistor;

[0036] Converting the decimal calibration coefficient into a hexadecimal calibration coefficient;

[0037] The power resolution is calculated according to the current resolution, wherein the power resolution is a preset multiple of the current resolution.

[0038] In a second aspect, the present application provides a server, comprising a power supply and a module to be monitored, and also comprising the power consumption monitoring system as described above, wherein the power consumption monitoring system is connected to the power supply and the module to be monitored respectively.

[0039] The present invention discloses a power consumption monitoring system and server, which relate to the field of hardware monitoring and are used to solve the problem of cumbersome manual calculation and parameter configuration. The system pre-stores the relevant resistance parameters of the sampling resistor by introducing a parameter storage module, avoiding the need to manually input and process these parameters each time the calculation is performed; the processing module is connected to the parameter storage module by communication to automatically calculate the target parameters based on the resistance parameters stored in the parameter storage module, and pass them to the monitoring module. In this way, the monitoring module can directly calculate the actual current and power of the module to be monitored based on these target parameters and the sampled voltage, thereby realizing accurate monitoring of the module to be monitored. By automatically calculating and configuring parameters, the complexity of manual operation is eliminated, flexibility and efficiency are improved, and a unified calculation and configuration method can be provided for different power consumption monitoring circuits, solving the problem that the program cannot be solidified and the operation is cumbersome. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0041] Figure 1 A schematic block diagram of a power consumption monitoring system provided by the present invention;

[0042] Figure 2 A schematic block diagram of another power consumption monitoring system provided by the present invention;

[0043] Figure 3 This is a schematic diagram of a specific implementation of a power consumption monitoring system provided by the present invention. DETAILED DESCRIPTION

[0044] The core of the present invention is to provide a power consumption monitoring system and server, which eliminates the complexity of manual operation through automated calculation and configuration parameters, improves flexibility and efficiency, and can provide a unified calculation and configuration method for different power consumption monitoring circuits, solving the problems of program solidification and cumbersome operation.

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0046] First, as Figure 1 As shown, the present application provides a power consumption monitoring system, comprising:

[0047] Sampling resistor 1, parameter storage module 2, processing module 3, monitoring module 4;

[0048] The processing module 3 is connected to the parameter storage module 2 and the monitoring module 4 respectively. The monitoring module 4 is connected to the sampling resistor 1. The power supply is connected to the module to be monitored through the sampling resistor 1.

[0049] The parameter storage module 2 is used to pre-store resistance parameters, which include a combination of one or more of the resistance value of the sampling resistor 1, the maximum current value allowed to pass through, and the maximum power value;

[0050] Processing module 3, used to calculate target parameters based on resistance parameters and send the target parameters to monitoring module 4; wherein the target parameters include current resolution, power resolution and calibration coefficient;

[0051] The monitoring module 4 is used to obtain the sampled voltage across the sampling resistor 1 and calculate the actual current and actual power of the module to be monitored based on the sampled voltage and target parameters, so as to monitor the module to be monitored.

[0052] In this embodiment, the power consumption monitoring system is applied to the server, mainly used to monitor the power consumption of each component inside the server, so as to understand its working status in real time and ensure the normal operation of the system. The various modules of the system have different functions, among which the sampling resistor 1 (in Figure 3R21 in the example is a core component in the system. It is connected in parallel with the module to be monitored (such as the hard drive, GPU, memory, or fan) to obtain the current flowing through it. The power supply is connected to the module to be monitored via sampling resistor 1, and the current flowing through it generates a voltage drop across the resistor. This voltage drop is proportional to the current, and the current can be inferred by measuring the voltage across sampling resistor 1. The resistance value of sampling resistor 1 and the maximum allowable current are key design parameters.

[0053] Parameter storage module 2 is used to store all electrical parameters related to sampling resistor 1. These parameters include, but are not limited to, the resistance value, maximum allowable current, and maximum power of sampling resistor 1. These resistor parameters are pre-stored in the storage module during initialization. The purpose of storing these parameters is to provide the necessary information for subsequent current and power calculations. Parameter storage module 2 provides fixed reference data to ensure accurate calculation of parameters such as power consumption and current.

[0054] The processing module 3 is responsible for calculating the required target parameters based on the resistance parameters obtained from the parameter storage module 2, and transmitting these target parameters to the monitoring module 4. The target parameters include: Current Resolution: This is a description of the current detection accuracy, usually the minimum current resolution calculated based on the resistance value of the sampling resistor 1 and the maximum current. This value is used to ensure that the system can accurately detect small current changes; Power Resolution: This is a calculation based on current resolution and voltage, which describes the accuracy of power detection. The higher the power resolution, the higher the accuracy of the system when monitoring power consumption; Calibration Coefficient: This parameter is used to correct measurement errors to make the measurement results more accurate. The calibration coefficient is determined through known standard testing and calibration methods. It helps to correct the current and power measurements and compensate for possible errors.

[0055] After these target parameters are calculated by processing module 3, they are sent digitally to monitoring module 4. When calculating the target parameters, processing module 3 uses the resistor parameters to ensure that the final calculated value accurately reflects the actual situation. Monitoring module 4 is the execution module in the power consumption monitoring system, primarily responsible for the actual measurement and calculation. It first measures the voltage across sampling resistor 1 to obtain a voltage value. This voltage value is the voltage drop generated when the current consumed by the monitored module flows through sampling resistor 1. Monitoring module 4 then calculates the actual current and actual power of the monitored module based on the sampled voltage value and the target parameters transmitted by processing module 3 (including current resolution, power resolution, and calibration coefficient). This enables monitoring module 4 to monitor the power consumption status of the monitored module in real time, thereby achieving accurate power consumption monitoring.

[0056] The system's workflow is as follows: upon system startup, parameter storage module 2 loads parameters containing information about sampling resistor 1 into the system. Processing module 3 calculates the stored resistor parameters to determine target parameters such as current resolution, power resolution, and calibration coefficients, and transmits these to monitoring module 4. Monitoring module 4 continuously measures the voltage across sampling resistor 1 and uses the target parameters to calculate the actual current and power. These calculation results help the system determine whether each component is within its normal operating range and promptly detect faults or abnormalities.

[0057] In summary, the entire power consumption monitoring system acquires current signals through sampling resistor 1, uses the resistor parameters stored in parameter storage module 2, and combines them with the target parameters calculated by processing module 3. Finally, monitoring module 4 performs real-time current and power calculations. This design accurately monitors the power consumption status of various server components, improving system reliability and efficiency.

[0058] Based on the above embodiment:

[0059] like Figure 2 As shown, as an optional embodiment, the monitoring module 4 includes a baseboard management controller 41 and a power consumption monitoring module 42;

[0060] The baseboard management controller 41 is connected to the processing module 3 and the power consumption monitoring module 42 respectively, and the power consumption monitoring module 42 is connected to both ends of the sampling resistor 1 respectively;

[0061] The baseboard management controller 41 is used to receive the target parameters sent by the processing module 3, and send the calibration coefficients to the power consumption monitoring module 42, and calculate the actual current and actual power of the module to be monitored based on the current value and power value, current resolution, and power resolution calculated by the power consumption monitoring module 42;

[0062] The power consumption monitoring module 42 is used to obtain the sampled voltage and bus voltage across the sampling resistor 1 according to the calibration coefficient, and calculate the current value and power value on the sampling resistor 1 based on the sampled voltage and bus voltage; the bus voltage is the voltage on the bus between the sampling resistor 1 and the module to be monitored.

[0063] In this embodiment, the power consumption monitoring system realizes efficient power consumption monitoring of internal components of the server by combining a baseboard management controller 41 (BMC) and a power consumption monitoring module 42 .

[0064] The baseboard management controller 41 is the core control unit in the system, primarily responsible for coordinating communication between the processing module 3 and the power consumption monitoring module 42. The BMC receives target parameters from the processing module 3, including current resolution, power resolution, and calibration coefficients. These target parameters are calculated by the processing module 3 based on data such as the resistance value and maximum current of the sampling resistor 1 and provided to the BMC. The BMC further transmits the calibration coefficients to the power consumption monitoring module 42. The calibration coefficients are important parameters for ensuring the measurement accuracy of the power consumption monitoring system. The BMC also calculates the actual current and actual power of the module to be monitored based on the current and power values ​​calculated by the power consumption monitoring module 42, as well as the current and power resolutions. This process ensures the accuracy of power consumption monitoring through BMC control and enables power consumption monitoring of the modules to be monitored (such as hard drives, GPUs, and memory) by transmitting the calculation results.

[0065] The power consumption monitoring module 42 is a hardware module specifically responsible for calculating the power consumption of the module to be monitored. It first accurately adjusts the measurement results based on the calibration coefficients passed in to eliminate possible errors. The power consumption monitoring module 42 calculates the current flowing through the sampling resistor 1 by detecting the voltage across the resistor. The relationship between current and voltage can be calculated using Ohm's law. The bus voltage refers to the voltage between the sampling resistor 1 and the module to be monitored, which reflects the voltage provided by the power supply to the module to be monitored. The power consumption monitoring module 42 uses the bus voltage to help determine the operating status of the module to be monitored, thereby inferring a more accurate power value. Using these voltage values ​​(the sampling voltage and the bus voltage) in combination with the calibration coefficients, the power consumption monitoring module 42 calculates the current and power values ​​of the module to be monitored.

[0066] The specific workflow is as follows: Processing module 3 calculates target parameters, including current resolution, minimum current resolution, power resolution, and calibration coefficients, based on information such as the resistance parameters and maximum current of sampling resistor 1. These parameters are sent to the baseboard management controller 41 (BMC), which then passes the calibration coefficients to the power consumption monitoring module 42. Power consumption monitoring module 42 measures the voltage (current signal) across sampling resistor 1 and the bus voltage (voltage signal), calculating current and power based on the voltage values ​​and calibration coefficients. After receiving the current and power values ​​calculated by power consumption monitoring module 42, the BMC further calculates and confirms the actual current and power of the monitored module based on these values ​​and the current / power resolution. This process enables real-time monitoring of the operating status of the monitored module and timely detection of potential anomalies, such as excessive current or abnormal power consumption.

[0067] As can be seen, this embodiment achieves precise power consumption monitoring of each module within the server through the collaboration between the BMC and the power consumption monitoring module 42. The BMC is responsible for transmitting the calculated target parameters and providing feedback, while the power consumption monitoring module 42 uses the calibration coefficients and the voltage across the sampling resistor 1 and the bus voltage to calculate the actual current and power values. This system architecture makes power consumption monitoring more accurate and automated, and provides real-time feedback and anomaly detection capabilities, effectively ensuring the operational reliability of server components.

[0068] As an optional embodiment, the actual current and actual power of the module to be monitored are calculated based on the current value and power value, current resolution, and power resolution calculated by the power consumption monitoring module 42, including:

[0069] The product of the current value and the current resolution is calculated to obtain the actual current of the module to be monitored. The product of the power value and the power resolution is calculated to obtain the actual power of the module to be monitored.

[0070] In this embodiment, the current value and power value calculated by the power consumption monitoring module 42 as well as the current resolution and power resolution can help accurately determine the actual current and power of the module to be monitored.

[0071] The power consumption monitoring module 42 first calculates the voltage across sampling resistor 1 and infers the current flowing through it based on the relationship between this voltage and the resistance value. Current resolution defines the minimum current unit; it represents the smallest increment of current change that the power consumption monitoring module 42 can measure and distinguish. By multiplying the calculated current value by the current resolution, the actual current of the monitored module can be obtained. This process effectively combines the current measurement value with the system's measurement accuracy (current resolution) to obtain a more accurate actual current value.

[0072] The power value is calculated by multiplying the current value by the bus voltage. The power resolution (PowerResolution) defines the smallest unit of power that the power consumption monitoring module 42 can measure. The power resolution reflects the minimum detection capability of the power consumption monitoring module 42 for power changes. The actual power of the monitored module is obtained by multiplying the calculated power value by the power resolution. This process effectively combines the power measurement value with the power resolution to accurately reflect the minimum power detection accuracy that the power consumption monitoring module 42 can provide.

[0073] By multiplying these two values, we can provide more accurate actual current and power values ​​for the module being monitored, taking into account measurement accuracy. This approach effectively combines actual measurements with the resolution parameters used in system design, thereby improving the reliability and accuracy of the power consumption monitoring system.

[0074] As an optional embodiment, the baseboard management controller 41 is further configured to convert the current value and the power value calculated by the power consumption monitoring module 42 from hexadecimal to decimal, respectively, to obtain a decimal current value and a decimal power value;

[0075] Calculating the actual current and actual power of the module to be monitored based on the current value and power value, current resolution, and power resolution calculated by the power consumption monitoring module 42 includes:

[0076] Calculate the product of the decimal current value and the current resolution to obtain the actual current of the module to be monitored. Calculate the product of the power value and the power resolution to obtain the actual power of the module to be monitored.

[0077] In this embodiment, the baseboard management controller 41 (BMC) not only receives the current and power values ​​calculated by the power consumption monitoring module 42, but also converts these values ​​from hexadecimal to decimal for subsequent processing and calculation. Specifically, the power consumption monitoring module 42 calculates the voltage across the sampling resistor 1 and infers the current and power values ​​based on this voltage and the bus voltage. These calculation results are typically expressed in hexadecimal. To facilitate subsequent calculations and analysis, the baseboard management controller 41 converts these hexadecimal current and power values ​​to decimal format. Hexadecimal is a commonly used data representation format in computers and digital circuits, while decimal is the number system used by humans in daily life. Therefore, converting the hexadecimal values ​​to decimal allows for more intuitive processing and analysis of current and power.

[0078] After converting the current value to decimal, the baseboard management controller 41 multiplies the decimal current value by the current resolution to obtain the actual current of the monitored module. The current resolution defines the smallest current unit that the power consumption monitoring module 42 can accurately measure. Through this multiplication, the baseboard management controller 41 can obtain an actual current value that reflects the actual current level of the system.

[0079] Similarly, the baseboard management controller 41 multiplies the power value by the power resolution to calculate the actual power consumption of the monitored module. The power resolution represents the smallest unit of power that the power consumption monitoring module 42 can measure. This multiplication provides the actual power value, reflecting the power consumption of the monitored module.

[0080] These calculation processes ensure that the power consumption monitoring system can monitor and provide feedback on the actual current and power of the monitored modules in real time with high accuracy, thereby helping the system optimize operation, improve reliability, and prevent overload or inefficiency issues.

[0081] As an optional embodiment, calculating the current value and power value on the sampling resistor 1 according to the sampled voltage and the bus voltage includes:

[0082] Calculate the current value on sampling resistor 1 according to the sampling voltage and the resistance value of sampling resistor 1;

[0083] Calculate the power value based on the current value and bus voltage.

[0084] In this embodiment, the power consumption monitoring module 42 calculates the current value and power value on the sampling resistor 1 by sampling the voltage and the bus voltage. First, using the sampled voltage and the known resistance value of the sampling resistor 1, Ohm's law can be used to calculate the current value passing through the sampling resistor 1. Next, based on the current value and the bus voltage, the power value can be calculated using the power formula ((P=V×I)), where (V) is the bus voltage and (I) is the previously calculated current value. In this way, the power consumption monitoring module 42 can accurately calculate the current and power of the module to be monitored based on the sampled voltage and bus voltage, combined with the parameters of the resistor, thereby achieving real-time monitoring of the system power consumption.

[0085] As an optional embodiment, the power consumption monitoring module 42 is provided with: a calibration register for storing the calibration coefficient sent by the baseboard management controller 41; a current register for storing the calculated current value of the sampling resistor 1; a power register for storing the calculated power value of the sampling resistor 1 ( Figure 3 These three registers are not identified in the figure, but are registers inside the power consumption monitoring module 42).

[0086] In this embodiment, the power consumption monitoring module 42 stores and processes important parameters related to power consumption monitoring by configuring specific registers. First, the calibration register stores calibration coefficients sent by the baseboard management controller 41 (BMC). These coefficients are calculated by the processing module based on the parameters of sampling resistor 1 and are used to calibrate the accuracy of current and power measurements. Second, the current register stores the current value of sampling resistor 1, calculated by the power consumption monitoring module 42. This current value is calculated based on the sampled voltage and the resistance value, and reflects the magnitude of the current flowing through the resistor. Finally, the power register stores the power value of sampling resistor 1. This value is calculated by multiplying the current value by the bus voltage and represents the power consumption through the resistor. Through these registers, the power consumption monitoring module 42 can store and update current and power values ​​in real time, providing accurate data support for subsequent power consumption analysis and system monitoring.

[0087] As an optional embodiment, it further includes: a communication module, which is arranged between the parameter storage module 2 and the processing module 3, and the parameter storage module 2 transmits data with the processing module 3 through the communication module. Figure 3The communication module is represented by an I2C or SMBUS compatible interface.

[0088] In this embodiment, the configuration of the communication module enables data transmission between the parameter storage module 2 and the processing module 3. Specifically, the communication module acts as a data intermediary, connecting the parameter storage module 2 and the processing module 3, and is responsible for transmitting the resistance parameters stored in the parameter storage module 2 (such as the resistance value and maximum current of the sampling resistor 1) to the processing module 3. After receiving these resistance parameters, the processing module 3 can perform further calculations based on these data, such as calculating target parameters (such as current resolution, power resolution, and calibration coefficients). The introduction of this data transmission mechanism ensures the timely and accurate transmission of parameters, while also improving the flexibility and scalability of the system and making the collaborative work between different modules more efficient.

[0089] As an optional embodiment, the method further includes:

[0090] The protection module 5 has its input end connected to the power supply through the sampling resistor 1, and its output end connected to the module to be monitored;

[0091] Protection module 5 is used to output the supply voltage to the module to be monitored through its own output terminal when the voltage at its own input terminal reaches its own set enable threshold, and stop outputting the supply voltage to the module to be monitored through its own output terminal when the voltage at its own input terminal reaches its own set protection threshold.

[0092] In this embodiment, protection module 5 provides power supply protection for the monitored module and ensures safe system operation. The input of protection module 5 is connected to the power supply via sampling resistor 1, which monitors voltage or current changes. Protection module 5 controls the voltage output at its output based on voltage changes at its input.

[0093] Specifically, the protection module 5 is provided with an enable threshold and a protection threshold: when the voltage at the input end reaches the set enable threshold, the protection module 5 will provide stable power supply to the module to be monitored through its output end to ensure the normal operation of the module to be monitored; and when the voltage at the input end exceeds the set protection threshold, the protection module 5 will stop outputting voltage and cut off the power supply to the module to be monitored to prevent the module to be monitored from being damaged due to excessive voltage or other abnormal conditions.

[0094] Through this mechanism, the protection module 5 can effectively prevent power supply anomalies (such as excessive voltage) from causing harm to the monitoring module, thereby ensuring the stability and security of the entire system.

[0095] As an optional embodiment, calculating the target parameter according to the resistance parameter includes:

[0096] Calculate the minimum current resolution based on the maximum current value and the number of bits representing the current in the monitoring module 4, and search the preset corresponding relationship table based on the minimum current resolution to determine the interval where the minimum current resolution is located;

[0097] Determining a current resolution corresponding to the interval according to a preset correspondence table; wherein the current resolution is greater than the minimum current resolution, and a difference between the current resolution and the minimum current resolution is within a preset range;

[0098] According to the current resolution and the resistance of sampling resistor 1, the formula CAL=trunc(0.04096 / (Current_LSB×R SHUNT ) calculates the decimal calibration coefficient, where trunc is the truncation function, CAL is the decimal calibration coefficient, Current_LSB is the current resolution, and R SHUNT is the resistance of sampling resistor 1;

[0099] Convert the decimal calibration coefficient to a hexadecimal calibration coefficient;

[0100] The power resolution is calculated based on the current resolution, where the power resolution is a preset multiple of the current resolution.

[0101] In this embodiment, the target parameter calculation process is based on the resistance parameters, including the maximum current value, the resistance value of the sampling resistor 1 and other information, in order to determine the key parameters in the power consumption monitoring system, such as current resolution, calibration coefficient and power resolution.

[0102] First, the minimum current resolution is calculated based on the maximum current value and the number of bits representing the current in the monitoring module. The minimum current resolution is the unit value at which the current can be minimized during the sampling process. Next, a preset correspondence table is searched based on the minimum current resolution to determine the interval in which it falls. After determining the interval in which the minimum current resolution falls, the current resolution corresponding to that interval is selected using the preset correspondence table. This current resolution should be greater than the minimum current resolution, and the difference between it and the minimum current resolution should be within a preset range to ensure system accuracy and flexibility.

[0103] According to the calculated current resolution (Current_LSB) and the resistance value of sampling resistor 1 (R SHUNT ), using the formula CAL=trunc(0.04096 / (Current_LSB×R SHUNT )) to calculate the calibration coefficient (CAL). This formula derives the calibration coefficient based on the current resolution and the resistance value of the sampling resistor 1, ensuring that the power consumption monitoring module 42 accurately reflects the current and power in actual applications.

[0104] The calculated calibration factor (CAL) is a decimal number and must be converted to hexadecimal for transmission to the power consumption monitoring module 42. Finally, the power resolution is calculated based on the current resolution. The power resolution is typically a preset multiple of the current resolution and represents the smallest unit of power that the system can resolve.

[0105] This process ensures that the power consumption monitoring system can automatically adjust and optimize its monitoring accuracy according to the specific parameters of the sampling resistor 1, thereby being able to more accurately calculate and control key indicators such as power consumption and temperature in equipment such as servers.

[0106] Furthermore, after the power consumption monitoring module 42 calculates the actual current and power, it can compare them with preset maximum allowable current and power values ​​to detect any abnormalities. If the current or power is detected to be outside the safe range, the system can trigger an alarm or notify the operator through the baseboard management controller 41 (BMC) for action. Regular system health assessments can also be performed based on sampled data, including analyzing current and power fluctuations to determine potential circuit or hardware failures such as overheating, overload, or current imbalance. Furthermore, machine learning algorithms can be used to predict future power consumption trends based on historical power consumption data and real-time measurement data. For example, when the load increases, the power consumption trend can be predicted to proactively implement appropriate energy-saving measures. Based on the predicted power consumption trend, the system's operating mode can be adjusted or load balancing can be implemented. For example, when the system load is low, the operating voltage of certain components can be automatically reduced or unnecessary hardware modules can be shut down to reduce power consumption.

[0107] In a specific embodiment, the calculation process is as follows:

[0108] Step 1: Set up the connection relationship between the parameter storage module, processing module, power consumption monitoring module, and BMC with I2C communication on the system.

[0109] Step 2: The parameter storage module with I2C communication transmits the current register and resistance register storing the information of the sampling resistor R21 to the processing module.

[0110] Step 3: The processing module receives information from the current register and the resistance register that store information about the sampling resistor R21. The maximum current of the sampling resistor R21 is 142A, and the resistance value of the sampling resistor R21 is 0.00025Ω.

[0111] The minimum current resolution is Current_LSB_min = 142 / 215 = 0.00433349. Select Current_LSB_min to be greater than 0.00433349. By looking up the Current_LSB value in Table 1, we obtain Current_LSB = 0.005.

[0112] The resistance of the sampling resistor R SHUNT =R21=0.00025Ω;

[0113] Table 1

[0114]

[0115] Step 4: According to R SHUNT , Current_LSB, calculate the value of the calibration coefficient CAL register and convert it to hexadecimal.

[0116] CAL=trunc(0.04096 / (Current_LSB×R SHUNT )) = trunc (0.04096 / (0.005 × 0.00025)) = 32768; converted to hexadecimal 8000H.

[0117] Step 5: Calculate the power resolution Power_LSB based on Current_LSB.

[0118] Power_LSB=20×Current_LSB=20×0.005=0.1.

[0119] Step 6: The processing module transmits the values ​​of Current_LSB, Power_LSB, and the CAL register to the BMC through I2C communication.

[0120] Step 7: The BMC writes the value of the CAL register (8000H) to the CalibrationRegister05H register of the power consumption monitoring module through I2C communication. The power consumption monitoring module can be, but is not limited to, TI's INA220.

[0121] Step 8: As the P12V_STBY voltage rises, the enable signal P12V_STBY_EN, derived from its voltage division, exceeds the enable threshold of protection module PU25. PU25 activates, P12V_HDD outputs normally, and P12V_HDD_PG becomes high. When the P12V_HDD backend is loaded, a certain current flows through PU25. The same current also flows through precision resistor R21 of precision resistor module PU21 for I2C communication, generating a certain voltage drop across it.

[0122] Step 9: The BMC receives the value of the CurrentRegister04H register and the value of the PowerRegister03H register from the power consumption monitoring module.

[0123] Step 10: Current and Power Calculation: The BMC calculates the system current and power consumption based on the values ​​of the CurrentRegister04H and PowerRegister03H registers. The hexadecimal value of the CurrentRegister04H register is 37E8H, which converts to decimal as 14312. The actual current Current = Current_LSB × 14312 = 0.005 × 14312 = 71.56A. The hexadecimal value of the PowerRegister03H register is 2141H, which converts to decimal as 8513. The actual power Power = Power_LSB × 8513 = 0.1 × 8513 = 851.3W.

[0124] Sampling resistor information can be automatically transmitted through I2C communication, eliminating the need for engineers to frequently count the resistance values ​​and maximum current flowing through the sampling resistors of different power monitoring circuits and transmit these information through software and hardware interface documentation. Processing module 3 can automatically calculate the values ​​of Current_LSB, Power_LSB, and the CAL register, eliminating the need for engineers to manually calculate them. For different power monitoring systems, the BMC automatically receives the values ​​transmitted by processing module 3, eliminating the need for engineers to write different Current_LSB, Power_LSB, and CAL register values ​​into the program. The BMC automatically receives the values ​​transmitted by the processing module and automatically configures the Current_LSB, Power_LSB, and CAL register values, allowing the program to be fixed. Since the resistance information is transmitted through I2C communication, and the values ​​of Current_LSB, Power_LSB, and the CAL register are all automatically calculated by processing module 3, there is no need to verify the accuracy of the power consumption system, saving labor costs.

[0125] In a second aspect, the present application provides a server, including a power supply and a module to be monitored, and also including a power consumption monitoring system as described above, wherein the power consumption monitoring system is connected to the power supply and the module to be monitored, respectively.

[0126] For other introductions to the server, please refer to the above embodiments, and this application will not go into details here.

[0127] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0128] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A power consumption monitoring system, characterized in that: include: Sampling resistor, parameter storage module, processing module, monitoring module; The processing module is connected to the parameter storage module and the monitoring module respectively, the monitoring module is connected to the sampling resistor, and the power supply is connected to the module to be monitored through the sampling resistor; The parameter storage module is used to pre-store resistance parameters, wherein the resistance parameters include a combination of one or more of the resistance value of the sampling resistor, the maximum current value allowed to pass, and the maximum power value; The processing module is used to calculate the target parameters according to the resistance parameters and send the target parameters to the monitoring module; wherein the target parameters include current resolution, power resolution and calibration coefficient; The monitoring module is used to obtain the sampled voltage across the sampling resistor, and calculate the actual current and actual power of the module to be monitored according to the sampled voltage and the target parameter, so as to monitor the module to be monitored.

2. The power consumption monitoring system according to claim 1, characterized in that: The monitoring module includes a baseboard management controller and a power consumption monitoring module; The baseboard management controller is connected to the processing module and the power consumption monitoring module respectively, and the power consumption monitoring module is connected to both ends of the sampling resistor respectively; The baseboard management controller is used to receive the target parameter sent by the processing module, and send the calibration coefficient to the power consumption monitoring module, and calculate the actual current and actual power of the module to be monitored according to the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution; The power consumption monitoring module is used to obtain the sampling voltage and the bus voltage at both ends of the sampling resistor according to the calibration coefficient, and calculate the current value and the power value on the sampling resistor according to the sampling voltage and the bus voltage; the bus voltage is the voltage on the bus between the sampling resistor and the module to be monitored.

3. The power consumption monitoring system according to claim 2, characterized in that: Calculating the actual current and actual power of the module to be monitored according to the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution, including: The product of the current value and the current resolution is calculated to obtain the actual current of the module to be monitored, and the product of the power value and the power resolution is calculated to obtain the actual power of the module to be monitored.

4. The power consumption monitoring system according to claim 3, characterized in that: The baseboard management controller is further used to convert the current value and the power value calculated by the power consumption monitoring module from hexadecimal to decimal, respectively, to obtain a decimal current value and a decimal power value; Calculating the actual current and actual power of the module to be monitored according to the current value and power value calculated by the power consumption monitoring module, the current resolution, and the power resolution, including: The product of the decimal current value and the current resolution is calculated to obtain the actual current of the module to be monitored, and the product of the power value and the power resolution is calculated to obtain the actual power of the module to be monitored.

5. The power consumption monitoring system according to claim 2, characterized in that: Calculating the current value and the power value on the sampling resistor according to the sampled voltage and the bus voltage includes: Calculating the current value on the sampling resistor according to the sampling voltage and the resistance value of the sampling resistor; The power value is calculated according to the current value and the bus voltage.

6. The power consumption monitoring system according to claim 2, characterized in that: The power consumption monitoring module is provided with: A calibration register, used to store the calibration coefficient sent by the baseboard management controller; A current register, used for storing the calculated current value on the sampling resistor; A power register is used to store the calculated power value of the sampling resistor.

7. The power consumption monitoring system according to claim 1, characterized in that: Also includes: The communication module is arranged between the parameter storage module and the processing module, and the parameter storage module performs data transmission with the processing module through the communication module.

8. The power consumption monitoring system according to claim 1, wherein: Also includes: A protection module, whose input end is connected to the power supply through the sampling resistor, and whose output end is connected to the module to be monitored; The protection module is used to output the supply voltage to the module to be monitored through its own output end when the voltage at its own input end reaches its own set enable threshold, and stop outputting the supply voltage to the module to be monitored through its own output end when the voltage at its own input end reaches its own set protection threshold.

9. The power consumption monitoring system according to claim 1, wherein: Calculating target parameters according to the resistance parameters includes: Calculate the minimum current resolution according to the maximum current value and the number of bits representing the current in the monitoring module, and search a preset corresponding relationship table according to the minimum current resolution to determine the interval where the minimum current resolution is located; Determining a current resolution corresponding to the interval according to the preset corresponding relationship table; wherein the current resolution is greater than the minimum current resolution, and a difference between the current resolution and the minimum current resolution is within a preset range; According to the current resolution and the resistance of the sampling resistor, the formula CAL=trunc(0.04096 / (Current_LSB×R SHUNT ) calculates the decimal calibration coefficient, where trunc is the truncation function, CAL is the decimal calibration coefficient, Current_LSB is the current resolution, R SHUNT is the resistance value of the sampling resistor; Converting the decimal calibration coefficient to a hexadecimal calibration coefficient; The power resolution is calculated according to the current resolution, wherein the power resolution is a preset multiple of the current resolution.

10. A server, characterized in that: It comprises a power supply and a module to be monitored, and also comprises a power consumption monitoring system as described in any one of claims 1 to 9, wherein the power consumption monitoring system is connected to the power supply and the module to be monitored respectively.