Method, circuit, system and medium for sensing current

CN121532660APending Publication Date: 2026-02-13SCHAEFFLER TECHNOLOGIES AG & CO KG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380100043.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing shunt solutions are difficult to cover the current range in large current scenarios and difficult to achieve high resolution and accuracy in small current ranges, and adding additional components increases cost and complexity.

Method used

By dividing the current range into multiple current intervals and setting a corresponding preset parameter set for each interval, the parameters are dynamically adjusted to achieve current sensing.

Benefits of technology

Higher resolution and accuracy are achieved throughout the current range, avoiding the disadvantages of increasing circuit complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121532660A_ABST
    Figure CN121532660A_ABST
Patent Text Reader

Abstract

A method, circuit, system and medium for sensing a current, the method comprising: dividing a range of a current into a plurality of current intervals, and setting a corresponding preset parameter set for each current interval (S101); sensing the current based on the initial set of parameters to obtain a sensed value of the current (S102); comparing the current sensed value of the current with a previous sensed value of the current to determine a current interval in which the current is to be in (S103); selecting a preset parameter set corresponding to a current interval in which the determined current is to be located (S104); and sensing the current using the selected set of preset parameters (S105). According to the method, current sensing can be performed by using different preset parameter sets for different current intervals, so that relatively high resolution and precision are realized in the whole current range.
Need to check novelty before this filing date? Find Prior Art

Description

Method, circuit, system and medium for sensing current Technical Field

[0001] The present application generally relates to the field of integrated circuits, and more particularly, to a method, circuit, system, and medium for sensing current. Background Art

[0002] A current sensing circuit consisting of a shunt, an amplifier, and an analog-to-digital converter (ADC) (referred to herein as a shunt solution) is widely used in the field of current sensing, for example, in motors, solenoid valves, and battery charging / discharging. Typically, the various parameters in the shunt solution are predefined and fixed. These parameters may include, for example, the resistance value of the shunt, the gain and offset of the amplifier, etc. When applied to high current scenarios, due to the presence of ground noise, the limited common-mode rejection ratio (CMRR) of the amplifier, and the quantization / offset errors of the ADC, the shunt solution has difficulty covering a large current range while achieving high resolution and accuracy in a small current range.

[0003] Summary of the Invention

[0004] Embodiments of the present application provide a method, circuit, system, and medium for sensing current, which can perform current sensing using different preset parameter sets for different current intervals, thereby achieving high resolution and accuracy over the entire current range.

[0005] According to one aspect of an embodiment of the present application, a method for sensing current is provided, comprising: dividing a current range into a plurality of current intervals, and setting a corresponding preset parameter set for each current interval; sensing the current based on an initial parameter set to obtain a sensing value of the current; comparing a current sensing value of the current with a previous sensing value of the current to determine a current interval in which the current will be; selecting a preset parameter set corresponding to the current interval in which the current is determined to be; and sensing the current using the selected preset parameter set.

[0006] According to another aspect of an embodiment of the present application, a circuit for sensing current is provided, including: a current division module, configured to divide the range of current into multiple current intervals, and set a corresponding preset parameter set for each current interval; and a current sensing module, coupled to the current division module and configured to: sense the current based on an initial parameter set to obtain a sensed value of the current; compare the current sensed value of the current with the previous sensed value of the current to determine the current interval in which the current will be; select a preset parameter set corresponding to the current interval in which the current is determined to be; and sense the current using the selected preset parameter set.

[0007] According to another aspect of an embodiment of the present application, a system for sensing current is provided, comprising: a processor; and a memory on which a computer program is stored, which, when executed by the processor, causes the processor to execute the method according to any aspect of the present application.

[0008] According to another aspect of the embodiments of the present application, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any aspect of the present application is performed. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly describes the drawings involved in the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0010] FIG1 shows a schematic structural diagram of a conventional splitter solution;

[0011] FIG2 shows a flow chart of a method for sensing current according to an embodiment of the present application;

[0012] FIG3 schematically shows a comparison between the current sensing method according to an embodiment of the present application and a conventional shunt solution in terms of input current and ADC output number;

[0013] FIG4 shows a schematic block diagram of a circuit for sensing current according to an embodiment of the present application; and

[0014] FIG5 shows a schematic block diagram of a system for sensing current according to an embodiment of the present application. DETAILED DESCRIPTION

[0015] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, scheme, and advantages of the present application clearer, the details of the present application are further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. For those skilled in the art, the present application can be implemented without some of the details in these specific details. The following description of the embodiments is only for providing a better understanding of the present application by illustrating the examples of the present application.

[0016] It should be noted that, in this article, relational terms such as first, second, third, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. In addition, the terms "comprise", "include" and any other variants thereof are intended to cover non-exclusive inclusion, and the process, method, article or equipment comprising a series of elements includes not only these elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprise..." do not exclude the presence of additional elements in the process, method, article or equipment comprising the elements.

[0017] As described above, the current shunt solution using a current shunt, an amplifier, and an analog-to-digital converter (ADC) is widely used in various current sensing scenarios, such as current sensing in motors, solenoid valves, and battery charging / discharging.

[0018] Figure 1 shows a schematic block diagram of a conventional shunt solution. As shown in Figure 1, the shunt solution includes a shunt, an amplifier, and an analog-to-digital converter (ADC). The shunt solution can perform current sensing according to the following equations (1) and (2): U out =R 分流 *I*G+Offset (1) I=(CNT / 2 n *V ADC –Offset) / R 分流 / G (2)

[0019] Wherein, I is the current to be sensed, which can be a bidirectional current, for example, in the range of -150A to 150A; R 分流 is the resistance of the shunt, typically between 0.5mΩ and 2mΩ, or it can be a larger value; U out is the output of the amplifier, G and Offset are the gain and offset of the amplifier respectively; V ADC is the power supply voltage of the analog-to-digital converter ADC, typically 3.3V or 5V; n is the number of bits of the ADC, for example, 12 bits; and CNT is the ADC output number.

[0020] Generally, the offset of an amplifier can be considered as the bias of the amplifier, which represents the output of the amplifier when the differential input voltage is zero. In the case of a bidirectional current, the offset of the amplifier can be set to V ADC half.

[0021] The parameters used in this shunt solution mainly include the resistance value R of the shunt. 分流, amplifier gain G and offset Offset, etc. The constraints that need to be considered when selecting the values ​​of these parameters are shown in Table 1 below:

[0022] Table 1 Parameters and constraints in the splitter scheme

[0023] As an example, when the current to be sensed I is a bidirectional current (eg, in the range of -150A to 150A), the power supply voltage V ADC When the voltage is 5V and the effective output of the amplifier is in the range of 0.2V to 4.7V, the selection of the parameters in Table 1 is shown in Table 2 below:

[0024] Table 2 Example of parameter selection for splitter solution

[0025] For example, in the above shunt solution, the resistance of the shunt, R 分流 You can choose based on experience, circuit cost, etc. For example, R 分流 When the current to be sensed I is a bidirectional current (within the range of -150A to 150A), the amplifier offset Offset can be set to the ADC power supply voltage V ADC Half of the input current, for example, 2.5V. Furthermore, the amplifier's output voltages at minimum and maximum input currents are 0.4V and 4.6V, respectively. Correspondingly, the ADC output counts at minimum and maximum input currents are 328 and 3768, respectively. Based on this, the resolution of the current to be sensed relative to the amplifier's output voltage and the ADC output count can be calculated as 71.43A / V and 87.19mA / CNT, respectively.

[0026] Typically, in a shunt solution, various parameters (including, for example, the resistance value R of the shunt) 分流 , amplifier gain G, and offset (Offset) are predefined and fixed. Therefore, when a shunt solution is applied to high-current scenarios, it is difficult to cover a large current range while simultaneously achieving high resolution and accuracy in the low-current range due to factors such as ground noise, the amplifier's limited common-mode rejection ratio (CMRR), and ADC quantization / offset errors.

[0027] To address the above issues, one existing solution is to use series shunts with different resistances to sense different current ranges separately. This solution requires setting up additional amplifiers and ADCs for different shunts, increasing circuit complexity and cost. Another solution is to use parallel shunts and relays (or equivalent components) with different resistances, and switch the target shunt into the circuit for different current ranges. These parallel shunts share the amplifier and ADC, which inevitably introduces the resistance of the relay and the resistance between the shunt and the common node, resulting in reduced current sensing accuracy, especially in the case of high input currents. Both of the above solutions introduce additional components into the circuit, thereby increasing the system's BOM cost, PCB size, and complexity.

[0028] To this end, embodiments of the present application provide a method, circuit, and system for sensing current, which can use different preset parameter sets for different current intervals to perform current sensing, thereby achieving high resolution and accuracy across the entire current range. Specifically, the method for sensing current according to embodiments of the present application can be applied to traditional shunt solutions, thereby not increasing the complexity and cost of the circuit. During current sensing, the method can use different preset parameter sets for different current intervals, achieving high resolution and accuracy in both high and low current situations. Therefore, the present application implements a configurable and adaptive current sensing solution.

[0029] Figure 2 shows a flow chart of a method for sensing current according to an embodiment of the present application, which can be applied to the conventional shunt solution shown in Figure 1. As shown in Figure 2, the method for sensing current according to an embodiment of the present application may include steps S101-S105.

[0030] In step S101 , the current range is divided into a plurality of current intervals, and a corresponding preset parameter set is set for each current interval.

[0031] In some embodiments, the current to be sensed is a bidirectional current, for example, in the range of -150 A to 150 A. In the present application, the entire current range may be divided into multiple current intervals at fixed intervals or non-fixed intervals, or the current range may be divided in other ways (for example, random intervals, etc.), which are not limited here.

[0032] In some embodiments, adjacent current intervals in the plurality of current intervals may partially overlap. In the present application, the current interval switching occurs at the current critical point between adjacent current intervals. By partially overlapping adjacent current intervals, it is possible to avoid repeated switching of the preset parameter set (see steps S103-S105 below) when the current repeatedly changes near the current critical point, thereby improving the stability of the method of the present application.

[0033] In step S102 , current is sensed based on the initial parameter set to obtain a sensed value of the current.

[0034] In some embodiments, for example, the method for sensing current according to an embodiment of the present application may further include determining a current range (e.g., -150A to 150A) and determining an initial parameter set to be used. For example, the initial parameter set may be selected based on experience and set to ensure that the outputs of the amplifier and ADC are not saturated when performing current sensing. For example, referring to Table 2, initially, the resistance R of the shunt is 分流 The gain G of the amplifier can be set to 0.5 mΩ, the gain G of the amplifier can be set to 28, and the offset Offset of the amplifier can be set to 2.5 V. When current sensing has not yet been performed, since the sensed value of the current has not been obtained, it can be considered that the current is within its entire range (-150, 150), and therefore the initial parameter set corresponding to the entire range of the current is used to sense the current.

[0035] In step S103 , the current sensed value of the current is compared with the previous sensed value of the current to determine the current interval in which the current will be.

[0036] In some embodiments, for example, the current sensing value of the current can be first compared with the previous sensing value of the current to determine the changing trend of the current, and the current interval in which the next sensing value of the current may be located can be further determined based on the current sensing value of the current, the current interval in which the current is currently located, and the determined changing trend of the current.

[0037] As an example, for the current interval in which the current is currently located, the current sensed value of the current is relatively close to the upper current value of the current interval. If the determined current change trend is an increasing trend, it can be determined that the next sensed value of the current may exceed the current interval and be in the next current interval. If the determined current change trend is a decreasing trend, it can be determined that the next sensed value of the current may remain in the current current interval. As another example, the current sensed value of the current is relatively close to the lower current value of the current interval. If the determined current change trend is an increasing trend, it can be determined that the next sensed value of the current may remain in the current current interval. If the determined current change trend is a decreasing trend, it can be determined that the next sensed value of the current may exceed the current interval and be in the previous current interval.

[0038] In step S104 , a preset parameter set corresponding to the determined current interval that the current will be in is selected.

[0039] In some embodiments, in combination with steps S103 and S104, for example, if it is determined that the next sensed current value is likely to remain within the current range, the preset parameter set used for the next current sensing operation remains unchanged. Conversely, if it is determined that the next sensed current value is likely to exceed the current range and be within another current range, a preset parameter set corresponding to the current range in which the next sensed current value is determined to be located is selected to perform the next current sensing operation.

[0040] In step S105 , the current is sensed using the selected preset parameter set.

[0041] After performing current sensing to obtain the current sensing value, other preset parameter sets different from the initial parameter set can be selected for each current interval through the above steps S103-S104, and then further current sensing can be performed using the selected preset parameter set to obtain further current sensing values.

[0042] According to the method for sensing current according to an embodiment of the present application, the above steps S103-S105 can be repeatedly executed, so that each time the current sensing value is executed, the preset parameter set used is a preset parameter set corresponding to the current interval in which the determined current will be, thereby achieving higher resolution and accuracy for each current interval.

[0043] In some embodiments, for example, the method for sensing current according to an embodiment of the present application may further include: determining whether the current sensing value of the current exceeds the current interval corresponding to the selected preset parameter set; in response to determining that the current sensing value of the current exceeds the current interval corresponding to the selected preset parameter set, reselecting the preset parameter set; and in response to determining that the current sensing value of the current does not exceed the current interval corresponding to the selected preset parameter set, maintaining the preset parameter set.

[0044] For example, if the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set, it means that the selected preset parameter set (i.e., the currently used preset parameter set) is not suitable for the current sensing, and a new preset parameter set needs to be selected. In some embodiments, for example, when the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set, by executing the above steps S103-S105, the current sensed value of the current is again compared with the previous sensed value of the current to determine the current interval in which the current will be, and then a parameter set corresponding to the determined current interval in which the current will be, is reselected, and the current is sensed using the reselected preset parameter set until the current sensed value of the current does not exceed the current interval corresponding to the selected preset parameter set.

[0045] Furthermore, if the current sensed value of the current does not exceed the current interval corresponding to the selected preset parameter set, it indicates that the selected preset parameter set (ie, the currently used preset parameter set) is appropriate, and the sensed value of the output current is used as a result.

[0046] In some embodiments, the method according to the embodiment of the present application may further include calibrating each current interval in the plurality of current intervals.

[0047] According to the above equations (1) and (2), the relationship between the ADC output number and the current to be sensed I can be expressed as follows: CNT = (I*R 分流 *G+Offset) / V ADC *2 n (3)

[0048] The meaning of each parameter in equation (3) is the same as that in equations (1) and (2). For example, for each current interval, the (one or more) actual ADC output numbers CNT corresponding to the current interval can be obtained, and then the current sensing value I corresponding to the actual ADC output number CNT can be calculated according to equations (2) and (3). Next, the calculated current sensing value I is applied by, for example, an additional current source, and the ADC output number CNT obtained in this case can be considered as the reference ADC output number CNT. The actual ADC output number CNT and the reference ADC output number CNT are compared, and if there is an error between the two, the error is taken into account when performing current sensing for the current interval. By calibrating each current interval, the accuracy of current sensing can be improved. Those skilled in the art will understand that the calibration method described above is only an example of a calibration method that can be used in the method for sensing current according to an embodiment of the present application, and other appropriate calibration methods can also be used in the present application and are within the scope of the present application.

[0049] In some embodiments, for example, reselecting the preset parameter set may include: determining another current interval that the current will be in based on the current sensed value of the current, the previous sensed value of the current, and the current interval that the current is currently in; and selecting the preset parameter set corresponding to the other current interval. Determining the other current interval that the current will be in can be as described above with respect to step S103. For example, the current sensed value of the current can be first compared with the previous sensed value of the current to determine the current change trend, and based on the current sensed value of the current, the current interval that the current is currently in, and the determined current change trend, further determining another current interval in which the next sensed value of the current may be located, and then selecting the preset parameter set corresponding to the determined other current interval.

[0050] In some embodiments, the preset parameter set may include an offset and a gain of an amplification module (e.g., an amplifier), as shown in Tables 1 and 2. Please note that the amplifier is only one example of an amplification module that can be used in the method for sensing current according to an embodiment of the present application, and other types of amplification modules are also possible and within the scope of the present application.

[0051] In some embodiments, the amplification module is a configurable amplification module, and reselecting the preset parameter set may include directly adjusting the offset and gain of the amplification module. In addition, in some embodiments, the amplification module is a non-configurable amplification module, and reselecting the preset parameter set may include adjusting the offset and gain of the amplification module through peripheral circuitry. For example, in the case where the amplification module is a configurable amplification module, the offset and gain of the amplification module may be directly adjusted by a processor (e.g., a microcontroller unit MCU) during current sensing. In addition, in the case where the amplification module is a non-configurable amplification module, the offset and gain of the amplification module may be adjusted by the processor using peripheral circuitry.

[0052] For example, the division of the current range (-150, 150) and the setting of the corresponding preset parameter set in the method for sensing current according to an embodiment of the present application are shown in Table 3 below.

[0053] Table 3 Parameters used in this application method

[0054] As shown in Table 3, for the entire current range (-150, 150) of the current to be sensed I, the gain G and offset Offset of the amplifier are the same as the corresponding values ​​in Table 2. For example, the gain G is 28, the offset Offset is 2.5V, and the gain G (28) and offset Offset (2.5V) correspond to the initial parameter set. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the output number of the ADC are 71.43 and 87.19 respectively; for the current interval (78, 150), the gain G and offset Offset of the amplifier are 40 and 0.5V respectively. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the output number of the ADC are 35.71 and 43.60 respectively; for the current interval (18, 82), the gain G and offset Offset of the amplifier are 50 and 1.5V respectively. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the output number of the ADC are The output voltage of the amplifier and the resolution of the ADC output are 25.97 and 31.71 respectively; for the current range (-22, 22), the amplifier gain G and offset Offset are 100 and 2.5V respectively. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the ADC output are 14.29 and 17.44 respectively; for the current range (-82, -18), the amplifier gain G and offset Offset are 50 and 3.5V respectively. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the ADC output are 25.97 and 31.71 respectively; for the current range (-150, -78), the amplifier gain G and offset Offset are 40 and 4.5V respectively. At this time, the resolution of the current to be sensed relative to the output voltage of the amplifier and the ADC output are 35.71 and 43.60 respectively. Those skilled in the art will understand that the division of the entire current interval to be sensed and the corresponding settings of the gain G and offset Offset shown in Table 3 are exemplary and do not constitute a limitation to the present application, and other division methods and parameter setting methods are also possible.

[0055] By comparing Table 2 and Table 3, we can see that the resistance R 分流 can be chosen to be a larger value, such as 0.7mΩ, so that when the same current flows through the shunt, the voltage across the shunt increases, making the input voltage of the amplifier (V in , as shown in Figure 1), and combined with the set gain G and offset Offset, the output voltage of the amplifier (V out , as shown in Figure 1), achieving better resolution and accuracy. Furthermore, compared to a 0.5mΩ shunt, the use of a 0.7mΩ shunt significantly reduces the sensing error caused by inherent noise in the amplifier and ADC, also contributing to improved current sensing resolution and accuracy.

[0056] In the current sensing method according to an embodiment of the present application, the current range of the current to be sensed is divided into multiple current intervals, and a corresponding preset parameter set is set for each current interval. During current sensing, the corresponding preset data set is selected by determining the current interval in which the current is located. Therefore, different preset parameter sets can be used for different current intervals to perform current sensing, thereby achieving high resolution and accuracy across the entire current range.

[0057] For example, the sensing result of the current is usually used to control the driving current of the load, and compared with the sensing and control frequency, the change of the current to be sensed is relatively slow, especially for example, inductive loads. If the current is sensed multiple times in succession within a period of time, it can be considered that the current is basically unchanged during this period of time. Using the method according to the embodiment of the present application, during current sensing, if the current is at the boundary of the current interval pre-divided as described above, resulting in the switching of the current interval, the corresponding preset parameter set can be reselected to perform further current sensing. Therefore, although the parameter set is reselected and configured during the current sensing process, because the change of the current to be sensed is relatively slow, the method according to the embodiment of the present application can still use the appropriate preset parameter set to sense the current, thereby ensuring higher resolution and accuracy.

[0058] In addition, the method for sensing current according to the embodiment of the present application can be applied to traditional shunt solutions, and a better signal-to-noise ratio is obtained by using a larger shunt (for example, a shunt resistor), thereby expanding the functionality of the traditional shunt solution while avoiding the introduction of additional components or occupying additional printed circuit board area, thereby not increasing the complexity and cost of the circuit.

[0059] FIG3 schematically shows a comparison between the current sensing method according to an embodiment of the present application and a conventional shunt solution in terms of input current (A) and ADC output number (CNT).

[0060] In FIG3 , the solid line represents a curve of the ADC output number obtained using a conventional current divider solution (as shown in FIG1 ) relative to the input current (i.e., the current to be sensed), and the dashed line and the dot-dash line represent curves of the ADC output number obtained using the method for sensing current according to an embodiment of the present application relative to the input current. Specifically, the dashed line shown in FIG3 represents a curve obtained when the current is increasing, and the dot-dash line represents a curve obtained when the current is decreasing.

[0061] As shown in Table 3 and FIG3 , the entire current range (-150, 150) of the current to be sensed I is divided into five current intervals, namely (-150, -78), (-82, -18), (-22, 22), (18, 82), and (78, 150). As described above, in some embodiments, adjacent current intervals may partially overlap, thereby avoiding repeated switching near the current critical point corresponding to the pair of adjacent current intervals, thereby improving the stability of the method of the present application.

[0062] For example, for the adjacent current intervals (-150, -78) and (-82, -18), the corresponding current critical point is -80 A. If the two adjacent current intervals are divided into (-150, -80) and (-80, -18), then when the current sensed value of the current is -80 A, if it is determined that the current will increase, the current interval will immediately switch to (-80, -18), and if it is determined that the current will decrease, the current interval will immediately switch to (-150, -80). Therefore, if the current to be measured fluctuates around -80 A, the current interval switching will occur repeatedly, which adversely affects the stability of the method. In contrast, by using the current intervals (-150, -78) and (-82, -18), which partially overlap, when the current sensing value is -80A, the current interval will only be switched when the determined current change trend (including increasing and decreasing trends) is large, that is, when the current change is large, thus avoiding repeated switching at -80A.

[0063] The above description is also applicable to, for example, current critical points of -20 A, 20 A, and 80 A. Those skilled in the art will understand that the present application is not limited to the above current interval division method, and when the current interval division is different, the corresponding current critical point will also change.

[0064] Furthermore, as shown in FIG3 , using a conventional current divider solution, the input current (A) and the ADC output number (CNT) have a single fixed linear relationship over the entire input current (A) range. However, using the current sensing method according to an embodiment of the present application, a piecewise linear relationship between the input current and the ADC output number is achieved (for both rising and falling current conditions). For example, for the current range (-82, -18) (or any other current range), the method of the present application can achieve a larger ADC output number difference, thereby achieving higher resolution for all current ranges.

[0065] Fig. 4 shows a schematic block diagram of a circuit for sensing current according to an embodiment of the present application. As shown in Fig. 4 , the circuit for sensing current according to an embodiment of the present application may include a current dividing module and a current sensing module.

[0066] In some embodiments, the current dividing module may be configured to divide the current range into a plurality of current intervals and set a corresponding preset parameter set for each current interval. Referring to the description of step S101 above, for example, in the present application, the current dividing module may be configured to divide the entire current range into a plurality of current intervals at fixed intervals or non-fixed intervals, or to divide the current range in other ways (e.g., random intervals, etc.), which are not limited here.

[0067] In some embodiments, adjacent current intervals in the plurality of current intervals may partially overlap, so that repeated switching near current critical points corresponding to adjacent current intervals can be avoided, thereby improving the stability of the circuit of the present application.

[0068] In some embodiments, as shown in FIG4 , the current sensing module can be coupled to the current dividing module and configured to: sense the current based on the initial parameter set to obtain a current sensed value; compare the current sensed value with the previous current sensed value to determine the current interval the current will be in; select a preset parameter set corresponding to the determined current interval the current will be in; and sense the current using the selected preset parameter set. For the above operations of the current sensing module, please refer to the description of steps S102-S105 above, which will not be repeated here.

[0069] In some embodiments, the current sensing module may be further configured to: determine whether a current sensed value of the current exceeds a current interval corresponding to a selected preset parameter set; reselect the preset parameter set in response to determining that the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set; and maintain the preset parameter set in response to determining that the current sensed value of the current does not exceed the current interval corresponding to the selected preset parameter set. As described above, if the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set, it indicates that the selected preset parameter set is no longer applicable and a new preset parameter set needs to be selected; otherwise, the current preset parameter set continues to be used.

[0070] In some embodiments, as shown in FIG4 , the circuit for sensing current according to an embodiment of the present application may further include: a calibration module coupled to the current dividing module and configured to calibrate each of the multiple current intervals. For the calibration method used in the circuit of the present application, please refer to the description of equation (3) above, which will not be repeated here.

[0071] In some embodiments, the current sensing module may be configured to reselect a preset parameter set by: determining another current interval that the current will be in based on a current sensed value of the current, a previous sensed value of the current, and the current interval that the current is currently in; and selecting a preset parameter set corresponding to the other current interval. For example, the current sensing module may be operable to first compare the current sensed value with the previous sensed value of the current to determine a current change trend, and further determine another current interval in which the next sensed value of the current may be based on the current sensed value of the current, the current interval that the current is currently in, and the determined current change trend, and then select the preset parameter set corresponding to the determined other current interval.

[0072] In some embodiments, as shown in FIG4 , the current sensing module may include an amplification module (e.g., an amplifier), and the preset parameter set includes an offset and a gain of the amplification module. Note that the amplifier is only one example of an amplification module that can be used in a circuit for sensing current according to an embodiment of the present application. Other types of amplification modules are also possible and within the scope of the present application.

[0073] In some embodiments, the amplification module is a configurable amplification module, and reselecting the preset parameter set may include directly adjusting the offset and gain of the amplification module. Furthermore, in some embodiments, the amplification module is a non-configurable amplification module, and reselecting the preset parameter set may include adjusting the offset and gain of the amplification module via peripheral circuitry. For example, if the amplification module is a configurable amplification module, the current sensing module may be operable to directly adjust the offset and gain of the amplification module. Furthermore, if the amplification module is a non-configurable amplification module, the current sensing module may be operable to utilize peripheral circuitry to adjust the offset and gain of the amplification module.

[0074] In some embodiments, as shown in Figure 4, the circuit for sensing current according to the embodiment of the present application may also include: an output module, configured to output the sensing value of the current as a result when the current sensing value of the current does not exceed the current interval corresponding to the selected preset parameter set.

[0075] In the circuit for sensing current according to the embodiment of the present application, the current division module divides the current range of the current to be sensed into multiple current intervals, and sets a corresponding preset parameter set for each current interval. During current sensing, the current sensing module selects the corresponding preset data set by determining the current interval in which the current is located, so that different preset parameter sets can be used for different current intervals to perform current sensing, thereby achieving high resolution and accuracy over the entire current range. In addition, the circuit for sensing current according to the embodiment of the present application obtains a better signal-to-noise ratio by using a larger shunt (e.g., a shunt resistor), expands the functionality of the traditional shunt solution, and avoids introducing additional components or occupying additional printed circuit board area, thereby not increasing the complexity and cost of the circuit.

[0076] FIG5 shows a schematic block diagram of a system for sensing current according to an embodiment of the present application.

[0077] As shown in FIG5 , a system for sensing current according to an embodiment of the present application may include a processor 501 and a memory 502 storing a computer program.

[0078] In the present application, the processor 501 may include but is not limited to: a central processing unit (CPU), an application-specific integrated circuit (ASIC), and one or more integrated circuits that can be configured to implement the method according to the embodiments of the present application.

[0079] The memory 502 may include a large-capacity memory for storing data or instructions. For example, the memory 502 may include, but is not limited to, a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, a universal serial bus (USB) drive, or a combination thereof. Where appropriate, the memory 502 may include removable or non-removable memory. Where appropriate, the memory 502 may be inside or outside the system for sensing current. In a specific embodiment, the memory 502 is a non-volatile solid-state memory. In a specific embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the read-only memory (ROM) may be a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), an electrically rewritable ROM (EAROM), or a combination thereof.

[0080] The processor 501 implements the method for sensing current described in any embodiment of the present application by reading and executing the computer program stored in the memory 502 .

[0081] In an example, the system for sensing current according to an embodiment of the present application may further include a communication interface 503 and a bus 510. As shown in FIG5, the processor 501, the memory 502, and the communication interface 503 are connected via the bus 510 and communicate with each other.

[0082] In the present application, the communication interface 503 includes any appropriate type of communication interface and is configured to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0083] Bus 510 includes hardware, software or both, for coupling each component in the system for sensing current according to an embodiment of the present application to each other. For example, bus 510 may include, but is not limited to: accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnect (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus, other suitable bus, or its combination. Where appropriate, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application also considers any other suitable bus or interconnection.

[0084] The system for sensing current according to the embodiment of the present application can execute the method for sensing current according to the embodiment of the present application and achieve the same benefits, which will not be repeated here.

[0085] In addition, embodiments of the present application further provide a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program can perform the method for sensing current according to embodiments of the present application and achieve the same benefits. This description is omitted here. For example, the non-transitory computer-readable storage medium may include, but is not limited to, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the present application does not limit this.

[0086] Those skilled in the art will understand that the present application is not limited to the specific structures and steps described above and shown in the accompanying drawings. For the sake of simplicity, the description of known structures and methods is omitted herein. In the above embodiments, several specific steps are described and shown as examples. However, the method of the present application is not limited to the specific steps described and shown, and without departing from the scope of the present application, those skilled in the art can make various changes, modifications and additions to the embodiments of the present application, or change the order between the steps.

[0087] The functional blocks shown in the above structured block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, the functional blocks can be, for example, electronic circuits, application specific integrated circuits (ASICs), suitable firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. These programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or communication link via a data signal carried in a carrier wave. Machine-readable media can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0088] The above disclosures are only some specific implementation methods of the present application. Those skilled in the art will understand that for the convenience and brevity of description, the specific working processes of the above systems, modules and units can refer to the corresponding processes in the method embodiments, and will not be repeated here. In addition, it should be understood that the scope of protection of the present application is not limited thereto. Those skilled in the art can think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these equivalent modifications or replacements are all covered by the scope of protection of the present application.

Claims

1. A method for sensing current, comprising: dividing the range of the current into a plurality of current intervals, and respectively setting a corresponding preset parameter set for each current interval; sensing the current based on an initial parameter set to obtain a sensed value of the current; comparing the current sensed value of the current with the previous sensed value of the current to determine the current interval in which the current will be; selecting the preset parameter set corresponding to the determined current interval in which the current will be; and sensing the current using the selected preset parameter set.

2. The method according to claim 1, further comprising: determining whether the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set.

3. The method according to claim 2, further comprising: in response to determining that the current sensed value of the current exceeds the current interval corresponding to the selected preset parameter set, reselecting the preset parameter set; and in response to determining that the current sensed value of the current does not exceed the current interval corresponding to the selected preset parameter set, maintaining the preset parameter set.

4. The method according to any one of claims 1-3, wherein, adjacent current intervals in the plurality of current intervals partially overlap.

5. The method according to any one of claims 1-3, further comprising: calibrating each current interval in the plurality of current intervals.

6. The method according to claim 3, wherein, reselecting the preset parameter set includes: determining another current interval in which the current will be according to the current sensed value of the current, the previous sensed value of the current, and the current interval in which the current is currently located; and selecting the preset parameter set corresponding to the other current interval.

7. The method according to claim 3, wherein, the preset parameter set includes the offset and gain of an amplification module.

8. The method according to claim 7, wherein, the amplification module is a configurable amplification module, and reselecting the preset parameter set includes: directly adjusting the offset and gain of the amplification module.

9. The method according to claim 7, wherein, the amplification module is a non-configurable amplification module, and reselecting the preset parameter set includes: adjusting the offset and gain of the amplification module through a peripheral circuit.

10. A circuit for sensing current, comprising: a current division module configured to divide the range of the current into a plurality of current intervals, and respectively set a corresponding preset parameter set for each current interval; and a current sensing module coupled to the current division module and configured to: sense the current based on an initial parameter set to obtain a sensed value of the current; compare the current sensed value of the current with the previous sensed value of the current to determine the current interval in which the current will be; select the preset parameter set corresponding to the determined current interval in which the current will be; and sense the current using the selected preset parameter set.

11. The circuit according to claim 10, wherein, the current sensing module is further configured to: Determine whether the current sensed value exceeds the current range corresponding to the selected preset parameter set.

12. The circuit according to claim 11, wherein, the current sensing module is further configured to: in response to determining that the current sensed value exceeds the current range corresponding to the selected preset parameter set, reselect the preset parameter set; and in response to determining that the current sensed value does not exceed the current range corresponding to the selected preset parameter set, maintain the preset parameter set.

13. The circuit according to any one of claims 10-12, wherein, adjacent current ranges in the plurality of current ranges partially overlap.

14. The circuit according to any one of claims 10-12, further comprising: a calibration module, coupled to the current partitioning module and configured to: calibrate each of the plurality of current ranges.

15. The circuit according to claim 12, wherein, the current sensing module is configured to reselect the preset parameter set by: determining another current range in which the current will be located according to the current sensed value, the previous sensed value of the current, and the current range in which the current is currently located; and selecting the preset parameter set corresponding to the other current range.

16. The circuit according to claim 12, wherein, the current sensing module includes an amplification module, and the preset parameter set includes the offset and gain of the amplification module.

17. The circuit according to claim 16, wherein, the amplification module is a configurable amplification module, and reselecting the preset parameter set includes: directly adjusting the offset and gain of the amplification module.

18. The circuit according to claim 16, wherein, the amplification module is a non-configurable amplification module, and reselecting the preset parameter set includes: adjusting the offset and gain of the amplification module through an external circuit.

19. A system for sensing current, comprising: a processor; and a memory storing a computer program, which when executed by the processor causes the processor to execute the method according to any one of claims 1-9.

20. A non-transitory computer-readable storage medium storing a computer program, which when executed by a processor executes the method according to any one of claims 1-9.