Modularized wide-range anti-overload electric energy meter
Through the multi-range collaborative measurement and prediction algorithm of the modular wide-range overload-resistant electricity meter, the range is dynamically selected, which solves the measurement bottleneck of the electricity meter when the current fluctuates with a wide amplitude, and realizes high-precision and low-energy current measurement.
Patent Information
- Application Number
- CN202510861703.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-12
AI Technical Summary
When existing electricity meters face wide-amplitude current fluctuations, fixed small-range electricity meters cause ADC clipping and sensor saturation due to over-range current, while fixed large-range electricity meters have low current measurement accuracy and long mechanical structure range switching response time, resulting in high power consumption, large heat loss, and increased failure risk.
A modular wide-range overload-resistant electricity meter is used to measure current collaboratively through multiple ranges. Combining digital measurement technology and prediction algorithms, the optimal and collaborative ranges are dynamically selected for current measurement. The range usage is adjusted using the activation probability to reduce energy consumption and fault risks.
It achieves accurate current measurement under wide-amplitude current fluctuations, reduces energy consumption and fault risks, and improves the measurement accuracy and reliability of the electricity meter.
Smart Images

Figure CN120629709A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital measurement of electric variables, and in particular to a modular wide-range overload-resistant electric energy meter. Background Art
[0002] Modern power grids (especially those with high penetration of new energy) are typically characterized by wide current fluctuations. Load currents can fluctuate instantaneously between 0.5A (light load) and 100A (overload). The measurement bottleneck for fixed-range energy meters is that over-range currents cause ADC clipping and sensor saturation (such as Hall effect sensors). Fixed-range energy meters also face a bottleneck in current measurement accuracy, especially for low currents.
[0003] While existing methods can change the range through mechanical structures, this approach has a long response time and is undesirable. When digital measurement technology is combined with multiple ranges in an energy meter, the meter consumes high power (e.g., over 3W) and generates significant heat loss. Furthermore, temperature changes caused by this heat loss during operation can affect the accuracy of circuits such as the ADC, operational amplifier, and clock, and even increase the risk of failure. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a modular wide-range overload-resistant electric energy meter.
[0005] The modular wide-range overload-resistant electric energy meter of the present invention adopts the following technical solutions: One embodiment of the present invention provides a modular wide-range overload-resistant electric energy meter. The electric energy meter uses several different ranges to collect current. The electric energy meter includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed: The predicted current at the next moment is predicted based on the current current sequence measured by the electric energy meter; several historical current sequences that are most similar to the current current sequence are obtained, and the prediction error when using the historical current sequence for prediction is used as the error current; the sum of the predicted current and the error current is used as the candidate measurement current; Recording the predicted current and any one of all candidate measurement currents as the target current, obtaining the adaptive range of the target current, where the adaptive range refers to the range with the smallest range size that does not exceed the range when acquiring the target current; among all the adaptive ranges of the target current, the adaptive range with the smallest range size is used as the collaborative range, and the adaptive range with the largest range size is used as the optimal range; and obtaining the activation probability of the collaborative range based on the distribution of all target currents within the range of the collaborative range; At the next moment, the optimal range is enabled, and the cooperative range is enabled with the activation probability to collect current, and the currents collected by the optimal range and the cooperative range are merged to obtain the current measured by the electric energy meter; For the difference between the current in the current sequence and the historical current sequence collected by the collaborative range, when the distribution difference of all the differences is greater than the preset threshold, the activation probability is amplified using the distribution difference, and the amplification size is positively correlated with the distribution difference. At the next moment, the collaborative range is enabled with the amplified activation probability.
[0006] Preferably, the specific steps for obtaining the difference between the current in the current sequence and the current in the historical current sequence collected by the collaborative measurement range are as follows: For any historical current sequence, traverse each current in the historical current sequence; determine whether the current is acquired using the cooperative range; if so, mark the current as a reference current; if not, mark it as a non-reference current; obtain the reference current or non-reference current in the current current sequence; For any reference current in the historical current sequence, denoted as f1, obtain the serial number k1 of the reference current f1, where k1 indicates that the k1th current in the historical current sequence is the reference current; obtain the k1th current in the current current sequence, and record the difference between the reference current f1 and the k1th current as the reference error current of the reference current f1; For any reference current in the current current sequence, denoted as f2, obtain the serial number k2 of the reference current f2, where k2 indicates that the k2th current in the current current sequence is the reference current; obtain the k2th current in the historical current sequence, and record the difference between the k1th current and the reference current f2 as the reference error current of the reference current f2; All reference currents in all historical current sequences and the current current sequence correspond to a reference error current as the difference.
[0007] Preferably, the specific steps of distributing all the differences are as follows: All the differences are linearly normalized, and all the normalized differences are mean-shift clustered to obtain several categories; each category represents a distribution; the mean of all the differences in each category is obtained, and recorded as the category center of each category; the category containing the most differences is obtained, and recorded as the target category; the difference between the category centers of all categories and the category center of the target category is obtained, and the standard deviation of all differences is recorded as the distribution difference.
[0008] Preferably, the activation probability is amplified by utilizing the distribution difference, and the amplification size is positively correlated with the distribution difference, including the specific formula as follows: Where Q represents the activation probability after amplification, Q0 represents the activation probability before amplification, represents the correction factor, Equal to the distribution difference.
[0009] Preferably, the currents collected by the optimal range and the coordinated range are fused to obtain the current measured by the electric energy meter, including the following specific formula: in, Indicates the current measured by the energy meter; Indicates the current collected in the optimal range; Indicates the current collected by the collaborative range; Indicates the optimal range size, Indicates the range size of the collaborative range.
[0010] Preferably, the step of obtaining several historical current sequences that are most similar to the current current sequence includes the following specific steps: From all currents collected by the ammeter in the historical time, a current sequence with the same length as the current current sequence is obtained, the DTW distance between the current sequence and the current current sequence is obtained, and several current sequences with the smallest DTW distance are recorded as historical current sequences.
[0011] Preferably, the prediction error when using the historical current sequence for prediction is used as the error current, and the specific steps include the following: A prediction algorithm is used to predict each historical current sequence to obtain the current at the next moment after the last moment in each historical current sequence, which is recorded as the predicted historical current. From all the currents collected by the ammeter under historical time, the current at the next moment after the last moment in each historical current sequence is read out and recorded as the actual collected current. The difference between the actual collected current and the predicted historical current is recorded as the error current.
[0012] Preferably, the acquisition of the adaptive range of the target current, wherein the adaptive range refers to a range that does not exceed the range and has the smallest range size when acquiring the target current, includes the following specific steps: Among all the range sizes, the range size with the smallest absolute value of the difference from the target current is obtained, which is recorded as I0; when I0 is greater than the target current, the range corresponding to I0 is recorded as the adaptive range; when I0 is less than or equal to the target current, the next range of the range corresponding to I0 is recorded as the adaptive range.
[0013] Preferably, obtaining the activation probability of the collaborative range according to the distribution of all target currents within the range of the collaborative range includes the following specific steps: The range size of the collaborative range is recorded as I2. Among the predicted current and all candidate measurement currents, all currents smaller than I2 are obtained and recorded as the first category currents. The first difference between I2 and the first category current is obtained, all the first differences are linearly normalized, and the standard deviation a1 of the first differences after linear normalization is obtained. The predicted current and all candidate measurement currents are linearly normalized and the standard deviation is obtained, recorded as a2. as the probability of enabling.
[0014] Preferably, the method for obtaining the next range is: record the range corresponding to I0 as the target range, and record the range that is larger than the target range and closest to the target range as the next range of the target range.
[0015] The beneficial effects of the technical solution of the present invention are: The present invention utilizes digital measurement technology to simultaneously acquire (or measure) current across multiple ranges, enabling relatively accurate current acquisition even when the current fluctuates widely. This invention avoids the problem of prolonged response time associated with range switching by eliminating the need for mechanical structures (or related circuitry) to dynamically change the range of a single range.
[0016] On this basis, the present invention predicts the current at the next moment (i.e., the predicted current) so that the current at the next moment is measured by relying on only two ranges at most (i.e., the optimal range and the collaborative range). At the same time, one of the ranges (the collaborative range) is enabled or disabled with a certain probability distribution (i.e., the activation probability) based on the predicted error situation, and the other range (the optimal range) is always enabled. Further, on the basis of ensuring accurate current measurement, the energy consumption of the measurement process is saved and the risk of failure is reduced.
[0017] Furthermore, the present invention uses the distribution difference to amplify the activation probability for the difference between the current in the current sequence and the historical current sequence collected by the collaborative range when the distribution difference of all the differences is greater than a preset threshold. The amplification size is positively correlated with the distribution difference, and the collaborative range is enabled at the next moment with the amplified activation probability. This process updates or corrects the activation probability by the distribution difference of all the differences, avoiding the following problem: since the collaborative range is enabled or disabled with a certain probability distribution based on the predicted error situation, this may cause the error situation of the historical current sequence when predicting to be different from the error situation when predicting the current current sequence, which in turn causes the sum of the predicted current and the error current to not be used as a candidate measurement current for the predicted current, ultimately leading to the problem that the calculation result of the activation probability is inappropriate.
[0018] On the other hand, by updating or correcting the activation probability, not only can the problem of energy waste caused by frequent use of collaborative range to collect current be avoided, but also the current measured by the electricity meter and the electric energy obtained can be made more accurate. At the same time, in the subsequent process (for example, the next moment after the next moment), it is conducive to more accurate analysis of the distribution differences of all the differences, thereby ensuring the accuracy of the activation probability obtained again in the subsequent process, thereby realizing dynamic positive feedback adjustment of the activation probability.
[0019] In summary, the present invention reduces energy consumption and fault risks while ensuring accuracy while coordinating multiple ranges and measuring current with wide fluctuations through digital measurement technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 paying any creative work.
[0021] Figure 1 A flowchart of the steps of a current measurement method for a modular wide-range overload-resistant electric energy meter provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0022] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of a modular, wide-range, overload-resistant electric energy meter proposed in accordance with the present invention. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0023] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0024] The specific solution of a modular wide-range overload-resistant electric energy meter proposed in the present invention includes: Example 1: As the existing core metering device in the power system, the electricity meter obtains the voltage and current of each phase input (for example, each phase of three-phase power) in real time, then uses a multiplier to calculate the instantaneous power based on the voltage and current, and obtains the electric energy by integrating the instantaneous power.
[0025] This embodiment, based on existing electric energy meters, further includes multiple ranges for measuring current, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a current measurement method for a modular wide-range, overload-resistant electric energy meter is implemented.
[0026] In this embodiment, current is collected (or measured) using different ranges, and electrical energy is further derived from the collected current. The ranges in this embodiment are: the first range is [0A, 5A] (range size is 5A), the second range is [0A, 30A] (range size is 30A), and the third range is [0A, 100A] (range size is 100A). The first range uses a 24-bit ADC with a high-gain PGA (e.g., ×16 gain); the second range uses a 16-bit ADC with pass-through mode; and the third range uses a 12-bit ADC with an ultra-low-resistance shunt (e.g., a 0.1mΩ shunt). In other embodiments, the above ranges may be added or deleted, or modified to other ranges; this is not specifically limited in this embodiment. The current in this embodiment refers to the effective current. In other embodiments, a bipolar ADC + polarity determinator can be used to acquire (or measure) negative current ranges, or a high-speed ADC + FFT processor can be used to acquire high-frequency current ranges. In this embodiment, an overvoltage clamp circuit (op amp + Zener diode limiter) is used to ensure that the maximum current of each range does not exceed the range size. In this embodiment, different ranges are enabled and disabled by disabling and enabling the sampling function of the ADC chip. When a range is enabled, the ADC can acquire current. When a range is disabled, the ADC in the range no longer acquires current, saving power.
[0027] It should be noted that, within the measuring range, the smaller the measuring range, the higher the accuracy of the collected current (or the smaller the measurement error).
[0028] A modular current measurement method for a wide-range, overload-resistant electric energy meter is used to obtain the current measured by the electric energy meter through a multi-range collaborative measurement method. This method is suitable for situations where the current has a large dynamic change range (for example, due to excessive current during overload), realizing wide-range measurement of the electric energy meter and making it resistant to overload.
[0029] Example 2: This embodiment provides a modular current measurement method for a wide-range overload-resistant electric energy meter, including: The current collected by each range is read in real time (for example, the current is collected every 0.5 seconds). It should be noted that due to different hardware (such as the ADC used) and range sizes between different ranges, different sampling errors may occur. Therefore, the current collected by all ranges may be different.
[0030] Record any range as the target range, record the current collected by the target range as I1, and obtain the range size Imax of the target range (the range size indicates the interval length of the range corresponding to the range, for example, the range size of the first range is 5A, and the range size of the second current is 30A); obtain the ratio m1 of I1 to Imax. When m1 is greater than 0.98, it means that the current collected by the target range may be out of range.
[0031] When m1 is greater than 0.98, the next range of the target range is obtained. The next range is a range that is larger than the target range and closest to the target range. For example, the next range of the first range is the second range, and the next range of the second range is the third range.
[0032] The current I2 collected by the next measurement range is obtained, and the ratio m2 of I2 to Imax is obtained. When m2 is greater than 1, it indicates that the current collected by the target measurement range is indeed out of range.
[0033] Thus, when m1 is greater than 0.98 and m2 is greater than 1, the next range is used as the preferred range of I1. When m1 is greater than 0.98 but m2 is not greater than 1; or when m1 is less than or equal to 0.98, the target range is used as the preferred range of I1.
[0034] The preferred range represents the range required for measuring the current I1, and the range will not exceed the range when used to measure the current I1.
[0035] At this point, the current obtained in each range corresponds to a preferred range.
[0036] Specifically, if the next range doesn't exist, the target range is selected as the preferred range for I1 and an alarm signal is issued (for example, a red indicator light flashes for 3 seconds or a buzzer sounds for 3 seconds) to indicate a current overload. If the alarm signal is issued three or more times within 5 seconds, the meter trips, disconnecting the power supply circuit to protect power transmission safety.
[0037] As an optional example: The optimal range is the smallest of all the preferred ranges. This optimal range has the smallest range, small measurement error, and high accuracy. The current collected by the optimal range is used as the current measured by the energy meter. The energy meter multiplies and integrates this current with the collected voltage to obtain the electric energy measured by the energy meter.
[0038] As a preferred example: The currents collected by all the preferred ranges are obtained, and the average value of these currents is used as the current measured by the electric energy meter.
[0039] This concludes the present embodiment.
[0040] In this embodiment, multiple ranges are enabled simultaneously to collect (or measure) current. The final current (i.e., the current measured by the energy meter) is derived from the currents collected by all ranges. Even when the current dynamic range of the power grid (or each phase of the power line) is large, the current (i.e., the current measured by the energy meter) can be obtained relatively accurately and used to calculate the electric energy measured by the energy meter.
[0041] Example 3: In the above-mentioned embodiment 2, since multiple ranges are required at all times to measure the current measured by the electric energy meter, this results in high energy consumption and failure rate when the electric energy meter measures current. For example, the energy consumption of the clock circuit and the ADC circuit increases, there is a risk of breakdown of the ADC and PGA, and the heat loss of the circuit increases. In addition, the temperature change caused by the heat loss during operation also interferes with the operating accuracy of the clock circuit and the ADC circuit, further increasing the error of the current collected in each range.
[0042] In order to solve the problems caused by measuring the current of the energy meter with multiple ranges (including power consumption, accuracy and failure issues), such as Figure 1 As shown, this embodiment provides a modular current measurement method for a wide-range anti-overload electric energy meter, including: Step S301: predicting the predicted current at the next moment based on the current sequence formed by the current collected by the electric energy meter in the latest preset time period.
[0043] The method in the second embodiment is used to obtain the current output by the electric energy meter at all times within the latest preset time period (eg, within the latest 30 minutes, including the current moment). The sequence formed by these currents is recorded as the current current sequence.
[0044] The current sequence is predicted using a prediction algorithm to obtain the current at the next moment after the current moment, which is recorded as the predicted current.
[0045] In this embodiment, every 0.5 seconds is a moment, and the electric energy meter outputs a current at each moment. That is, using the method of the second embodiment, the current measured by the electric energy meter is obtained every 0.5 seconds.
[0046] As an example, a prediction algorithm is used to predict the current sequence to obtain the current at the next moment, which is recorded as the predicted current. The methods include: The extended Kalman filter algorithm is used to predict the current at the next moment.
[0047] As another example, a prediction algorithm is used to predict the current sequence to obtain the current at the next moment, which is recorded as the predicted current. The methods include: Use LSTM neural network to predict the current at the next moment.
[0048] The method for obtaining the data set for training the LSTM neural network is: When the meter is operating, every 30 minutes, the sequence of current output at all times within that 30-minute period is taken as a sample, and the current at the moment immediately following the last moment in the sequence is used as the sample label. All samples and labels obtained during the meter's operation constitute a dataset.
[0049] Using this dataset, the LSTM neural network is trained using the mean square error loss function and the stochastic gradient descent algorithm. LSTM neural networks and their training methods are well known in the art and will not be described in detail in this embodiment.
[0050] Step S302: Acquire several historical current sequences that are most similar to the current sequence, use the prediction errors when using the historical current sequences for prediction as error currents, and use the sum of the predicted current and the error current as a candidate measurement current.
[0051] In this embodiment, the current measured by the electric energy meter at each moment in the history is stored and recorded as the historical current. In some embodiments, only the historical current within the most recent month is stored.
[0052] In the historical currents, several (for example, 10) historical current sequences (excluding the current current sequence) that are most similar to the current current sequence are obtained.
[0053] The historical current sequence and the current current sequence have the same or similar changing trends. This embodiment uses a prediction algorithm to predict each historical current sequence, obtaining the current at the moment immediately following the last moment in each historical current sequence, which is recorded as the predicted historical current (the specific details are similar to step S301). From the historical current, the current at the moment immediately following the last moment in each historical current sequence is read and recorded as the actual collected current. The difference between the actual collected current and the predicted historical current is recorded as the error current when predicting each historical current sequence, also recorded as the error current of the predicted current, representing the prediction error of the prediction algorithm when predicting similar currents.
[0054] For all historical current sequences, predictions are performed to obtain multiple error currents related to the predicted current. Specifically, if an error current is greater than 0.5 times the predicted current, it is discarded. The sum of the predicted current and each error current is used as a candidate measured current for the predicted current. Each candidate measured current represents the current that may actually be collected at the next moment.
[0055] As an example, several historical current sequences that are most similar to the current current sequence are obtained, including: In the historical current, obtain any current sequence with the same length as the current current sequence, obtain the DTW distance between the current sequence and the current current sequence, and record several (for example, 10) current sequences with the smallest DTW distance as the historical current sequence.
[0056] The smaller the DTW distance is, the more similar the change trend of the current sequence is to the current current sequence. The DTW distance is obtained by the DTW algorithm, which is not described in detail in this embodiment.
[0057] In particular, when the number of historical current sequences is less than 10, the current measured by the electric energy meter is obtained using the method of the second embodiment, and this embodiment is no longer executed.
[0058] In some other embodiments, current sequences (including the current current sequence) whose DTW distance to the current current sequence is less than a preset value (e.g., 0.3) can be classified as a category. When historical current sequences are subsequently acquired again, it is first determined whether there is a current sequence in any category whose DTW distance to the current current sequence is less than a preset value. If so, the category is marked as the target category. Prioritize obtaining several historical current sequences with the smallest DTW distance to the current current sequence from all target categories. If the number of historical current sequences is insufficient (e.g., less than 10), the historical current sequences (10) are supplemented from current sequences outside the target category. This process can reduce the amount of calculation.
[0059] Step S303: Select the optimal range and the coordinated range from all ranges.
[0060] The predicted current and any one of all candidate measurement currents of the predicted current are recorded as the target current, and the adaptive range of the target current is obtained. The adaptive range refers to the range that does not exceed the range and has the smallest range size when measuring the target current, indicating the most suitable range when measuring the target current.
[0061] Among all the adaptive ranges of the predicted currents and all the candidate measurement currents of the predicted currents, the adaptive range with the smallest range size is taken as the cooperative range, and the adaptive range with the largest range size is taken as the optimal range.
[0062] In this embodiment, when the optimal range is used to measure current at the next moment after the current moment, it can be guaranteed that the range will not be exceeded, but the measurement error of the optimal range cannot be guaranteed to be minimized. When the collaborative range is used to measure current at the next moment after the current moment, the measurement error is minimized as long as the current is within the range of the collaborative range. However, once the range of the collaborative range is exceeded, the accurate current cannot be obtained.
[0063] Based on this, this embodiment uses the optimal range and the coordinated range together to collect (or measure) the current at the next moment after the current moment. At the next moment, other ranges except the optimal range and the coordinated range are disabled.
[0064] As an example, the predicted current and any one of all candidate measurement currents of the predicted current are recorded as the target current, and the adaptive range of the target current is obtained, including the following methods: Get the range size of all ranges respectively.
[0065] Among all ranges, the range with the smallest absolute difference from the target current is selected and recorded as I0. When I0 is greater than the target current, the range corresponding to I0 is recorded as the adaptive range. When I0 is less than or equal to the target current, the range immediately following I0 is recorded as the adaptive range.
[0066] Step S304: According to the distribution of all target currents within the range of the collaborative range, the activation probability of the collaborative range is obtained, the optimal range is enabled, and the collaborative range is enabled with the activation probability to measure the current at the next moment. The currents measured by the optimal range and the collaborative range are merged to obtain the current measured by the electric energy meter and output electric energy.
[0067] The activation probability indicates whether the collaborative range should be enabled when measuring current at the next moment after the current. When the majority of the predicted current and candidate measurement currents can be measured using the collaborative range (that is, most currents do not exceed the collaborative range), the greater the activation probability, the more likely the collaborative range should be enabled.
[0068] As an example, the method to obtain the activation probability is: The range size I2 of the cooperative range is obtained, and among the predicted current and all candidate measurement currents, all currents smaller than I2 are obtained and recorded as first-category currents.
[0069] Obtain the first difference between I2 and the first type of current, perform linear normalization on all first differences, and obtain the standard deviation a1 of the first difference after linear normalization. Perform linear normalization on the predicted current and all candidate measured currents and obtain the standard deviation, which is recorded as a2. as the enable probability.
[0070] In particular, when the first-category currents are all equal, a1=0. When the predicted current and all candidate measured currents are equal, the enabling probability is directly set to 1.
[0071] After the enabling probability is obtained, at the next moment, the optimal range measurement current is enabled, and at the same time, the cooperative range measurement current is enabled with the enabling probability.
[0072] As an example, enabling cooperative range measurement of current with enabling probability includes the following methods: The processor randomly selects a value from 0 or 1 with probability p, where 0 is selected with probability 1-p and 1 is selected with probability p. p represents the activation probability. When the selected value is 1, collaborative range is enabled at the next moment; when the selected value is 0, collaborative range is disabled at the next moment.
[0073] Furthermore, obtaining the current measured by the electric energy meter according to the current measured by the optimal range and the current measured by the cooperative range specifically includes: (1) When the collaborative range is disabled, the current collected by the optimal range is used as the current measured by the energy meter; (2) When collaborative range is enabled: In a preferred example, the current Iout measured by the electric energy meter is: in Indicates the current collected in the optimal range; Indicates the current collected by the collaborative range. Indicates the optimal range size, Indicates the range size of the collaborative range.
[0074] The current Iout measured by the electric energy meter is obtained by weighted fusion of the current collected by the optimal range and the coordinated range, which ensures the accuracy of the current measured by the electric energy meter. The smaller the range size, the greater the weight, that is, more attention is paid to the current collected by the smaller range size.
[0075] In an optional example, the average of the current collected by the collaborative range and the current collected by the optimal range is used as the current measured by the electric energy meter.
[0076] In some other examples, the current collected by the collaborative range can be directly used as the current measured by the electricity meter.
[0077] After obtaining the current measured by the electric energy meter, the current is multiplied by the measured voltage to obtain the instantaneous power at the next moment, and the instantaneous power is integrated to obtain the electric energy at the next moment. Obtaining electric energy based on current and voltage is a well-known technology of existing electric energy meters and will not be described in detail in this embodiment.
[0078] This completes this step.
[0079] Repeat all the steps of this embodiment, and by predicting the current at the next moment (i.e., the predicted current), the current at the next moment is measured by relying on only two ranges (i.e., the optimal range and the collaborative range). At the same time, one of the ranges (the collaborative range) is enabled or disabled with a certain probability distribution (i.e., the activation probability) based on the predicted error situation. Further, on the basis of ensuring accurate current measurement, the power consumption of the measurement process is saved and the risk of failure is reduced.
[0080] This concludes the present embodiment.
[0081] Example 4: In Example 3, the collaborative range is enabled or disabled with a certain probability distribution based on the predicted error situation, where the predicted error situation is specifically described by the predicted current in Example 3 and its candidate measurement current, and the candidate measurement current represents the current that may actually be collected at the next moment.
[0082] When obtaining candidate measured currents, the error condition of the historical current sequence during prediction (i.e., the error current) is used as the error condition during prediction of the current current sequence (i.e., the sum of the predicted current and the error current is used as the candidate measured current for the predicted current). The prediction algorithm used during prediction is the same, but the currents in both the current and historical current sequences may be obtained using different measurement ranges. Different measurement ranges have different errors when collecting current, which results in different errors in the currents in the current and historical current sequences. Considering this situation, the error condition of the historical current sequence during prediction (i.e., the error current) may not be used as the error condition during prediction of the current current sequence. In other words, the sum of the predicted current and the error current cannot be used as a candidate measured current for the predicted current, and cannot reliably represent the possible current at the next moment, which in turn leads to inappropriate calculation results of the activation probability.
[0083] In summary, during the implementation of Example 3 (that is, when the current measured by the electric energy meter is obtained by continuously repeating all the steps of Example 3), there are errors in the results of obtaining the activation probability, which will result in the inability to ensure the accuracy of the current measured by the electric energy meter by reasonably enabling and disabling the collaborative range, while saving the energy consumption of the electric energy meter and reducing faults.
[0084] After obtaining the activation probability using the method in Example 3, this embodiment obtains the difference between the current in the current sequence and the current in the historical current sequence collected by the collaborative range, which is recorded as the reference error current. When the distribution difference of all reference error currents is greater than a preset threshold (for example, greater than 0.3), the activation probability is amplified using the distribution difference, and the amplification size is positively correlated with the distribution difference.
[0085] If the distribution difference of all reference error currents is less than or equal to a preset threshold, the enabling probability is no longer amplified (or the amplification size is 0).
[0086] After obtaining the amplified activation probability, the method in Example 3 is followed: at the next moment, the optimal range is enabled to measure the current, and at the same time, the collaborative range is enabled to measure the current with the amplified activation probability. Further, the current measured by the electric energy meter is obtained based on the current measured by the optimal range and the current measured by the collaborative range.
[0087] As an example, the difference between the current in the current sequence and the current in the historical current sequence collected by the collaborative range is obtained and recorded as the reference error current, which specifically includes: For any historical current sequence, we traverse each current in the historical current sequence and the obtained collaborative range; determine whether the current was acquired using the collaborative range. If so, we mark the current as the reference current; if not, we mark it as the non-reference current. Similarly, for the current sequence, we use the same method to mark the current as the reference current or the non-reference current.
[0088] For any reference current in the historical current sequence, denoted as f1, obtain the serial number k1 of the reference current, where k1 indicates that the k1th current in the historical current sequence is the reference current; obtain the k1th current in the current current sequence, and record the difference between the reference current f1 and the k1th current as the reference error current of the reference current f1.
[0089] For any reference current in the current current sequence, denoted as f2, obtain the serial number k2 of the reference current, where k2 indicates that the k2th current in the current current sequence is the reference current; obtain the k2th current in the historical current sequence, and the difference between the k1th current and the reference current f2 is recorded as the reference error current of the reference current f2.
[0090] At this point, each reference current in the historical current sequence and the current current sequence corresponds to a reference error current, which represents the error between the current sequence and the historical current sequence collected using the cooperative measurement range.
[0091] Obtain reference error currents of all reference currents in the current current sequence and all historical current sequences to form a reference error current set. Obtain all distributions of the reference error currents in the reference error current set, and record the distribution differences between all distributions as correction coefficients.
[0092] A larger correction coefficient indicates a more diverse distribution of errors between the historical current sequence and the current collected by the collaborative range. In other words, for the current collected by the collaborative range, the error distributions in the current and historical current sequences differ. This results in the error in the historical current sequence (i.e., the error current) being used during prediction not being sufficient for the current current sequence. In other words, the sum of the predicted current and the error current cannot be used as a candidate measurement current for the predicted current, leading to inappropriate calculation results for the activation probability. In this case, it is more necessary to increase the activation probability so that the collaborative range can be used to collect more accurate currents and reduce current errors. This not only makes the current measured by the energy meter and the resulting energy more accurate, but also facilitates obtaining more reference error currents (i.e., more reference error currents in the reference error current set) in subsequent processes (e.g., at the next moment). More reference error currents facilitate more accurate analysis of all distributions of the reference error currents in the reference error current set, thereby ensuring the accuracy of the correction coefficients obtained in subsequent processes. This achieves dynamic positive feedback regulation of the activation probability in this embodiment.
[0093] When the correction coefficient is smaller, it means that there is a single (uniform) distribution of errors between the historical current sequence and the current in the current sequence and the current collected by the collaborative range. In other words, for the current collected by the collaborative range, the error distribution of the current in the current current sequence and the historical current sequence is the same, resulting in the error situation of the historical current sequence when predicting (that is, the error current) can be used as the error situation when predicting the current current sequence, that is, the sum of the predicted current and the error current is used as the candidate measurement current for the predicted current, and can be used to represent the possible current at the next moment, which makes the calculation result of the activation probability more appropriate. At this time, there is no need to make excessive adjustments to the activation probability to avoid the problem of energy waste caused by frequent use of collaborative range to collect current.
[0094] This embodiment uses a correction coefficient to amplify the activation probability, and the amplification magnitude of the activation probability is positively correlated with the correction coefficient.
[0095] After obtaining the amplified activation probability, at the next moment, the optimal range is activated to measure current, and the cooperative range is activated to measure current at the same time. Then, the electric energy of the electric energy meter is obtained according to the solution in the third embodiment.
[0096] As an example, the method for obtaining all distribution conditions of the reference error current in the reference error current set includes: All reference error currents in the reference error current set are linearly normalized (in other embodiments, a softmax formula may also be used for normalization). Mean-shift clustering is then performed on all normalized reference error currents to obtain several categories. Each category represents a distribution of the reference error currents. In this embodiment, the radius of the sliding window used for mean-shift clustering is 0.1, and the minimum number of elements in each category (i.e., the number of reference error currents) is 2. Other values may be used in other embodiments and are not specifically limited in this embodiment. The mean-shift clustering algorithm is well known and will not be described in detail in this embodiment.
[0097] Specifically, if there is no category, each reference error current is considered as a category.
[0098] As an example, the distribution differences between all distribution cases are recorded as correction factors, including the following methods: Obtain the mean of all reference error currents in each class and record it as the class center of each class.
[0099] The class containing the most reference error current is obtained and recorded as the target class.
[0100] In particular, if there are multiple target categories (that is, there are multiple categories containing the same and maximum number of reference error currents), the median of the category centers of all target categories is obtained, and the target category corresponding to the median is used as the target category required subsequently, and the other target categories are no longer marked as target categories.
[0101] Obtain the difference between the class center of each class and the class center of the target class. For each class center, obtain the difference between the class center and the class center of the target class. The standard deviation of all the differences represents the distribution difference between all the distributions. This standard deviation is recorded as the correction factor.
[0102] As an example, the activation probability is amplified using a correction coefficient. The amplified activation probability is positively correlated with the correction coefficient, including the formula: Where Q represents the activation probability after amplification, Q0 represents the activation probability before amplification, Indicates the correction coefficient. In particular, when Q is greater than 1, let Q=1.
[0103] Embodiment 5: In this embodiment, the second embodiment and the third embodiment are combined, and the specific method is as follows: The method in the second embodiment is used to obtain the current measured by the electric energy meter in real time (and thus obtain electric energy). For example, the method in the second embodiment is used to obtain the current measured by the electric energy meter every 0.5 seconds.
[0104] At the same time, the method in the third embodiment is used to obtain the current measured by the electric energy meter in real time at regular intervals (for example, every 10 seconds) (and thus obtain electric energy).
[0105] This embodiment takes into account both the accuracy of the current measured by the electric energy meter and the energy consumption of the electric energy meter. In addition, it avoids the problem of excessive calculation caused by frequent implementation of the method in Example 3 (reducing the demand for computing resources).
[0106] This embodiment is applicable to scenarios where the accuracy of the current measured by the electric energy meter is high but the energy consumption of the electric energy meter is not a concern, and computing resources are limited (the processor has insufficient processing power).
[0107] Example 6: In this implementation, each range corresponds to a set of hardware. For example, the first range uses a 24-bit ADC + high-gain PGA. This embodiment treats the hardware for different ranges as a module, referred to as a range module. To expand or reduce the range, simply install or uninstall the range module, thus achieving modularity in the energy meter.
[0108] It should be noted that this embodiment is suitable for scenarios with a large current dynamic range (or time fluctuation range), such as measuring the power generation of a photovoltaic power station; or monitoring the power consumption of urban residential users (or factory users) over a large area.
[0109] In some other embodiments: considering that all the above embodiments are used to obtain the current measured by the electric energy meter, the same method can be used in this embodiment to obtain the voltage measured by the electric energy meter, which will not be described in detail in this embodiment.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A modular wide-range overload-resistant electric energy meter, which uses several different ranges to collect current, and includes a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that: When the processor executes the computer program, the following steps are implemented: The predicted current at the next moment is predicted based on the current current sequence measured by the electric energy meter; several historical current sequences that are most similar to the current current sequence are obtained, and the prediction error when using the historical current sequence for prediction is used as the error current; The sum of the predicted current and the error current is used as a candidate measurement current; Recording the predicted current and any one of all candidate measurement currents as the target current, obtaining the adaptive range of the target current, where the adaptive range refers to the range with the smallest range size that does not exceed the range when acquiring the target current; among all the adaptive ranges of the target current, the adaptive range with the smallest range size is used as the collaborative range, and the adaptive range with the largest range size is used as the optimal range; and obtaining the activation probability of the collaborative range based on the distribution of all target currents within the range of the collaborative range; At the next moment, the optimal range is enabled, and the cooperative range is enabled with the activation probability to collect current, and the currents collected by the optimal range and the cooperative range are merged to obtain the current measured by the electric energy meter; For the difference between the current in the current sequence and the historical current sequence collected by the collaborative range, when the distribution difference of all the differences is greater than the preset threshold, the activation probability is amplified using the distribution difference, and the amplification size is positively correlated with the distribution difference. At the next moment, the collaborative range is enabled with the amplified activation probability.
2. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The specific steps for obtaining the difference between the current in the current sequence and the current in the historical current sequence collected by the collaborative measurement range are as follows: For any historical current sequence, traverse each current in the historical current sequence; determine whether the current is acquired using the cooperative range; if so, mark the current as a reference current; if not, mark the current as a non-reference current; Obtain the reference current or non-reference current in the current sequence; For any reference current in the historical current sequence, denoted as f1, obtain the serial number k1 of the reference current f1, where k1 indicates that the k1th current in the historical current sequence is the reference current; Obtaining the k1th current in the current sequence, and recording the difference between the reference current f1 and the k1th current as a reference error current of the reference current f1; For any reference current in the current sequence, denoted as f2, obtain the serial number k2 of the reference current f2, where k2 indicates that the k2th current in the current sequence is the reference current; Obtaining the k2th current in the historical current sequence, where the difference between the k1th current and the reference current f2 is recorded as a reference error current of the reference current f2; All reference currents in all historical current sequences and the current current sequence correspond to a reference error current as the difference.
3. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The specific steps for the distribution differences of all the above differences are as follows: All the differences are linearly normalized, and all the normalized differences are mean-shift clustered to obtain several categories; each category represents a distribution; the mean of all the differences in each category is obtained, and recorded as the category center of each category; the category containing the most differences is obtained, and recorded as the target category; the difference between the category centers of all categories and the category center of the target category is obtained, and the standard deviation of all differences is recorded as the distribution difference.
4. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The activation probability is amplified by utilizing the distribution difference, and the amplification size is positively correlated with the distribution difference. The specific formula is as follows: Where Q represents the activation probability after amplification, Q0 represents the activation probability before amplification, represents a correction factor, which is equal to the distribution difference.
5. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The currents collected by the optimal range and the coordinated range are integrated to obtain the current measured by the electric energy meter, including the specific formula as follows: in, Indicates the current measured by the energy meter; Indicates the current collected in the optimal range; Indicates the current collected by the collaborative range; Indicates the optimal range size, Indicates the range size of the collaborative range.
6. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The specific steps of obtaining several historical current sequences that are most similar to the current current sequence are as follows: From all currents collected by the ammeter in the historical time, a current sequence with the same length as the current current sequence is obtained, the DTW distance between the current sequence and the current current sequence is obtained, and several current sequences with the smallest DTW distance are recorded as historical current sequences.
7. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The prediction error when using the historical current sequence for prediction is used as the error current, and the specific steps include the following: Use the prediction algorithm to predict each historical current sequence and obtain the current at the next moment after the last moment in each historical current sequence, which is recorded as the predicted historical current; from all the currents collected by the ammeter during the historical time, read the current at the next moment after the last moment in each historical current sequence, which is recorded as the actual collected current; The difference between the actual collected current and the predicted historical current is recorded as the error current.
8. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The adaptive range of the target current is obtained, where the adaptive range refers to a range that does not exceed the range and has the smallest range size when acquiring the target current. The specific steps include: Among all the ranges, the range with the smallest absolute value of the difference from the target current is obtained and recorded as I0; when I0 is greater than the target current, the range corresponding to I0 is recorded as the adaptive range; When I0 is less than or equal to the target current, the next range of the range corresponding to I0 is recorded as the adaptive range.
9. A modular wide-range overload-resistant electric energy meter according to claim 1, characterized in that: The specific steps of obtaining the activation probability of the collaborative range according to the distribution of all target currents within the range of the collaborative range are as follows: The range size of the collaborative range is recorded as I2. Among the predicted current and all candidate measurement currents, all currents smaller than I2 are obtained and recorded as the first category currents. The first difference between I2 and the first category current is obtained, all the first differences are linearly normalized, and the standard deviation a1 of the first differences after linear normalization is obtained. The predicted current and all candidate measurement currents are linearly normalized and the standard deviation is obtained, recorded as a2. as the enable probability.
10. A modular wide-range overload-resistant electric energy meter according to claim 8, characterized in that: The method for obtaining the next range is: record the range corresponding to I0 as the target range, and record the range that is larger than the target range and closest to the target range as the next range of the target range.