A cylindrical battery spiral calculation method based on VBA
By using VBA programs and Newton's method in Excel to calculate the electrode parameters of cylindrical lithium-ion batteries, the problems of long calculation time and large errors in the existing technology have been solved, realizing fast and accurate parameter calculation and improving the efficiency and consistency of battery manufacturing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGXI GANFENG BATTERY TECH
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies suffer from problems such as long calculation time, large errors, and low efficiency when calculating the parameters of cylindrical lithium-ion battery electrodes, resulting in long debugging cycles, poor consistency, and low yield in the manufacturing process.
The data processing module based on VBA is adopted, including data structure definition, interface construction, input data, core calculation, plotting and data generation and data export modules. The VBA program in Excel is used to calculate parameters and generate charts, and Newton's method is combined to solve the winding angle and arc length.
It enables rapid and accurate calculation of cylindrical battery electrode parameters, simplifies engineers' workflow, reduces experimental costs, shortens the R&D cycle, and improves the efficiency and consistency of battery manufacturing.
Smart Images

Figure CN122364592A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lithium-ion battery technology, and in particular to a VBA-based method for calculating the spiral path of a cylindrical battery. Background Technology
[0002] In the design and manufacturing of cylindrical lithium-ion batteries, the electrodes are assembled inside the battery in a wound manner. This compact structure maximizes the electrode area within a limited space, thereby improving the battery's capacity and energy density. In actual production, the cross-sectional trajectory of the wound cylindrical electrode is ideally described by a constant-velocity spiral (also known as an Archimedean spiral). The mathematical expression for a constant-velocity spiral in polar coordinates is: in:
[0003] r: represents the polar radius, which is the distance from the center of the spiral (the center of winding) to any point on the curve; a: Represents the initial polar diameter of the spiral, which can be understood as the initial radius at the start of winding; θ: Represents the polar angle, which is a variable describing the angular position of a point in the polar coordinate system; b: represents the increase in polar diameter per unit central angle, which determines the rate of spiral expansion; whenever the polar angle θ increases by one unit radian, the polar diameter r increases by b.
[0004] However, in actual production, how to quickly and accurately calculate the various winding parameters of a specific cylindrical battery using this formula is a problem that needs to be solved. In existing technologies, there are usually two methods: the first is the theoretical approximation method (purely manual calculation), which is a single calculation. However, this method is time-consuming, has large errors, and involves a lot of repetitive work, resulting in low efficiency. Generally, a skilled engineer needs 10-15 minutes (including formula derivation, parameter substitution, and result verification) to complete the calculation, and the accuracy error is maintained at 5-10%. Every time the battery model is changed (i.e., a and b change), each parameter needs to be recalculated, and it is easy to scrap the battery batch due to incorrect substitution. In addition, there are many parameters that need to be tested. The second method is CAD drawing, which is more cumbersome, taking about 30-50 minutes for drawing and measurement. It also depends on software license and the engineer's CAD proficiency. The results need to be manually copied into an Excel spreadsheet, with a transcription error rate of about 2%. Furthermore, it cannot quickly generate 2000+ point coordinates for direct use by the equipment. The third method is experimental determination, which is time-consuming and costly. A single experiment takes more than 2 hours, consumes a large number of electrode cells, and requires 4-6 hours to reach a stable process window.
[0005] The existing methods for calculating the parameters of cylindrical battery electrodes all have their own shortcomings. As a result, the cylindrical battery manufacturing process suffers from long debugging cycles, poor consistency, and low yield because it is impossible to quickly and accurately solve parameters such as helix angle, electrode length, and number of winding turns. Summary of the Invention
[0006] To address the aforementioned technical problems in existing methods, this invention provides a VBA-based method for calculating the spiral path of a cylindrical battery, comprising: establishing a VBA data processing module; the VBA data processing module includes a data structure definition module, a global variable definition module, an interface construction module, an input data & read data module, a core calculation module, a plotting and data generation module, a chart creation module, and a data export module; the steps of the VBA data processing module in processing data are as follows: S1: The VBA tool runs and initializes and limits the cylindrical battery's angle array (theta), arc length array (arcData), radius array (radium), X coordinate array (x), and Y coordinate array (y). S2: Interface building module builds the interface for solving the spiral parameters of cylindrical batteries; S3: The input data & read data module performs preliminary data processing based on the data input by the user in the interface building module in step S2; S4: The core calculation module performs calculations based on the data input in step S3; the core calculation module is equipped with two subroutines, including an angle calculation subroutine and an arc length calculation subroutine, which are used to calculate the winding angle and winding arc length of the cylindrical battery respectively. S5: The plotting and data generation module stores and outputs the arc length and theta data calculated by the core calculation module in step S4; and can generate XY scatter plots of the arc length and theta respectively. S6: The data export module exports the data stored in step S5 to a new worksheet.
[0007] Furthermore, the interface building module includes a module for solving arc length and a module for solving angle.
[0008] Furthermore, when the interface is configured as an arc length calculation module, the input data and data reading module inputs data in the form of a, b, θstart, θend, and the number of points; where a: represents the initial polar diameter of the spiral; θ: represents the polar angle, a variable describing the angular position of a point in the polar coordinate system; where θstart is the angle at the starting point of winding; θend is the angle at the end of winding; b: represents the increase in polar diameter per unit central angle, determining the rate of spiral expansion; whenever the polar angle θ increases by one unit radian, the polar diameter r increases by b; the number of points: represents the number of times the results are obtained by running the data using this VBA program.
[0009] Furthermore, when the interface is configured as an angle-solving module, the input data and data reading module inputs data including a, b, θstart, arc length, and number of points; where arc length represents the length of the cylindrical cell across the battery electrode from the start of winding to the end of winding.
[0010] Furthermore, the number of points is 2000.
[0011] Furthermore, the angle calculation subroutine in the core calculation module calls Newton's method to solve for the winding angle.
[0012] Compared with the prior art, the present invention has the following technical advantages: This invention creates a VBA data processing program within the commonly used Excel office software, develops the user interface and tools using VBA code, and perfects the underlying logic and algorithms. It embeds a complex implicit equation solver into Excel, triggering it through form control events, transforming the functions of professional mathematical software into a "lightweight component" that can be called with a single click, requiring no additional runtime environment. It achieves a one-click operation from parameter input to numerical solution, in-memory plotting, and data export, which is convenient and fast. Furthermore, it can export batch data and draw XY scatter plots in real time based on the data, thus visualizing the results.
[0013] Compared to traditional methods for calculating the spiral parameters of cylindrical batteries, the method of this invention can greatly simplify the engineer's workflow, reduce experimental costs, shorten the R&D cycle, quickly evaluate cell design schemes, assist engineers in effectively evaluating cell designs, and improve the efficiency of the cylindrical battery manufacturing process. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one embodiment of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0015] Figure 1 This is a flowchart of a VBA-based calculation method for a constant velocity spiral in a cylindrical battery cell according to the present invention. Figure 2 This is a flowchart of step S4, the core calculation module, in the VBA-based calculation method for constant velocity spirals in cylindrical battery cells according to the present invention. Figure 3 This is an interface diagram showing the calculation of the winding arc length of a 46800 battery using a VBA-based method for calculating the constant velocity spiral of a cylindrical battery cell. Figure 4 This invention provides a VBA-based method for calculating the constant velocity spiral of a cylindrical battery cell, which calculates the XY scatter plot of the winding arc length of a 46800 battery. Figure 5 This is an interface diagram showing the calculation of the winding arc length of a 21700 battery using a VBA-based method for calculating the constant velocity spiral of a cylindrical cell. Figure 6 This invention provides an XY scatter plot of the calculation method for the constant velocity spiral of a cylindrical cell based on VBA, used to calculate the winding arc length of a 21700 battery. Figure 7 This is an interface diagram showing the calculation of the winding angle / number of turns of a 46800 battery using a VBA-based method for calculating the constant velocity spiral of a cylindrical cell. Figure 8 Figure 4 This invention provides a VBA-based method for calculating the constant velocity spiral of a cylindrical battery cell, which calculates the XY scatter plot of the angle / number of revolutions for a 46800 battery. Figure 9 This is an interface diagram showing the calculation of the winding angle / number of turns of a 21700 battery using a VBA-based method for calculating the constant velocity spiral of a cylindrical battery cell. Figure 10 This invention provides a VBA-based method for calculating the constant velocity spiral of a cylindrical battery cell, which calculates the XY scatter plot when calculating the winding angle / number of turns of a 21700 battery. Figure 11 Detailed comparison results of the arc length calculations of various embodiments of the present invention and comparative examples are shown in the following figures: Figure 12 Detailed comparison results of the number of revolutions calculated in each embodiment of the present invention and the comparative example are shown in the figure. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] like Figure 1-2 As shown, this invention provides a VBA-based method for calculating the spiral path of a cylindrical battery, comprising the following steps: Create a VBA program in the commonly used office software Excel to calculate the relevant parameters of the cylindrical battery helix. The VBA program includes modules for data structure definition, global variable definition, interface construction, data input and reading, core calculation, plotting and data generation, chart creation, and data export. The modules in the created VBA program will perform the following steps to calculate the parameters of the equilateral helix in the cylindrical battery: Step S1: The VBA tool runs and initializes. During the running and initialization process, the VBA program builds a data structure definition module and a global variable definition module. The data structure definition module defines a structure to store the spiral data of the cylindrical battery, including the angle array (theta), radius array (radium), X-coordinate array (x), and Y-coordinate array (y). The global variable module defines an angle array submodule and an arc length array submodule. The angle array (theta Data) submodule stores the spiral data stored in the "Solve θ" mode for chart drawing and data export. The arc length array (arc Data) submodule stores the spiral data stored in the arc length mode for chart drawing and data export.
[0018] S2: The interface building module is used to create a complete user interface in an Excel worksheet. The user interface includes a title, input boxes, buttons, a result display area, and a protection program to prevent users from accidentally modifying the results. The interface building module is the initial entry point for the work. In this embodiment, the interface building module includes two modules: one is the angle solving module (solveforTheta). Under this module, the data input into the input boxes includes: a, b, θstart, arc length, and number of points. The exported results include: θend, r, angle solution diagram, and angle data (theta Data). One is the Solve for Arc Length module: In this module, the input data includes: a, b, θstart, θend, and the number of points; the exported structures are: Arc Length, Arc Length graph, and Arc Data.
[0019] In the interface building module, the input and output of the above data are based on the definitions of various parameters in the constant velocity spiral formula, specifically:
[0020] Where: r: represents the polar diameter, which is the distance from the center of the helix (winding center) to any point on the curve; a: represents the initial polar diameter of the helix, which can be understood as the initial radius at the start of winding; θ: represents the polar angle, which is a variable describing the angular position of a point in the polar coordinate system; where θstart is the angle at the start of winding; θend is the angle at the end of winding; b: represents the increase in polar diameter per unit central angle, which determines the rate of helix expansion; whenever the polar angle θ increases by one unit radian, the polar diameter r increases by b; Arc Length: represents the length of the cylindrical cell traversed from the start of winding to the end of winding; Point Count: represents the number of times the results are obtained by running the data using this VBA program; S3: The Input Data & Read Data module performs preliminary processing on the data input by the user in the interface building module in step S2. That is, it reads the value input by the user from the specified cell, supports direct numerical values or mathematical expressions, handles conversion errors, and returns the numerical value.
[0021] S4: The core calculation module calculates the various data input in step S3. The core calculation module performs calculations according to different logics based on the window type in step S2 and the data input in step S3. Specifically, in the angle calculation module, the angle calculation subroutine (CalculateTheta) is run in step S4 to solve the winding angle θ (theta). Specifically, this involves responding to the θ-solving button, obtaining input, calling Newton's method to solve θ, displaying the result, generating a point set, and plotting the result. This process mainly involves running... The following three functions are used to solve the equations using the Newton-Raphson iteration method. The returned θ is calculated using a formula to determine the arc length difference, which is then used in the Newton-Raphson iteration method. The reciprocal, the polar coordinate arc length differential of the spiral, is also calculated to solve for θ. Specifically, the initial L0 (initial arc length) is calculated first, and the θ angle from the first Newton iteration is calculated using an approximation function as the initial input. After multiple iterations based on the Newton iteration equation, the difference between the arc length and the target arc length is calculated using a formula. Through multiple Newton iterations, the θ angle with the smallest arc length difference is found, and the solved θ is output. In the arc length calculation module, the arc length calculation subroutine (CalculateArcLength subroutine) is run. Its specific logic is as follows: responding to the arc length calculation button, obtaining the input value, directly calculating the arc length, displaying the result, generating a point set, and plotting it. Specifically, the Arclength function is first called to calculate the arc length from θstart to θend, and then the L function is called for interpolation to accurately calculate the arc length of the constant-velocity spiral.
[0022] Step S5: The plotting and data generation module stores and outputs the arc length and theta data calculated by the core calculation module. This is primarily achieved through two subroutines: the DrawSpiral subroutine and the CreateChart subroutine. The DrawSpiral subroutine calculates discrete points based on the spiral parameters a, b, θstart, θend, and the number of points of the input cylindrical battery, generating arrays of θ, r, x, and y and filling them into the input SpiralData structure. The CreateChart subroutine creates a scatter plot in the worksheet based on the data (X and Y arrays) in SpiralData; it sets the chart title, axes, and line styles and places them in the specified positions, forming an XY scatter plot.
[0023] S6: The data export module has three subroutines: Export Theta Data, Export ArcData, and ExportData. The functions of these three subroutines are as follows: the Export Theta Data subroutine exports the winding angle θ data to a new worksheet and automatically names it Theta Data; the Export Arc Data subroutine exports the winding electrode arc length data to a new worksheet and automatically names it Arc Data; and the ExportData subroutine is constructed as a general export function, creating a new worksheet, writing the header and data, and automatically adjusting the column width.
[0024] Using the above methods, the relevant parameters of the cylindrical battery spiral can be quickly calculated as needed, and the corresponding results and icons can be output.
[0025] The following will describe in detail the operation and corresponding results of calculating the spiral parameters of a cylindrical battery using the method of the present invention, with reference to the accompanying drawings and comparative examples. Specifically, two types of cylindrical batteries will be used as examples: the 46800 cylindrical battery and the 217000 cylindrical battery.
[0026] Comparative Example 1: The actual disassembly and production of a 46800 cylindrical battery was performed. The relevant parameters of the 46800 cylindrical battery were measured as follows: the winding needle radius a=1.5mm, b=0.05052mm / rad, and the starting arc of the winding was 0. The number of turns of the positive electrode was 50, the number of turns of the negative electrode was 51, the measured length of the negative electrode was 3260.1mm, and the length of the positive electrode was 3211.4mm.
[0027] Comparative Example 2: The actual disassembled 21700 cylindrical battery was tested. The relevant parameters of the 21700 cylindrical battery were measured as follows: the winding needle radius a=1.75mm, b=0.03756mm / rad, and the starting arc of the winding was 0. The number of turns of the positive electrode was 34.96, the number of turns of the negative electrode was 36.19, the measured length of the negative electrode was 1369.032mm, and the length of the positive electrode was 1290.605mm.
[0028] I. Calculation and verification of the length of positive and negative electrode plates of cylindrical battery (46800) and cylindrical battery (21700) based on measured data.
[0029] Example 1A: Calculation of the positive electrode length of a 46800 battery using VBA: Input the winding needle radius a=1.5mm, b=0.05052mm / rad, the starting arc of winding is 0, and the number of turns of the positive electrode is 50. The length of the positive electrode is calculated to be 3002.137mm using VBA. The length of the positive electrode sheet calculated by the VBA method was compared with the actual length of the positive electrode sheet, and the error was 6.52%.
[0030] Example 1B: Calculation of the negative electrode length of a 46800 battery using VBA: Input the winding needle radius a=1.5mm, b=0.05052mm / rad, and the starting arc of winding is 0, with 51 turns of negative electrode winding. The VBA calculation yields a negative electrode length of 3074.508mm. The negative electrode length calculated by the VBA method is compared with the actual negative electrode length, and the error is 5.69%.
[0031] The process and results of calculating the length of the negative electrode of the 46800 battery in this invention are as follows: Figure 3 and 4 As shown.
[0032] Example 2A: Calculation of the positive electrode length of a 21700 battery using VBA: Input the winding needle radius a = 1.75 mm, b = 0.03756 mm / rad, and the starting arc of the winding is 0. The number of turns of the positive electrode is 34.96. The positive electrode length calculated by VBA is 1290.605 mm. The positive electrode length calculated by VBA is compared with the actual positive electrode length, and the error is 0.57%.
[0033] Example 2B: Calculation of the negative electrode length of the 21700 battery using VBA: Input the winding needle radius a=1.75mm, b=0.03756mm / rad, and the starting arc of winding is 0, with 36.19 turns of negative electrode winding. The negative electrode length calculated by VBA is 1369.032mm. The negative electrode length calculated by VBA is compared with the actual negative electrode length, and the error is 0.22%.
[0034] The process and results of calculating the length of the negative electrode of the 21700 battery in this invention are as follows: Figure 5 and 6 As shown. Detailed comparison results of the arc length calculations for each embodiment and the comparative example are as follows. Figure 11 As shown.
[0035] II. Calculation and verification of the number of winding turns of cylindrical batteries (46800) and (21700)
[0036] Example 1C: Calculation of the number of negative electrode turns for a 46800 battery using VBA: Input winding needle radius a = 1.5 mm, b = 0.05052 mm / rad, winding start arc is 0, negative electrode length is 3260.1 mm; VBA calculation yields 52.65 negative electrode turns; Comparison of the VBA-calculated negative electrode turns with the actual negative electrode turns shows an error of 3.24%.
[0037] The process and structure for calculating the number of turns of the negative electrode sheet in this invention are as follows: Figure 7 and 8 As shown.
[0038] Example 1D: Calculation of the number of positive electrode turns for a 46800 battery using VBA: Input winding needle radius a = 1.5 mm, b = 0.05052 mm / rad, winding start arc is 0, and positive electrode length is 3211.4 mm; VBA calculation yields 52.22 turns for the positive electrode; Comparison of the negative electrode turns calculated using VBA with the actual negative electrode turns shows an error of 4.44%.
[0039] Example 2C: Calculation of the number of positive electrode turns for a 21700 battery using VBA: Input winding needle radius a = 1.75 mm, b = 0.03756 mm / rad, winding start arc is 0, and positive electrode length is 1298 mm; the number of positive electrode turns calculated by VBA is 35.08; the number of positive electrode turns calculated by VBA is compared with the actual number of turns: the error is 0.34%.
[0040] Example 2D: Calculation of the number of negative electrode turns for a 21700 battery using VBA: Input winding needle radius a = 1.75 mm, b = 0.03756 mm / rad, winding start arc is 0, and negative electrode length is 1366 mm; the number of negative electrode turns calculated by VBA is 36.15 turns; the number of negative electrode turns calculated by VBA is compared with the actual number of negative electrode turns: the error is 0.11%.
[0041] The process and structure for calculating the number of turns of the negative electrode sheet in this invention are as follows: Figure 9 and 10 As shown.
[0042] Detailed comparison results of the number of revolutions calculated for each embodiment and the comparative example are as follows: Figure 12As shown. A comparison of the measured battery data and the data calculated using VBA reveals that the calculation structure using the VBA method of this invention has small errors and fast calculation speed, enabling rapid evaluation of cell design schemes. This assists engineers in effectively evaluating cell designs, significantly shortening the R&D cycle and reducing experimental costs. Furthermore, the built-in VBA tool in Excel greatly simplifies the calculation workflow and can automatically output XY scatter plots, providing strong visualization.
Claims
1. A VBA-based method for calculating the spiral path of a cylindrical battery, characterized in that, include: A VBA data processing module is established; this module includes a data structure definition module, a global variable definition module, an interface construction module, a data input and data reading module, a core calculation module, a plotting and data generation module, a chart creation module, and a data export module; the steps of the VBA data processing module in processing data are as follows: S1: The VBA tool runs and initializes and limits the cylindrical battery's angle array (theta), arc length array (arcData), radius array (radium), X coordinate array (x), and Y coordinate array (y). S2: Interface building module builds the interface for solving the spiral parameters of cylindrical batteries; S3: The input data & read data module performs preliminary data processing based on the data input by the user in the interface building module in step S2; S4: The core calculation module performs calculations based on the data input in step S3; the core calculation module is equipped with two subroutines, including an angle calculation subroutine and an arc length calculation subroutine, which are used to calculate the winding angle and winding arc length of the cylindrical battery respectively. S5: The plotting and data generation module stores and outputs the arc length and theta data calculated by the core calculation module in step S4; and can generate XY scatter plots of the arc length and theta respectively. S6: The data export module exports the data stored in step S5 to a new worksheet.
2. The method for calculating the spiral path of a cylindrical battery based on VBA as described in claim 1, characterized in that, The interface building module includes a module for solving arc length and a module for solving angle.
3. The VBA-based method for calculating the spiral path of a cylindrical battery as described in claim 2, characterized in that, When the interface is configured as an arc length calculation module, the input data and data reading module inputs data in the form of a, b, θstart, θend, and the number of points; where a: represents the initial polar diameter of the spiral; θ: represents the polar angle, a variable describing the angular position of a point in the polar coordinate system; where θstart is the angle at the starting point of winding; θend is the angle at the end of winding; b: represents the increase in polar diameter per unit central angle, determining the rate of spiral expansion; whenever the polar angle θ increases by one unit radian, the polar diameter r increases by b; the number of points: represents the number of times the results are obtained by running the data using this VBA program.
4. The VBA-based method for calculating the spiral path of a cylindrical battery as described in claim 3, characterized in that, When the interface is set up as an angle solving module, the input data and read data module inputs data including a, b, θstart, arc length, and number of points; where arc length represents the length of the cylindrical cell from the start of winding the battery electrode to the end of winding.
5. The VBA-based method for calculating the spiral path of a cylindrical battery as described in claim 3, characterized in that, The number of points is 2000.
6. The VBA-based method for calculating the spiral path of a cylindrical battery as described in claim 1, characterized in that, The angle calculation subroutine in the core calculation module calls Newton's method to solve for the winding angle.