Current detection method, device and electronic equipment

By using sinc3 filters with different decimation rates to filter the ΣΔ ADC output code stream, the output spikes affected by high noise codes are corrected, which solves the problem of low measurement accuracy in the existing technology and significantly improves the accuracy of current detection.

CN118501536BActive Publication Date: 2024-09-13NANJING JUNHAI DIGITAL ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410973384.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-09-13
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

In the existing technology, there are high noise codes in the code stream output by the ΣΔ ADC, which affects the output of the subsequent sinc3 filter, resulting in low measurement accuracy.

Method used

Two sinc3 filters with different decimation rates are used, and the output value of the filter with a low decimation rate is used to correct the output peak of the filter with a high decimation rate that is affected by the high noise code, and the input current detection within the target time period is determined. value.

Benefits of technology

It improves the measurement accuracy and reduces the impact of high noise codes on the measurement results. Especially in the long-term measurement process, the measurement accuracy is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118501536B
    Figure CN118501536B
Patent Text Reader

Abstract

The present invention discloses a current detection method, device and electronic device. The method comprises: obtaining an output code stream generated by a ΣΔ type ADC for an input current; filtering the output code stream by a first sinc3 filter and a second sinc3 filter respectively in a target time period to obtain a first filtering result and a second filtering result; determining the detection value of the input current in the target time period according to the first filtering result and the second filtering result. The present invention uses two sinc3 filters with different decimation rates, and corrects the output peak of the sinc3 filter with a high decimation rate that is affected by a high noise code according to the output value of the sinc3 filter with a low decimation rate, thereby improving the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electronic technology, and in particular relates to a current detection method, device and electronic equipment. Background Art

[0002] The ΣΔ ADC (Analog to Digital Converter) converts the analog signal into an oversampled high-speed 1-bit bit stream in the time domain and shapes the quantization noise to a high frequency in the frequency domain, so that low-sampled high-precision measurement data can be obtained through the subsequent sinc3 filter. Since there are high-noise codes in the bit stream output by the ΣΔ ADC, the high-noise codes will affect the output of the subsequent sinc3 filter and affect the measurement accuracy. Summary of the invention

[0003] An object of the present invention is to provide a current detection method, device and electronic equipment, which can solve the technical problem of low measurement accuracy in the prior art.

[0004] According to a first aspect of the present invention, there is provided a current detection method, comprising:

[0005] Obtain the output code stream generated by the ΣΔ ADC for the input current;

[0006] The output code stream is filtered by a first sinc3 filter and a second sinc3 filter respectively within a target time period to obtain a first filtering result and a second filtering result;

[0007] The decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, the first filtering result includes X detection values ​​output by the first sinc3 filter, the second filtering result includes Y detection values ​​output by the second sinc3 filter, and X is less than Y;

[0008] A detection value of the input current within the target time period is determined according to the first filtering result and the second filtering result.

[0009] Optionally, determining the detection value of the input current according to the first filtering result and the second filtering result includes:

[0010] Determining whether the second filtering result meets a preset condition;

[0011] When the second filtering result meets a preset condition, determining the detection value of the input current according to the first filtering result;

[0012] When the second filtering result does not meet a preset condition, the detection value of the input current is determined according to the second filtering result.

[0013] Optionally, determining whether the second filtering result meets a preset condition includes:

[0014] Calculate the average value of Y detection values ​​in the second filtering result;

[0015] Calculating a maximum deviation of the second filtering result according to the average value, wherein the maximum deviation is a maximum value of deviations between the Y detection values ​​output by the second sinc3 filter and the average value;

[0016] If the maximum deviation of the second filtering result does not exceed a preset limit value, determining that the second filtering result meets the preset condition;

[0017] If the maximum deviation of the second filtering result exceeds the preset limit value, it is determined that the second filtering result does not meet the preset condition.

[0018] Optionally, when the second filtering result does not meet a preset condition, determining the detection value of the input current according to the second filtering result includes:

[0019] Determine a target detection value among the Y detection values ​​output by the second sinc3 filter, wherein the target detection value is the detection value with the largest deviation;

[0020] Determine the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value in the Y detection values ​​and the preset weights corresponding to the detection values ​​at each position;

[0021] The detection value of the input current is determined according to the weights respectively corresponding to the Y detection values.

[0022] Optionally, determining the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value in the Y detection values ​​and a preset weight corresponding to each detection value includes:

[0023] When the target detection value is the first detection value among the Y detection values, the weight of the first detection value and the weight of the second detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

[0024] Optionally, determining the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value in the Y detection values ​​and a preset weight corresponding to each detection value includes:

[0025] When the target detection value is the Yth detection value among the Y detection values, the weights of the Y-1th detection value and the Yth detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

[0026] Optionally, determining the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value in the Y detection values ​​and a preset weight corresponding to each detection value includes:

[0027] When the target detection value is the Nth detection value among the Y detection values, the weight of the N-1th detection value, the weight of the Nth detection value, and the weight of the N+1th detection value among the Y detection values ​​are all set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights, where N is not equal to 1 and N is not equal to Y.

[0028] Optionally, a decimation rate of the first sinc3 filter is four times a decimation rate of the second sinc3 filter.

[0029] According to a second aspect of the present invention, there is provided a current detection device, comprising:

[0030] ΣΔ type ADC, used to generate an output code stream corresponding to the input current;

[0031] A first sinc3 filter, used to filter the output code stream within a target time period to obtain a first filtering result, wherein the first filtering result includes X detection values ​​output by the first sinc3 filter;

[0032] A second sinc3 filter, used for filtering the output code stream within a target time period to obtain a second filtering result, wherein the second filtering result includes Y detection values ​​output by the second sinc3 filter;

[0033] wherein the decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, and X is less than Y;

[0034] A calculation module is used to determine the detection value of the input current within the target time period according to the first filtering result and the second filtering result.

[0035] According to a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the current detection method as described in the first aspect of the present invention are implemented.

[0036] The beneficial effect of the present invention is that the present invention uses two sinc3 filters with different decimation rates to correct the output peak of the sinc3 filter with a high decimation rate that is affected by the high noise code according to the output value of the sinc3 filter with a low decimation rate, thereby improving the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Schematic diagram of the output value of the sinc3 filter with an M value of 256 in an embodiment of the present invention.

[0038] Figure 2 It is a partial enlarged diagram of the output value of the sinc3 filter with an M value of 256 in an embodiment of the present invention.

[0039] Figure 3 is a flow chart of a current detection method in an embodiment of the present invention.

[0040] Figure 4 Schematic diagram of the output value of the sinc3 filter with an M value of 64 in an embodiment of the present invention.

[0041] Figure 5 It is a partial enlarged diagram of the output value of the sinc3 filter with an M value of 64 in an embodiment of the present invention.

[0042] Figure 6 Schematic diagram of output correction value in an embodiment of the present invention.

[0043] Figure 7 It is a partial enlarged view of the output correction value in the embodiment of the present invention. DETAILED DESCRIPTION

[0044] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0045] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0046] The techniques, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods and devices should be considered as part of the specification. In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0047] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0048] In the specification and claims of the present invention, if the term "first" or "second" is involved, it may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the related objects are in an "or" relationship.

[0049] ΣΔ ADC converts analog signals into oversampled high-speed 1-bit code streams in the time domain and shapes quantization noise to high frequency in the frequency domain, so that high-precision measurement data with low sampling rate can be obtained through subsequent sinc filters. For example, the NSI1306M25 chip is a second-order ΣΔ ADC with a linear input range of ±250mV and a full-scale voltage V clipping =320mV, the low level 0 in the output 1bit code stream represents -320mV, and the high level 1 represents +320mV. Ideally, the duty cycle k of the output code stream is proportional to the input voltage V in ,in,

[0050] ;

[0051] ;

[0052] When the input voltage V in =0V, the output code stream duty cycle k=50%, the input voltage V in = ±250mV, the output duty cycle is k = 89.06% and k = 10.94% respectively. If the sampling frequency f s =20MHz, when using a sinc3 filter with a decimation rate of M=256, the output frequency f OSR =f s / M=78.125kHz, which can achieve 16bit resolution. When used for current measurement, a current sensor is required. For example, if a 300A current is converted into a 250mV voltage, the full-scale current I corresponding to the full-scale voltage of 320mV is clipping =384A, the duty cycle k of the output code stream and the input current I in for:

[0053] ;

[0054] ;

[0055] The output of the sinc3 filter with M=256 is the weighted average of 3M-2=766 code streams. For example, when the input current is 10A, the output duty cycle k=51.302%. In theory, there should be 392.974 high levels in the 766 code streams output by the sinc3 filter, but in reality, only 392, 393 or 394 high levels can be output. Although sinc3 can filter and output most of the 392-394 high-level ΣΔ code streams to 10A (deviation is less than 10mA). However, due to the randomness of noise, there is a certain probability that high noise codes will appear in the ΣΔ output code stream, resulting in spikes in the output of the sinc3 filter, and the deviation ΔI from the input current of 10A is:

[0056] ;

[0057] Although the probability of high noise code appearing in the ΣΔ output code stream is very low, such as Figure 1 As shown, when the sampling frequency f s =20MHz, 200,000 ΣΔ code streams are output in 10ms, the sinc3 filter output contains 18 peaks, and the probability of high noise code appearing is less than one in ten thousand. Figure 2 As shown, in the time period of 0.6-0.9ms, the sinc3 filter output contains 2 spikes. However, in the long-term measurement process, the high noise code filter output spike will cause the measurement accuracy to decrease by 0.5A / 10mA=50 times. In order to improve the measurement accuracy in the long-term measurement process, the technical solution of this application is specially proposed.

[0058] like Figure 3 As shown, this embodiment provides a current detection method, including steps 1100-1300.

[0059] Step 1100 obtains the output code stream generated by the ΣΔ ADC for the input current.

[0060] Step 1200: filtering the output code stream by a first sinc3 filter and a second sinc3 filter respectively within a target time period to obtain a first filtering result and a second filtering result; wherein the decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, the first filtering result includes X detection values ​​output by the first sinc3 filter, and the second filtering result includes Y detection values ​​output by the second sinc3 filter, where X is less than Y.

[0061] Step 1300: Determine a detection value of the input current within the target time period according to the first filtering result and the second filtering result.

[0062] In this embodiment, two sinc3 filters with different M values ​​are used, and the M value of the sinc3 filter is the decimation rate. Since the M values ​​of the two sinc3 filters are different, the two sinc3 filters output different numbers of values ​​in the same time.

[0063] For example, when the sampling frequency is fs=20MHz, for the sinc3 filter with M=256, one high noise code in the ΣΔ output code stream only affects the sinc3 filter output in the time period of 3M / fs=38.4μs. If a sinc3 filter with M=64 is used, 10 stable values ​​can be output within 38.4μs, and the high noise code only affects 3 output values ​​in the time period of 3M / fs=9.6μs. There are at least 10-3=7 output values ​​that are not affected by the high noise code within 38.4μs. Therefore, the 10 output values ​​of the sinc3 filter with M=64 can be used to identify whether the ΣΔ output code stream contains high noise codes within the 38.4μs measurement time, and the sinc3 filter output spike can be corrected to improve the measurement accuracy.

[0064] In this embodiment, the decimation rate of the first sinc3 filter is four times the decimation rate of the second sinc3 filter. For example, the decimation rate of the first sinc3 filter is 256, and the decimation rate of the second sinc3 filter is 64.

[0065] The present invention uses two sinc3 filters with different decimation rates and corrects the output peak of the sinc3 filter with high decimation rate that is affected by high noise code according to the output value of the sinc3 filter with low decimation rate, thereby improving the measurement accuracy.

[0066] In this embodiment, step 1300 includes steps 1310 - 1330 .

[0067] Step 1310: Determine whether the second filtering result meets a preset condition.

[0068] Step 1320: When the second filtering result meets a preset condition, determine the detection value of the input current according to the first filtering result.

[0069] Step 1330: When the second filtering result does not meet a preset condition, determine the detection value of the input current according to the second filtering result.

[0070] Since the output code stream of the ΣΔ ADC may or may not contain high noise codes in the target time period, it is necessary to first determine whether the output code stream of the ΣΔ ADC contains high noise codes.

[0071] The preset condition is a judgment condition for judging whether the output code stream of the ΣΔ type ADC contains a high noise code. If the second filtering result meets the preset condition, it means that the output code stream of the ΣΔ type ADC does not contain a high noise code. If the second filtering result does not meet the preset condition, it means that the output code stream of the ΣΔ type ADC contains a high noise code.

[0072] When the output code stream of the ΣΔ ADC does not contain a high noise code, it means that the X detection values ​​in the first filtering result are accurate and are not affected by the high noise code. Since the higher the decimation rate of the sinc3 filter, the more accurate the result output by the sinc3 filter, when the output code stream of the ΣΔ ADC does not contain a high noise code, the first filtering result can be directly used to determine the detection value of the input current.

[0073] In the case where the output code stream of the ΣΔ type ADC contains a high noise code, the high noise code will affect the output result of the sinc3 filter. For two sinc3 filters with different M values, the number of output values ​​affected by each high noise code is the same. In this case, since the number X of detection values ​​output by the first sinc3 filter is less than the number Y of detection values ​​output by the second sinc3 filter, the proportion of detection values ​​affected by the high noise code in the X detection values ​​output by the first sinc3 filter is higher than the proportion of detection values ​​affected by the high noise code in the Y detection values ​​output by the second sinc3 filter. At this time, the second filtering result can be used to determine the detection value of the input current. When calculating the detection value of the input current, multiple output values ​​of the sinc3 filter are weighted and calculated, and the result of the weighted calculation is the detection value of the input current. Since the proportion of detection values ​​affected by the high noise code in the Y detection values ​​output by the second sinc3 filter is lower, the accuracy of the detection value of the input current calculated by the second filtering result is higher.

[0074] In this embodiment, step 1310 includes steps 1311-1314.

[0075] Step 1311: Calculate the average value of the Y detection values ​​in the second filtering result.

[0076] Step 1312: Calculate the maximum deviation of the second filtering result based on the average value, wherein the maximum deviation is the maximum value of the deviations between the Y detection values ​​output by the second sinc3 filter and the average value.

[0077] There is a certain deviation between the detection value output by the second sinc3 filter and the theoretical current value of the input current. Among them, the deviation between most of the detection values ​​output by the second sinc3 filter and the theoretical current value of the input current is very small. However, due to the influence of the high noise code output by the ΣΔ type ADC, the deviation between the detection value output by the sinc3 filter and the theoretical current value of the input current increases.

[0078] like Figure 4 As shown in the figure, for an input current of 10A, the detection values ​​output by the sinc3 filter are mostly around 10A, with very small deviations. For example, within 0.9ms, Figure 5 As shown in the figure, the deviation between most of the detection values ​​output by the sinc3 filter and the theoretical current value of the input current of 10A is less than 0.1A. However, at 0.64ms, the output value is 11.9A, which is 1.9A away from the theoretical current value of the input current of 10A, which is a large deviation. At 0.83ms, the output value is 8.2A, which is 1.8A away from the theoretical current value of the input current of 10A, which is a large deviation.

[0079] Since the test system does not know the theoretical current value of the input current, the average value of the Y detection values ​​in the second filtering result is used when calculating the maximum deviation of the second filtering result. After calculating the deviation between each output value in the second filtering result and the average value, the maximum deviation of the second filtering result can be obtained. For example, the second filtering result includes 10 output values, which are 10.05A, 10.06A, 10.04A, 10.03A, 11.15A, 10.05A, 10.08A, 10.02A, 10.06A, and 10.03A. The average value of the 10 output values ​​is 10.157A, and the deviations between each output value and the average value 10.157A are 0.107A, 0.097A, 0.117A, 0.127A, 0.993A, 0.107A, 0.077A, 0.137A, 0.097A, and 0.127A, respectively. Then the maximum deviation is 0.993A.

[0080] Step 1313: If the maximum deviation of the second filtering result does not exceed a preset limit value, determine that the second filtering result meets the preset condition.

[0081] Step 1314: If the maximum deviation of the second filtering result exceeds the preset limit value, determine that the second filtering result does not meet the preset condition.

[0082] The preset limit value can be set according to the normal output quantization noise peak value I of the second sinc3 filter. pp Determine, among which,

[0083] ;

[0084] The preset limit value can be set to the noise peak value I pp Half of I pp / 2.

[0085] For example, at full-scale voltage V clipping When it is 320mV, the corresponding full-scale current I clipping is 384A. If the M value of the sinc3 filter is 64, then the noise peak I pp The current is 324.8 mA, and the corresponding preset limit value is 162.4 mA.

[0086] After calculating the maximum deviation of the second filtering result, it is determined whether the second filtering result meets the preset condition according to the magnitude relationship between the maximum deviation and the preset limit value.

[0087] In this embodiment, step 1330 includes steps 1331-1333.

[0088] Step 1331: Determine a target detection value among the Y detection values ​​output by the second sinc3 filter, wherein the target detection value is the detection value with the largest deviation.

[0089] The deviations between the Y detection values ​​output by the second sinc3 filter and the average value can be calculated first, and then the detection value with the largest deviation can be determined as the target detection value. For example, the second sinc3 filter outputs 10 detection values, and the deviations are 0.05A, 0.06A, 0.04A, 0.03A, 1.15A, 0.05A, 0.08A, 0.02A, 0.06A, and 0.03A, respectively, then the target detection value is the fifth detection value.

[0090] Step 1332: Determine the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value among the Y detection values ​​and the preset weights corresponding to the detection value at each position.

[0091] Since the deviation of the target detection value is large, it means that the target detection value is affected by the high noise code. Therefore, when calculating the detection value of the input current, the target detection value needs to be eliminated. Since the detection value of the input current is obtained by weighted calculation based on multiple detection values ​​output by the sinc3 filter, after obtaining the target detection value, the weight of the target detection value is set to 0, and the target detection value is not used when calculating the detection value of the input current, which can improve the accuracy.

[0092] Step 1333: Determine the detection value of the input current according to the weights corresponding to the Y detection values.

[0093] When the target detection value is the first detection value among the Y detection values, the weight of the first detection value and the weight of the second detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

[0094] For example, the second sinc3 filter outputs 10 detection values, and the preset weights are 1, 3, 6, 10, 12, 12, 10, 6, 3, and 1. After the first detection value is detected as the target detection value, the weight is adjusted, and the weight of the first detection value and the weight of the second detection value are set to 0, and the other weights remain unchanged. The adjusted weights are 0, 0, 6, 10, 12, 12, 10, 6, 3, and 1. The detection value I of the input current can be expressed as:

[0095] ;

[0096] Among them, I j Represents the jth detection value output by the second sinc3 filter.

[0097] When the target detection value is the Yth detection value among the Y detection values, the weights of the Y-1th detection value and the Yth detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

[0098] For example, the second sinc3 filter outputs 10 detection values, and the preset weights are 1, 3, 6, 10, 12, 12, 10, 6, 3, and 1. When the 10th detection value is detected as the target detection value, the weight is adjusted, and the weight of the 9th detection value and the weight of the 10th detection value are set to 0, and the other weights remain unchanged. The adjusted weights are 1, 3, 6, 10, 12, 12, 10, 6, 0, 0. The detection value I of the input current can be expressed as:

[0099] ;

[0100] When the target detection value is the Nth detection value among the Y detection values, the weight of the N-1th detection value, the weight of the Nth detection value, and the weight of the N+1th detection value among the Y detection values ​​are all set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights, where N is not equal to 1 and N is not equal to Y.

[0101] For example, the second sinc3 filter outputs 10 detection values, and the preset weights are 1, 3, 6, 10, 12, 12, 10, 6, 3, and 1. When the fifth detection value is detected as the target detection value, the weights are adjusted, and the weights of the fourth detection value, the fifth detection value, and the sixth detection value are set to 0, and the remaining weights remain unchanged. The adjusted weights are 1, 3, 6, 0, 0, 0, 10, 6, 3, and 1. The detection value I of the input current can be expressed as:

[0102] ;

[0103] In one example, the M value of the first sinc3 filter is 256, the M value of the second sinc3 filter is 64, and the sampling frequency f s is 20MHz. Figure 1 and Figure 2 As shown in the figure, when the input current is 10A, the measurement error of the sinc3 filter with an M value of 256 is less than 10mA when no high noise code is included. In the case of high noise, the measurement error of the sinc3 filter with an M value of 256 may reach 500mA. However, 7-8 output values ​​of the sinc3 filter with an M value of 64 are not affected by the high noise code. In this case, the weighted average value is used as the detection value of the input current, and the error ΔI is:

[0104] ;

[0105] By using two sinc3 filters with different M values, when there is no high noise code influence, the output value of the sinc3 filter with an M value of 256 is used, and the measurement error is less than 10mA. When the ΣΔ output code stream contains high noise code, the weighted average value of the sinc3 filter output with an M value of 64 is used, and the measurement error is also less than 23mA; thus, the measurement error affected by the ΣΔ high noise code can be reduced from 500mA to 23mA, and the measurement accuracy is improved by more than twenty times.

[0106] The present invention uses two sinc3 filters with different M values ​​to filter the output code stream of the ΣΔ type ADC at the same time, and determines whether there is a high noise code in the output code stream of the ΣΔ type ADC according to the output value of the sinc3 filter with a low M value. If not, the output of the sinc3 filter with a high M value is directly used to calculate the detection value of the input current. If it exists, the output value affected by the high noise code is eliminated from the output value of the sinc3 filter with a low M value, and a weighted calculation is performed based on the remaining output values ​​not affected by the high noise code to obtain the detection value of the input current, and the error is much smaller than the peak error of the output of the sinc3 filter with a high M value, thereby improving the accuracy of the measurement result.

[0107] This embodiment introduces a current detection device, including:

[0108] ΣΔ type ADC, used to generate an output code stream corresponding to the input current;

[0109] A first sinc3 filter, used to filter the output code stream within a target time period to obtain a first filtering result, wherein the first filtering result includes X detection values ​​output by the first sinc3 filter;

[0110] A second sinc3 filter, used for filtering the output code stream within a target time period to obtain a second filtering result, wherein the second filtering result includes Y detection values ​​output by the second sinc3 filter;

[0111] wherein the decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, and X is less than Y;

[0112] A calculation module is used to determine the detection value of the input current within the target time period according to the first filtering result and the second filtering result.

[0113] This embodiment introduces an electronic device, including a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the current detection method described in any embodiment of the present invention are implemented.

[0114] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

[0115] Those of ordinary skill in the art will appreciate that the modules and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

[0118] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0119] In addition, each functional module in the embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0120] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the energy-saving signal sending / receiving method of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0121] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.

[0122] It should be understood that the size of the sequence number of each step in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. For the purpose of example and description, the foregoing description of the implementation of the present disclosure has been given. The foregoing description is not exhaustive and is not intended to limit the present disclosure to the exact form disclosed. Various deformations and modifications may exist according to the above teachings, or various deformations and modifications may be obtained from the practice of the present disclosure. These embodiments are selected and described to illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can use the present disclosure in various embodiments and various modifications suitable for the specific purpose conceived.

Claims

1. A current detection method, It is characterized in that include: Obtain the output code stream generated by the ΣΔ ADC for the input current; The output code stream is filtered by a first sinc3 filter and a second sinc3 filter respectively within a target time period to obtain a first filtering result and a second filtering result; The decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, the first filtering result includes X detection values ​​output by the first sinc3 filter, the second filtering result includes Y detection values ​​output by the second sinc3 filter, and X is less than Y; Determining a detection value of the input current within the target time period according to the first filtering result and the second filtering result; The determining the detection value of the input current within the target time period according to the first filtering result and the second filtering result includes: Determining whether the second filtering result meets a preset condition; When the second filtering result meets a preset condition, determining the detection value of the input current according to the first filtering result; When the second filtering result does not meet a preset condition, determining a detection value of the input current according to the second filtering result; The determining whether the second filtering result meets a preset condition includes: Calculate the average value of Y detection values ​​in the second filtering result; Calculating a maximum deviation of the second filtering result according to the average value, wherein the maximum deviation is a maximum value of deviations between the Y detection values ​​output by the second sinc3 filter and the average value; If the maximum deviation of the second filtering result does not exceed a preset limit value, determining that the second filtering result meets the preset condition; If the maximum deviation of the second filtering result exceeds the preset limit value, it is determined that the second filtering result does not meet the preset condition.

2. The method according to claim 1, It is characterized in that When the second filtering result does not meet a preset condition, determining the detection value of the input current according to the second filtering result includes: Determine a target detection value among the Y detection values ​​output by the second sinc3 filter, wherein the target detection value is the detection value with the largest deviation; Determine the weights corresponding to the Y detection values ​​respectively according to the position of the target detection value in the Y detection values ​​and the preset weights corresponding to the detection values ​​at each position; The detection value of the input current is determined according to the weights respectively corresponding to the Y detection values.

3. The method according to claim 2, It is characterized in that The determining, according to the position of the target detection value in the Y detection values ​​and the preset weight corresponding to each detection value, the weights corresponding to the Y detection values ​​respectively include: When the target detection value is the first detection value among the Y detection values, the weight of the first detection value and the weight of the second detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

4. The method according to claim 2, It is characterized in that The determining, according to the position of the target detection value in the Y detection values ​​and the preset weight corresponding to each detection value, the weights corresponding to the Y detection values ​​respectively include: When the target detection value is the Yth detection value among the Y detection values, the weights of the Y-1th detection value and the Yth detection value among the Y detection values ​​are both set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights.

5. The method according to claim 2, It is characterized in that The determining, according to the position of the target detection value in the Y detection values ​​and the preset weight corresponding to each detection value, the weights corresponding to the Y detection values ​​respectively include: When the target detection value is the Nth detection value among the Y detection values, the weight of the N-1th detection value, the weight of the Nth detection value, and the weight of the N+1th detection value among the Y detection values ​​are all set to 0, and the weights of the other detection values ​​among the Y detection values ​​are preset weights, where N is not equal to 1 and N is not equal to Y.

6. The method according to claim 1, It is characterized in that The decimation rate of the first sinc3 filter is four times the decimation rate of the second sinc3 filter.

7. A current detection device, It is characterized in that include: ΣΔ type ADC, used to generate an output code stream corresponding to the input current; A first sinc3 filter, used to filter the output code stream within a target time period to obtain a first filtering result, wherein the first filtering result includes X detection values ​​output by the first sinc3 filter; A second sinc3 filter, used for filtering the output code stream within a target time period to obtain a second filtering result, wherein the second filtering result includes Y detection values ​​output by the second sinc3 filter; wherein the decimation rate of the first sinc3 filter is greater than the decimation rate of the second sinc3 filter, and X is less than Y; a calculation module, configured to determine a detection value of the input current within the target time period according to the first filtering result and the second filtering result; The calculation module is further used to determine whether the second filtering result meets a preset condition; when the second filtering result meets the preset condition, determine the detection value of the input current according to the first filtering result; when the second filtering result does not meet the preset condition, determine the detection value of the input current according to the second filtering result; The calculation module is also used to calculate the average value of Y detection values ​​in the second filtering result; calculate the maximum deviation of the second filtering result based on the average value, wherein the maximum deviation is the maximum value of the deviation between the Y detection values ​​output by the second sinc3 filter and the average value; if the maximum deviation of the second filtering result does not exceed the preset limit value, it is determined that the second filtering result meets the preset condition; if the maximum deviation of the second filtering result exceeds the preset limit value, it is determined that the second filtering result does not meet the preset condition.

8. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the current detection method according to any one of claims 1 to 6 are implemented.