A method for calculating battery current in LLC topology
By sampling and accumulating resonant current in the llc topology and calculating the battery current, the problem of both cost and accuracy in the prior art is solved, and efficient and accurate battery current measurement is achieved.
Patent Information
- Application Number
- CN202510073106.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-17
AI Technical Summary
The prior art cannot take into account both cost and accuracy when sampling battery current in 1C topology, and traditional methods have problems such as loss, high complexity and poor versatility.
By sampling the resonant current at a certain time in the 1C topology, the sampling value is accumulated according to the battery state, and the battery current is obtained through the difference or sum calculation, and finally the accurate battery current is obtained through proportional transformation.
It realizes accurate calculation of battery current without increasing circuit cost and loss, which is suitable for charging and discharging back and forth conversion, and supports closed-loop control and display.
Smart Images

Figure CN119471431B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new energy technology, and in particular to a method for calculating battery current in an LLC topology. Background Art
[0002] In the prior art, LLC topology is often used as the DC / DC link of energy storage products to perform voltage boosting and downshifting. The methods for sampling the battery current of LLC topology are:
[0003] Method 1: directly sample the battery current through a resistor or Hall sensor at the output end of the LLC topology;
[0004] Method 2: Sample the bus current on the DC bus at the input end of the LLC topology, and then convert it using the original-secondary turns ratio.
[0005] However, when using method 1, since the battery current is generally 100A-200A, there will be a certain loss when sampling through resistance, and the resistance is affected by temperature, so the resistance value needs to be corrected, which is more complicated and less accurate; and when using Hall sensors to sample the battery current, since Hall sensors are generally only suitable for current sampling below 100A, they have poor versatility. When using method 2, since the DC bus current is small, although sampling can be performed through Hall sensors, it will increase the circuit cost. Summary of the invention
[0006] The purpose of the present invention is to provide a method for calculating battery current in an LLC topology to solve the problem that the prior art cannot take both cost and accuracy into consideration.
[0007] The present invention provides a method for calculating battery current in an LLC topology, the method comprising:
[0008] Step 1: Every time Ts, the current state of the battery is determined, the resonant current sampling value CurADResult and the state flag bit under different states are accumulated respectively, and the time flag bit CurCnt is counted at the same time;
[0009] Step 2: Return to step 1 or proceed to step 3 according to the time flag;
[0010] Step 3: Determine whether to proceed to step 4 or step 5 according to the status flag;
[0011] Step 4: Calculate the resonant current sampling average value CurSumAvg by difference;
[0012] Step 5: Calculate the resonant current sampling average value CurSumAvg by summing;
[0013] Step 6: Obtain the battery current through proportional transformation, and clear the cumulative sum of the resonant current sampling values, the state flag bit, and the time flag bit CurCnt;
[0014] Step 7: Return to step 1;
[0015] Wherein, Ts is the sampling period of the resonant current sampling value CurADResult.
[0016] Furthermore, the first step is specifically:
[0017] At every time Ts, the current state of the battery is judged. If it is in the charging state, the resonant current sampling value CurADResult is accumulated to obtain the cumulative sum of the resonant current sampling values in the charging state CurSumCh, and the charging flag CurCntCh is counted, and the time flag CurCnt is counted at the same time; if it is in the discharging state, the resonant current sampling value CurADResult is accumulated to obtain the cumulative sum of the resonant current sampling values in the discharging state CurSumDis, and the discharge flag CurCntDis is counted, and the time flag CurCnt is counted at the same time;
[0018] If the current state of the battery is a charging state, the state flag is a charging flag CurCntCh; if the current state of the battery is a discharging state, the state flag is a discharging flag CurCntDis.
[0019] Furthermore, the second step is specifically as follows:
[0020] Determine whether the time flag CurCnt is less than N0, if so, return to step 1; if not, that is, the time flag CurCnt is equal to N0, proceed to step 3;
[0021] Among them, N0=T / Ts, T is the power frequency period of the LLC topology.
[0022] Furthermore, the third step is specifically as follows:
[0023] Determine whether the charging flag bit CurCntCh and the discharging flag bit CurCntDis are both greater than N1, if so, proceed to step 4, if not, proceed to step 5;
[0024] Among them, the range of N1 is (0, N0 / 2).
[0025] Furthermore, the fourth step is specifically as follows:
[0026] The resonant current sampling average value CurSumAvg is calculated according to the absolute value of the difference between the charging flag bit CurSumCh and the discharging flag bit CurSumDis.
[0027] Further, the resonant current sampling average value CurSumAvg is calculated according to the absolute value of the difference between the charging flag bit CurSumCh and the discharging flag bit CurSumDis:
[0028] Determine whether the charging flag CurCntCh is greater than the discharging flag CurCntDis. If so, the calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumCh - CurSumDis) / CurCnt. If not, the calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumDis - CurSumCh) / CurCnt.
[0029] Furthermore, the fifth step is specifically as follows:
[0030] The calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumCh + CurSumDis) / CurCnt.
[0031] Furthermore, the sixth step is specifically as follows:
[0032] According to the hardware sampling circuit parameters of the LLC topology and the primary-to-secondary turns ratio of the transformer, the resonant current sampling average value CurSumAvg is proportionally converted to obtain the battery current Ibat.
[0033] Furthermore, the T is 16.67ms / 20ms.
[0034] Furthermore, the Ts is 20us-50us.
[0035] The above-mentioned calculation method of the battery current in the LLC topology converts the resonant cavity current sampling without increasing the circuit cost and circuit loss. Even when the LLC is switching back and forth between charge and discharge, the accurate battery current can be obtained, and then closed-loop control and display can be performed. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 An LLC topology diagram of an embodiment of the present invention;
[0037] Figure 2 1 is a hardware sampling circuit diagram of the resonant current Irs in an LLC topology according to an embodiment of the present invention;
[0038] Figure 3A schematic diagram of converting the resonant current Irs into a low-frequency voltage in an LLC topology according to an embodiment of the present invention;
[0039] Figure 4 A flow chart of a method for calculating battery current in an LLC topology according to an embodiment of the present invention;
[0040] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0041] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are provided in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0042] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0044] See also Figure 1 , Figure 1 It is an LLC topology diagram, in which the primary side (left side) of the transformer Tr is a DC bus connected full bridge and series resonant topology, and the secondary side (right side) of the transformer Tr is a full bridge synchronous rectifier topology connected to the battery; C1 and C2 are the primary capacitor and the secondary capacitor, respectively, which play a role in smoothing and filtering. In some embodiments, C1 and C2 can be removed. In which, bus represents the DC bus (referred to as the bus), and bat represents the battery; the full bridge of the primary side is formed by connecting the switch tubes Q1-Q4 in series and then in parallel, that is, the switch tubes Q1 and Q2 are connected in series, and the switch tubes Q3 and Q4 are connected in series and then in parallel; the series resonant topology is composed of the resonant inductor Lr, the resonant capacitor Cr and the excitation inductor Lm of the transformer Tr in series, and the full bridge rectifier topology of the secondary side is formed by connecting the switch tubes Q5-Q8 in series and then in parallel, that is, the switch tubes Q5 and Q6 are connected in series, and the switch tubes Q7 and Q8 are connected in series and then in parallel. In one embodiment, the switch tubes Q1-Q8 are all MOS tubes.
[0045] It should be noted that Figure 1 This is just an example to illustrate an LLC circuit topology. In other embodiments, in the LLC topology, the full bridge on the primary side can be replaced by a half bridge, and the series resonant topology on the primary side can be replaced by a parallel resonant topology or a series-parallel resonant topology; the full-bridge synchronous rectification topology on the secondary side can be replaced by a half-bridge synchronous rectification topology, or a full-bridge uncontrolled rectification topology, or a half-bridge uncontrolled rectification topology, and so on.
[0046] The present invention samples the high-frequency resonant cavity current Irs of the LLC topology (the current passing through the primary resonant topology, referred to as the resonant current Irs for short), and finally obtains the battery current Ibat through corresponding transformation. Figure 2 A hardware sampling circuit of a resonant current Irs in an LLC topology is shown. The hardware sampling circuit includes a current transformer L1, a full-wave rectifier circuit, a first resistor R1 and a low-pass filter circuit. The current transformer L1 is used to convert the resonant current Irs into a first current Isam and then send it to the full-wave rectifier circuit. Specifically, the wire where the resonant cavity current Irs is located passes through the cavity of the current transformer L1. The resonant cavity current Irs is the primary side current of the current transformer L1. The first current Isam is the secondary side current of the current transformer L1. The two ends of the secondary side of the current transformer L1 are respectively connected to the two midpoint ends of the full-wave rectifier circuit, and the two common ends of the full-wave rectifier circuit are respectively connected to the two ends of the first resistor R1. The two ends of the first resistor R1 serve as input ends of the low-pass filter circuit, and the output of the low-pass filter circuit serves as the input of the LLC circuit controller (referred to as the controller) MCU.
[0047] In one embodiment, the full-wave rectifier circuit includes four diodes, namely a first diode D1, a second diode D2, a third diode D3, and a fourth diode D4. The anode of the first diode D1 is connected to the cathode of the second diode D2, serving as the first midpoint of the full-wave rectifier circuit; the anode of the third diode D3 is connected to the cathode of the fourth diode D4, serving as the second midpoint of the full-wave rectifier circuit; the cathode of the first diode D1 is connected to the cathode of the third diode D3, serving as the first common terminal of the full-wave rectifier circuit, and the anode of the second diode D2 is connected to the anode of the fourth diode D4, serving as the second common terminal of the full-wave rectifier circuit; it can be understood that the first midpoint and the second midpoint of the full-wave rectifier circuit are the two midpoints of the aforementioned full-wave rectifier circuit, and the first common terminal and the second common terminal of the full-wave rectifier circuit are the two common terminals of the full-wave rectifier circuit. One end of the secondary side of the current transformer L1 is connected to the first midpoint of the full-wave rectifier circuit, and the other end of the secondary side of the current transformer L1 is connected to the second midpoint of the full-wave rectifier circuit; the low-pass filter circuit includes a second resistor R2 and a third capacitor C3 connected in series, the first common end of the full-wave rectifier circuit is connected to one end of the first resistor R1 and one end of the second resistor R2, and the second common end of the full-wave rectifier circuit is connected to the other end of the first resistor R1 and one end of the third capacitor C3; the other end of the second resistor R2 is connected to the other end of the third capacitor C3; the two ends of the third capacitor C3 are the output ends of the low-pass filter circuit, and are connected to the input ends of the controller MCU.
[0048] Understandably, Figure 2 The hardware sampling circuit shown may also be in other forms as long as it can convert the high-frequency resonant cavity current Irs (resonant current Irs) into a low-frequency voltage signal.
[0049] Figure 3 FIG. 1 shows a schematic diagram of converting the resonant current Irs into a low-frequency voltage in an LLC topology according to an embodiment of the present invention, wherein: Figure 3 The solid line in (a) shows the high-frequency resonant cavity current Irs. For ease of viewing, the waveform of the resonant cavity current Irs of four switching cycles within 10ms (corresponding to a frequency of 50Hz, which is half the power frequency cycle of the LLC topology) is shown here. In fact, 10ms contains hundreds or more switching cycles of the resonant cavity current Irs. For example, when the switching frequency is 40kHz, 10ms contains 400 switching cycles; the periphery of the resonant cavity current Irs of each switching cycle forms a current envelope of a 10ms time period, as shown in Figure 3 As shown by the dotted line in (a) of the LLC topology. Since the switching frequency of the LLC topology is high frequency (for example, above 40kHz), the frequency of the resonant current Irs is also high frequency (same as the switching frequency mentioned above), it is difficult for the controller MCU to accurately collect multiple points in each switching cycle for effective value calculation. Therefore, it is necessary to use, for example, Figure 2The hardware sampling circuit shown performs full-wave rectification on the resonant cavity current Irs through a full-wave rectification circuit, and then converts it into a first voltage V1 (high-frequency voltage signal) through a first resistor R1, and then performs low-pass filtering through a low-pass filtering circuit to filter out high-frequency components, thereby obtaining a low-frequency voltage signal V2 which is input to the controller MCU, and then performs AD (analog-to-digital) conversion to obtain a resonant current sampling value CurADResult. The sampling frequency of the resonant current sampling value CurADResult is 1 / Ts, or in other words, the sampling period of the resonant current sampling value CurADResult is Ts.
[0050] In one embodiment, the switching frequency of the LLC topology is 40kHz-100kHz. In other embodiments, the switching frequency of the LLC topology can be selected in other ranges according to actual needs.
[0051] See also Figure 4 An embodiment of the present invention provides a method for calculating battery current in an LLC topology, the method comprising:
[0052] Step 1: Every time Ts, the current state of the battery is determined, the resonant current sampling value CurADResult and the state flag under different states are accumulated respectively, and the time flag CurCnt is counted at the same time.
[0053] In one embodiment, the current state of the battery is judged every time Ts. If it is in the charging state, the resonant current sampling values CurADResult are accumulated to obtain the cumulative sum of the resonant current sampling values in the charging state CurSumCh, and the charging flag CurCntCh is counted, and the time flag CurCnt is counted at the same time; if it is in the discharging state, the resonant current sampling values CurADResult are accumulated to obtain the cumulative sum of the resonant current sampling values in the discharging state CurSumDis, and the discharge flag CurCntDis is counted, and the time flag CurCnt is counted at the same time; it can be understood that counting the time flag CurCnt is a continuous count and will not be affected by the switching of the battery state. For example, when the battery state switches from the charging state to the discharging state, or from the discharging state to the charging state, the time flag CurCnt counts to M before the switching, and after the switching, the time flag CurCnt continues to count from M+1.
[0054] It can be understood that if the current state of the battery is a charging state, the state flag is the charging flag CurCntCh; if the current state of the battery is a discharging state, the state flag is the discharging flag CurCntDis.
[0055] In one embodiment, Ts is 20us-50us; in another embodiment, the value of Ts is related to parameters such as the main frequency of the LLC circuit controller MCU. For example, the higher the main frequency, the smaller Ts can be, and vice versa.
[0056] Step 2: Return to step 1 or proceed to step 3 based on the time flag.
[0057] In one embodiment, it is determined whether the time flag CurCnt is less than N0, where N0=T / Ts. If so, return to step 1; if not, that is, the time flag CurCnt is equal to N0, proceed to step 3.
[0058] Wherein, T is the power frequency period of the LLC topology, which is generally 20ms (corresponding to a frequency of 50Hz) or 16.67ms (corresponding to a frequency of 60Hz).
[0059] It can be understood that in the present invention, LLC circuit and LLC topology have the same meaning.
[0060] Step 3: Determine whether to proceed to step 4 or step 5 based on the corresponding status flag.
[0061] Determine whether the charging flag CurCntCh and the discharging flag CurCntDis are both greater than N1. If so, it means that within one power frequency cycle T, the LLC circuit is in a state of switching between battery charging and discharging, then proceed to step 4; if not, it means that within one power frequency cycle T, the LLC circuit is in a state of pure battery charging or pure battery discharging, then proceed to step 5; it can be understood that at this time, the time flag CurCnt is equal to N0, CurSumCh represents the sum of the resonant current sampling values CurADResult in the battery charging time period within one power frequency cycle T, and CurSumDis represents the sum of the resonant current sampling values CurADResult in the battery discharging time period within one power frequency cycle T.
[0062] The range of N1 is (0, N0 / 2); in one embodiment, the range of N1 is [N0 / 10 - N0 / 8].
[0063] Step 4: Calculate the resonant current sampling average value CurSumAvg by difference.
[0064] In one embodiment, the resonant current sampling average value CurSumAvg is calculated according to the absolute value of the difference between the charging flag bit CurSumCh and the discharging flag bit CurSumDis.
[0065] Specifically, it is determined whether the charging flag CurCntCh is greater than or equal to the discharging flag CurCntDis. If so, the calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumCh - CurSumDis) / CurCnt; if not, the calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumDis - CurSumCh) / CurCnt.
[0066] Step 5: Calculate the resonant current sampling average value CurSumAvg by summing.
[0067] Specifically, the calculation formula of the resonant current sampling average value is CurSumAvg = (CurSumCh +CurSumDis) / CurCnt.
[0068] Step 6: Obtain the battery current through proportional transformation, and clear the cumulative sum of the resonant current sampling value, the state flag bit, and the time flag bit CurCnt.
[0069] In one embodiment, according to Figure 2 The relevant parameters of the hardware sampling circuit shown and Figure 1 The primary-to-secondary turns ratio of the transformer Tr in the LLC topology shown in the figure is used to proportionally convert the resonant current sampling average value CurSumAvg to obtain the battery current Ibat. In one embodiment, Figure 2 The hardware uses the current transformer L1 in the circuit, and its conversion coefficient is k1, then the first current Isam, that is, the secondary current Isam = k1 * Irs of the current transformer L1, can be obtained. After rectification by the full-wave rectifier circuit, the resistance value of the first resistor R1 is k2, and the high-frequency voltage signal across the first resistor R1, that is, the first voltage V1 = Isam * k2; after the low-pass filter circuit, in one embodiment, the cut-off frequency of the low-pass filter circuit is selected as 1 / 10-1 / 5 of the minimum switching frequency of the LLC circuit, so as to effectively filter out the high-frequency component in the high-frequency voltage signal, that is, the first voltage V1, and obtain the low-frequency voltage signal V2, and then send it to the AD module of the LLC circuit controller MCU. The effective value of the resonant current Irs is Irms, and the AD module of the LLC circuit controller MCU is an N-bit analog-to-digital conversion module, whose power supply voltage is Vad, and the ratio of the average value of the first voltage V1 to the effective value is k3, then the resonant current sampling average value CurSumAvg = (Irms * k1 * k2 * k3 * 2 N ) / Vad; Assuming that the primary-to-secondary turns ratio of the LLC circuit transformer is k0 and the charge-discharge conversion efficiency is k4, the battery current Ibat = CurSumAvg * k0 * k4= (Irms * k1 * k2 * k3 * 2N * k0 * k4) / Vad. It can be understood that k3=2√2 / π≈0.9.
[0070] In one embodiment, the accumulated sum of the resonant current sampling values, the state flag, and the time flag are cleared, which means that the accumulated sum of the resonant current sampling values in the charging state CurSumCh, the accumulated sum of the resonant current sampling values in the discharging state CurSumDis, the charging flag CurCntCh, the discharging flag CurCntDis, and the time flag CurCnt are all cleared.
[0071] Step 7: Return to step 1.
[0072] The method for calculating the battery current in the LLC topology of the present invention samples and converts the resonant cavity current without increasing the circuit cost and circuit loss. Even when the LLC is charged and discharged, the accurate battery current can be obtained, which is convenient for subsequent corresponding control and display.
[0073] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. For those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A method for calculating battery current in an LLC topology, characterized in that: The method comprises: Step 1: Every time Ts, the current state of the battery is determined, the resonant current sampling value CurADResult and the state flag bit under different states are accumulated respectively, and the time flag bit CurCnt is counted at the same time; Step 2: Return to step 1 or proceed to step 3 according to the time flag; Step 3: Determine whether to proceed to step 4 or step 5 according to the status flag; Step 4: Calculate the resonant current sampling average value CurSumAvg by difference; Step 5: Calculate the resonant current sampling average value CurSumAvg by summing; Step 6: Obtain the battery current through proportional transformation, and clear the cumulative sum of the resonant current sampling values, the state flag bit, and the time flag bit CurCnt; Step 7: Return to step 1; Wherein, Ts is the sampling period of the resonant current sampling value CurADResult; The first step is specifically: At every time Ts, the current state of the battery is judged. If it is in the charging state, the resonant current sampling value CurADResult is accumulated to obtain the cumulative sum of the resonant current sampling values in the charging state CurSumCh, and the charging flag CurCntCh is counted, and the time flag CurCnt is counted at the same time; if it is in the discharging state, the resonant current sampling value CurADResult is accumulated to obtain the cumulative sum of the resonant current sampling values in the discharging state CurSumDis, and the discharge flag CurCntDis is counted, and the time flag CurCnt is counted at the same time; Wherein, if the current state of the battery is a charging state, the state flag is a charging flag CurCntCh; if the current state of the battery is a discharging state, the state flag is a discharging flag CurCntDis; The fourth step is specifically as follows: Determine whether the charging flag bit CurCntCh is greater than the discharging flag bit CurCntDis. If so, the calculation formula of the resonant current sampling average value is CurSumAvg = (CurSumCh - CurSumDis) / CurCnt. If not, the calculation formula of the resonant current sampling average value is CurSumAvg = (CurSumDis - CurSumCh) / CurCnt. The fifth step is specifically as follows: The calculation formula for the resonant current sampling average value is CurSumAvg = (CurSumCh + CurSumDis) / CurCnt.
2. The method for calculating battery current in LLC topology according to claim 1, characterized in that: The second step is specifically as follows: Determine whether the time flag CurCnt is less than N0, if so, return to step 1; if not, that is, the time flag CurCnt is equal to N0, proceed to step 3; Among them, N0=T / Ts, T is the power frequency period of the LLC topology.
3. The method for calculating battery current in LLC topology according to claim 2, characterized in that: The third step is specifically: Determine whether the charging flag bit CurCntCh and the discharging flag bit CurCntDis are both greater than N1, if so, proceed to step 4, if not, proceed to step 5; Among them, the range of N1 is [N0 / 10 - N0 / 8].
4. The method for calculating battery current in an LLC topology according to any one of claims 1 to 3, characterized in that: The sixth step is specifically as follows: According to the hardware sampling circuit parameters of the LLC topology and the primary-to-secondary turns ratio of the transformer, the resonant current sampling average value CurSumAvg is proportionally converted to obtain the battery current Ibat.
5. The method for calculating battery current in LLC topology according to claim 2, characterized in that: The T is 16.67ms / 20ms.
6. The method for calculating battery current in LLC topology according to claim 1, characterized in that: The Ts is 20us-50us.
Citation Information
Patent Citations
Synchronous rectification signal extraction circuit, control system and energy storage system
CN116015069A
Parameter estimation method of resonant converter, control method of resonant converter and resonant converter
CN116633141A