Optimized design of battery pole control system based on dual-chip architecture

At present, the global demand for lithium batteries is still in a high growth state, and the traditional lithium battery pole mill control system is still dominated by ARM (Artificial Intelligence Enhanced Computing), DSP (Digital Signal Processing), and other single-chip control methods. There are problems such as poor anti-interference ability and insufficient real-time online analysis of production data. This paper adopts the dual-chip control system architecture based on "ARM+DSP", starting from the mechanical characteristics and operating signal features of the pole mill. The hardware system adopts a three-unit joint control hardware structure, which separates the control unit from the data processing unit and improves the operation of the system. The software system adopts fuzzy PID algorithm to realize deflection control and tension control, and verifies that the Fuzzy PID (Proportion Integration Differentiation) control algorithm can effectively improve the anti-interference ability of the deflection system and tension system. The results show that the data loss rate is low with the SPI communication between DSP and ARM. The tension error of the "ARM+DSP" control system does not exceed 5%, and the deviation of the correction band is within ±4mm. The dedicated dual-chip hardware architecture effectively improves the robustness and operation efficiency of the pole mill, solves the problem of low tension control accuracy, and provides a theoretical basis for the application of the dual-roll mill.


Introduction
The level of development of modern manufacturing equipment determines the industrial strength of a country due to the characteristics of high automation, high efficiency, high precision, high reliability, high flexibility, low energy consumption, green and environmental protection [1]. In recent years, lithium batteries have been widely used in cell phones, tablet PCs and electric vehicles with their unique advantages [1,2]. According the report of Global EV (Electric Vehicles) Outlook 2021, we considered that the electric vehicle market remains huge, as shown in Fig 1, from the global market, the global electric vehicle ownership is in a high growth stage. In the three years of 2018-2020, the EV ownership in China, Europe and the U. S. grew steadily, and the global EV ownership also reached 13.1million. According to prediction of the IEA (International Energy Agency), the global EV ownership will reach 35million in 2030, among which China and Europe will reach 12 million and 13 million in China and Europe [3]. Therefore, lithium batteries, as the core component of electric vehicles, still have a large demand, and it is necessary to optimize the production and assembly process of lithium batteries [4] The specific workflow of the lithium battery electrode mill is shown in Fig 2, and its main manufacturing process is to release the unrolled electrode by the unwinding system, to coat the lithiated active substance on the carrier surface with aluminum foil or copper foil as the base carrier, and then to compact it by the main roll, and finally to recycle the rolled lithium battery electrode by the winding system [5]. The pole mill equipment is a multimotor controlled transmission machine. And for the multi-motor control and harsh accuracy and robustness compared with the traditional PID control. Finally, the communication protocol, tension module and deflection correction module are experimentally tested.
Our paper is structured as follows: Section 2 summarizes the research work of others in control systems, deflection systems and tension systems. Section 3 analyzes the dual-chip control architecture, the deflection control, and the tension control. Section 4 illustrates the effectiveness of fuzzy PID in the application of deflection control and tension control. Section 5 describes the digital control system and related circuit optimization design methods. Section 6 describes the communication bus test and the experimental test of the deflection control circuit and the tension control circuit. Section 7 summarizes the shortcomings of existing work and provides an outlook for future work. Section 8 describes the contributions of our research.

Embedded control system
Currently, for industrial sites, many companies use PLC as the main controller and inverters as drive modules. Some common condition monitoring devices are included [10,11]. Such a design, although simple and anti-interference, still has the following problems: • Less efficient operation than dedicated controllers and poor programming flexibility [11], • The data processing and transmission method is single and poor in real time.
To improve the efficiency of mechanical equipment, many scholars have used high-performance embedded chips or data processing chips to control lithium equipment [12][13][14]. Zhao et al. [12], proposed the application of embedded technology to design the control system, using an isolated power supply to ensure stable circuit operation and designing relevant circuits to control the connected sensors, inverters, etc. Song et al. [13], adopted STM32 as the core controller and designed circuits for switching and analog quantities, and the rolling accuracy was improved to ±0.003 mm. In addition, since the rolling process mainly relies on the driving role of motors, and high-performance embedded platforms have been widely used in motor control [15][16][17][18][19][20]. Among them, some scholars have used DSP data processing capability to control AC motors [17][18][19][20]. Fengcan Zhang et al. [20], employed an STM32 control chip to control AC servo motors and optimized the motor control accuracy. The traditional embedded control method is a single chip for control, which inevitably generates some electromagnetic interference, and despite the use of some anti-interference measures, it still cannot be completely eliminated, so some scholars have explored the advantages of dual-chip architecture and achieved results in some fields.
The dual-chip architecture separates the parts that are prone to interfere with each other, which can effectively reduce noise and improve the resolution of the sensor [21], at the same time, Brice.R et al. [22], used a model reduction method to analyze the heat dissipation problem of the dual-chip architecture and experimentally verified that the dual-chip architecture can reduce the thermal network creation time by 80%. Therefore, the dual-chip architecture has stronger thermal and immunity capabilities and is more suitable for high-speed mechanical platforms. Dual-chip architectures have been used in temperature control [23], image processing [24], motor control [25,26], RFID(Radio Frequency Identification) temperature measurement [27,28] and prediction control [29], where scholars have divided the modules through the physical layer to ensure stable device operation. In addition, Chung et al. [30], applied a dual-chip power management system to the field of photovoltaic power generation and improved the power conversion efficiency to 97.2%.
The dual-core control system of "ARM+DSP" can fully utilize the advantages of digital signal processing to realize data operation. Jiang Han et al. [31], proposed a reconfigurable embedded CNC (Computer Numerical Control) machine tool platform based on the hardware architecture of "ARM+DSP", where ARM implements human-machine interaction and interface management and DSP accomplishes complex mathematical operations and real-time tasks. The correctness and effectiveness of the dual chip architecture are verified by taking the six axis bedridden rolling machine as the experimental platform. In addition, the dual-chip architecture of "ARM+DSP" has been applied to cutting platform control [32], sorting system control [33] and power quality detection [34]. Rasesh.D et al. [35] used an ARM Cortex A9 processor and FPGA to form a SoC dual-core control unit, where the programmable unit implements the deterministic functions of the power system, the processor unit implements corrective tasks based on field feedback.
The traditional single-chip control system architecture can no longer be applied in highspeed rolling mills. Therefore, according to the mechanical structure of the mill and the operating characteristics of the rolling motor, this paper designs a three-unit integrated digital system based on STM32F407 and DSPTMS320C6713 with dual-chip control, separating the drive and unwinding units. And simulates and analyzes the robustness of the Fuzzy PID strategy for deflection control and tension control. Finally, experimental tests are conducted to verify the effectiveness of the "ARM+DSP" architecture in the pole mill by testing the dual-chip architecture model communication bus and the accuracy of controlled parameters acquisition.

Deflection system
When the electrode mill is running smoothly, the electrode strip is running fast on the drive roller, but due to the bending and deformation of the electrode strip itself or the influencing factors of the lithium mill equipment and operation process, it will cause the runaway of the lithium battery electrode strip on top of the drive roller. This will not only affect the winding and unwinding of the poles, but may also cause damage to the mechanical equipment in the winding and unwinding section. Therefore, a deflection correction system is needed to solve the problem of run-out of the poles and to keep the poles running in the correct direction in the production line [36].
The main role of the deflection correction system in the smooth rolling process of the poles is as follows: • Avoid the runaway of the pole piece during the production process and ensure the smooth running of the pole piece on the main roll and drive roll, • Smooth winding of the pole piece, avoiding folding or wrinkling of the pole piece during the winding process, • Make the traction force of the pole piece belt parallel to the center line of the drive roller to ensure the uniform tension of the pole piece in the winding and unwinding.
The research of the guiding system originated from European countries. As the demand for deflection systems gradually increased, many research and development enterprises of deflection controllers emerged, such as ST (Italy), FIFE (USA) and BST (Germany), which have widely applied deflection systems in metallurgy, packaging and textile industries. With the gradual increase in the demand for deflection correction, many scholars have analyzed the causes of strip structure runout and also proposed corresponding solutions. You et al. [36], the roll design with the best deviation correction ability is designed through the control variable method, and the effectiveness of the strip roll model is verified combined with the PID control method. Image acquisition methods are also gradually used in the design of correction systems [37,38]. However, due to the complex industrial site environment, the optical path information acquisition system error is large. Therefore, this paper adopts a dual-chip control architecture, combined with Fuzzy PID control algorithm and equipped with fieldbus to control the deflection system.

Tension system
During the winding and unwinding process of the mill, the size and stability of the tension of the pole strip are crucial process indicators. Also tension control is one of the difficult points that affects whether the pole strip can be rolled smoothly [39]. The specific role of tension in the pole rolling process is as follows: • Maintain the straightness of the lithium battery pole strip to avoid waves caused by uneven extension of the pole strip, • Smooth and stable rolling of the polar strip to avoid runaway of the polar strip during winding and unwinding, • Adjust the thickness of the lithium battery electrode strip to meet the set thickness requirements, • Reduce the deformation resistance of the pole strip and fine-tune the rolling force to reduce energy and material losses.
Tension control for take-up and take-down strips was initially achieved by conventional simulators with motors. Due to the lack of precise detection feedback devices, the production accuracy of the product was low. With the performance of the inspection system and computer processing power gradually improved, the rolling process and control strategy gradually optimized. Tension control methods are also becoming more and more abundant, the traditional simulator is replaced by the existing high-precision sensors and controllers, through the output control signal or adjust the current to complete the tension regulation and control [40].
Many scholars have studied tension control systems, Ashour H et al. [40], designed a PLC and HMI (Human Machine Interface) based variable speed AC (Alternating Current) drive hardware system for paper curling, which calculates the reference torque and angular velocity by counting the number of pulses at the nip roll through an encoder. Shokhin et al. [41], investigated the tension detection system for the winding mechanism of the pole mill, and realized real-time tension monitoring using tension sensors. Therefore, this paper uses dual-chip architecture to control the winding and unwinding mechanism.
The main existing control methods are robust control, adaptive control, fuzzy control, neural network, and PID control. Among them, robust control has good performance in combating the disturbances within the system and the external environment, but its control accuracy is slightly lower than other methods. Adaptive control has good performance in coping with external random disturbances and hysteresis response method of mechanical equipment, but the hysteresis of closed-loop control of mill tension is not high, and the disturbance is not particularly strong in the stable control process. PID control method is simple and easy to implement and widely used in industry, with no need to establish accurate mathematical models and excellent anti-interference fuzzy algorithm, can be well applied to the closed-loop control process of rolling mills. Therefore, this paper uses fuzzy theory optimized PID control method to control the tension system.

Dual-chip architecture
The ARM architecture is a 32-bit RISC (Reduced Instruction Set Computer) processor architecture, while the DSP is a SIMD (Single Instruction Multiple Data) processor architecture. The STM32F407 used in this paper is an ARM branch architecture based on the Cortex-M3 core with a Harvard architecture and a three-stage pipeline selected for microcontroller applications with added branch prediction. The TMS320C6713 is a 32-bit high-speed floating-point DSP with a Harvard architecture. Therefore, the hardware architecture can be designed in combination.
The dual-chip architecture system division of labor is shown in Fig 4. DSP generally performs complex mathematical operations and real-time tasks, including position control, interpolation calculation and programmable controller control; STM32 mainly performs humanmachine interaction and interface management, such as code programming, parameter setting and status display.
The operation of the pole mill includes multi-motor asynchronous operation, tension size mediation, roll slit mediation, deflection mediation and other processes. The dual-chip architecture enables the division of modules with different functions, giving full play to the control capability of ARM and the data processing capability of DSP, and improving the operating efficiency of the mill. Data transfer between dual CPUs can be done through serial, SPI, dual-port RAM, CAN and Ethernet, etc. STM32 and DSP often use SPI protocol to communicate with external chips. SPI communication protocol adopts frame structure, which is a synchronous serial communication interface technology [42]. SPI communication protocol has the advantages of supporting full duplex communication, simple communication mode and relatively fast data transmission rate, the disadvantage is that there is no specified flow control and no response mechanism to confirm whether the data is received.
As shown in Fig 5, SPI uses a Master-Slave control method and a timing synchronized data transfer method. The master device generates the clock signal to work synchronously with the slave device [35]. The meaning of each component is: SSPBUF is the internal buffer of SPI

PLOS ONE
Optimized design of battery pole control system based on dual-chip architecture device to save the temporary data during transmission. SSPSR is the shift register of SPI device to move the data into or out of SSPBUF. Controller is the CPU controller to configure the SPI bus transmission mode. Usually, only the following four pins need to be configured to achieve SPI communication. SCK: Master device transmits clock signal to Slave device, which controls the timing and rate of data exchange. CS: Master device chip selects Slave device. MOSI: Master device data output, Slave device data input. MISO: Master device data input, Slave device data output.
There are four operating modes of the SPI [35]. The clock polarity CPOL is used to configure which state the SCK level is idle or active, and the clock phase CPHA is used to configure at which edge the data is sampled [43].
This paper uses mode 0 operation as shown in Fig 6. The DSP is the Master device, sending data, and the STM32 is the Slave device, receiving data. When CS_N is low, it is in the data transmission state. CPOL = 0, which means it is in the idle state when SCK = 0, so the valid state is when SCK is high. CPHA = 0, which means the data sampling is at the first edge, and the data is sent at the second edge.

Deflection system
In the actual pole rolling process, the complex structure of machinery and equipment, the large number of actuators in the control system and the influence of external uncertainties can lead to a certain degree of deflection of the pole strip [44]. Among the main factors that can affect the polar strip offset are the following: • Influence of the geometry of the guide roller, • Uneven tension distribution due to wave edge, • The axis between each guide roller is not parallel. In the winding and unwinding part of lithium battery cells, it is necessary to ensure that the cells are accurately rolled and pressed by the rollers during unwinding, and that the edges are neatly wound by the air expansion shaft during winding. The structure of the pole strip correction system is shown in Fig 7. The pole strip correction system is mainly composed of four parts: deflection detection device, electric actuator, information feedback device and deflection controller. The deviation correction detection device uses the photoelectric sensor installed on one side of the pole strip as the reference. When the pole strip is offset, the detection device will measure the offset distance and angle of the edge of the pole strip to determine the offset degree of the pole strip. The deflection controller determines the control strategy after analysis and processing, and controls the drive motor to drive the deflection mechanical equipment to realize the pole piece belt deflection. When the offset distance of the pole strip is corrected to return to the set value, the electric actuator action is stopped so that the pole strip operates stably within the set offset range [36].
In summary, the flow of pole piece correction is shown in Fig 8. The pole strip deflection operation process is a typical closed-loop feedback control link. The commonly used

PLOS ONE
Optimized design of battery pole control system based on dual-chip architecture correction detection device is photoelectric or ultrasonic type correction sensor, which collects the position information of the edge of the pole piece in real time and transmits the signal to the main control system. The electric actuator adopts servo driver to drive the servo motor, which drives the screw guide and push rod to move to complete the correction of the offset distance.

Tension system
The tension control method can be mainly divided into open-loop control and closed-loop control according to the process, and the open-loop control lacks the corresponding feedback link, so the anti-interference ability and rolling accuracy are slightly inadequate [45]. The closed-loop control adds a feedback link to the tension, so that the input and output signals of the whole system can be contrasted and deviations can be eliminated, which can significantly improve the accuracy and anti-interference ability.
As can be seen from Fig 9, the real-time tension value collected by the tension sensor is calculated by the deviation from the set tension value, so that the control system drives the motor to drive the mechanical drive mechanism to change the speed of the pole piece belt drive. Then the tension sensor compares the tension value with the set value, forming a continuous and accurate closed-loop tension control system.

Control strategy optimization study
Research on corrective control methods Fuzzy PID control study for correction of deflection. The deviation correction fuzzy control needs to divide the basic universe of input and output parameters and transform it into the fuzzy universe of fuzzy reasoning operation combined with Q-Factors (Quantization Factors). On the basis of the actual operating parameters of the rolling mill, this paper selects appropriate quantitative factors to realize the transformation of fuzzy universe of control parameters, as described in Table 1. e represents the pole position deviation, e c represents the deviation rate of change, ΔK P , ΔK I and ΔK D , represent the proportional, integral and differential coefficients, respectively.
According to the characteristics of real-time correction control and the need to achieve fast response of correction, the resolution of the fuzzy set of the affiliation function can be set lower. Taking e as an example, the established affiliation function is illustrated in Fig 10. The left and right boundary parts use semi-trapezoidal affiliation function, and the five quantization levels in the middle use triangular affiliation function, which in terms of structure division, the middle part is dense, and the closer it is to both sides, the more sparse it is.
After determining the fuzzy affiliation function, it is necessary to determine the relationship between ΔK P , ΔK I and ΔK D in the PID. Considering that the variation of e under different operating conditions varies greatly, it is not possible to use expert knowledge for pre-setting, but the following rules can be followed: • When e is in a large range, a larger ΔK P is chosen to make e fall rapidly. When e c is large then it is necessary to avoid overshoot by weakening the effect of the differential link by appropriately reducing ΔK D .
• When e is in the middle range, ΔK P is increased, ΔK D and ΔK I are decreased to reduce oscillations and static errors. When e c is centered, ΔK D is taken to be moderate to stabilize the differential link.
• When e is in a small range, a smaller ΔK P and a larger ΔK I are chosen. And when e c is small, the value of ΔK I should be reduced appropriately.
Combined with reference materials and after several simulation tests, the ΔK P , ΔK I and ΔK D fuzzy control rules are determined as shown in Table 2.
Simulation testing. By combining the three transfer functions of detection comparison, motor drive and mechanical drive in the deflection control, the transfer model of the deflection correction system can be obtained as follows: Where T m , T d and K d are constants and are related to the electromagnetic torque of the motor, K L represents the correction detection link conversion factor.
According to the conversion calculation of the output analog voltage of the correction photoelectric sensor and the position deviation information in the actual correction control, K L can be obtained as 0.1. According to the mechanical device delay link, τ 0 will be to 0.1. Combining the relevant parameters such as armature voltage, rotation angle and potential of the correction motor, the speed and voltage transfer model of the motor can be obtained as followed: Fuzzy PID simulation model for correction is shown in Fig 11. The authors in [38] only used the pole position deviation as the fuzzy input. But obviously, the deviation change rate also needs to be considered. This paper takes the difference between the set step signal and the final output signal and the change rate of the difference as the input of the fuzzy controller.   The differential signal is passed through two-stage amplifier to initialize the system gain, and then the parameters are introduced into fuzzy logic controller 1. The optimized PID parameters K P , K I and K D are output and combined with the speed-voltage transfer function to form a closed-loop feedback control.
The step signal is used as the input signal in the simulation test, and the sinusoidal signal and smaller step signal are used as disturbances. The threshold is set to 5, when the integral link in PID is eliminated. Add PID model, integral separation PID model for experiments, simulation results are shown in Figs 12 and 13.
When the set disturbance signal is small, it will not trigger the integral separation, so the PID and integral separation PID control curves overlap. And it can be observed that the Fuzzy PID has a stronger ability to adapt to the disturbance and can revert to the initial step value and reach the steady state faster. When large sinusoidal disturbance is added, all three methods have certain resistance to the disturbances, and the output waveforms of all three control methods show oscillations with the sinusoidal curve, but the deviation δ 3 of Fuzzy PID is the smallest, and the deviation δ 2 and δ 1 of integral separation PID and PID are larger. Therefore, the Fuzzy PID has a greater advantage in terms of anti-jamming and anti-oscillation.
Under the action of the same control signal, although the PID control response is faster, but the response rate of the three methods is relatively close. In the analysis of the subsequent overshoot oscillation and finally reach the steady state time situation can be seen, the Fuzzy PID effect is optimal.

Research on tension control methods
Fuzzy PID control study for tension of deflection. The unwinding and rewinding tension control methods are the same, so only the unwinding tension Fuzzy PID control is introduced. Combined with the changes of tension in the actual unwinding control process of the polar strip, Q-Factors are selected to complete the theoretical domain transformation of the parameters e' and e c ' and the optimal variation range of ΔK P , ΔK I and ΔK D in the PID control process, the specific parameter formulation rules are shown in Table 3. e' represents the unwinding tension deviation, e c ' represents the rate of change of deviation.
Taking the e' as an example, the affiliation function of tension control is constructed as in Fig 14. Both input and output parameters use Z-type and inverse Z-type affiliation functions to form the left and right boundaries, so that the affiliation at the boundary can achieve a smooth transition from 0-1 or from 1-0. When the pole mill is running smoothly and the tension is stable in operation without external interference, showing a symmetric structure of left and right. The trigonometric affiliation function is more sensitive than the normal distribution and other affiliation functions when the input changes.
In determining the variation of ΔK P , ΔK I and ΔK D parameters during PID control, the following rules need to be followed: • When the pole mill is in the start-up stage, the unwinding device is disturbed by mechanical parts. The pole piece position is unstable, the pole piece position deviation e is large, and the tension deviation e ' has a large fluctuation range. It is necessary to reduce the value of ΔK P and ΔK I appropriately and increase the value of ΔK D to prevent the output integral from saturating.
• When the pole mill is in stable operation, the tension does not change dramatically in a short period of time, e' and e c ' are small, and the ΔK P and ΔK I is gradually increased to improve the stability of the control.
• In the process of pole piece belt transmission, the e c is small, but there is a sudden change of the e. At this time, the e ' and e c ' change suddenly in a short time to form a spike pulse. In this case, ΔK I should be increased appropriately and ΔK P should be reduced, while ΔK D should be taken as a small value.
Combining expert knowledge and multiple experimental simulations to obtain the tension fuzzy rule is shown in Table 4.
Simulation testing. By analyzing the causes of tension generation, the unwinding tension is obtained as: Where v main for the mill main roll running line speed, v for the release roll pole sheet with the exit line speed, E for the elastic modulus, S for the Polar strip cross-section area, L for the length of polar strip.  Deriving Eq (3) yields: Under the premise of stable and reliable torque, v is only related to the speed of the unwinding motor and the roll diameter of the unwinding roll. By appropriately selecting the signal conversion scale factor, we can get motor-speed voltage transfer function is 3:5 5s 2 þ0:8sþ1 , speed-tension transfer function is 1 0:5sþ1 . The authors in [40] only considered the influence of motor   speed difference on tension. After analysis, we determine the influence of deviation correction control on tension control, and add the influence relationship into fuzzy knowledge base. The tension Fuzzy PID simulation model is shown in Fig 15, different from the deviation correction control model, the feedback output is not only determined by motor speed and voltage, but also the relationship between motor speed and tension. This paper takes the difference between the step signal and the final output as the input, and uses the fuzzy controller to optimize the three parameters of PID. Step11 and Step12 are the set linear speed of the pole strip through the main roll.
The initial values of three coefficients in PID control K P ', K I ' and K D ' are taken as 5, 0.6 and 2.5, and the threshold value of the integration separation principle is set as 5. Adding PID model, integration separation PID model for experiment, the interference step signal amplitude is 10, and the simulation results are shown in Fig 16. Step11, Step12 and Step16 differential input system, therefore, at the beginning of the signal, there is a weak oscillation in the same direction as the step signal.
The deviation amount δ 1 of PID is the largest, and the deviation amount δ 3 of Fuzzy PID is the smallest. The two curves corresponding to the PID and the integral separation PID do not overlap because the step value is greater than the set threshold value that causes the integral separation. After putting in disturbance, δ 1 is obviously larger than δ 3 , and the final time to reach steady state is much larger than that of Fuzzy PID. Therefore, the stability of the Fuzzy PID control method is optimal.

Overall design plan
System integration is the tailoring of numerous technologies and products according to the user's needs, the appropriate and reasonable selection of relevant technologies and strategies. Then selecting and configuring the best software and hardware products and resources. Finally the combination into a complete and integrated solution that can solve the application needs of the device [46,47]. Pole mill is a transmission equipment controlled by multiple motors in complex factory environment [48]. For multi-motor control and harsh production environments, the following problems are generally encountered in the design of their digital hardware system integration [45]: • The control circuit of the motor generates high frequency, RF, spikes and other multi-coupled interference signals, • Complex control sequence and control logic, • Large electricity requirements and unstable power supply.
To overcome the interference between multiple signals, a three-unit cascade architecture is used, as shown in Fig 17. The main control unit adopts the dual-chip architecture of "ARM +DSP", in which ARM mainly controls the asynchronous motor drive and realizes the realtime display of data. DSP is responsible for the acquisition and data processing of various detection quantities. The DSP (Master) sends data to the STM32 (Slave) via the MOSI signal line, along with the clock signal SCK and the chip select signal CS_N. The data to be sent is stored in the FIFO and sent via the shift register SSFSR. The STM32 receives data synchronously and stores it in a FIFO. To overcome spikes and other interference, an isolated power supply is used.

Control circuit optimization design
Deflection control module. Authors in [37] adopts the combined driving mode of NPN and PNP triodes, but this mode has limited driving capacity and cannot drive high-power motors. The deviation correction system needs to be driven by 80W stepping motor, so the multi-channel optocoupler driving mode is selected, and the deviation correction driving circuit based on pulse plus direction control mode is designed [38]. The specific circuit is shown in Fig 18. The voltage regulator circuit adjusts the input voltage to the VREF reference voltage to supply power to the stepper motor driver chip. M1, M2, M3 are subdivision setting signals, which are used to subdivide the stepper driver chip by changing the high and low levels. The most precise subdivision can reach 1 / 128, which are pulse CP, direction DIR and enable EN respectively. The pulse signal should be connected to the CLK of the chip via the high-speed optocoupler 6N137, and the direction signal and enable signal should be connected to the ENABLE pin of the chip via the common optocoupler TLP521. To drive an 80W stepper motor, a drive current of 2.7 A is required. The current setting formula is:

PLOS ONE
Optimized design of battery pole control system based on dual-chip architecture Where R S is the external detection resistor, R 1 can change the value of the reference voltage at any time to adapt to the size of the controlled motor power. Through R 1 and R 5 resistor voltage division can be calculated, VREF = 3 V, R S = 0.22 O, where R 1 is a sliding resistor can be changed at any time to adapt the value of the reference voltage to the size of the controlled motor power.
Tension detection module. The tension signal is an analog signal, and most of the analog detection circuits are detected by a single signal source, which cannot be applied to the control field of multi signal input [49]. Considering the strong compatibility of the integrated control system, the tension detection circuit designed in this paper can detect 4-20mA current signal and 0-10V voltage signal at the same time. The design schematic is shown in Fig 19. The input electrical signals of two different types of sensors, 4-20 mA or 0-10 V, are converted into 0-3.3 V voltage signals that can be recognized by the built-in AD converter of the dual control chip.
The two operational amplifiers inside the LM358 are set to amplify the voltage with the inphase proportional amplification function and the voltage following function, and then the voltage following circuit matches the impedance to play the role of buffering. The tension signal is a current signal of 4-20 mA, which is converted to a voltage signal of 0.4-2 V by means of a resistor. Using an in-phase proportional amplifier circuit to enhance the measurement range. Tension detection signal of 0.6 V to 3 V is transmitted to the DSP through a voltage following circuit.

Communication testing
In order that the parameters obtained after the information acquisition module of DSP and processing can be accurately transferred to the STM32 master control, and the STM32 will realize the control of motor and inverter. The test process ensures that the master and slave are in synchronization. Firstly, the RS-232 interface is used to write 8-bit decimal data to the master. After that, the master receives the upper computer data through the serial port, prepares the SPI bus, sends 1bit preparation signal to the slave, and configures the slave SCK clock signal and CS chip selection signal. The program design follows the modular design idea, and the program engineering block diagram is shown in Fig 20. During SPI communication test, take DSP as the master to be responsible for clock and data output; STM32 is a slave to complete data reception. The STM32 FLASH saves the received data, and the STM32 sends the received data to the DSP again to complete the process of one master and one slave data sending and receiving. The simulation waveform is shown in Fig 21. The STM32 first receives the data sent by the DSP, and when the CS_N chip select signal is high, data reception begins, and due to the communication protocol, the sending and receiving process lags behind Sys_clk by one clock cycle. When FLASH finishes receiving data, it starts sending data to DSP. Through simulation experiments, the following conclusions are drawn: • The DSP needs to send an SPI ready signal to the STM32 to overcome the answer mechanism without the data acknowledgments bit,

PLOS ONE
Optimized design of battery pole control system based on dual-chip architecture • DSP sends data through MOSI, STM32 receives data through MISO, both keep synchronized, • DSP and STM32 through the SPI bus communication stability, in the industrial field need to add anti-interference technology to ensure stable data transmission.

Tension detection and control testing
After the integrated design scheme is introduced in this system, the Fuzzy PID control strategy is used to control the tension. The tension real experiment platform is shown in Fig 22. Two servo motor drive units are used to drive the conveyor belt to work, and the conveyor belt is a model for winding and unwinding. The tension is controlled by adjusting the motor speed. Adjusting the relationship between tension and winding and unwinding motor speed, so that the two achieve dynamic equilibrium. DSP collects tension information and transmits through SPI bus, tension data. During the lithium battery electrode rolling process, the tension is preset, and the tension should be in the range of 0-200 N. When conducting the tension test, a tension setting of 100 N is used as an example, and the upper limit of tension is set to 110 N and the lower limit to 90 N.
Take the unwinding mechanism as an example, the results of the tension information are shown in Fig 23, where the tension fluctuation range for both control architectures is between 10% and stays within the set range. The tension of the integrated single-chip architecture is significantly disturbed, although it is between the upper and lower limits, which is not conducive to actual production. The "ARM+DSP" control architecture, on the other hand, has a smaller tension fluctuation range and is more stable. As can be seen from Fig 23(A), the single-chip control method has a tension sampling point closer to the set alarm boundary line, and once the disturbance increases, the tension may be too large or too small.
Ten sets of sampling points were randomly extracted from the sampling data as shown in Table 5. T u is the setting of unwinding tension, T 0 u is the measurement of unwinding tension in "ARM" control architecture, T 0 0 u is the measurement of unwinding tension in "ARM+DSP" control architecture. By analyzing the deviation of tension value in the table, it can be seen that the tension error of single-chip control is within 10%, but the tension is more easily and obviously affected by external factors after system integration, while the tension error of dual chip control architecture is within 5%. Therefore, the control method of "ARM+DSP" architecture is more resistant to external disturbances and helps to improve the production quality of the pole piece.

Deflection control testing
When there is no offset of the pole strip, the position of the correction sensor is corrected and the corrected position is set to the standard value of the pole strip position 0. When the pole strip position changes and swings in and out with respect to the correction sensor, the corresponding standard value is taken as positive or negative.
After the equipment is running stably, the edge information of the pole strip in the deflection control is collected. Under the Fuzzy PID control method, for example, the pole strip position information of the "ARM" control architecture is shown in Fig 24(A). In the case of "ARM +DSP" control architecture, the position information of the pole strip is shown in Fig 24(B).
The collected edge information of the pole strip fluctuates up and down around the standard value of 0. When the pole strip position fluctuates under the control of STM32, the correction speed is slower and the fluctuation degree is more drastic. In contrast, under the joint control of STM32 and DSP, the adjustment speed is faster and the position information fluctuates less after the position of the pole strip deviates from the set value. In the sample data collected from the pole strip position information, the sampling points are selected at equal time intervals, and 10 sets of position sampling information are selected for each of the two methods. In Table 6, "+" and "-" indicate the direction in which the edge of the pole piece is shifted relative to the set value, L is the setting of pole position, L is the measurement of pole position in "ARM" control architecture, L is the measurement of pole position in "ARM+DSP" control architecture.
By comparing the data in the table, the following conclusions can be drawn: • The deviation values of the polar strip for the dual-chip control architecture are generally smaller than those for the single-chip control architecture, Under the control mode of "ARM + DSP" architecture, the position of pole strip is more stable, the deviation correction control process is stable and reliable, and the adverse impact caused by pole strip deviation can be reduced.

Discussion
In order to improve the operation efficiency of the existing mill control system, this paper proposes a digital integrated control system based on the dual-chip architecture of "ARM+DSP". The system separates the main drive mechanism and the winding mechanism at the physical layer, uses an isolated power supply to suppress the impact of the grid current, and incorporates a deflection unit to reduce the error in the production of pole pieces. The comparison verifies the effectiveness of Fuzzy PID theory in deflection and tension control. The results show that the tension control accuracy is higher and the correction error is lower with the dual-chip architecture.
The dual-chip architecture of "ARM+DSP" can improve the stability of the system to a certain extent. Compared to the pole mill control system proposed by the authors in [12], the dual-chip system-level architecture is able to integrate multiple functional modules. SoC (system on chip) system is a micro system, which is a special chip developed for customer needs. SoC system level chips have been used in power control [35], protection control [43] and other fields. SoC system level chips are expensive and lack of reconfigurability, so they are not suitable for nonlinear systems such as mechanical equipment. The control accuracy of the system level architecture proposed in this paper is lower than that of SoC special chip, but considering the cost and reconfigurability, the embedded system with dual chip architecture has more farreaching research significance and is more suitable for the industrial field. The experimental test shows that the hardware platform has strong anti-interference ability, eliminates the peak, sharp frequency and other interference signals, and the signal output is stable. However, due to the experimental conditions, the following problems and areas for further improvement still exist: • The signals of ARM and DSP interfere with each other, and the shielded line technology still does not achieve better results, Compared with SoC integrated chips, the cascade structure of "ARM+DSP" is not integrated enough and heat dissipation is not strong. In the future, the chip integration technology can be applied, combined with HPL, MailBox, OpenCL, DCE and other communication protocols to ensure stable data transmission.
• During the experimental test phase, there is a discrepancy between the tension setting value and the actual tension value in the industrial field. In the real situation, the tension will change depending on the pole piece. In the future research process, several actual working parameters can be extended to verify the tension control effect of the algorithm from several perspectives.
• The selection of deflection and tension control algorithms In addition, there are some intelligent algorithms, such as genetic self-anti-disturbance control and model predictive control, which can also be used for pole mill deflection and tension control. Therefore, based on the  research in this paper, other algorithms can be investigated in the subsequent research process.

Summary
The working environment of lithium battery pole mill is complex and the signal acquisition is difficult, and the integration and flexibility of the measurement and control system composed of single control unit such as PLC and ARM are poor, especially for the multi-motor control of complex electromechanical equipment. Therefore, this paper uses the powerful data storage and processing capability of DSP and the richness of STM32 peripherals to design a "dualchip-three-unit" cascade control system. It is verified that the dual-chip architecture is possible for industrial field applications, and the contributions of this study are as follows: • In this paper, the influence of pole position deviation on tension is considered. In the design of control algorithm, the influence of pole position deviation on tension is considered to improve the stability of the system • Fuzzy PID is used to optimize the pole piece deviation correction control and tension control process, and the relevant knowledge of the influence of deviation correction control on tension control is added to the knowledge base. It is verified that fuzzy PID can effectively improve the anti-interference ability and adaptive ability of the system, • The experimental platform of "ARM+DSP" dual-chip control was built, and the visualization interface was designed to monitor the operation status of the lithium battery pole mill. The experimental results show that the dual-chip control system operates stably, the accuracy of tension system is 5%, and the deviation of deflection system is ±4mm.