Lithium battery and lead-acid adaptive adjustment method and system based on CAN communication
By using an adaptive adjustment method based on CAN communication, and leveraging characteristic frequency impedance fingerprinting and a virtual BMS protocol twin mechanism, automatic identification and precise control of lithium-ion and lead-acid batteries were achieved. This solved the problems of misjudgment of battery type and low safety in the charging system, reduced development and maintenance costs, and improved the system's intelligent identification and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG AIFICO ELECTRIC TECHNOLOGY CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-19
AI Technical Summary
In hybrid energy charging applications, existing technologies lack a unified digital handshake signal for the charging control systems of lithium-ion and lead-acid batteries, resulting in a high risk of battery type misjudgment, low safety and efficiency, and high development and maintenance costs.
An adaptive adjustment method based on CAN communication is adopted. The battery type is automatically identified by the characteristic frequency impedance fingerprint recognition unit. A virtual BMS protocol twin mechanism is constructed to map the analog state of lead-acid batteries into standardized digital messages. Energy management is realized through a unified channel decision control unit, and a highly secure digital control architecture is established.
It achieves accurate battery type identification without digital handshake signals, eliminates information asymmetry, reduces development and maintenance costs, improves the system's intelligent identification capabilities and security, and ensures comprehensive safety protection for lead-acid batteries.
Smart Images

Figure CN122246941A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power electronics and battery charging control technology, specifically to a method and system for adaptive adjustment of lithium-ion and lead-acid batteries based on CAN communication. Background Technology
[0002] In current hybrid energy charging applications, the charging control system needs to be compatible with both lithium-ion batteries with standard digital communication protocols and lead-acid batteries that lack communication capabilities. Existing technologies generally adopt a heterogeneous control mode with direct physical layer drive, that is, maintaining two independent sets of control codes for different battery types or relying on physical switches for mode switching;
[0003] Although the solution can maintain basic charging functionality, it faces serious safety and efficiency bottlenecks in practical applications. Due to the lack of a unified digital handshake signal, the system struggles to automatically identify the physical and chemical nature of the connected battery during initialization, making it highly susceptible to misidentifying lead-acid batteries as lithium batteries due to blind insertion, leading to overcharging accidents. The dual logic architecture results in high software development and maintenance costs, and lead-acid batteries can only rely on coarse analog voltage feedback, lacking accurate digital descriptions of state of charge and health, making it difficult to incorporate them into a high-safety-level unified management system. Therefore, how to construct a normalized digital control architecture to achieve automatic identification of battery types and standardized protocol mapping of analog physical quantities under no-communication conditions, thereby unifying the energy management logic of heterogeneous batteries, has become an urgent technical problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for adaptive adjustment of lithium-ion and lead-acid batteries based on CAN communication. This method can automatically identify the physicochemical nature of batteries through characteristic frequency impedance fingerprints without digital handshake signals, avoiding the risk of misjudgment of battery type due to blind insertion and system vulnerabilities caused by heterogeneous logic switching. Furthermore, by using a virtual BMS protocol twin mechanism, the analog state of lead-acid batteries is mapped to standardized digital messages, thereby achieving normalization and improved security of the heterogeneous battery energy management architecture. Specifically, the technical solution of this invention is as follows:
[0005] A CAN-based adaptive adjustment method for lithium-ion and lead-acid batteries is proposed. This method operates in a charging control system that includes a characteristic frequency impedance fingerprinting unit, a virtual BMS protocol twin unit, and a unified channel decision control unit. The method includes the following steps:
[0006] Step S1: Establish the characteristic frequency impedance fingerprint recognition process: The characteristic frequency impedance fingerprint recognition unit serves as the decision mechanism in the blind test stage. It is configured to drive the power stage circuit to inject a specific frequency AC disturbance current signal into the battery under test and simultaneously collect the voltage response when no external heartbeat signal is detected within the preset time window of the physical communication interface. Based on the collected data, the complex impedance characteristics are calculated to generate a dielectric type identification signal.
[0007] Step S2: Constructing a virtual BMS protocol twin mechanism: The virtual BMS protocol twin unit serves as an intermediate layer to eliminate information asymmetry. It is configured to be activated after receiving the medium type identification signal indicating that the access object is a lead-acid battery. It takes over the voltage and current sampling data of the underlying layer, uses the built-in electrochemical model to map the simulated physical quantities into the internal state parameters of the battery, and encapsulates the internal state parameters into a virtual BMS message that conforms to the lithium-ion battery standard CAN communication protocol, and injects it into the internal data bus of the system in real time.
[0008] Step S3: Execute unified channel decision control: The unified channel decision control unit, as the highest execution mechanism that mainly responds to the digital communication protocol, is configured to continuously monitor the internal data bus, parse the charging voltage demand and charging current demand fields in the virtual BMS message without distinguishing the source of the message, and calculate the PWM duty cycle based on the parsed digital instructions, thereby driving the power circuit to perform energy output.
[0009] Preferably, in step S1, the specific logic for the characteristic frequency impedance fingerprint recognition unit to generate the medium type identification signal is as follows:
[0010] A specific impedance detection request message is constructed and sent to the internal data bus. The unified channel decision control unit drives the power stage circuit to inject a 1kHz micro-amplitude AC disturbance current signal to avoid the battery polarization effect.
[0011] Simultaneously calculate the phase difference between the voltage and current at the battery port and the magnitude of the complex impedance;
[0012] If the calculated phase angle shows capacitive characteristics of current leading voltage or the impedance modulus is higher than the preset high impedance threshold, then the connected object is determined to be a dormant lithium-ion battery.
[0013] If the calculated phase angle exhibits resistive or inductive characteristics and the impedance modulus is in the low resistance range, the access object is determined to be a lead-acid battery, and the medium type identification signal is output to activate the virtual BMS protocol twin unit.
[0014] Preferably, in step S2, the process by which the virtual BMS protocol twin unit maps the internal state parameters of the battery using an electrochemical model is specifically manifested as follows:
[0015] The voltage and current sampling data from the receiver are input as input variables to the built-in dynamic state observer.
[0016] The dynamic state observer is based on the Kalman filter algorithm and combines a pre-stored lead-acid battery electrochemical model to iteratively calculate the input variables, thereby estimating the battery's internal state parameters, including the virtual state of charge (SOC), equivalent single-cell voltage, and maximum allowable charging current, in real time.
[0017] The estimated internal state parameters of the battery are encapsulated in strict accordance with the frame format of the SAE J1939 standard to generate a virtual BMS message that is consistent with the real lithium battery BMS message in terms of format and timing.
[0018] Preferably, the method further includes the step of achieving constant voltage control through a discrimination-control bidirectional coupling mechanism:
[0019] The virtual BMS protocol twin unit acts as a constraint on the control boundary, and monitors the calculated internal state parameters of the battery in real time.
[0020] When the calculation shows that the lead-acid battery is close to full charge, the virtual BMS protocol twin unit actively generates a charging current demand field with gradually decreasing values and encapsulates it into the virtual BMS message.
[0021] After parsing the virtual BMS message, the unified channel decision control unit reduces the PWM duty cycle to reduce the output current, thereby forcing the physical output to exhibit constant voltage control characteristics without changing the control algorithm of the unified channel decision control unit.
[0022] Preferably, the identification-control bidirectional coupling mechanism also includes model correction and protection steps based on physical feedback:
[0023] After the unified channel decision control unit adjusts the output, the virtual BMS protocol twin unit captures the physical changes in battery terminal voltage and current as feedback signals.
[0024] The feedback signal is compared with the predicted value of the internal electrochemical model. If the deviation between the physical response and the model prediction exceeds the safety threshold set based on the battery health state boundary, the virtual BMS protocol twin unit immediately generates a virtual fault frame containing error codes and sends it to the internal data bus.
[0025] Upon receiving the virtual fault frame, the unified channel decision control unit immediately executes the shutdown protection logic.
[0026] Preferably, the system further includes a dynamic camouflage unit for security boundaries, and the method further includes an adaptive recovery step in a forced charging mode:
[0027] When a user-triggered forced charging command is received, the faulty virtual BMS model in the dynamic camouflage unit of the security boundary is activated;
[0028] The virtual BMS model operating with defects sends a CAN message with an undervoltage status flag but containing a flag that allows small current recovery to the internal data bus, inducing the unified channel decision control unit to output a trickle charging current.
[0029] The dynamic camouflage unit for the safety boundary continuously monitors the voltage recovery. Once the voltage recovers to the safety threshold, it immediately and smoothly switches back to the virtual BMS protocol twin unit, which then takes over the subsequent normal charging control process.
[0030] Preferably, the unified channel decision control unit is also equipped with a unified security circuit breaker mechanism:
[0031] The unified channel decision control unit continuously monitors the status of the message flow on the internal data bus. When a message flow interruption timeout is detected, or a virtual error frame is received by the virtual BMS protocol twin unit due to the detection of an analog quantity abnormality, the unified channel decision control unit executes the same set of shutdown protection logic to stop driving the power circuit.
[0032] A lithium-ion and lead-acid battery adaptive adjustment system based on CAN communication includes:
[0033] The characteristic frequency impedance fingerprint recognition unit is configured to drive the power circuit to inject AC disturbance current by sending an impedance detection request message when there is no heartbeat signal, and determine the battery type based on the phase difference between voltage and current.
[0034] The virtual BMS protocol twin unit is configured to, upon receiving the lead-acid battery identification signal, use the Kalman filter algorithm and electrochemical model to convert the collected voltage and current physical quantities into virtual SOC and equivalent single cell voltage, and encapsulate them into a standard CAN message to inject into the data bus.
[0035] The unified channel decision control unit is configured to respond only to digital communication protocols, analyze voltage and current requirements by listening to messages on the data bus to drive power circuits, and perform shutdown protection when messages are interrupted or error frames are received.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. This invention achieves accurate blind testing of battery type without digital handshake signal by using characteristic frequency impedance fingerprint recognition technology; by analyzing the phase difference and impedance characteristics of port voltage and current using AC disturbance signals of a specific frequency, it can automatically distinguish between lithium-ion batteries and lead-acid batteries; this mechanism effectively solves the problem of blind insertion misjudgment caused by the universality of physical interfaces, eliminates overcharging or safety accidents caused by incorrect charging logic, and improves the intelligent identification capability of the system.
[0038] 2. This invention constructs a virtual battery management system protocol twin mechanism, eliminating information asymmetry between lead-acid batteries and digital control systems; through built-in electrochemical models and filtering algorithms, the voltage and current physical quantities of lead-acid batteries are mapped in real time to internal parameters such as state of charge, and encapsulated into standard communication messages; this design endows analog characteristic batteries with digital description capabilities, enabling them to be incorporated into a high-precision unified digital management system, realizing state visualization and precise control.
[0039] 3. This invention achieves the normalization of the control architecture and the decoupling of the software logic; the decision control unit only responds to standard digital instructions, shielding the differences in the underlying physical medium, and eliminating the need to maintain two sets of control codes for different batteries; combined with the bidirectional coupling strategy of identification and control, without changing the core algorithm, the physical output is forced to exhibit constant voltage characteristics by dynamically adjusting the message requirements, which significantly reduces the development complexity and maintenance cost of heterogeneous systems.
[0040] 4. This invention establishes an advanced safety protection system based on physical feedback closed loop and dynamic camouflage; by comparing the deviation between the physical response and the model prediction value, the system can keenly detect anomalies such as micro-short circuits and trigger shutdown; at the same time, for severely over-discharged batteries, a faulty operation model is used to induce trickle output for safe treatment; this design gives lead-acid batteries the same level of comprehensive safety protection as lithium batteries, ensuring system reliability under extreme operating conditions and fault recovery scenarios. Attached Figure Description
[0041] The present invention will be further explained below with reference to the accompanying drawings and embodiments:
[0042] Figure 1 This is a flowchart of the method of the present invention;
[0043] Figure 2 This is a structural diagram of the system of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0045] Example 1:
[0046] Please see Figure 1A method for adaptive adjustment of lithium-ion and lead-acid batteries based on CAN communication includes: the method operates in a charging control system comprising a characteristic frequency impedance fingerprinting unit, a virtual BMS protocol twin unit, and a unified channel decision control unit; the method includes the following steps:
[0047] Step S1: Establish the characteristic frequency impedance fingerprint recognition process: The characteristic frequency impedance fingerprint recognition unit is configured to drive the power stage circuit to inject a specific frequency AC disturbance current signal into the battery under test and simultaneously collect the voltage response when no external heartbeat signal is detected within the preset time window of the physical communication interface. Based on the collected data, the complex impedance characteristics are calculated to generate a dielectric type identification signal.
[0048] Step S2: Construct a virtual BMS protocol twin mechanism: The virtual BMS protocol twin unit is configured to be activated after receiving the medium type identification signal indicating that the access object is a lead-acid battery. It takes over the voltage and current sampling data at the bottom layer, uses the built-in electrochemical model to map the simulated physical quantities into the internal state parameters of the battery, and encapsulates the internal state parameters into a virtual BMS message that conforms to the lithium-ion battery standard CAN communication protocol, and injects it into the internal data bus of the system in real time.
[0049] Step S3: Execute unified channel decision control: The unified channel decision control unit is configured to continuously monitor the internal data bus and parse message types to switch working modes: When a virtual BMS message is received, the charging voltage requirement and charging current requirement fields are parsed, and the DC PWM duty cycle is calculated based on the parsed digital instructions; when an impedance detection request is received, the built-in waveform generation logic is called to generate a modulated PWM signal of a specific frequency; thereby driving the power circuit to perform the corresponding energy output.
[0050] This embodiment constructs an adaptive charging architecture that breaks away from the traditional physical layer directly driving the control layer mode. During the blind test phase of system initialization, the characteristic frequency impedance fingerprint recognition unit is triggered to solve the technical problem of being unable to determine the electrochemical properties of the battery due to the lack of digital handshake signals. This unit generates a key medium type identification signal by injecting a perturbation signal of a specific frequency into the connection port and analyzing its feedback response. This medium type identification signal is defined as a logical flag bit used to characterize the physical and chemical nature of the access object, and its numerical state directly determines the direction of the system architecture: whether to maintain the transparent transmission mode for lithium batteries or activate the virtual twin mode.
[0051] When the media type identification signal indicates that the access object is a lead-acid battery, the system immediately activates the virtual BMS protocol twin unit. This unit acts as a standardized interface between the simulated physical world and digital control logic, and it takes over the voltage and current data collected by the underlying analog-to-digital converter in real time. Using built-in computing logic, this unit maps the simple physical port status data into battery internal status parameters containing advanced information such as state of charge and health status. According to the lithium-ion battery standard communication protocol, this unit encapsulates these status parameters into virtual BMS messages and injects them into the system bus. The virtual BMS message here specifically refers to a data frame that completely simulates the output of a real lithium battery management system in terms of data format, timing definition, and communication protocol stack, so that the downstream control unit does not need to identify the differences in physical media, but only needs to process standardized digital information.
[0052] The unified channel decision control unit performs the final energy management task; this unit continuously monitors the internal data bus of the system; the source of the instructions on the bus is masked, whether they come from a real external lithium battery BMS or virtual messages generated by the virtual BMS protocol twin unit, they are all regarded as equally valid control instructions; this unit parses the voltage and current demand fields in the message, and calculates the PWM duty cycle based on this using the PID algorithm to drive the hardware output;
[0053] Achieving normalization and ultimate security in the control architecture; by introducing a virtual BMS protocol twin mechanism, the lead-acid battery, which has no communication capability and originally could only rely on low-level analog logic control, is forcibly incorporated into a high-safety digital control system; this design eliminates the need for the system to maintain two independent sets of control code, eliminates the risk of system vulnerabilities caused by heterogeneous logic switching, and significantly reduces the development complexity and maintenance cost of the software.
[0054] Example 2:
[0055] The specific logic for the characteristic frequency impedance fingerprint recognition unit to generate the media type identification signal is as follows:
[0056] A specific impedance probe request message is constructed and sent to the internal data bus, where it is injected by the power stage circuit driven by the unified channel decision control unit. To avoid battery polarization effects;
[0057] Simultaneously calculate the phase difference between the voltage and current at the battery port and the magnitude of the complex impedance;
[0058] If the calculated phase angle shows capacitive characteristics of current leading voltage or the impedance modulus is higher than the preset high impedance threshold, then the connected object is determined to be a dormant lithium-ion battery.
[0059] If the calculated phase angle exhibits resistive or inductive characteristics and the impedance modulus is in the low resistance range, the access object is determined to be a lead-acid battery, and the medium type identification signal is output to activate the virtual BMS protocol twin unit.
[0060] The fingerprint recognition logic during the blind testing phase: After detecting that the communication bus has been silent for more than a preset time window, the characteristic frequency impedance fingerprint recognition unit constructs and sends an impedance detection request; this request is transmitted via the internal bus, triggering the power circuit to strictly lock the frequency injected into the battery at a specific frequency. The small-amplitude AC disturbance current; select The basis for using a specific detection frequency is that this frequency is in the middle band of the electrochemical impedance spectrum, which can effectively avoid the interference of low-frequency polarization effects in the internal electrochemical reaction of the battery, thereby accurately obtaining the most essential ohmic impedance characteristics of the battery.
[0061] Simultaneously with the injection signal, the unit synchronously samples the voltage and current waveforms of the port at high speed and calculates the phase difference and complex impedance magnitude using discrete Fourier transform or zero-crossing detection algorithm. The logic judgment is based on the following: once the current phase is detected to lead the voltage phase, or the calculated impedance magnitude is higher than the preset high-resistance threshold, where the high-resistance threshold is set to be greater than 500 milliohms, it is used to determine that the port is in an open circuit or high-resistance state formed by the protection board being turned off; the system logic determines that the access object is a lithium-ion battery in a dormant state, at which time it remains silent and does not activate the lead-acid mode; if the phase angle is displayed as resistive or slightly inductive, and the impedance magnitude is in the low-resistance range representing the direct conduction of chemically active materials, where the low-resistance range is defined as the range of 10 milliohms to 100 milliohms, or defined as the range not exceeding 150% of the standard internal resistance value of the same capacity battery stored in the system, the system determines that the access object is a lead-acid battery and immediately sets the medium type identification signal, which is used as a trigger condition to wake up the virtual BMS protocol twin unit;
[0062] The system's intelligent error prevention and correction capabilities have been enhanced. Through physical fingerprint recognition based on electrochemical impedance spectroscopy characteristics, the system can accurately distinguish battery types and automatically correct users' incorrect settings or blind insertion behavior, effectively preventing overcharging or safety accidents caused by the system mistakenly pressing the high-voltage logic output of lithium batteries when physically connected to lead-acid batteries.
[0063] Example 3:
[0064] The process by which the virtual BMS protocol twin unit maps the internal state parameters of the battery using an electrochemical model is specifically manifested as follows:
[0065] The voltage and current sampling data and ambient temperature sampling data of the receiver are input as input variables to the built-in dynamic state observer.
[0066] The dynamic state observer is based on the Kalman filter algorithm. It combines a pre-stored electrochemical model of lead-acid battery with temperature compensation coefficient to perform iterative calculations on the input variables and uses ambient temperature data to perform linear compensation correction on the upper limit of charging voltage, thereby estimating the battery internal state parameters in real time, including virtual state of charge (SOC), equivalent single cell voltage, and the maximum allowable charging current after temperature correction.
[0067] The estimated internal state parameters of the battery are encapsulated in strict accordance with the frame format of the SAE J1939 standard to generate a virtual BMS message that is consistent with the real lithium battery BMS message in terms of format and timing.
[0068] The virtual BMS protocol twin unit uses a built-in dynamic state observer to process input data. This observer receives real-time voltage and current values acquired and filtered by the underlying ADC as input vectors and performs state estimation based on the extended Kalman filter algorithm. In each operation cycle, the algorithm uses a pre-stored lead-acid battery electrochemical model to predict the terminal voltage at the next moment and compares the predicted value with the actual measured value. By continuously correcting the covariance matrix and state gain, the observer can solve for battery internal state parameters that cannot be directly measured from noisy measurements, specifically including virtual SOC, equivalent single cell voltage, and maximum allowable charging current.
[0069] After completing the state estimation, the unit starts the protocol encapsulation engine, mapping the aforementioned internal state parameters to the specific PGN and SPN locations defined in the SAE J1939 standard protocol; and mapping the estimated SOC value to... Specific bytes of the frame map voltage and current requirements to Frames; ultimately generating virtual BMS messages that fully conform to the standards in bit arrangement, transmission period, and verification mechanism;
[0070] This advanced algorithm eliminates the information asymmetry between lead-acid and lithium batteries. Lead-acid batteries, which could only be represented by rough voltage values, are now given precise digital state descriptions. This enables the system to not only perform high-precision closed-loop control but also display accurate percentage charge on the user interface, greatly optimizing the user experience of heterogeneous batteries.
[0071] Example 4:
[0072] The method also includes the step of achieving constant voltage control through a discrimination-control bidirectional coupling mechanism:
[0073] The virtual BMS protocol twin unit acts as a constraint on the control boundary, and monitors the calculated internal state parameters of the battery in real time.
[0074] When the calculation shows that the lead-acid battery is close to full charge, the virtual BMS protocol twin unit actively generates a charging current demand field with gradually decreasing values and encapsulates it into the virtual BMS message.
[0075] After parsing the virtual BMS message, the unified channel decision control unit reduces the PWM duty cycle to reduce the output current, thereby forcing the physical output to exhibit constant voltage control characteristics without changing the control algorithm of the unified channel decision control unit.
[0076] The virtual BMS protocol twin unit and the unified channel decision control unit employ a forward coupling control strategy. Although the unified channel decision control unit essentially executes constant current source logic based on digital instructions, an active constraint strategy is used to meet the constant voltage requirement of lead-acid batteries in the later stages of charging. When the electrochemical model of the virtual unit calculates that the battery terminal voltage is close to the preset upper limit of the float charge voltage, its internal logic does not request to switch the underlying control mode, but instead calculates a gradually decreasing current limit value based on the voltage deviation value. The specific calculation logic is as follows: set the target float charge voltage threshold, and calculate the forward approximation difference between the current battery terminal voltage and the target float charge voltage threshold in real time; use a preset proportional control coefficient to perform an inverse proportional operation on the forward approximation difference, or subtract the product of the forward approximation difference and the proportional coefficient from the maximum allowable charging current, thereby obtaining a current limit value that decreases linearly with the voltage increase, ensuring that the current smoothly converges to zero or the preset float charge maintenance current value when the voltage reaches the target value; this unit fills this continuously decreasing value into the charging current requirement field in the message.
[0077] After parsing the continuously decreasing current command, the unified channel decision control unit automatically reduces the PWM duty cycle through the PID regulator. From the perspective of macroscopic physical output, as the battery voltage increases, the charging current automatically decreases, thus perfectly reproducing the constant voltage charging characteristics without adding a branch of the underlying constant voltage control code. This design greatly simplifies the logic structure of the controller and achieves complete decoupling between the control strategy and the actuator.
[0078] Example 5:
[0079] The identification-control bidirectional coupling mechanism also includes model correction and protection steps based on physical feedback:
[0080] After the unified channel decision control unit adjusts the output, the virtual BMS protocol twin unit captures the physical changes in battery terminal voltage and current as feedback signals.
[0081] The feedback signal is compared with the predicted value of the internal electrochemical model. If the deviation between the physical response and the model prediction exceeds the safety threshold set based on the battery health state boundary, the virtual BMS protocol twin unit immediately generates a virtual fault frame containing error codes and sends it to the internal data bus.
[0082] Upon receiving the virtual fault frame, the unified channel decision control unit immediately executes the shutdown protection logic.
[0083] This embodiment constructs a closed-loop verification mechanism for reverse feedback and safety protection; after the unified channel decision control unit adjusts the power output, the physical state of the battery will inevitably undergo a dynamic response that conforms to the electrochemical law; the virtual BMS protocol twin unit continuously captures these responses as feedback signals and performs real-time residual analysis with the theoretical prediction values of the internal electrochemical model.
[0084] If the absolute value of the deviation between the calculated actual physical response and the model prediction exceeds the preset safety threshold, it indicates that a physical anomaly has occurred inside the battery that cannot be explained by the model. This safety threshold is a limit parameter representing the battery's health boundary, determined based on a large amount of experimental data. Once the threshold is triggered, the virtual unit immediately terminates the normal charging message transmission and instead generates a virtual fault frame containing a specific error code to inject into the bus. After receiving the standard error frame, the decision control unit immediately executes the forced shutdown protection logic and cuts off the main circuit. This mechanism gives lead-acid batteries the same level of safety protection as lithium batteries and can keenly detect micro-short circuits or thermal runaway precursors that are difficult for analog control logic to detect.
[0085] Example 6:
[0086] The system also includes a dynamic security boundary camouflage unit, and the method further includes an adaptive recovery step in a forced charging mode:
[0087] When a user-triggered forced charging command is received, the faulty virtual BMS model in the dynamic camouflage unit of the security boundary is activated;
[0088] The virtual BMS model operating with defects sends a CAN message with an undervoltage status flag but containing a flag that allows small current recovery to the internal data bus, inducing the unified channel decision control unit to output a trickle charging current.
[0089] The dynamic camouflage unit for the safety boundary continuously monitors the voltage recovery. Once the voltage recovers to the safety threshold, it immediately and smoothly switches back to the virtual BMS protocol twin unit, which then takes over the subsequent normal charging control process.
[0090] This embodiment addresses the scenario of treating severely over-discharged batteries by introducing a dynamic safety boundary camouflage unit. When the system receives a strong charging command triggered by the user via a physical button or interface, the control logic does not simply bypass the safety check and directly output the voltage. Instead, it activates a special virtual BMS model that is operating with a fault. This model simulates a BMS logic that is in a state of severe undervoltage fault but requests emergency recovery. It constructs and sends a special CAN message: the battery undervoltage warning flag is set in the status bit of the message, but at the same time, the small current recovery flag is set in the control bit, and an extremely low current demand value is set.
[0091] This specific combination of flags is designed to induce the unified channel decision control unit to output a controlled trickle charge, provided that the safety protocol is followed. During this period, the unit continuously monitors the rate of voltage recovery at the battery terminals. Once the voltage is detected to have recovered to a safe threshold that allows for normal high-current charging, the system immediately performs a logic switch, smoothly transferring control to a standard virtual BMS protocol twin unit, achieving seamless digital takeover from fault recovery mode to normal charging mode. This technical solution solves the problem of over-discharged batteries being unable to start charging, while avoiding the high risks associated with directly removing the protection mechanism in traditional forced charging modes.
[0092] Example 7:
[0093] The unified channel decision control unit is also equipped with a unified security circuit breaker mechanism:
[0094] The unified channel decision control unit continuously monitors the status of the message flow on the internal data bus. When a message flow interruption timeout is detected, or a virtual error frame is received by the virtual BMS protocol twin unit due to the detection of an analog quantity abnormality, the unified channel decision control unit executes the same set of shutdown protection logic to stop driving the power circuit.
[0095] This embodiment defines the secure circuit breaker logic for the unified channel decision control unit. This unit continuously monitors the CAN message stream on the internal data bus. The system normalizes the conditions for triggering shutdown protection into two categories: one is communication-level anomalies, i.e., the message stream interruption time exceeds the preset safety time limit, regardless of whether the interruption originates from the physical connection disconnection of the external real BMS or the process anomaly of the internal virtual unit; the other is service-level anomalies, i.e., receiving a clear error frame. Regardless of which category the triggering source belongs to, the unit executes the same set of standardized shutdown actions, i.e., immediately blocking the PWM drive signal and disconnecting the output relay. This design simplifies the fault handling process and ensures that the system can return to a safe state in any abnormal situation, reflecting the high consistency and reliability of the system architecture.
[0096] Example 8:
[0097] Please see Figure 2 An adaptive adjustment system for lithium-ion and lead-acid batteries based on CAN communication, comprising:
[0098] The characteristic frequency impedance fingerprint recognition unit is configured to drive the power circuit to inject AC disturbance current by sending an impedance detection request message when there is no heartbeat signal, and determine the battery type based on the phase difference between voltage and current.
[0099] The virtual BMS protocol twin unit is configured to, upon receiving the lead-acid battery identification signal, use the Kalman filter algorithm and electrochemical model to convert the collected voltage and current physical quantities into virtual SOC and equivalent single cell voltage, and encapsulate them into a standard CAN message to inject into the data bus.
[0100] The unified channel decision control unit is configured to respond only to digital communication protocols, analyze voltage and current requirements by listening to messages on the data bus to drive power circuits, and perform shutdown protection when messages are interrupted or error frames are received.
[0101] This embodiment implements the system hardware and firmware architecture of the aforementioned adaptive adjustment method. The characteristic frequency impedance fingerprint recognition unit is configured to actively initiate physical detection during the communication silence period, acquiring the battery's electrochemical fingerprint through micro-operations of the power stage circuit. The virtual BMS protocol twin unit embeds a high-performance microprocessor to run complex Kalman filtering algorithms and electrochemical models, responsible for translating unstructured analog sampling signals into structured standard digital protocols in real time. The unified channel decision control unit achieves precise driving and safe fuse breaking of the power hardware through unified parsing and response to digital messages. These three units are clearly defined in logical function but closely interlocked in data flow, together forming a closed-loop control system that can adaptively and reliably support both digital communication batteries and analog characteristic batteries. Through modular functional division, the reuse of hardware resources and the decoupling of software logic are realized, providing a concrete physical implementation basis for building highly compatible and highly safe hybrid battery charging devices.
[0102] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A lithium and lead acid adaptive regulation method based on CAN communication, characterized in that, The method operates in a charging control system comprising a characteristic frequency impedance fingerprinting unit, a virtual BMS protocol twin unit, and a unified channel decision control unit, and includes the following steps: Step S1: Establish the characteristic frequency impedance fingerprint recognition process: The characteristic frequency impedance fingerprint recognition unit serves as the decision mechanism in the blind test stage. It is configured to drive the power stage circuit to inject a specific frequency AC disturbance current signal into the battery under test and simultaneously collect the voltage response when no external heartbeat signal is detected within the preset time window of the physical communication interface. Based on the collected data, the complex impedance characteristics are calculated to generate a dielectric type identification signal. Step S2: Constructing a virtual BMS protocol twin mechanism: The virtual BMS protocol twin unit serves as an intermediate layer to eliminate information asymmetry. It is configured to be activated after receiving the medium type identification signal indicating that the access object is a lead-acid battery. It takes over the voltage and current sampling data of the underlying layer, uses the built-in electrochemical model to map the simulated physical quantities into the internal state parameters of the battery, and encapsulates the internal state parameters into a virtual BMS message that conforms to the lithium-ion battery standard CAN communication protocol, and injects it into the internal data bus of the system in real time. Step S3: Execute unified channel decision control: The unified channel decision control unit, as the highest execution mechanism that mainly responds to the digital communication protocol, is configured to continuously monitor the internal data bus, parse the charging voltage demand and charging current demand fields in the virtual BMS message without distinguishing the source of the message, and calculate the PWM duty cycle based on the parsed digital instructions, thereby driving the power circuit to perform energy output.
2. The CAN communication-based lithium battery and lead-acid adaptive adjustment method according to claim 1, characterized in that, In step S1, the specific logic for the characteristic frequency impedance fingerprint recognition unit to generate the medium type identification signal is as follows: A specific impedance detection request message is constructed and sent to the internal data bus. The unified channel decision control unit drives the power stage circuit to inject a 1kHz micro-amplitude AC disturbance current signal to avoid the battery polarization effect. Simultaneously calculate the phase difference between the voltage and current at the battery port and the magnitude of the complex impedance; If the calculated phase angle shows capacitive characteristics of current leading voltage or the impedance modulus is higher than the preset high impedance threshold, then the connected object is determined to be a dormant lithium-ion battery. If the calculated phase angle exhibits resistive or inductive characteristics and the impedance modulus is in the low resistance range, the access object is determined to be a lead-acid battery, and the medium type identification signal is output to activate the virtual BMS protocol twin unit.
3. The CAN communication-based lithium and lead-acid adaptive adjustment method according to claim 1, characterized in that, In step S2, the process by which the virtual BMS protocol twin unit maps the internal state parameters of the battery using an electrochemical model is specifically manifested as follows: The voltage and current sampling data from the receiver are input as input variables to the built-in dynamic state observer. The dynamic state observer is based on the Kalman filter algorithm and combines a pre-stored lead-acid battery electrochemical model to iteratively calculate the input variables, thereby estimating the battery's internal state parameters, including the virtual state of charge (SOC), equivalent single-cell voltage, and maximum allowable charging current, in real time. The estimated internal state parameters of the battery are encapsulated in strict accordance with the frame format of the SAE J1939 standard to generate a virtual BMS message that is consistent with the real lithium battery BMS message in terms of format and timing.
4. The CAN communication-based lithium and lead acid adaptive regulation method according to claim 1, characterized in that, The method further includes a step of achieving constant pressure control through a discrimination-control bidirectional coupling mechanism: The virtual BMS protocol twin unit acts as a constraint on the control boundary, and monitors the calculated internal state parameters of the battery in real time. When the calculation shows that the lead-acid battery is close to full charge, the virtual BMS protocol twin unit actively generates a charging current demand field with gradually decreasing values and encapsulates it into the virtual BMS message. After parsing the virtual BMS message, the unified channel decision control unit reduces the PWM duty cycle to reduce the output current, thereby forcing the physical output to exhibit constant voltage control characteristics without changing the control algorithm of the unified channel decision control unit.
5. The adaptive adjustment method for lithium-ion and lead-acid batteries based on CAN communication according to claim 4, characterized in that, The identification-control bidirectional coupling mechanism also includes model correction and protection steps based on physical feedback: After the unified channel decision control unit adjusts the output, the virtual BMS protocol twin unit captures the physical changes in battery terminal voltage and current as feedback signals. The feedback signal is compared with the predicted value of the internal electrochemical model. If the deviation between the physical response and the model prediction exceeds the safety threshold set based on the battery health state boundary, the virtual BMS protocol twin unit immediately generates a virtual fault frame containing error codes and sends it to the internal data bus. Upon receiving the virtual fault frame, the unified channel decision control unit immediately executes the shutdown protection logic.
6. The adaptive adjustment method for lithium-ion and lead-acid batteries based on CAN communication according to claim 1, characterized in that, The system also includes a dynamic security boundary camouflage unit, and the method further includes an adaptive recovery step in a forced charging mode: When a user-triggered forced charging command is received, the faulty virtual BMS model in the dynamic camouflage unit of the security boundary is activated; The virtual BMS model operating with defects sends a CAN message with an undervoltage status flag but containing a flag that allows small current recovery to the internal data bus, inducing the unified channel decision control unit to output a trickle charging current. The dynamic camouflage unit for the safety boundary continuously monitors the voltage recovery. Once the voltage recovers to the safety threshold, it immediately and smoothly switches back to the virtual BMS protocol twin unit, which then takes over the subsequent normal charging control process.
7. The adaptive adjustment method for lithium-ion and lead-acid batteries based on CAN communication according to claim 1, characterized in that, The unified channel decision control unit is also equipped with a unified security circuit breaker mechanism: The unified channel decision control unit continuously monitors the status of the message flow on the internal data bus. When a message flow interruption timeout is detected, or a virtual error frame is received by the virtual BMS protocol twin unit due to the detection of an analog quantity abnormality, the unified channel decision control unit executes the same set of shutdown protection logic to stop driving the power circuit.
8. A lithium-ion battery and lead-acid battery adaptive adjustment system based on CAN communication, applied to the lithium-ion battery and lead-acid battery adaptive adjustment method based on CAN communication as described in any one of claims 1-7, characterized in that, include: The characteristic frequency impedance fingerprint recognition unit is configured to drive the power circuit to inject AC disturbance current by sending an impedance detection request message when there is no heartbeat signal, and determine the battery type based on the phase difference between voltage and current. The virtual BMS protocol twin unit is configured to, upon receiving the lead-acid battery identification signal, use the Kalman filter algorithm and electrochemical model to convert the collected voltage and current physical quantities into virtual SOC and equivalent single cell voltage, and encapsulate them into a standard CAN message to inject into the data bus. The unified channel decision control unit is configured to respond only to digital communication protocols, analyze voltage and current requirements by listening to messages on the data bus to drive power circuits, and perform shutdown protection when messages are interrupted or error frames are received.