A battery voltage sampling system and compensation method for eliminating common-mode voltage error
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2026-08-11
Smart Images

Figure CN116338480B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery voltage measurement technology, specifically relating to a battery voltage sampling system and compensation method for eliminating common-mode voltage errors. Background Technology
[0002] In the field of new energy, multiple batteries are typically connected in series to increase output voltage. However, because battery failure can easily lead to fire or explosion, it is crucial to constantly monitor the battery's status, such as temperature and voltage, to prevent overheating, overcharging, and over-discharging that could cause failure. Therefore, the battery's status is extremely important, requiring real-time sampling and monitoring of the temperature and voltage of each battery cell. In the cell voltage sampling, because the battery consists of multiple cells connected in series, the voltage of the preceding cells is superimposed as a common-mode voltage on the sampling of subsequent cells. This reduces sampling accuracy, and the impact of common-mode voltage is particularly pronounced in high-precision battery charge / discharge testing equipment.
[0003] To address the impact of common-mode voltage, existing technologies typically employ high common-mode voltage differential amplifiers, such as the AD629. However, this approach still suffers from errors caused by common-mode voltage, albeit smaller than those of ordinary operational amplifiers. Nevertheless, in high-precision measurement equipment, the errors caused by this common-mode voltage still fail to meet the high-precision requirements. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a compensation method for eliminating common-mode voltage errors. By compensating for the sampling voltage of each battery sampling channel, the method solves the problem of excessive voltage sampling errors caused by common-mode voltage when sampling cell voltages in a high-precision measurement system with multiple batteries connected in series.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A battery voltage sampling compensation method for eliminating common-mode voltage error is characterized by: first testing the common-mode compensation coefficient of each battery sampling channel, then calculating the common-mode voltage value of each battery sampling channel based on the sampling voltage of each battery sampling channel, and then the voltage compensation value of each battery sampling channel is the product of the common-mode compensation coefficient and the common-mode voltage value.
[0007] Furthermore, a battery voltage sampling compensation method for eliminating common-mode voltage error according to the present invention includes the following steps:
[0008] Step S1: The linearity error of each battery sampling channel is calibrated one by one using the linear function Y = KX + B to obtain the calibration coefficients K and B;
[0009] Step S2: Read the measured value V3 of a single battery sampling channel after calibration;
[0010] Step S3: Calculate the error caused by the rated common-mode voltage;
[0011] If the rated common-mode voltage Vcom is applied to the front end of the battery sampling channel and the measured value V4 is read, then the error caused by the rated common-mode voltage is (V3-V4).
[0012] Step S4: Calculate the common-mode compensation coefficient C;
[0013] The common-mode compensation coefficient C is equal to the rated common-mode voltage Vcom / (V3-V4).
[0014] Step S5: Remove the rated common-mode voltage Vcom, connect all battery sampling channels to the individual battery, read the voltage value, and calculate the common-mode voltage V5 that each battery sampling channel bears.
[0015] Step S6: The battery voltage value VOUT for each battery sampling channel is K(X+CX V5)+B.
[0016] Furthermore, in step S1, the linear function is calibrated at two points: when the input is 0, the measured value V1 is read; when the input is 3.3v, the measured value V2 is read.
[0017] Furthermore, in step S1, the calibration coefficients K and B are written into the memory.
[0018] Furthermore, in step S6, the processor calculates the battery voltage value for each battery sampling channel.
[0019] This invention also provides a battery voltage sampling compensation system for eliminating common-mode voltage errors, characterized in that it includes multiple battery sampling channels, an analog-to-digital converter, and a processor connected in series. Each battery sampling channel has a differential operational amplifier connected to its positive and negative terminals. The differential operational amplifier converts the analog signal of the battery sampling channel's voltage into a single-ended signal, which is then input to the subsequent analog-to-digital converter. The analog-to-digital converter converts the analog signal into a digital signal and transmits it to the processor. The system is characterized in that a rated common-mode voltage Vcom is connected between the negative terminal of the battery sampling channel and the system ground of the sampling system.
[0020] Furthermore, the rated common-mode voltage Vcom is half the sum of the positive and negative input voltages of the differential operational amplifier.
[0021] Furthermore, the differential operational amplifier is AD629; the analog-to-digital converter is AD7606; the processor is GD32F303ZET6; and the memory is 24LC641.
[0022] Because the present invention adopts the above technical solution, it has the following advantages and effects:
[0023] The sampling system and compensation method of the present invention pre-test the common-mode compensation coefficient of each battery sampling channel, and then calculate the common-mode voltage value of each battery sampling channel based on the sampling voltage of each channel. The product of the common-mode compensation coefficient and the common-mode voltage value is the voltage compensation value of each battery sampling channel. The present invention can measure the sampling voltage in any series connection of batteries, effectively improving the voltage sampling accuracy to below 0.02%. Attached Figure Description
[0024] Figure 1 This is a block diagram of the existing battery voltage sampling system.
[0025] Figure 2 This is a block diagram of the battery voltage sampling system of the present invention.
[0026] Figure 3 This is a flowchart of the battery voltage sampling and compensation method of the present invention.
[0027] Among them, 1-battery sampling channel, 2-differential operational amplifier, 3-digital-to-analog converter, 4-processor, and 5-memory. Detailed Implementation
[0028] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings to provide a clearer understanding of the purpose, features, and advantages of the present invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of the present invention, but are merely illustrative of the essential spirit of the technical solution of the present invention.
[0029] like Figure 1 As shown, in existing battery sampling systems, a differential operational amplifier 2 samples the voltage across the battery terminals in sampling channel 1. The voltage signal is then converted into a single-ended signal and input to the subsequent analog-to-digital converter 3. The analog-to-digital converter 3 converts the analog signal into a digital signal and transmits the data to the processor 4 via SPI. The processor 4 communicates with the host computer via Ethernet to display the sampled value. In high-precision measurement equipment, this sampling system still suffers from errors caused by common-mode voltage, although the error is smaller than that of ordinary operational amplifiers. In high-precision measurement equipment, the error caused by common-mode voltage still cannot meet the accuracy requirements.
[0030] like Figure 2As shown. This invention provides a battery voltage sampling system for eliminating common-mode voltage errors. The sampling system includes multiple battery sampling channels 1 connected in series, an analog-to-digital converter 3, and a processor 4. A battery is disposed within each battery sampling channel. A differential operational amplifier 2 is connected to the positive and negative terminals of each battery sampling channel 1. The differential operational amplifier 2 converts the analog signal of the battery voltage from the sampling channel into a single-ended signal, which is then input to the subsequent analog-to-digital converter 3. The analog-to-digital converter 3 converts the analog signal into a digital signal and transmits it to the processor 4. The processor 4 is connected to a host computer and a memory 5. The invention is characterized by a rated common-mode voltage connected between the negative terminal of each battery sampling channel 1 and the system ground of the sampling system. The rated common-mode voltage is half the sum of the positive and negative input voltages of the differential operational amplifier 2.
[0031] Furthermore, the differential operational amplifier 2 preferably uses AD629, the analog-to-digital converter 3 preferably uses AD7606, the processor 4 preferably uses GD32F303ZET6, and the memory 5 preferably uses 24LC641.
[0032] Based on the aforementioned sampling system, this invention also provides a battery voltage sampling compensation method for eliminating common-mode voltage errors. This method is applicable to voltage sampling of multiple series-connected batteries in a high-precision testing system. First, the common-mode compensation coefficient of each battery sampling channel 1 is tested and written into memory 5. Then, based on the sampling voltage of each battery sampling channel 1, the common-mode voltage value of each battery sampling channel 1 can be calculated. The product of the common-mode compensation coefficient and the common-mode voltage value is the compensation value for each battery sampling channel 1.
[0033] like Figure 3 As shown. Furthermore, the present invention provides a battery voltage sampling compensation method for eliminating common-mode voltage errors, specifically including the following steps:
[0034] Step S1: Calibrate the linearity error of the differential operational amplifier for each battery sampling channel 1 one by one (the linearity error of the differential operational amplifier is the proportional error of the differential operational amplifier 2);
[0035] The calibration method is as follows: A two-point calibration method is used, namely:
[0036] When the input is 0, the measured value V1 is read;
[0037] The input is 3.3V (3.3V is the voltage of a single battery cell), and the measured value V2 is read. According to the linear function Y=KX+B, the calibration coefficients K and B can be obtained, and the calibration coefficients K and B are written into the memory 5.
[0038] Step S2: Read the measurement value of a single battery sampling channel after calibration (the measurement value is the reading value of the host computer when 3.3V is input again);
[0039] That is, input a given value of 3.3V and read the measured value V3.
[0040] Step S3: Calculate the error caused by the rated common-mode voltage;
[0041] The rated common-mode voltage Vcom is connected in series between the negative terminal of battery sampling channel 1 and system ground, and the measured value V4 is read; then the error generated by the rated common-mode voltage = V3-V4; the rated common-mode voltage Vcom is half of the sum of the positive and negative input voltages of the differential operational amplifier 2.
[0042] Step S4: Calculate the common-mode compensation coefficient C and write it into memory;
[0043] The common-mode compensation coefficient C = rated common-mode voltage Vcom / (V3 - V4).
[0044] Step S5: Remove the rated common-mode voltage. After power failure and restart, connect all battery sampling channels 1 to individual cells (multiple cells are connected in series). After reading the voltage value of each individual cell through each battery sampling channel 1, the common-mode voltage V5 that each cell bears can be calculated. The common-mode voltage V5 is equal to the sum of the sampling values of all battery sampling channels before this single battery sampling channel.
[0045] Step S6: The processor 4 finally calculates the voltage value sampled by each battery sampling channel as: VOUT=K(X+CX V5)+B.
[0046] The compensation method of this invention performs 16-channel battery voltage sampling, which can effectively improve the voltage sampling accuracy to below 0.02%. The test results are shown in Table 1 below.
[0047]
[0048] Table 116 Battery Voltage Sampling Parameters
[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A battery voltage sampling compensation method for eliminating common-mode voltage error, characterized in that: First, test the common-mode compensation coefficient of each battery sampling channel, then calculate the common-mode voltage value of each battery sampling channel based on the sampling voltage of each battery sampling channel. The voltage compensation value of each battery sampling channel is then the product of the common-mode compensation coefficient and the common-mode voltage value. Specifically, the following steps are included: Step S1: The linearity error of each battery sampling channel is calibrated one by one using the linear function Y = KX + B to obtain the calibration coefficients K and B; Step S2: Read the measured value V3 of a single battery sampling channel after calibration; Step S3: Calculate the error caused by the rated common-mode voltage; When the rated common-mode voltage Vcom is applied to the front end of the battery sampling channel and the measured value V4 is read, the error generated by the rated common-mode voltage is (V3-V4). Step S4: Calculate the common-mode compensation coefficient C; The common-mode compensation coefficient C is equal to the rated common-mode voltage Vcom / (V3-V4). Step S5: Remove the rated common-mode voltage Vcom, connect all battery sampling channels to the individual battery, read the voltage value, and calculate the common-mode voltage V5 that each battery sampling channel bears. Step S6: The battery voltage value VOUT for each battery sampling channel is K(X+CXV5)+B.
2. The battery voltage sampling compensation method for eliminating common-mode voltage error according to claim 1, characterized in that: In step S1, the linear function uses two-point calibration: when the input is 0, the measured value V1 is read; when the input is 3.3v, the measured value V2 is read.
3. The battery voltage sampling compensation method for eliminating common-mode voltage error according to claim 2, characterized in that: In step S1, the calibration coefficients K and B are written into the memory.
4. The battery voltage sampling compensation method for eliminating common-mode voltage error according to claim 3, characterized in that: In step S6, the processor calculates the battery voltage value for each battery sampling channel.
5. A sampling system employing the battery voltage sampling compensation method for eliminating common-mode voltage error as described in any one of claims 1-4, characterized in that: The system includes multiple battery sampling channels, an analog-to-digital converter (ADC), and a processor connected in series. Each battery sampling channel has a differential operational amplifier (op-amp) connected to its positive and negative terminals. The differential op-amp converts the analog signal of the battery sampling channel's voltage into a single-ended signal, which is then input to the subsequent ADC. The ADC converts the analog signal into a digital signal and transmits it to the processor. The system is characterized by having a rated common-mode voltage Vcom connected between the negative terminal of the battery sampling channel and the system ground of the sampling system.
6. The sampling system according to claim 5, characterized in that: The rated common-mode voltage Vcom is half the sum of the positive and negative input voltages of the differential operational amplifier.
7. The sampling system according to claim 5, characterized in that: The differential operational amplifier is AD629; the analog-to-digital converter is AD7606; the processor is GD32F303ZET6; and the memory is 24LC641.
Citation Information
Patent Citations
Calibration method of common-mode voltage
CN114839580A