An ADC correction circuit applied to wide-range current detection
By using a calibration circuit combining a chopper switch and PGA zeroing, the gain error and offset error of the ADC are corrected, solving the error problem caused by the external environment in wide-range current detection of the ADC and realizing accurate current measurement.
Patent Information
- Application Number
- CN202211128276.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-09-16
AI Technical Summary
In existing technologies, ADCs are easily affected by the external environment in wide-range current detection, leading to offset and gain errors, which affect the accurate measurement of electric vehicle battery management systems.
A correction circuit consisting of a chopper switch, a short-circuit switch, a PGA, an ADC, a PGA controller, a PGA multiplier, a chopper controller, a correction multiplier, and a correction adder is used to correct the gain error and offset error in the ADC sampling channel through multiplication and addition operations. Error correction is achieved by combining the PGA zeroing and chopping mechanisms.
It significantly corrects the gain and offset errors of the ADC, improves the dynamic range of the circuit, accurately measures a wide range of currents, and has a simple structure that is easy to implement.
Smart Images

Figure CN115347895B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ADC detection technology, and more specifically, to an ADC correction circuit for wide-range current detection. Background Technology
[0002] Sensing the world is a crucial function of the Analog-to-Digital Converter (ADC). Digital systems often use ADCs to convert external analog signals into processable digital signals. These signals are then processed by the powerful data processing capabilities of digital circuits to achieve the desired functionality. The accuracy of the ADC has a significant impact on the performance of the digital system; higher conversion accuracy results in better system performance.
[0003] An ADC is a high-precision data conversion device, but in practical use it is easily affected by the external environment, often failing to achieve the accuracy specified by the ADC. This loss of accuracy can significantly impact the performance of the entire system; therefore, error correction is necessary for the ADC results.
[0004] The static indicators of ADC design, i.e., error types, can be broadly categorized into four types: offset error, gain error, differential nonlinearity, and integral nonlinearity. Offset error and gain error are primarily influenced by external environmental factors, while differential and integral nonlinearity errors often depend on the ADC's structure and manufacturing process. Furthermore, the correction principles for offset and gain errors are relatively simple, requiring fewer resources and making them suitable for chip-level correction. In contrast, differential and integral nonlinearity errors are structure-dependent, making them difficult to correct and requiring methods such as polynomial approximation and lookup tables, which are costly in terms of area and not universally applicable, thus unsuitable for chip-level correction.
[0005] Electric vehicle battery packs consist of hundreds of cells connected in series and parallel, with a wide range of charging and discharging currents. Accurate measurement of this wide current range is a crucial aspect of battery management systems (BMS) for monitoring battery status. Current sensing ADCs indirectly measure current by measuring the voltage across a shunt resistor. Because the current input range is large, and the shunt resistor value is chosen to be small and fixed after selection, the voltage to be detected needs to be processed to fit within the ADC's processing range in order to accurately measure the wide current range.
[0006] This invention focuses on wide-range current sensing ADCs, and studies the correction of offset and gain errors caused by external environment. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides an ADC correction circuit for wide-range current detection, which can correct gain and offset errors in the ADC sampling channel based on multiplication and addition operations. It has significant effects, a simple structure, and is easy to implement.
[0008] As a first aspect of the present invention, an ADC correction circuit for wide-range current detection is provided, the ADC correction circuit for wide-range current detection includes a chopper switch, a short-circuit switch, a PGA, an ADC, a PGA controller, a PGA multiplier, a chopper controller, a correction multiplier, a correction adder, and a gain error correction module.
[0009] The first input terminal of the chopper switch is used to input the voltage signal to be detected, the second input terminal of the chopper switch is connected to the first output terminal of the chopper controller, the output terminal of the chopper switch is connected to the first input terminal of the PGA, and the chopper switch is used to control the direction of the voltage signal to be detected.
[0010] The switch control terminal of the short-circuit switch is connected to the first output terminal of the PGA controller, and the short-circuit switch is connected to both ends of the output signal of the chopper switch. The short-circuit switch is used to short-circuit the input signal of the PGA.
[0011] The second input terminal of the PGA is connected to the second output terminal of the PGA controller, and the output terminal of the PGA is connected to the input terminal of the ADC. The PGA is used to amplify the gain of the voltage signal to be detected.
[0012] The input terminal of the PGA controller is connected to the output terminal of the correction adder, and the third output terminal of the PGA controller is connected to the first input terminal of the PGA multiplier. The PGA controller is used to control the short-circuit switch to achieve zeroing of the PGA and control the gain amplification of the PGA.
[0013] The second input terminal of the PGA multiplier is connected to the quantization data output terminal of the ADC, and the output terminal of the PGA multiplier is connected to the first input terminal of the correction multiplier and the input terminal of the chopper controller, respectively. The PGA multiplier is used to remove the gain amplification of the voltage signal to be detected by the PGA.
[0014] The second output terminal of the chopper controller is connected to the first input terminal of the correction adder, and the chopper controller is used to output the offset error correction coefficient to the correction adder;
[0015] The first input terminal of the correction multiplier is used to input the raw voltage quantization data of the ADC; the second input terminal of the correction multiplier is connected to the gain error correction module and is used to obtain the gain error correction coefficient output by the gain error correction module; the output terminal of the correction multiplier is connected to the second input terminal of the correction adder.
[0016] The correction multiplier and the correction adder are used to correct the gain error and offset error of the original voltage quantization data after the PGA is zeroed. The output of the correction adder outputs the corrected voltage quantization data.
[0017] Furthermore, the PGA includes a transconductance amplifier and an operational amplifier, and the PGA controller includes a PGA digital-to-analog converter and a PGA gain controller. The input terminal of the PGA digital-to-analog converter is connected to the output terminal of the correction adder, the output terminal of the PGA digital-to-analog converter is connected to the transconductance amplifier, and the output terminal of the PGA gain controller is connected to the first input terminal of the PGA and the PGA multiplier, respectively.
[0018] The transconductance amplifier and the operational amplifier constitute a closed-loop PGA structure, and the variable gain of the PGA is achieved by changing the transconductance of the transconductance amplifier through the PGA gain controller;
[0019] Before use, the PGA controller controls the short-circuit switch to close, making the PGA input 0. At this time, the input of the PGA is only the offset error voltage. The offset error quantization value measured by the ADC is output to the PGA digital-to-analog converter via the correction adder. The PGA digital-to-analog converter converts the offset error value into an analog offset voltage value. The transconductance amplifier subtracts the feedback analog offset voltage value at its input terminal to achieve zeroing of the PGA.
[0020] After the PGA zeroing is completed, the PGA controller controls the short-circuit switch to open, and the ADC correction circuit starts to work normally. The correction multiplier and the correction adder correct the gain error and offset error in the ADC sampling channel according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff.
[0021] Furthermore, after the PGA zeroing is completed, the PGA controller controls the short-circuit switch to open, and the ADC correction circuit starts to work normally. The chopper switch alternately transmits the voltage signal to be detected to the PGA. The zeroed PGA is used to amplify the voltage signal to be detected and then transmit it to the ADC for sampling. The ADC outputs the amplified voltage quantization data to the PGA multiplier. The PGA multiplier is used to remove the PGA gain from the amplified voltage quantization data to output the original voltage quantization data src_data. Then, the correction multiplier and the correction adder correct the original voltage quantization data src_data according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff.
[0022] Furthermore, the chopper controller is used to acquire the raw voltage quantization data src_data output by the PGA multiplier. Assuming that the raw voltage quantization data src_data currently sampled and output by the ADC is V2 and the raw voltage quantization data src_data output in the previous sampling is V1, the chopper controller obtains the offset error correction coefficient off_coeff by calculating the difference between the current raw voltage quantization data V2 and the previous raw voltage quantization data V1.
[0023] Furthermore, the gain error correction module includes a memory, a selector, an interpolator, a coefficient multiplier, and a coefficient adder;
[0024] The first output terminal of the memory is connected to the input terminal of the interpolator and the selection signal input terminal of the selector, respectively. The second output terminal of the memory is connected to the first data input terminal of the selector. The third output terminal of the memory is connected to the second data input terminal of the selector. The fourth output terminal of the memory is connected to the first input terminal of the coefficient adder. The memory is used to store temperature coefficients and the current ambient temperature value. The temperature coefficients include room temperature coefficient, high temperature coefficient, and low temperature coefficient.
[0025] The output of the selector is connected to the first input of the coefficient multiplier, and the selector is used to select the high temperature coefficient or the low temperature coefficient according to the current ambient temperature value.
[0026] The output of the interpolator is connected to the second input of the coefficient multiplier. The interpolator is used to obtain a temperature proportionality coefficient based on the current ambient temperature value. The output of the coefficient multiplier is connected to the second input of the coefficient adder. The third input of the coefficient adder is a fixed value of 1. The output of the coefficient adder is connected to the second input of the correction multiplier. The coefficient adder is used to calculate the gain error correction coefficient.
[0027] Furthermore, the formula for calculating the gain error correction coefficient gain_coeff is as follows (1):
[0028] gain-coeff=1+gain-room+K(T)×gain-hot / cold (1)
[0029] Wherein, gain_room is the room temperature coefficient, K(T) is the temperature proportionality coefficient, gain_hot is the high temperature coefficient, gain_cold is the low temperature coefficient, and the gain error correction coefficient gain_coeff is calculated by the coefficient adder.
[0030] Furthermore, the formula for calculating the corrected voltage quantization data cali_data is as follows (2):
[0031] cali-data=(src-data×gain-coeff)+off-coeff (2)
[0032] Wherein, src_data is the original voltage quantization data of the ADC, gain_coeff is the gain error correction coefficient, off_coeff is the offset error correction coefficient, and the corrected voltage quantization data cali_data is calculated by the correction adder.
[0033] Furthermore, the temperature proportionality coefficient K(T) is a decimal less than or equal to 1, wherein,
[0034] The closer the current ambient temperature T is to the set high temperature coefficient gain_hot or low temperature coefficient gain_cold, the larger the temperature proportionality coefficient K(T) becomes.
[0035] When the current ambient temperature T is equal to the set room temperature coefficient gain_room, the temperature proportionality coefficient K(T) is 0.
[0036] Furthermore, the PGA gain controller controls the gain of the PGA and outputs the reciprocal of the gain coefficient to the PGA multiplier as a multiplication coefficient to eliminate the gain implemented by the PGA and restore the true measured value of the voltage signal to be detected.
[0037] Furthermore, the voltage signal to be detected at the first input terminal of the chopper switch is a differential signal, and the chopper controller is used to control the chopper switch to alternately output the differential signal.
[0038] The ADC correction circuit for wide-range current detection provided by this invention has the following advantages: It obtains the gain error correction coefficient through the temperature-dependent gain coefficient in the interpolator and memory, and corrects the offset error through PGA zeroing and chopping mechanisms. Specifically, the circuit ensures a small offset error in the signal before PGA input by using PGA zeroing, making it suitable for cases with large offset voltages and improving the circuit's dynamic range. The circuit eliminates the residual offset voltage after zeroing through chopping, making it suitable for cases with small offset ratios. The offset error correction coefficient is obtained through chopping, and then the gain and offset errors in the ADC sampling channel are corrected using multiplication and addition operations, resulting in significant effects, a simple structure, and ease of implementation. Attached Figure Description
[0039] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof.
[0040] Figure 1 This is a block diagram of the ADC correction circuit for wide-range current detection provided by the present invention. Detailed Implementation
[0041] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the ADC correction circuit for wide-range current detection proposed according to the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] In explaining this invention, it should be noted that the terms "installation," "connection," and "linking" should be interpreted broadly unless otherwise specified. For example, a connection can be a fixed connection, a connection through a special interface, or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0044] This embodiment provides an ADC correction circuit for wide-range current detection, such as... Figure 1 As shown, the ADC correction circuit 10 applied to wide-range current detection includes a chopper switch 20, a short-circuit switch 30, a PGA 40, an ADC 50, a PGA controller 60, a PGA multiplier 70, a chopper controller 80, a correction multiplier 90, a correction adder 100, and a gain error correction module.
[0045] The first input terminal of the chopper switch 20 is used to input the voltage signal to be detected. The second input terminal of the chopper switch 20 is connected to the first output terminal of the chopper controller 80. The output terminal of the chopper switch 20 is connected to the first input terminal of the PGA40. The chopper switch 20 is used to control the direction of the voltage signal to be detected.
[0046] The switching control terminal of the short-circuit switch 30 is connected to the first output terminal of the PGA controller 60. The short-circuit switch 30 is connected to both ends of the output signal of the chopper switch 20. The short-circuit switch 30 is used to short-circuit the input signal of the PGA 40.
[0047] The second input terminal of the PGA40 is connected to the second output terminal of the PGA controller 60, and the output terminal of the PGA40 is connected to the input terminal of the ADC50. The PGA40 is used to amplify the gain of the voltage signal to be detected.
[0048] The input terminal of the PGA controller 60 is connected to the output terminal of the correction adder 100, and the third output terminal of the PGA controller 60 is connected to the first input terminal of the PGA multiplier 70. The PGA controller 60 is used to control the short-circuit switch 30 to realize the zeroing of the PGA 40 and control the gain amplification of the PGA 40.
[0049] The second input terminal of the PGA multiplier 70 is connected to the quantization data output terminal of the ADC 50, and the output terminal of the PGA multiplier 70 is connected to the first input terminal of the correction multiplier 90 and the input terminal of the chopper controller 80, respectively. The PGA multiplier 70 is used to remove the gain amplification of the voltage signal to be detected by the PGA 40.
[0050] The second output terminal of the chopper controller 80 is connected to the first input terminal of the correction adder 100, and the chopper controller 80 is used to output the offset error correction coefficient to the correction adder 100;
[0051] The first input terminal of the correction multiplier 90 is used to input the original voltage quantization data src_data of the ADC; the second input terminal of the correction multiplier 90 is connected to the gain error correction module and is used to obtain the gain error correction coefficient output by the gain error correction module; the output terminal of the correction multiplier 90 is connected to the second input terminal of the correction adder 100.
[0052] The correction multiplier 90 and the correction adder 100 are used to correct the gain error and offset error of the original voltage quantization data after the PGA40 is zeroed. The output of the correction adder 100 outputs the corrected voltage quantization data cali_data.
[0053] Preferably, the PGA40 includes a transconductance amplifier 401 and an operational amplifier 402, and the PGA controller 60 includes a PGA digital-to-analog converter 601 and a PGA gain controller 602. The input terminal of the PGA digital-to-analog converter 601 is connected to the output terminal of the correction adder 100, the output terminal of the PGA digital-to-analog converter 601 is connected to the transconductance amplifier 401, and the output terminal of the PGA gain controller 602 is connected to the first input terminal of the PGA40 and the PGA multiplier 70, respectively.
[0054] The transconductance amplifier 401 and the operational amplifier 402 constitute a closed-loop PGA structure. The variable gain of the PGA 40 is achieved by changing the transconductance of the transconductance amplifier 401 through the PGA gain controller 602.
[0055] Before use, the PGA controller 60 controls the short-circuit switch 30 to close, making the input of the PGA40 zero. That is, when the input is short-circuited, the input of the PGA40 is only the offset error voltage. The offset error quantization value measured by the ADC50 is output to the PGA digital-to-analog converter 601 via the correction adder 100. The PGA digital-to-analog converter 601 converts the offset voltage value into an analog offset voltage value. The transconductance amplifier 401 subtracts the feedback analog offset voltage value at its input terminal to achieve zeroing of the PGA40.
[0056] After the PGA40 is zeroed, the PGA controller 60 controls the short-circuit switch 30 to open, and the ADC correction circuit starts to work normally. The correction multiplier 90 and the correction adder 100 correct the gain error and offset error in the ADC sampling channel according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff.
[0057] In this embodiment of the invention, PGA40 is a programmable gain amplifier, OTA is a transconductance amplifier, and OPA is an operational amplifier.
[0058] Preferably, after the PGA40 is zeroed, the PGA controller 60 controls the short-circuit switch 30 to open, and the ADC correction circuit starts to work normally. The chopper switch 20 alternately transmits the voltage signal to be detected to the PGA40. The zeroed PGA40 is used to amplify the voltage signal to be detected and then transmit it to the ADC50 for sampling. The ADC50 outputs the amplified voltage quantization data to the PGA multiplier 70. The PGA multiplier 70 is used to remove the PGA gain from the amplified voltage quantization data to output the original voltage quantization data src_data. Then, the correction multiplier 90 and the correction adder 100 correct the original voltage quantization data src_data according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff.
[0059] Preferably, the chopper controller 80 is used to acquire the raw voltage quantization data src_data output by the PGA multiplier 70. Assuming that the raw voltage quantization data src_data currently sampled and output by the ADC 50 is V2 and the raw voltage quantization data src_data output in the previous sampling is V1, the chopper controller 80 obtains the offset error correction coefficient off_coeff by calculating the difference between the current raw voltage quantization data V2 and the previous raw voltage quantization data V1.
[0060] Preferably, the gain error correction module includes a memory 110, a selector 120, an interpolator 130, a coefficient multiplier 140, and a coefficient adder 150;
[0061] The first output terminal of the memory 110 is connected to the input terminal of the interpolator 130 and the selection signal input terminal of the selector 120, respectively. The second output terminal of the memory 110 is connected to the first data input terminal of the selector 120. The third output terminal of the memory 110 is connected to the second data input terminal of the selector 120. The fourth output terminal of the memory 110 is connected to the first input terminal of the coefficient adder 150. The memory 110 is used to store temperature coefficients and the current ambient temperature value. The temperature coefficients include room temperature coefficient, high temperature coefficient, and low temperature coefficient.
[0062] The output of the selector 120 is connected to the first input of the coefficient multiplier 140. The selector 120 is used to select the high temperature coefficient or the low temperature coefficient according to the current ambient temperature value.
[0063] The output of the interpolator 130 is connected to the second input of the coefficient multiplier 140. The interpolator 130 is used to obtain a temperature proportionality coefficient based on the current ambient temperature value. The output of the coefficient multiplier 140 is connected to the second input of the coefficient adder 150. The third input of the coefficient adder 150 is input with a fixed value of 1. The output of the coefficient adder 150 is connected to the second input of the correction multiplier 90. The coefficient adder 150 is used to calculate the gain error correction coefficient.
[0064] Preferably, the gain error correction coefficient gain_coeff is calculated using the following formula (1):
[0065] gain-coeff=1+gain-room+K(T)×gain-hot / cold (1)
[0066] Wherein, gain_room is the room temperature coefficient, K(T) is the temperature proportionality coefficient, gain_hot is the high temperature coefficient, gain_cold is the low temperature coefficient, and the gain error correction coefficient gain_coeff is calculated by the coefficient adder 150.
[0067] Preferably, the formula for calculating the corrected voltage quantization data cali_data is as follows (2):
[0068] cali-data=(src-data×gain-coeff)+off-coeff (2)
[0069] Wherein, src_data is the original voltage quantization data of the ADC, gain_coeff is the gain error correction coefficient, off_coeff is the offset error correction coefficient, and the corrected voltage quantization data cali_data is calculated by the correction adder 100.
[0070] Specifically, selector 120 is a data selector.
[0071] Specifically, the temperature coefficient in the memory 110 is related to the ADC temperature and is obtained through actual testing of the ADC; the current ambient temperature value in the memory is the output value of the temperature sensor or the temperature value written by the MCU.
[0072] The ADC correction circuit provided by this invention for wide-range current detection amplifies the voltage to a range suitable for ADC processing by zeroing the PGA40, so as to accurately measure the current over a wide range.
[0073] For current-sensing ADCs, this invention provides two offset error correction methods: zeroing and chopping. Zeroing is generally used when the offset voltage is large to improve the dynamic range of the circuit. This invention achieves zeroing of the PGA40 through short-circuit switch 30 and PGA controller 60. After PGA40 is zeroed, the gain error correction coefficient gain_coeff is obtained through interpolator 130 and temperature-related gain coefficients in memory 110, as shown in formula (1). The offset error correction coefficient off_coeff is obtained through chopping mechanism. Then, the gain error and offset error in the ADC sampling channel are corrected according to multiplication and addition operations, as shown in formula (2). cali_data is the final output result after correction. This invention has significant correction effect, simple structure, and is easy to implement.
[0074] It should be noted that the PGA zeroing interval should be reasonably set according to the degree of change in the external environment of the system being used. Generally, PGA zeroing can be performed at the beginning of circuit power-on or at the beginning of switching measurement channels. PGA zeroing cannot eliminate all offset errors, while chopping is used to eliminate the residual offset voltage after zeroing, which is suitable for cases with a small offset ratio. The ADC correction circuit provided by this invention obtains the gain error correction coefficient through the interpolator and the temperature-related gain coefficient in the memory, as shown in formula (1); the offset error correction coefficient is obtained through the chopping mechanism, and then the gain error and offset error in the ADC sampling channel are corrected according to the multiplication and addition operations, as shown in formula (2). The present invention has significant correction effect, simple structure, and is easy to implement.
[0075] Preferably, the temperature proportionality coefficient K(T) is a decimal less than 1, wherein the temperature proportionality coefficient K(T) is larger when the current ambient temperature value T is closer to the set high temperature coefficient gain_hot or the low temperature coefficient gain_cold; and the temperature proportionality coefficient K(T) is 0 when the current ambient temperature value T is the set room temperature coefficient gain_room.
[0076] Preferably, the PGA gain controller 602 controls the gain of the PGA40 and outputs the reciprocal of the gain coefficient to the PGA multiplier 70 as a multiplication coefficient to eliminate the gain implemented by the PGA40 and restore the true measured value of the voltage signal to be detected.
[0077] Preferably, the voltage signal to be detected at the first input terminal of the chopper switch 20 is a differential signal. The chopper controller 80 is used to control the chopper switch 20 to alternately output the differential signal. The chopper switch 20 alternately transmits voltage Vin and the inverse of Vin to the input of ADC 50. ADC 50 outputs raw voltage quantization data src_data. Assuming that the src_data output by ADC after two samplings is V1 and V2 respectively, then V1 = +Vin + offset and V2 = -Vin + offset. Generally, the data src_data output by ADC sampling is deviated due to the influence of the external environment and its own circuit. Therefore, a correction circuit is used to adjust these deviations to obtain the corrected data cali_data.
[0078] Preferably, the chopper controller 80 is the control core of the ADC correction circuit applied to wide-range current detection, controls the sampling channel and the chopper switch, and obtains the offset error correction coefficient off_coeff based on the ADC quantization data (V1 and V2); the chopper controller 80 obtains the offset error coefficient off_coeff = (V1 + V2) / 2 by calculating the difference between the current sample (V2) and the previous sample (V1).
[0079] It should be noted that the chopper switch 20 is a switch used in conjunction with the chopper controller 80 to realize the chopping function. Its function is to switch the direction of the input. Assuming that the input from top to bottom is +vin and -vin, the switch control signal is 0, and the output is directly output; if it is 1, the output is switched, and -vin and +vin are output.
[0080] Preferably, the operands of the corrected multiplier 90 and the corrected adder 100 are both fixed-point numbers.
[0081] Preferably, the operands of the coefficient adder 150 and the coefficient multiplier 140 are both fixed-point numbers.
[0082] Preferably, the interpolator 130 uses linear interpolation to obtain the temperature proportionality coefficient based on the current ambient temperature value.
[0083] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An ADC correction circuit for wide-range current detection, characterized in that, The ADC correction circuit (10) for wide-range current detection includes a chopper switch (20), a short-circuit switch (30), a PGA (40), an ADC (50), a PGA controller (60), a PGA multiplier (70), a chopper controller (80), a correction multiplier (90), a correction adder (100), and a gain error correction module. The first input terminal of the chopper switch (20) is used to input the voltage signal to be detected. The second input terminal of the chopper switch (20) is connected to the first output terminal of the chopper controller (80). The output terminal of the chopper switch (20) is connected to the first input terminal of the PGA (40). The chopper switch (20) is used to control the direction of the voltage signal to be detected. The switch control terminal of the short-circuit switch (30) is connected to the first output terminal of the PGA controller (60), and the short-circuit switch (30) is connected to the two output signal terminals of the chopper switch (20) respectively. The short-circuit switch (30) is used to short-circuit the input signal of the PGA (40). The second input terminal of the PGA (40) is connected to the second output terminal of the PGA controller (60), and the output terminal of the PGA (40) is connected to the input terminal of the ADC (50). The PGA (40) is used to amplify the gain of the voltage signal to be detected. The input terminal of the PGA controller (60) is connected to the output terminal of the correction adder (100), and the third output terminal of the PGA controller (60) is connected to the first input terminal of the PGA multiplier (70). The PGA controller (60) is used to control the short-circuit switch (30) to realize the zeroing of the PGA (40) and control the gain amplification of the PGA (40). The second input terminal of the PGA multiplier (70) is connected to the quantization data output terminal of the ADC (50), and the output terminal of the PGA multiplier (70) is connected to the first input terminal of the correction multiplier (90) and the input terminal of the chopper controller (80) respectively. The PGA multiplier (70) is used to remove the gain amplification of the voltage signal to be detected by the PGA (40). The second output terminal of the chopper controller (80) is connected to the first input terminal of the correction adder (100), and the chopper controller (80) is used to output the offset error correction coefficient to the correction adder (100). The first input terminal of the correction multiplier (90) is used to input the original voltage quantization data of the ADC; the second input terminal of the correction multiplier (90) is connected to the gain error correction module and is used to obtain the gain error correction coefficient output by the gain error correction module; the output terminal of the correction multiplier (90) is connected to the second input terminal of the correction adder (100). The correction multiplier (90) and the correction adder (100) are used to correct the gain error and offset error of the original voltage quantization data after the PGA (40) is zeroed. The output of the correction adder (100) outputs the corrected voltage quantization data. The PGA (40) includes a transconductance amplifier (401) and an operational amplifier (402), and the PGA controller (60) includes a PGA digital-to-analog converter (601) and a PGA gain controller (602). The input terminal of the PGA digital-to-analog converter (601) is connected to the output terminal of the correction adder (100), and the output terminal of the PGA digital-to-analog converter (601) is connected to the transconductance amplifier (401). The output terminal of the PGA gain controller (602) is connected to the first input terminal of the PGA (40) and the PGA multiplier (70), respectively. The transconductance amplifier (401) and the operational amplifier (402) constitute a closed-loop PGA structure. The variable gain of the PGA (40) is achieved by changing the transconductance of the transconductance amplifier (401) through the PGA gain controller (602). Before use, the PGA controller (60) controls the short-circuit switch (30) to close, so that the input of the PGA (40) is 0. At this time, the input of the PGA (40) is only the offset error voltage. The offset error quantization value measured by the ADC (50) is output to the PGA digital-to-analog converter (601) through the correction adder (100). The PGA digital-to-analog converter (601) converts it into an analog offset voltage value. The transconductance amplifier (401) subtracts the feedback analog offset voltage value at its input terminal to achieve zeroing of the PGA (40). After the PGA (40) is zeroed, the PGA controller (60) controls the short-circuit switch (30) to open, and the ADC correction circuit starts to work normally. The correction multiplier (90) and the correction adder (100) correct the gain error and offset error in the ADC sampling channel according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff. The voltage signal to be detected at the first input terminal of the chopper switch (20) is a differential signal, and the chopper controller (80) is used to control the chopper switch (20) to alternately output the differential signal.
2. The ADC correction circuit for wide-range current detection according to claim 1, characterized in that, After the PGA (40) is zeroed, the PGA controller (60) controls the short-circuit switch (30) to open, and the ADC correction circuit starts to work normally. The chopper switch (20) alternately transmits the voltage signal to be detected to the PGA (40). The zeroed PGA (40) is used to amplify the voltage signal to be detected and then transmit it to the ADC (50) for sampling. The ADC (50) outputs the amplified voltage quantization data to the PGA multiplier (70). The PGA multiplier (70) is used to remove the PGA gain from the amplified voltage quantization data to output the original voltage quantization data src_data. Then the correction multiplier (90) and the correction adder (100) correct the original voltage quantization data src_data according to the obtained gain error correction coefficient gain_coeff and offset error correction coefficient off_coeff.
3. The ADC correction circuit for wide-range current detection according to claim 2, characterized in that, The chopper controller (80) is used to obtain the original voltage quantization data src_data output by the PGA multiplier (70). Assuming that the original voltage quantization data src_data currently sampled and output by the ADC (50) is V2 and the original voltage quantization data src_data output in the previous sampling is V1, the chopper controller (80) obtains the offset error correction coefficient off_coeff by calculating the difference between the current original voltage quantization data V2 and the previous original voltage quantization data V1.
4. The ADC correction circuit for wide-range current detection according to claim 3, characterized in that, The gain error correction module includes a memory (110), a selector (120), an interpolator (130), a coefficient multiplier (140), and a coefficient adder (150). The first output terminal of the memory (110) is connected to the input terminal of the interpolator (130) and the selection signal input terminal of the selector (120), respectively. The second output terminal of the memory (110) is connected to the first data input terminal of the selector (120). The third output terminal of the memory (110) is connected to the second data input terminal of the selector (120). The fourth output terminal of the memory (110) is connected to the first input terminal of the coefficient adder (150). The memory (110) is used to store temperature coefficients and current ambient temperature values. The temperature coefficients include room temperature coefficient, high temperature coefficient, and low temperature coefficient. The output of the selector (120) is connected to the first input of the coefficient multiplier (140), and the selector (120) is used to select the high temperature coefficient or the low temperature coefficient according to the current ambient temperature value. The output of the interpolator (130) is connected to the second input of the coefficient multiplier (140). The interpolator (130) is used to obtain a temperature proportionality coefficient based on the current ambient temperature value. The output of the coefficient multiplier (140) is connected to the second input of the coefficient adder (150). The third input of the coefficient adder (150) is a fixed value of 1. The output of the coefficient adder (150) is connected to the second input of the correction multiplier (90). The coefficient adder (150) is used to calculate the gain error correction coefficient.
5. The ADC correction circuit for wide-range current detection according to claim 4, characterized in that, The formula for calculating the gain error correction coefficient gain_coeff is as follows (1): (1), Wherein, gain_room is the room temperature coefficient, K(T) is the temperature proportionality coefficient, gain_hot is the high temperature coefficient, gain_cold is the low temperature coefficient, and the gain error correction coefficient gain_coeff is calculated by the coefficient adder (150).
6. The ADC correction circuit for wide-range current detection according to claim 5, characterized in that, The formula for calculating the corrected voltage quantization data cali_data is as follows (2): (2), Wherein, src_data is the original voltage quantization data of the ADC, gain_coeff is the gain error correction coefficient, off_coeff is the offset error correction coefficient, and the corrected voltage quantization data cali_data is calculated by the correction adder (100).
7. An ADC correction circuit for wide-range current detection according to claim 5, characterized in that, The temperature proportionality coefficient K(T) is a decimal less than 1, where, The closer the current ambient temperature T is to the set high temperature coefficient gain_hot or low temperature coefficient gain_cold, the larger the temperature proportionality coefficient K(T) becomes. When the current ambient temperature T is equal to the set room temperature coefficient gain_room, the temperature proportionality coefficient K(T) is 0.
8. An ADC correction circuit for wide-range current detection according to claim 2, characterized in that, The PGA gain controller (602) controls the gain of the PGA (40) and outputs the reciprocal of the gain coefficient to the PGA multiplier (70) as a multiplication coefficient to eliminate the gain implemented by the PGA (40) and restore the true measured value of the voltage signal to be detected.
Citation Information
Patent Citations
ADC correction circuit applied to wide-range current detection
CN218587165U