Multi-loop electric energy monitoring method, device, equipment and storage medium
The method and device for multi-circuit power monitoring address high costs and temperature-related inaccuracies by sequencing circuit switching and correcting power values, ensuring accurate power monitoring across a wide temperature range.
Patent Information
- Application Number
- CN202510550635.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-15
AI Technical Summary
The existing multi-loop electric energy monitoring solution is expensive, the mechanical relay response speed is slow, the solid-state relay single-channel cost is high and the temperature drift characteristics are obvious, and it cannot meet the high-frequency real-time monitoring needs in the wide temperature range of -40℃~85℃, and the electrical energy metering error is large.
By controlling the electronic switch time-dividing switching of multiple loops, combining the ambient temperature correction current calibration coefficient, the AES-128 encryption algorithm is used to store the calibration coefficient, the four-wire method is used to measure the on-resistance, calculate the instantaneous power and accumulated power, reduce hardware costs and improve metering accuracy.
Reduce the electrical energy metering error within a wide temperature range of -40℃~85℃, realize high-precision multi-loop electrical energy monitoring, reduce hardware costs and improve the reliability and accuracy of electrical energy monitoring.
Smart Images

Figure CN120314641A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power monitoring, and particularly to a multi-loop power monitoring method, device, equipment, and storage medium. Background Art
[0002] In the field of power monitoring, multi-loop power monitoring solutions need to balance cost, accuracy, and reliability. Traditional solutions usually independently configure dedicated metering chips for each loop, resulting in a linear increase in hardware cost with the number of loops, and the cost is high. The multi-way switching solution of mechanical relays is limited by the mechanical structure life and response speed, and cannot adapt to high-frequency real-time monitoring scenarios. After long-term operation, measurement errors are likely to be caused by the deterioration of contact performance. Although the solution introducing solid-state relays improves the switching efficiency, its single-loop cost is high and the temperature drift characteristic is obvious, and there are still deficiencies in multi-loop collaborative calibration and wide-temperature environment adaptability. Therefore, how to reduce the cost of multi-loop power monitoring solutions, support the implementation of the solutions in the wide temperature range of -40°C to 85°C, and at the same time reduce the power metering error of the solutions to meet the national standard (<0.5%, national standard GB / T17215 Class 1) is an urgent problem to be solved. Summary of the Invention
[0003] The purpose of the present invention is to overcome the defects existing in the prior art and provide a multi-loop power monitoring method, device, equipment, and storage medium that can reduce costs, can be implemented in the wide temperature range of -40°C to 85°C, and can reduce power metering errors.
[0004] To achieve the above purpose, the first aspect of the present invention provides a multi-loop power monitoring method, including: Controlling an electronic switch to switch to a target loop according to the loop switching sequence, a single-loop switching period, and the priority of each loop, and recording the time interval between the current switching to the target loop and the last switching to the target loop; Reading a first AD value measured by a metering chip for the target loop and the true effective value of the voltage, and obtaining the current ambient temperature value of the electronic switch; Calculating a correction value of the current calibration coefficient of the target loop at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at room temperature, the on-resistance temperature drift compensation coefficient, the current calibration coefficient at room temperature of the target loop, and the line impedance; Calculating the instantaneous power of the target loop during the current switching period according to the correction value of the current calibration coefficient, the first AD value, and the true effective value of the voltage; Calculating the accumulated electric energy of multiple loops that the electronic switch can switch in the total switching period according to the instantaneous power of each target loop in a single switching period and the time interval, where the total switching period is the period required for each loop to switch at least once.
[0005] Further, the calculation formula for the current calibration coefficient correction value of the target circuit at the current ambient temperature is as follows:
[0006] Wherein, represents the current calibration coefficient correction value of the target circuit at the current ambient temperature, T represents the current ambient temperature value, represents normal temperature, represents the current calibration coefficient of the target circuit at normal temperature, represents the on-resistance of the electronic switch at normal temperature, represents the on-resistance temperature drift compensation coefficient of the electronic switch, represents the line impedance of the target circuit.
[0007] Further, the calculation formula for the instantaneous power of the target circuit is as follows:
[0008] Wherein, represents the instantaneous power of the target circuit during the current switching cycle, n represents the channel code of the target circuit, which is used as a loop identifier, represents the true RMS value of the voltage, represents the first AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, represents the current calibration coefficient correction value of the target circuit at the current ambient temperature, represents the power factor.
[0009] Further, before the control electronic switch is switched to the target circuit, the method further includes: Performing a calibration process on each loop that the electronic switch can switch to in advance, and calculating the current calibration coefficient of each loop at normal temperature; The calibration process includes: For each loop, after controlling the electronic switch to switch to the loop to be calibrated and turn on, connect to the standard power supply; Read the second AD value of the metering chip in the loop to be calibrated when the standard power supply supplies power to the loop to be calibrated; Calculate the current calibration coefficient of the loop to be calibrated at normal temperature according to the on-resistance of the electronic switch at normal temperature, the line impedance of the loop to be calibrated, the second AD value, and the output current value of the standard power supply; The calculation formula for the current calibration coefficient of the loop to be calibrated at normal temperature is as follows:
[0010] Among them, represents the current calibration coefficient of the loop to be calibrated at room temperature, represents the output current value of the standard power supply, represents the second AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, represents the on-resistance of the electronic switch at room temperature, represents the line impedance of the loop to be calibrated.
[0011] Furthermore, before the control electronic switch switches to the target loop, the method further includes: Using the AES - 128 encryption algorithm to encrypt and store the current calibration coefficient of each loop at room temperature, and changing the encryption storage key daily; Measuring the line impedance of each loop, and measuring the on-resistance of the electronic switch at room temperature by the four-wire method; Saving the on-resistance of the electronic switch at room temperature, the on-resistance temperature drift compensation coefficient, and the line impedance of each loop.
[0012] Furthermore, the controlling the electronic switch to switch to the target loop according to the loop switching sequence, the single-loop switching period, and the priority of each loop includes: Obtaining the loop switching sequence, the single-loop switching period, and the preset priority of each loop. Among them, the loop switching sequence is to switch sequentially according to the channel code of each loop, and the preset priority of each loop is the same; Determining the target loop and its channel code according to the loop switching sequence, and sending the channel code to the electronic switch after a single-loop switching period when switching to the previous loop, so that the electronic switch switches to the target loop according to the channel code; When it is monitored that the current of the target loop is higher than the preset current threshold, changing the priority of the target loop to the highest priority until the current of the target loop is not higher than the preset current threshold; When there is a loop with the highest priority, every time a loop is switched according to the loop switching sequence, the loop with the highest priority will be switched once.
[0013] Furthermore, the method further includes: When the ambient temperature value is greater than the preset temperature threshold, extending the duration of the single-loop switching period.
[0014] A second aspect of the present invention provides a multi-loop power monitoring device, including: A control module, which is used to control an electronic switch to switch to a target loop according to a loop switching sequence, a single-loop switching period, and the priority of each loop, and record the time interval between this switch to the target loop and the last switch to the target loop; A communication module, which is used to read the first AD value and the true effective value of voltage measured by a metering chip for the target loop and obtain the current ambient temperature value of the electronic switch; A current calibration coefficient correction module, which is used to calculate the current calibration coefficient correction value of the target loop at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at normal temperature, the on-resistance temperature drift compensation coefficient, the current calibration coefficient of the target loop at normal temperature, and the line impedance; An instantaneous power calculation module, which is used to calculate the instantaneous power of the target loop during the current switching period according to the current calibration coefficient correction value, the first AD value, and the true effective value of voltage; An accumulated electric energy calculation module, which is used to calculate the accumulated electric energy of multiple loops that the electronic switch can switch in the total switching period according to the instantaneous power of each target loop in a single switching period and the time interval, and the total switching period is the period required for each loop to switch at least once.
[0015] Further, the calculation formula for the current calibration coefficient correction value of the target loop at the current ambient temperature is as follows:
[0016] Wherein, represents the current calibration coefficient correction value of the target loop at the current ambient temperature, T represents the current ambient temperature value, represents normal temperature, represents the current calibration coefficient of the target loop at normal temperature, represents the on-resistance of the electronic switch at normal temperature, represents the on-resistance temperature drift compensation coefficient of the electronic switch, represents the line impedance of the target loop.
[0017] Further, the calculation formula for the instantaneous power of the target loop is as follows:
[0018] Wherein, represents the instantaneous power of the target loop during the current switching period, n represents the channel code of the target loop, which is used as a loop identifier, represents the true effective value of voltage, represents the first AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, Indicates the correction value of the current calibration coefficient of the target circuit at the current ambient temperature. Indicates the power factor.
[0019] Furthermore, the multi-circuit power monitoring device further includes a calibration module for pre-executing a calibration process for each circuit that can be switched by the electronic switch, and calculating the current calibration coefficient of each circuit at normal temperature; the calibration process includes: for each circuit, after controlling the electronic switch to switch to the circuit to be calibrated and turn on, connect to a standard power supply; read the second AD value of the metering chip in the circuit to be calibrated when the standard power supply supplies power to the circuit to be calibrated; calculate the current calibration coefficient of the circuit to be calibrated at normal temperature according to the on-resistance of the electronic switch at normal temperature, the line impedance of the circuit to be calibrated, the second AD value, and the output current value of the standard power supply. The calculation formula for the current calibration coefficient of the circuit to be calibrated at normal temperature is as follows:
[0020] Wherein, Indicates the current calibration coefficient of the circuit to be calibrated at normal temperature. Indicates the output current value of the standard power supply. Indicates the second AD value. Indicates the conversion coefficient between the AD value of the metering chip and the measured current. Indicates the on-resistance of the electronic switch at normal temperature. Indicates the line impedance of the circuit to be calibrated.
[0021] Furthermore, the multi-circuit power monitoring device further includes a storage module for encrypting and storing the current calibration coefficient of each circuit at normal temperature using the AES-128 encryption algorithm, and replacing the encryption storage key daily. The calibration module is also used to measure the line impedance of each circuit and measure the on-resistance of the electronic switch at normal temperature by the four-wire method. The storage module is also used to save the on-resistance of the electronic switch at normal temperature and the on-resistance temperature drift compensation coefficient and the line impedance of each circuit.
[0022] Further, when the control module controls the electronic switch to switch to the target loop according to the loop switching sequence, the single-loop switching period, and the priority of each loop, it is specifically configured to: obtain the loop switching sequence, the single-loop switching period, and the preset priority of each loop, where the loop switching sequence is to switch in turn according to the channel codes of each loop, and the preset priority of each loop is the same; determine the target loop and its channel code according to the loop switching sequence, and send the channel code to the electronic switch after a single-loop switching period when switching to the previous loop, so that the electronic switch switches to the target loop according to the channel code; when it is monitored that the current of the target loop is higher than the preset current threshold, change the priority of the target loop to the highest priority until the current of the target loop is not higher than the preset current threshold; when there is a loop with the highest priority, each time a loop is switched according to the loop switching sequence, the loop with the highest priority will be switched once.
[0023] Further, the control module is further configured to extend the duration of the single-loop switching period when the environmental temperature value is greater than the preset temperature threshold.
[0024] A third aspect of the present invention provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of the first aspects is implemented.
[0025] A fourth aspect of the present invention provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed, the method according to any one of the first aspects is implemented.
[0026] The advantages and beneficial effects of the present invention are as follows: By controlling the electronic switch to switch multiple loops in a time-sharing manner for power measurement, the cost of multi-loop power monitoring can be reduced. When performing power measurement, the current calibration coefficient is corrected in combination with the current environmental temperature. The current measurement value converted from the AD value of the measurement chip is corrected by the corrected current calibration coefficient, so that the current measurement value is closer to the true value, thereby making the calculated instantaneous power of the loop closer to the true value, and further reducing the power measurement error, enabling the present invention to be implemented in a wide temperature range of -40°C to 85°C and reducing the power measurement error. Description of the Drawings
[0027] Figure 1 is a flowchart of the multi-loop power monitoring method of the present invention; Figure 2 is a calibration flowchart for calculating the current calibration coefficient for each loop of the present invention; Figure 3 is a schematic structural diagram of the multi-loop power monitoring device of the present invention; Figure 4 is a schematic structural diagram of the electronic device of the present invention.
[0028] In the figure: 300, multi-loop power monitoring device; 301, control module; 302, communication module; 303, current calibration coefficient correction module; 304, instantaneous power calculation module; 305, cumulative power calculation module; 306, calibration module; 307, storage module; 400, electronic device; 401, memory; 402, processor; 403, communication interface. Specific implementation manner
[0029] The following combines the accompanying drawings and embodiments to further describe the specific implementation manner of the present invention. The following embodiments are only used to more clearly illustrate the technical solution of the present invention and cannot be used to limit the protection scope of the present invention.
[0030] According to Figures 1 to 3 As shown, the multi-loop power monitoring method of the present invention includes: S101. Control the electronic switch to switch to the target loop according to the loop switching sequence, single-loop switching period, and the priority of each loop, and record the time interval between this switch to the target loop and the previous switch to the target loop.
[0031] S102. Read the first AD value measured by the metering chip for the target loop and the true effective value of the voltage, and obtain the current ambient temperature value of the electronic switch.
[0032] S103. Calculate the current calibration coefficient correction value of the target loop at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at normal temperature, the on-resistance temperature drift compensation coefficient, the current calibration coefficient at normal temperature of the target loop, and the line impedance.
[0033] S104. Calculate the instantaneous power of the target loop during this switching period according to the current calibration coefficient correction value, the first AD value, and the true effective value of the voltage.
[0034] S105. Calculate the cumulative power of the multiple loops that the electronic switch can switch within the total switching period according to the instantaneous power of each target loop within a single switching period and the time interval. The total switching period is the period required for each loop to switch at least once.
[0035] Exemplarily, the multi-loop power monitoring method of the present invention can be executed by the main control unit MCU of the multi-loop power monitoring system. The MCU controls the electronic switch to switch each loop in a time-sharing manner, and switches to the target loop with an extremely short switching period (such as 1 μs or 1 ms). When switching to the target loop, the metering chip measures the voltage (true RMS value of the voltage) and current (converted from the first AD value) of the target loop. The MCU reads the voltage value and current value measured by the metering chip for the target loop to calculate the instantaneous power of the target loop within the current switching period. Since the power fluctuation of the loop is usually small in a short time, the electric energy of the target loop during this period is calculated by multiplying the instantaneous power by the time interval between two consecutive switches of the target loop. After all loops are measured once to complete the total switching period, the electric energies calculated for all loops in the total switching period are accumulated, and the accumulated electric energy of multiple loops that can be switched by the electronic switch within the total switching period can be obtained.
[0036] For example, there are a total of 36 loops. Two metering chips are built into the multi-loop power monitoring instrument. Each metering chip can measure the power signals of 3 loops simultaneously, and only 6 signals can be measured at the same time. The MCU of the multi-loop power monitoring instrument uses an electronic switch to switch and measure these 6 signals in a time-sharing manner. At the beginning, it measures loops 1-6, then switches to loops 7-12, then to loops 13-18, and so on. In this way, the multi-loop power monitoring instrument can monitor the electric energy of 36 loops. In this case, there is no need to set a separate metering chip for each loop, which greatly reduces the cost of power monitoring. And as long as the switching speed of the loop is fast enough, that is, the switching period of each loop is short enough, the accuracy of power monitoring can be ensured at the same time.
[0037] The AD value (AD Raw Value) of the metering chip refers to the original digital quantity output by the metering chip after sampling the analog signal through the analog-to-digital converter (ADC). Current is an analog physical quantity. In modern electronic systems, in order to facilitate signal processing, storage, and transmission, analog signals usually need to be converted into digital signals. The analog-to-digital converter (ADC) inside the metering chip can convert the input analog current signal into a digital quantity, that is, the AD value. The metering chip usually only collects voltage signals. Therefore, whether it is the measurement of current or voltage, essentially it is the sampling and processing of voltage signals. The AD value measured by the metering chip can be mapped to the current measurement value through a conversion coefficient. Therefore, there are usually some deviations between the current measurement value and the actual current value. This deviation is mainly affected by the actual path impedance of the current measurement. Therefore, it is necessary to convert the current measurement value through the current calibration coefficient to make the current measurement value closer to the real current value. The definition of the current calibration coefficient K is the ratio between the real current value and the current measurement value, that is / 。
[0038] When the electronic switch is switched to the target loop, the on-resistance of the electronic switch and the line impedance of the target loop form the actual path impedance for measuring the target loop current, and the change in its resistance value directly affects the current measurement result of the metering chip. The on-resistance of the electronic switch is affected by temperature. Therefore, when determining the current calibration coefficient for measuring the target loop current, it is necessary to consider the on-resistance of the electronic switch and the influence of the ambient temperature, so as to obtain a more accurate current calibration coefficient. The present invention measures the current calibration coefficient at room temperature when the electronic switch is switched to each loop through a pre-calibration process for each loop , during actual power monitoring, the current calibration coefficient at room temperature of the target loop is corrected by combining the current ambient temperature and the temperature drift compensation coefficient of the on-resistance of the electronic switch , and the corrected value of the current calibration coefficient of the target loop at the current ambient temperature is calculated .
[0039] By using the corrected value of the current calibration coefficient to perform conversion calculation on the current measurement value of the target loop measured by the metering chip , the current measurement value can be made more accurate, and a current true value close to the actual current value of the target loop can be obtained . Then, according to the current measurement value and the current true value and the true root mean square value of the voltage of the target loop , the instantaneous power of the target loop during the current switching period is calculated .
[0040] After the MCU controls the electronic switch to switch to each loop for a measurement, the instantaneous power of all loops during their switching periods is obtained. When the priorities of each loop are the same, the MCU will switch each loop in turn according to the loop switching order, that is, each loop is only switched once within the total switching period. For example, all loops that the electronic switch can switch to are 1, 2, 3, 4, 5, 6. When the priorities of each loop are the same, the MCU controls the electronic switch to switch the loops in the order of 1, 2, 3, 4, 5, 6. It can be understood that in this case, the time interval between the previous and next switching periods of each loop is the duration of the total switching period. The calculation formula for accumulating electric energy in this case can be simplified as:
[0041] Among them, represents the accumulated electric energy of multiple loops that the electronic switch can switch to within the total switching period, is the instantaneous power of each loop during its switching period, is the duration of the total switching period
[0042] Since it is possible that the switching priorities of each circuit are different, when the circuit with the highest switching priority appears currently, each time a circuit with a normal priority is switched according to the circuit switching sequence, it is necessary to switch the circuit with the highest switching priority once afterwards. For example, all the circuits that the electronic switch can switch are 1, 2, 3, 4, 5, and 6. If circuit 1 has the highest priority, the actual sequence of the MCU controlling the electronic switch to perform circuit switching according to the circuit switching sequence and circuit switching priority is 1, 2, 1, 3, 1, 4, 1, 5, 1, 6. At this time, the circuit with the highest switching priority is switched more frequently. In this case, the cumulative power formula within the total switching period of multiple circuits is as follows:
[0043] N represents the number of multiple circuits, represents the instantaneous power of the target circuit within one switching period of it, The time interval between the current switching to the target circuit and the previous switching to the target circuit, that is, the time interval between two consecutive switchings of a single circuit. It is affected by the circuit switching priority.
[0044] The present invention can reduce the cost of multi-circuit power monitoring by controlling the electronic switch to switch multiple circuits time-sharing for power metering. When performing power metering, the current calibration coefficient is corrected in combination with the current ambient temperature. The current measurement value converted from the AD value of the metering chip is corrected by the corrected current calibration coefficient, which can make the current measurement value closer to the true value, so that the calculated instantaneous power of the circuit is closer to the true value, thereby reducing the power metering error, enabling the present invention to be implemented in a wide temperature range of -40°C to 85°C and reducing the power metering error.
[0045] In order to improve the accuracy of the current calibration coefficient and thus improve the accuracy of power monitoring, a further preferred embodiment of the present invention is that before controlling the electronic switch to switch to the target circuit, a calibration process is performed on each circuit that the electronic switch can switch, and the current calibration coefficient of each circuit at normal temperature is calculated.
[0046] As Figure 2 shown, the calibration process includes: S201. For each circuit, after controlling the electronic switch to switch to the circuit to be calibrated and turn it on, connect to the standard power supply.
[0047] S202. Read the second AD value of the metering chip in the circuit to be calibrated when the standard power supply supplies power to the circuit to be calibrated.
[0048] S203. Calculate the current calibration coefficient of the circuit to be calibrated at room temperature based on the on-resistance of the electronic switch at room temperature, the line impedance of the circuit to be calibrated, the second AD value, and the output current value of the standard power supply.
[0049] For example, when a standard power supply of (220V / 10A) is connected, the true value of the current in the circuit to be calibrated is the output current value of the standard power supply, which is 10A. is the measured current value of the circuit when the standard power supply is connected. is the current calibration coefficient when not considering the on-resistance of the electronic switch and the line impedance of the circuit. Due to the influence of the actual path impedance of the current measurement in the actual application process on the measured current value, the calculation formula for the current calibration coefficient of the circuit to be calibrated at room temperature is as follows:
[0050] Among them, represents the current calibration coefficient of the circuit to be calibrated at room temperature. represents the output current value of the standard power supply. represents the second AD value. represents the conversion coefficient between the AD value of the metering chip and the measured current. represents the on-resistance of the electronic switch at room temperature. represents the line impedance of the circuit to be calibrated.
[0051] In order to accurately calculate the current calibration coefficient at different ambient temperatures and improve the accuracy of power monitoring, a further preferred embodiment of the present invention is that the calculation formula for the correction value of the current calibration coefficient of the target circuit at the current ambient temperature is as follows:
[0052] Among them, represents the correction value of the current calibration coefficient of the target circuit at the current ambient temperature, T represents the current ambient temperature value. represents room temperature. represents the current calibration coefficient of the target circuit at room temperature. represents the on-resistance of the electronic switch at room temperature. represents the temperature drift compensation coefficient of the on-resistance of the electronic switch. represents the line impedance of the target circuit.
[0053] The on-resistance of the electronic switch at room temperature is used as the reference for the metering chip to measure the current value of the circuit. When the ambient temperature changes, the actual on-resistance of the electronic switch is , which will affect the current calibration coefficient of the circuit at room temperature for the measurement circuit of the circuit Therefore, it is necessary to introduce the temperature drift compensation coefficient of the on - resistance of the electronic switch to calculate the current calibration coefficient. The formula for the current calibration coefficient with the temperature drift compensation coefficient of the on - resistance is as follows:
[0054] From the above formula, we can get:
[0055] Furthermore, we can get:
[0056] In order to improve the accuracy of power monitoring by using the current calibration coefficient at different ambient temperatures, the formula for calculating the instantaneous power of the target circuit is as follows:
[0057] Among them, represents the instantaneous power of the target circuit during the current switching cycle, n represents the channel code of the target circuit, which is used as the circuit identifier, represents the true effective value of voltage, represents the first AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, represents the correction value of the current calibration coefficient of the target circuit at the current ambient temperature, and PF represents the power factor.
[0058] We can obtain the current measurement value of the target circuit , We can obtain the true value of the current of the target circuit . The power factor PF is default set to 1.0.
[0059] In order to increase the data security and reliability of the current calibration coefficient and improve the accuracy of the on - resistance of the electronic switch, a further preferred implementation of the present invention is that before the control electronic switch is switched to the target circuit, the method further includes: encrypting and storing the current calibration coefficient of each circuit at normal temperature by using the AES - 128 encryption algorithm, and changing the encryption storage key daily; measuring the line impedance of each circuit, and measuring the on - resistance of the electronic switch at normal temperature by using the four - wire method; saving the on - resistance of the electronic switch at normal temperature, the temperature drift compensation coefficient of the on - resistance, and the line impedance of each circuit.
[0060] To improve the monitoring accuracy of abnormally high - energy - consuming circuits, a further preferred embodiment of the present invention is that, according to the circuit switching sequence, the single - circuit switching period, and the priority of each circuit, the electronic switch is controlled to switch to the target circuit, including: obtaining the circuit switching sequence, the single - circuit switching period, and the preset priority of each circuit, where the circuit switching sequence is to switch in turn according to the channel codes of each circuit, and the preset priority of each circuit is the same; determining the target circuit and its channel code according to the circuit switching sequence, and sending the channel code to the electronic switch after a single - circuit switching period has elapsed since switching to the previous circuit, so that the electronic switch switches to the target circuit according to the channel code; when it is detected that the current of the target circuit is higher than the preset current threshold, changing the priority of the target circuit to the highest priority until the current of the target circuit is not higher than the preset current threshold; when there is a circuit with the highest priority, each time a circuit is switched according to the circuit switching sequence, the circuit with the highest priority will be switched once.
[0061] For example, all the circuits that the electronic switch can switch to are 1, 2, 3, 4, 5, 6, and the circuit switching sequence is to switch to circuits 1, 2, 3, 4, 5, 6 in turn. When switching to circuit 1, the MCU reads that the current value measured by the metering chip for circuit 1 is higher than the preset current threshold (such as 20 A). The MCU changes the priority of circuit 1 to the highest priority. Each time the MCU controls the electronic switch to switch a circuit according to the circuit switching sequence 1, 2, 3, 4, 5, 6, it will control the electronic switch to switch circuit 1 once. At this time, the actual circuit switching sequence is 1, 2, 1, 3, 1, 4, 1, 5, 1, 6. By monitoring through high - frequency switching of high - energy - consuming circuits, the monitoring accuracy and response speed of abnormal states are improved, and metering errors or safety risks caused by monitoring delays are avoided.
[0062] To reduce the safety risks in high - temperature environments and ensure the stable operation of the multi - circuit power monitoring device under high - temperature and complex working conditions, a further preferred embodiment of the present invention is that the method further includes: when the ambient temperature value is greater than the preset temperature threshold, extending the duration of the single - circuit switching period.
[0063] For example, when the ambient temperature > 70 °C, the frequency - reduction mode is started, and the single - circuit switching period is extended from the original 10 ms to 20 ms.
[0064] According to Figure 3 As shown, the present invention provides a multi - circuit power monitoring device 300, including: A control module 301, configured to control the electronic switch to switch to the target circuit according to the circuit switching sequence, the single - circuit switching period, and the priority of each circuit, and record the time interval between the current switch to the target circuit and the previous switch to the target circuit; The communication module 302 is configured to read the first AD value and the true effective voltage value measured by the metering chip for the target loop, and obtain the current ambient temperature value of the electronic switch; The current calibration coefficient correction module 303 is configured to calculate the current calibration coefficient correction value of the target loop at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at room temperature, the on-resistance temperature drift compensation coefficient, the current calibration coefficient of the target loop at room temperature, and the line impedance; The instantaneous power calculation module 304 is configured to calculate the instantaneous power of the target loop during the current switching period according to the current calibration coefficient correction value, the first AD value, and the true effective voltage value; The cumulative electric energy calculation module 305 is configured to calculate the cumulative electric energy of multiple loops that the electronic switch can switch during the total switching period according to the instantaneous power of each target loop during a single switching period and the time interval. The total switching period is the period required for each loop to switch at least once.
[0065] Further, the calculation formula for the current calibration coefficient correction value of the target loop at the current ambient temperature is as follows:
[0066] Wherein, represents the current calibration coefficient correction value of the target loop at the current ambient temperature, T represents the current ambient temperature value, represents room temperature, represents the current calibration coefficient of the target loop at room temperature, represents the on-resistance of the electronic switch at room temperature, represents the on-resistance temperature drift compensation coefficient of the electronic switch, represents the line impedance of the target loop.
[0067] Further, the calculation formula for the instantaneous power of the target loop is as follows:
[0068] Wherein, represents the instantaneous power of the target loop during the current switching period, n represents the channel code of the target loop, which is used as the loop identifier, represents the true effective voltage value, represents the first AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, represents the current calibration coefficient correction value of the target loop at the current ambient temperature, represents the power factor.
[0069] Furthermore, the multi-circuit power monitoring device 300 also includes a calibration module 306, which is used to perform a calibration process on each circuit that can be switched by the electronic switch in advance, and calculate the current calibration coefficient of each circuit at room temperature; the calibration process includes: for each circuit, controlling the electronic switch to switch to the circuit to be calibrated to be turned on, and then connecting to the standard power supply; reading the second AD value of the metering chip in the circuit to be calibrated when the standard power supply supplies power to the circuit to be calibrated; calculating the current calibration coefficient of the circuit to be calibrated at room temperature according to the on-resistance of the electronic switch at room temperature, the line impedance of the circuit to be calibrated, the second AD value and the output current value of the standard power supply; The calculation formula of the current calibration coefficient of the circuit to be calibrated at room temperature is as follows:
[0070] in, Indicates the current calibration coefficient of the circuit to be calibrated at room temperature. Indicates the output current value of the standard power supply. Indicates the second AD value, Indicates the conversion coefficient between the AD value of the metering chip and the measured current. It represents the on-resistance of the electronic switch at room temperature. Indicates the line impedance of the loop to be calibrated.
[0071] Furthermore, the multi-circuit power monitoring device 300 also includes a storage module 307, which is used to encrypt and store the current calibration coefficient of each circuit at room temperature using the AES-128 encryption algorithm, and replace the encrypted storage key daily; the calibration module 306 is also used to measure the line impedance of each circuit, and measure the on-resistance of the electronic switch at room temperature by a four-wire method; the storage module 307 is also used to save the on-resistance of the electronic switch at room temperature and the on-resistance temperature drift compensation coefficient and the line impedance of each circuit.
[0072] Furthermore, when the control module 301 controls the electronic switch to switch to the target circuit according to the circuit switching sequence, the single circuit switching cycle and the priority of each circuit, it is specifically used to: obtain the circuit switching sequence, the single circuit switching cycle and the preset priority of each circuit, wherein the circuit switching sequence is to switch in sequence according to the channel code of each circuit, and the preset priority of each circuit is the same; determine the target circuit and its channel code according to the circuit switching sequence, and send the channel code to the electronic switch after switching to the previous circuit for a single circuit switching cycle, so that the electronic switch switches to the target circuit according to the channel code; when it is monitored that the current of the target circuit is higher than the preset current threshold, change the priority of the target circuit to the highest priority until the current of the target circuit is no higher than the preset current threshold; when there is a circuit with the highest priority, each time the circuit is switched according to the circuit switching sequence, the circuit with the highest priority will be switched once.
[0073] Further, the control module 301 is further configured to extend the duration of a single loop switching period when the ambient temperature value is greater than a preset temperature threshold.
[0074] Figure 3 The multi-loop power monitoring device shown can be used to implement the technical solutions of the above method embodiments. The implementation principles and technical effects are similar and will not be elaborated here.
[0075] Figure 4 The electronic device shown can execute the processing flow provided by the multi-loop power monitoring method embodiment. The electronic device 400 includes: a memory 401, a processor 402, a computer program, and a communication interface 403. Among them, the computer program is stored in the memory 401 and is configured to be executed by the processor 402 to perform the multi-loop power monitoring method as described above. In a specific embodiment, the memory 401 may be a non-volatile solid-state memory. In a specific embodiment, the memory 401 includes a read-only memory ROM (Read-Only Memory).
[0076] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the multi-loop power monitoring method described in the above embodiments. Among them, the storage medium may be a non-volatile / non-temporary computer-readable storage medium.
[0077] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principles of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A multi-loop power monitoring method, characterized in that, include: Control the electronic switch to switch to the target circuit according to the circuit switching sequence, the single circuit switching cycle and the priority of each circuit, and record the time interval between the current switching to the target circuit and the last switching to the target circuit; Reading the first AD value and the voltage true effective value obtained by the metering chip measuring the target circuit and obtaining the current ambient temperature value of the electronic switch; Calculate a current calibration coefficient correction value of the target circuit at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at room temperature and the on-resistance temperature drift compensation coefficient, and the current calibration coefficient and line impedance of the target circuit at room temperature; Calculating the instantaneous power of the target circuit in this switching cycle according to the current calibration coefficient correction value, the first AD value and the voltage true effective value; The accumulated electric energy of the multiple circuits switchable by the electronic switch in the total switching cycle is calculated according to the instantaneous power of each target circuit in a single switching cycle and the time interval. The total switching cycle is the cycle required for each circuit to be switched at least once.
2. The multi-loop power monitoring method according to claim 1, characterized in that, The calculation formula of the current calibration coefficient correction value of the target circuit at the current ambient temperature is as follows:
3. Among them, represents the correction value of the current calibration coefficient of the target circuit at the current ambient temperature, T represents the current ambient temperature value, represents normal temperature, represents the current calibration coefficient of the target circuit at normal temperature, represents the on-resistance of the electronic switch at normal temperature, represents the temperature drift compensation coefficient of the on-resistance of the electronic switch, represents the line impedance of the target circuit.
4. The multi-loop power monitoring method according to claim 1, wherein The calculation formula of the instantaneous power of the target circuit is as follows:
5. Among them, represents the instantaneous power of the target circuit during the current switching cycle, and n represents the channel code of the target circuit, which is used as the circuit identifier. represents the true RMS value of the voltage. represents the first AD value. represents the conversion coefficient between the AD value of the metering chip and the measured current. represents the correction value of the current calibration coefficient of the target circuit at the current ambient temperature. represents the power factor.
6. The multi-loop power monitoring method according to claim 1, characterized in that, Before controlling the electronic switch to switch to the target circuit, the method further includes: Performing a calibration process on each circuit switchable by the electronic switch in advance, and calculating a current calibration coefficient of each circuit at normal temperature; The calibration process includes: For each circuit, the electronic switch is controlled to switch to the circuit to be calibrated to be turned on, and then connected to the standard power supply; Reading a second AD value of a metering chip in the circuit to be calibrated when the standard power supply supplies power to the circuit to be calibrated; Calculating a current calibration coefficient of the circuit to be calibrated at room temperature according to the on-resistance of the electronic switch at room temperature, the line impedance of the circuit to be calibrated, the second AD value, and the output current value of the standard power supply; The calculation formula of the current calibration coefficient of the circuit to be calibrated at room temperature is as follows:
7. Among them, represents the current calibration coefficient of the loop to be calibrated at room temperature, represents the output current value of the standard power supply, represents the second AD value, represents the conversion coefficient between the AD value of the metering chip and the measured current, represents the on-resistance of the electronic switch at room temperature, represents the line impedance of the loop to be calibrated.
8. The multi-loop power monitoring method according to claim 4, characterized in that Before controlling the electronic switch to switch to the target circuit, the method further includes: The current calibration coefficient of each circuit at room temperature is encrypted and stored using the AES-128 encryption algorithm, and the encryption key is changed daily; Measuring the impedance of each loop line, and measuring the on-resistance of the electronic switch at room temperature by a four-wire method; The on-resistance of the electronic switch at room temperature, the on-resistance temperature drift compensation coefficient, and the impedance of each loop line are stored.
9. The multi-loop power monitoring method according to claim 1, characterized in that The method of controlling the electronic switch to switch to the target circuit according to the circuit switching sequence, the single circuit switching cycle and the priority of each circuit includes: Obtain the loop switching sequence, the switching cycle of a single loop, and the preset priority of each loop, wherein the loop switching sequence is to switch in sequence according to the channel code of each loop, and the preset priority of each loop is the same; Determine the target loop and its channel code according to the loop switching sequence, and send the channel code to the electronic switch after a single loop switching period when switching to the previous loop, so that the electronic switch switches to the target loop according to the channel code; When it is monitored that the current of the target loop is higher than the preset current threshold, change the priority of the target loop to the highest priority until the current of the target loop is not higher than the preset current threshold; When there is a loop with the highest priority, each time a loop is switched according to the loop switching sequence, the loop with the highest priority will be switched once.
10. The multi-loop power monitoring method according to claim 6, wherein The method further includes: When the ambient temperature value is greater than the preset temperature threshold, extend the duration of the single loop switching period.
11. A multi-loop power monitoring device, characterized in that, It includes: A control module, configured to control the electronic switch to switch to the target loop according to the loop switching sequence, the single loop switching period, and the priority of each loop, and record the time interval between the current switch to the target loop and the previous switch to the target loop; A communication module, configured to read the first AD value and the true effective value of the voltage measured by the metering chip for the target loop and obtain the current ambient temperature value of the electronic switch; A current calibration coefficient correction module, configured to calculate the current calibration coefficient correction value of the target loop at the current ambient temperature according to the ambient temperature value, the on-resistance of the electronic switch at room temperature and the on-resistance temperature drift compensation coefficient, and the current calibration coefficient and line impedance of the target loop at room temperature; An instantaneous power calculation module, configured to calculate the instantaneous power of the target loop during the current switching period according to the current calibration coefficient correction value, the first AD value, and the true effective value of the voltage; An accumulated electric energy calculation module, configured to calculate the accumulated electric energy of multiple loops that can be switched by the electronic switch during the total switching period according to the instantaneous power of each target loop during a single switching period and the time interval, where the total switching period is the period required for each loop to be switched at least once.
12. An electronic device, characterized in that, It includes a memory and a processor, wherein, a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in any one of claims 1-7 is implemented.
13. A computer-readable storage medium, characterized in that, Program instructions are stored thereon, and when the program instructions are executed, the method described in any one of claims 1-7 is implemented.