Measuring sum of squared current

Information

  • Patent Grant
  • 8843538
  • Patent Number
    8,843,538
  • Date Filed
    Wednesday, December 22, 2010
    13 years ago
  • Date Issued
    Tuesday, September 23, 2014
    9 years ago
Abstract
A modulator can be configured to sense a change in current flow in a circuit and to generate an oversampled, noise-shaped signal. A first decimation filter is coupled to the modulator and is configured to generate instantaneous current data at a first data rate. The instantaneous current data can be input into a multiplier circuit. The output of the multiplier circuit (the instantaneous current data squared) can be input to a second decimation filter. The second decimation filter can be configured to generate a sum of the squared current data at a second data rate. The sum of the squared current data can be used by an application (e.g., battery power management) to compute power measurements or for other purposes.
Description
TECHNICAL FIELD

This subject matter is generally related to electronics, and more particularly to current measurement systems.


BACKGROUND

A battery management system can include one or more integrated circuit devices that manage a rechargeable battery (e.g., a cell or battery pack) by monitoring its state. Some battery management systems monitor rechargeable battery packs. An integrated circuit in the battery pack monitors the battery and reports information to a system management bus. This information can include but is not limited to: battery type, model number, manufacturer, characteristics, discharge rate, predicted remaining capacity and any other information that can be used to determine the state of the battery.


Some applications monitor the State of Charge (SOC) of the battery or of the individual cells in a battery chain. This may simply be for providing the user with an indication of the capacity left in the battery, or it could be needed in a control circuit to ensure optimum control of the charging process. The State of Health (SOH) is a measure of a battery's capability to deliver its specified output. This can be vital for assessing the readiness of emergency power equipment and can be an indicator of whether maintenance action is needed.


SUMMARY

A modulator can be configured to sense a change in current flow in a circuit and to generate an oversampled, noise-shaped signal. A first decimation filter is coupled to the modulator and is configured to generate instantaneous current data at a first data rate. The instantaneous current data can be input into a multiplier circuit. The output of the multiplier circuit (the instantaneous current data squared) can be input to a second decimation filter. The second decimation filter can be configured to generate a sum of the squared current data at a second data rate. The sum of the squared current data can be used by an application (e.g., battery power management) to compute power measurements or for other purposes.


Particular implementations of the invention can be implemented to realize one or more of the following advantages: 1) a cost efficient solution to measure and calculate a sum of squared current when the current itself is measured and the sum is calculated, 2) a cost efficient solution that reuses existing ADC circuitry to generate the sum of squared current on a single integrated circuit chip, and 3) a reduced physical footprint.





DESCRIPTION OF DRAWINGS


FIG. 1 is a block diagram of an exemplary current measuring system.



FIG. 2 is a schematic diagram of an exemplary digital multiplier.



FIG. 3 is a flow diagram of an exemplary process for calculating a sum of squared current data.





DETAILED DESCRIPTION
System Overview


FIG. 1 is a block diagram of an exemplary current measuring system 100. In some implementations, system 100 can include modulator 102, decimation filter stages 104, 106, 108 and multiplier 110. Decimation filter stages 104, 106, 108 can include digital low pass filters 112, 114, 116 respectively. In some implementations, the current measuring system can be part of a current sensing analog-to-digital converter (CS-ADC), as described in U.S. Pat. No. 7,113,122, which is incorporated by reference herein in its entirety. The CS-ADC can be part of a variety of devices such as a microcontroller, digital signal processor (DSP), digital camera, PDA or the like.


In a CS-ADC implementation, a sampling circuit (e.g., a switch coupled to a sampling capacitor) can sample the charge or discharge current flowing through an external or internal sense resistor. The sample can be processed by modulator 102 (e.g., 1-bit delta-sigma modulator) which generates an oversampled noise-shaped (most of the noise energy in high signals) signal. Decimation filter stage 104 can be coupled to modulator 102 and configured to remove out-of-band noise from the signal and to reduce the data rate of the signal to generate a high-resolution signal. The output of decimation filter stage 104 is instantaneous current data (fic) with a resolution and conversion time suitable for instantaneous current measurements.


Decimation filter stage 106 is coupled to decimation filter stage 104. The output of decimation filter stage 106 is accumulated current data (fac) with a resolution and conversion time suitable for charge flow accumulation measurements. In some implementations, the instantaneous current data has a short conversion time at the cost of lower resolution. The accumulated current data provides a highly accurate current measurement for coulomb counting. The conversion time of the accumulated current data can be configured to trade accuracy against conversion time.


In some implementations, digital low pass filter 112 in decimation filter stage 104 can be a third order sinc filter with a data output having a data rate that is reduced by a predetermined decimation ratio D1 (e.g., 128). For example, if D1 is 8:1 and operates on the 1-bit input stream 10010110, the decimation result is 4/8=0.5=100b (binary). This reduces the sample frequency (fs) by a factor of eight. The serial (1-bit) input bus can become a parallel (3-bits) output bus.


The digital low pass filter 114 in decimation filter stage 106 can be a first order sinc filter with a data output having a data rate that is reduced by a configurable decimation ratio D2 (e.g., 32, 64, 128, 256). Decimation filter stages 104, 106 can be implemented using a cascaded integrator-comb combination (CIC) structure, where data is accumulated, decimated and differentiated. In some implementations, computations can be performed using wrap around 2 s complement arithmetic. In some implementations, filters 112, 114 are linear phase, finite impulse response (FIR) filters. Suitable CIC structures are described in U.S. Pat. No. 7,113,122.


In some implementations, the instantaneous current data are input into multiplier 110. Multiplier 110 multiplies each instantaneous current data by itself to generate the square of the instantaneous current data (fic2). The square of the instantaneous current data is input into decimation filter stage 108. Decimation filter stage 108 generates a sum (average) of the squared data (Σfic2).


The digital low pass filter 116 in decimation filter stage 108 can be a first order sinc filter with a data output having a data rate that is reduced by a configurable decimation ratio D3. Decimation filter stage 108 can have the same internal structure as decimation filter stage 106 (e.g., a CIC structure). In some implementations, decimation filter stage 108 can be omitted and the circuitry in decimation filter stage 106 can be used to generate the sum (average) of the squared current data.


The outputs of decimation filter stages 104, 106 and 108 can be coupled to data registers for storing instantaneous current data, accumulated current data and the accumulated squared current data, respectively. Additionally, a data register can be coupled to the output of multiplier 110 to store the squared instantaneous current data. The data registers can be accessible by firmware executed by a controller or central processing unit (CPU) and provided to applications.


Exemplary Digital Multiplier Circuit


FIG. 2 is a schematic diagram of an exemplary digital multiplier. The digital multiplier shown is a scaling accumulator multiplier 200. Scaling accumulator multiplier 200 performs multiplication using an iterative shift-add routine. One input (e.g., a sample of instantaneous current) is presented in bit parallel form while the other input (e.g., the same sample of instantaneous current) is in bit serial form. Each bit in the serial input multiplies the parallel input by either 0 or 1. The parallel input is held constant while each bit of the serial input is presented. Note that the one bit multiplication either passes the parallel input unchanged or substitutes zero. The result from each bit is added to an accumulated sum. That sum is shifted one bit before the result of the next bit multiplication is added to it.


Other multipliers that can be used in system 100 include but are not limited to: serial by parallel Booth multipliers, ripple carry array multipliers, row adder tree multipliers, carry save array multipliers, look-up table (LUT) multipliers, partial product LUT multipliers, computed partial product multipliers, constant multipliers from adders, constant coefficient multiplier (KCM), limited set LUT multipliers, Wallace Trees or any other known digital multiplier.


Exemplary Process


FIG. 3 is a flow diagram of an exemplary process 300 for calculating a sum (average) of squared current data. Process 300 can be implemented by system 100.


In some implementations, process 300 can begin by generating an oversampled signal (302). For example, a delta-sigma modulator can be used to generate an oversampled, noise-shaped signal from current flowing through a sense resistor of a CS-ADC or other current measuring device or system.


Process 300 decimates the oversampled signal to generate high-resolution, instantaneous current data (304). The instantaneous current data can be stored in a first data register accessible by firmware. Step 304 can be implemented by a third order sinc filter configured to reduce the data rate of the high-resolution, instantaneous current data according to a predefined or configurable decimation ratio.


Process 300 multiples the instantaneous current data by itself to generate squared current data (306). The squared current data can be stored in a second data register accessible by firmware. Step 306 can be implemented by a digital multiplier circuit, such as the circuits described in reference to FIG. 2.


Process 300 decimates the squared current data to provide a sum (average) of squared current data (308). The sum of squared current data can be stored in a third data register accessible by firmware. Step 308 can be implemented by a first order sinc filter configured to reduce the data rate of the sum of squared current data according to a predefined or configurable decimation ratio.


While this document contains many specific implementation details, these should not be construed as limitations on the scope what may be claimed, but rather as descriptions of features that may be specific to particular embodiments. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub combination or variation of a sub combination.

Claims
  • 1. A circuit comprising: a modulator configured for oversampling a current flow and generating an oversampled signal;a first decimation filter stage coupled to the modulator, the first decimation filter stage configured for decimating the oversampled signal to generate a high resolution signal indicating instantaneous current data;a digital multiplier coupled to the first decimation filter stage, the digital multiplier configured for generating squared current data from the instantaneous current data; a second decimation filter stage coupled to the digital multiplier, the second decimation filter stage configured for decimating the squared current data to generate a sum of squared current data; anda third decimation filter stage coupled to the output of the first decimation filter stage, the third decimation filter stage configured for reducing a data rate of the high resolution signal and generating accumulated current data for charge flow accumulation.
  • 2. The circuit of claim 1, further comprising: one or more data registers for storing one or more measurements of the instantaneous current data, squared current data or sum of squared current data.
  • 3. The circuit of claim 1, where the first decimation filter stage is configured to decimate the oversampled signal according to a first decimation ratio and the second decimation filter stage is configured to decimate the squared current data according to a second decimation ratio.
  • 4. The circuit of claim 1, where the first decimation filter stage includes a third order sinc filter and the second decimation filter stage includes a first order sinc filter.
  • 5. The circuit of claim 1, where the modulator is a delta-sigma modulator.
  • 6. The circuit of claim 1, where the circuit is included in a current sensing analog-to-digital converter (CS-ADC).
  • 7. The circuit of claim 6, where the CS-ADC is included in a microcontroller.
  • 8. The circuit of claim 1, where at least one of the first, second or third decimation filter stages is implemented in a cascade integrator-comb combination (CIC) structure.
  • 9. The circuit of claim 8, where the first decimation filter is a third order sinc filter and the second decimation filter and the third decimation filter stage are first order sinc filters.
  • 10. A circuit comprising: a modulator configured to sense a change in current and to generate an oversampled signal;a first decimation filter stage coupled to the modulator, the first decimation filter stage configured for removing out-of-band noise from the oversampled signal and for reducing a data rate of the oversampled signal to generate a high resolution signal indicating instantaneous current data;a multiplier coupled to the first decimation filter stage, the multiplier configured for generating squared current data from the instantaneous current data;a second decimation filter stage coupled to the multiplier, the second decimation filter stage configured for reducing a data rate of the squared current data and generating sum of squared current data; anda third decimation filter stage coupled to the output of the first decimation filter stage, the third decimation filter stage configured for reducing a data rate of the high resolution signal and generating accumulated current data for charge flow accumulation.
  • 11. The circuit of claim 10, where the modulator is a delta-sigma modulator.
US Referenced Citations (33)
Number Name Date Kind
5955869 Rathmann Sep 1999 A
6012153 Brink et al. Jan 2000 A
6025695 Friel et al. Feb 2000 A
6040722 Lee Mar 2000 A
6078165 Ashtiani et al. Jun 2000 A
6417792 King et al. Jul 2002 B1
6555997 De Vries et al. Apr 2003 B1
6710578 Sklovsky Mar 2004 B1
6795007 Mayes Sep 2004 B2
7236110 Antonesei Jun 2007 B2
7567063 Suzuki et al. Jul 2009 B1
7605568 Gangstoe et al. Oct 2009 B2
8245214 Long et al. Aug 2012 B2
8350529 Loncarevic Jan 2013 B2
20060170398 Gangstoe et al. Aug 2006 A1
20080189563 Itkin Aug 2008 A1
20080197809 Ho et al. Aug 2008 A1
20080231232 Seo et al. Sep 2008 A1
20080284383 Aas et al. Nov 2008 A1
20080300660 John Dec 2008 A1
20090198399 Kubo et al. Aug 2009 A1
20090224741 Marholev et al. Sep 2009 A1
20100229011 Pedersen et al. Sep 2010 A1
20100287389 Gangsto et al. Nov 2010 A1
20100332233 Chen et al. Dec 2010 A1
20110025277 Hussain et al. Feb 2011 A1
20120161746 Holsen et al. Jun 2012 A1
20120162828 Holsen et al. Jun 2012 A1
20120166506 Holsen Jun 2012 A1
20120166841 Holsen et al. Jun 2012 A1
20120166855 Holsen et al. Jun 2012 A1
20120166918 Svendsli et al. Jun 2012 A1
20120170157 Holsen et al. Jul 2012 A1
Non-Patent Literature Citations (15)
Entry
ATMEL®: “8-bit AVR® Microcontroller with 16K/32K Bytes In-System Programmable Flash—ATmega16HVB, ATmega32HVB Preliminary”, 8042B-AVR-06/10, 275 pages (Jun. 2010).
ATMEL®: “8-bit AVR® XMEGA A Microcontroller—XMEGA Manual Preliminary”, 8077H-AVR-12/09, 445 pages, (Dec. 2009).
Non-final office action issued in U.S. Appl. No. 12/976,884 dated May 17, 2013, 9 pgs.
Non-final office action issued in U.S. Appl. No. 12/976,845 dated Jan. 30, 2013, 9 pgs.
Non-final office action issued in U.S. Appl. No. 13/412,937 dtd Apr. 25, 2013, 12 pgs.
Non-final office action issued in U.S. Appl. No. 12/976,898 dtd Apr. 26, 2013, 12 pgs.
Final office action issued in U.S. Appl. No. 12/976,865 dtd May 24, 2013, 19 pgs.
Non-final office action issued in U.S. Appl. No. 12/976,865 dtd Dec. 28, 2012, 15 pgs.
Final office action issued in U.S. Appl. No. 12/976,845 dtd Aug. 14, 2013, 9 pgs.
Non-final office action issued in U.S. Appl. No. 13/410,806 dtd Aug. 15, 2013, 12 pgs.
Final office action issued in U.S. Appl. No. 12/976,898 dtd Sep. 3, 2013, 14 pgs.
Non-final office action issued in U.S. Appl. No. 12/976,865 dtd Sep. 13, 2013, 9 pgs.
Final office action issued in U.S. Appl. No. 12/976,884 dtd Oct. 23, 2013, 6 pgs.
Office action issued in the U.S. Appl. No. 12/976,845 dtd Jan. 29, 2014, 9 pgs.
Final office action issued in the U.S. Appl. No. 12/976,865, dtd Feb. 27, 2014, 11 pgs.
Related Publications (1)
Number Date Country
20120166506 A1 Jun 2012 US