Charging pile CAN bus baud rate adaptive method, system and device and storage medium

By dynamically adjusting the baud rate of the CAN bus, the problem of fixed-rate communication being susceptible to interference in a variable environment is solved, communication efficiency and stability are improved, and efficient and reliability of the charging process is ensured.

CN119676023APending Publication Date: 2025-03-21SHAANXI GREEN ENERGY ELECTRONIC TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411914254.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-12-16
Filing Date
2024-12-24
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, fixed-rate communication is susceptible to interference in a variable application environment, resulting in low communication efficiency.

Method used

By dynamically adjusting the baud rate of the CAN bus, the baud rate will be automatically increased or reduced according to the real-time communication environment and link quality to adapt to different communication conditions.

Benefits of technology

It improves the stability and efficiency of data transmission, optimizes the communication process between CMU and TMU, charging module, centralized control, and electric vehicles, and ensures that an efficient and reliable charging experience can be achieved in various environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676023A_ABST
    Figure CN119676023A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of charging piles, and discloses a charging pile CAN bus baud rate adaptive method, system and device and a storage medium. Comprising the following steps that internal CAN communication is used as a use object, a core node CMU evaluates the stability of a CAN communication link and dynamically adjusts the baud rate to optimize the communication performance by analyzing the accuracy of received frames, adaptive matching of the baud rate is carried out according to the accuracy of received messages for newly added nodes, and the communication performance is optimized. The communication efficiency and quality of each node in the CAN network are ensured, when the communication quality is reduced, the baud rate is reduced, errors in data transmission are reduced, and the accuracy and integrity of data are ensured; under the condition that the communication quality is good, the baud rate is improved, so that the data transmission speed is accelerated. Therefore, the communication efficiency can be improved, the time and resources required for data transmission can be reduced, and the technical problems that in the prior art, existing fixed-rate communication is prone to being interfered in a changeable application environment, and the communication efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of charging piles, and relates to a charging pile CAN bus baud rate self-adaptation method, system, device and storage medium. Background Art

[0002] With the rapid expansion of the electric vehicle market, the number of charging piles is also increasing. Electric vehicles of different brands and models, as well as various components of charging piles (such as CMU, TMU, charging module, centralized control, etc.) have their own communication requirements and standards. CAN is the controller area network, CMU is the communication management unit, and TMU is the charging terminal management unit.

[0003] In the communication system of electric vehicle charging piles, the existing fixed-rate communication performs well when the environment is stable, but is susceptible to interference in a changeable application environment, resulting in low communication efficiency. The CAN adaptive baud rate can dynamically adjust the data transmission rate according to the real-time communication environment. By real-time monitoring of the communication link quality, it automatically increases or decreases the baud rate to adapt to different communication conditions, improve the stability and efficiency of data transmission, and optimize the communication process between CMU and TMU, charging module, centralized control, and electric vehicles, ensuring an efficient and reliable charging experience in various environments. Summary of the invention

[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a charging pile CAN bus baud rate adaptive method, system, device and storage medium, which dynamically adjusts the communication baud rate to adapt to the ever-changing communication environment, and solves the technical problems in the prior art that the existing fixed-rate communication is susceptible to interference in a changing application environment and has low communication efficiency.

[0005] In order to achieve the above object, the present invention adopts the following technical solution: The present invention provides a charging pile CAN bus baud rate self-adaptation method, comprising the following steps: obtaining CAN receiving and sending messages, counting the results of each frame, and calculating the correct frame ratio according to the results of each frame; if the correct frame ratio is within a preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level, and all nodes are modified. Furthermore, the CAN baud rate includes 5kb / s, 10kb / s, 20kb / s, 50kb / s, 100kb / s, 125kb / s, 250kb / s, 500kb / s, 800kb / s and 1000kb / s.

[0006] Furthermore, if the correct frame ratio is within the preset value, the CMU maintains the current setting; otherwise, the CAN baud rate is increased or decreased by one level, and all nodes are modified, including: if the correct frame ratio is greater than or equal to 95 and less than 100%, the CAN receive and send messages are reacquired; if the correct frame ratio is equal to 100%, it is determined whether the CAN baud rate is the maximum rate, the CAN baud rate is the maximum rate, and the process ends; otherwise, the CAN baud rate is increased by one level, and all nodes are modified; if the correct frame ratio is less than 95%, it is determined whether the CAN baud rate is the minimum rate, the CAN baud rate is the minimum rate, and the process ends; otherwise, the CAN baud rate is reduced by one level, and all nodes are modified. Furthermore, the CMU sends an adaptive request signal when a communication error occurs, the baud rate is increased, or the baud rate is decreased, and the remaining nodes adjust the baud rate according to the adaptive request signal.

[0007] Furthermore, it also includes a CAN baud rate self-adaptation method for a newly added node; the CAN baud rate self-adaptation method for a newly added node includes the following steps: setting the CAN baud rate, receiving a message through a filter; if the received message is wrong, generating a received data error interrupt, increasing the number of error messages by one, and increasing the number of error messages by one. 10 rounds of training baud rate configuration table, otherwise set the filter to receive the message; if the received message is correct, a correct reception data interrupt is generated, the number of correct messages is increased by one, and the number of correct messages is 10. Save the current baud rate, otherwise set the filter to receive the message.

[0008] Furthermore, the receiving time of the message received by the filter is once every 10ms.

[0009] Furthermore, before setting the CAN baud rate, initialization parameters are also included; the initialization parameters include: a CAN baud rate configuration table, clearing the number of error messages, and clearing the number of correct messages.

[0010] The present invention also provides a charging pile CAN bus baud rate adaptive system, including: an acquisition module, used to obtain CAN reception and transmission messages, and count the results of each frame; a calculation module, used to calculate the correct frame ratio according to the results of each frame; an adjustment module, used to maintain the current setting of the CMU when the correct frame ratio is within a preset value, otherwise increase or decrease the CAN baud rate by one level, and all nodes are modified.

[0011] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned charging pile CAN bus baud rate adaptation method when executing the computer program.

[0012] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned charging pile CAN bus baud rate adaptation method are implemented.

[0013] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention provides a charging pile CAN bus baud rate self-adaptation method, which can adjust the baud rate according to the real-time communication environment. When the communication quality decreases, the baud rate is reduced to reduce errors in data transmission and ensure the accuracy and integrity of the data; when the communication quality is good, the baud rate is increased to speed up the data transmission. This can not only improve the communication efficiency, but also reduce the time and resources required for data transmission.

[0014] The present invention discloses a charging pile CAN bus baud rate self-adaptation method, which can automatically identify the model of the connected electric vehicle and the communication requirements of the charging module, enhances the compatibility of the charging pile system, and is applicable to a wider range of vehicle models and application scenarios.

[0015] The present invention discloses a charging pile CAN bus baud rate adaptive method, which can dynamically adjust the data transmission rate according to the actual communication environment, so as to effectively deal with adverse factors such as electromagnetic interference and temperature changes, reduce the occurrence of communication errors, and significantly improve the charging experience of electric vehicles by reducing communication errors, optimizing data transmission processes, improving charging efficiency and reducing charging time.

[0016] The present invention discloses a charging pile CAN bus baud rate self-adaptation method, and stable communication and fast charging speed can significantly reduce the situation of charging interruption or charging failure caused by communication failure, thereby avoiding unnecessary trouble and anxiety encountered by users during the charging process. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of a method for self-adapting CAN baud rate on the CMU side in an embodiment of the present invention; Figure 2 This is a flow chart of the CAN baud rate self-adaptation method for a newly added node in an embodiment of the present invention; Figure 3 CAN communication topology diagram in an embodiment of the present invention; Figure 4 is a CAN error register in an embodiment of the present invention; Figure 5 1 is a timing diagram of the bxCAN module in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0019] like Figure 3 As shown in the figure, the CAN communication topology in the charging pile has three lines. The first line connects the CMU and the centralized control, which is called the centralized control CAN line, and is used for data transmission and communication between the CMU and the centralized control. The centralized control, as the central control unit, is responsible for monitoring the status of the entire charging system, including the working status of the CMU, charging progress, etc. The CMU reports various data during the charging process, such as charging current, voltage, temperature, etc., to the centralized control through this line, and receives control instructions from the centralized control.

[0020] The second line connects the CMU or TMU to the car, called the car CAN line, which allows the CMU (or TMU) to communicate with the electric vehicle's battery management system BMS or other related modules to monitor battery status, control the charging process, etc. Through this line, the CMU can obtain real-time data on the electric vehicle battery.

[0021] The third line connects the CMU with the module and TMU, which is called the internal CAN line. It is used for internal communication between the CMU and various modules (such as charging module, temperature sensor module, relay module, etc.) and TMU. It allows the CMU to coordinate and manage the work of each module and can complete the charging task together. At the same time, the TMU also communicates with the CMU through this line to report temperature data or receive control instructions.

[0022] Example 1 The present invention discloses a charging pile CAN bus baud rate self-adaptation method, comprising: obtaining CAN receiving and sending messages, counting the results of each frame, and calculating the correct frame ratio according to the results of each frame; if the correct frame ratio is within a preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level, and all nodes are modified.

[0023] Specifically, Figure 1 As shown, real-time monitoring: real-time statistics of received and sent messages totaling 100 frames, statistics of the results of each frame, each frame has two results, correct and wrong, and then calculate the correct frame ratio, the correct frame ratio is calculated as follows:

[0024] Evaluate CAN communication quality: When the correct frame ratio is kept within the range of 95% to 100%, that is, greater than or equal to 95 and less than 100%, the network is in good condition, and the CMU maintains the current settings and continues to count the received and sent messages in real time. When the correct frame ratio is as high as 100%, it means that the network is running smoothly. At this time, it is determined whether the baud rate is the maximum value. If it is the maximum value, the process ends, otherwise the CAN baud rate is increased by one level. In summary, when the correct frame ratio is 100%, the CMU increases the baud rate to enhance the efficiency of data transmission. If the maximum baud rate has been reached, no adjustment will be made.

[0025] If the correct frame ratio is not within the range of 95% to 100% and is not 100%, determine whether the baud rate is the minimum value. If it is the minimum value, the process ends, otherwise the CAN baud rate is reduced by one level. If the correct frame ratio is lower than 95%, it means that the network performance has deteriorated. The CMU will reduce the baud rate to improve the reliability of communication and the accurate transmission of data. If the baud rate has been reduced to the minimum and needs to be reduced, the CMU will report that the current CAN communication quality is poor and stop further baud rate changes to deal with network instability.

[0026] In the CAN bus standard, each node has a CAN controller, which is connected to the CAN bus through internal registers and interfaces. During CAN transmission, if an error occurs, the error information will be recorded in the CAN controller's internal error register, such as Figure 4 As shown. The status of the CAN bus can be reflected by the transmit error counter (TECNT) and receive error counter (RECNT) of the CAN_ERR register. The values ​​will be increased or decreased by the hardware according to the error situation. The software can judge the stability of the CAN network through these values. The CAN_ERR register can also indicate the current error status, which generates interrupts under the control of the CAN_INTEN register. When the interrupt is enabled and an interrupt occurs, the corresponding flag bit will be set. The interrupt type can be determined by reading the value of the register. TECNT and RECNT are the message error interrupt flag bits. If an error occurs during the message sending or receiving process, the message error interrupt will be triggered and the flag bit will be set. The description of the CAN error register is shown in Table 1.

[0027] Table 1 CAN error register bit description

[0028] The present invention also includes a method for self-adapting the CAN baud rate of a newly added node, comprising the following steps: setting the CAN baud rate, receiving a message through a filter; if the received message is wrong, generating a received data error interrupt, increasing the number of error messages by one, and increasing the number of error messages by one; 10 rounds of training baud rate configuration table, otherwise set the filter to receive the message; if the received message is correct, a correct reception data interrupt is generated, the number of correct messages is increased by one, and the number of correct messages is 10. Save the current baud rate, otherwise set the filter to receive the message.

[0029] Specifically, Figure 2 As shown, initialization is first performed, and the initialization parameters include the CAN baud rate configuration table, the number of error messages cleared, and the number of correct messages cleared. After entering the adaptive stage, the node will continue to monitor the interrupt signal in the CAN system. If a protection error flag is detected in the CAN interrupt register, it is caused by an inappropriate baud rate. At this time, the protection error interrupt counter will be increased. Once this counter reaches a preset value, the preset value in this embodiment is 10 times, the current operation will be suspended, and the baud rate will be further adjusted according to the pre-defined baud rate configuration table.

[0030] If there is no error in the message but a message reception interruption occurs, it means that the received data is valid. At this time, the positive message interruption counter is increased. When the counter exceeds the threshold, in this embodiment, the threshold is set to 10 times, it is considered that the current baud rate setting is appropriate, the current baud rate is saved, the CAN mode is switched to the normal working mode, and the process of adding the new node to the adaptive baud rate is completed.

[0031] like Figure 5 As shown in the figure, the bit synchronization in the CAN bus protocol is achieved through the bit timing logic, which monitors the serial CAN bus, performs sampling and adjusts the sampling point position. The bxCAN module on the GD32F407VE chip implements the setting of the bit timing through the CAN_BTR register. In CAN communication, the duration of a data bit is called the nominal bit time. The nominal bit time consists of three parts: synchronization segment, bit segment 1 and bit segment 2. Each part contains several t q (minimum time unit), where the synchronization segment is fixed to a t q , baud rate The calculation is as follows:

[0032]

[0033] 1×

[0034] (1× ×

[0035] (1× ×

[0036] (1× ×

[0037] in, is the baud rate, that is, the number of symbols transmitted per second, is the bit time, i.e. the time required to transmit one standard bit; The time required for the synchronization segment is used to synchronize the clocks and other information of both communicating parties. is the time required for the propagation period, How many bits are there in the synchronization segment? is the time required for phase buffering, How many bit fields are there in the phase buffer segment? for , and is the corresponding bit field in the CAN_BTR register, where Used to implement CAN bus baud rate pre-scaling, and Used to determine the t contained in bit segment 1 and bit segment 2 q Number, It is a time quantum unit, which is determined by the BT.BAUDPSC pre-division and the tpclk1 system bus clock time period. The CAN baud rates include 5kb / s, 10kb / s, 20kb / s, 50kb / s, 100kb / s, 125kb / s, 250kb / s, 500kb / s, 800kb / s and 1000kb / s, 10 common baud rates.

[0038] In summary, the present invention provides a charging pile CAN bus baud rate adaptive method, which uses internal CAN communication as the use object. The core node CMU evaluates the stability of the CAN communication link by analyzing the accuracy of the received frame, and dynamically adjusts the baud rate to optimize the communication performance. For newly added nodes, the baud rate is adaptively matched according to the accuracy of the received message to ensure the communication efficiency and quality of each node in the CAN network.

[0039] Example 2 The invention discloses a fuzzy control system for a liquid cooler, comprising an acquisition module, a calculation module and an adjustment module. The acquisition module is used for acquiring CAN receiving and sending messages and counting the results of each frame; the calculation module is used for calculating the correct frame ratio according to the results of each frame; the adjustment module is used for maintaining the current setting of the CMU when the correct frame ratio is within a preset value, otherwise increasing or decreasing the CAN baud rate by one level and modifying all nodes.

[0040] Example 3 The present invention provides a terminal device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of the charging pile CAN bus baud rate adaptive method, including the following steps: obtaining CAN receiving and sending messages, counting the results of each frame, and calculating the correct frame ratio according to the results of each frame; if the correct frame ratio is within the preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level, and all nodes are modified.

[0041] Example 4 The present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0042] One or more instructions stored in a computer-readable storage medium can be loaded and executed by the processor to implement the charging pile CAN bus baud rate adaptation method in the above embodiment; one or more instructions in the computer-readable storage medium are loaded by the processor and execute the following steps: obtain CAN receive and send messages, count the results of each frame, and calculate the correct frame ratio according to the results of each frame; if the correct frame ratio is within the preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level, and all nodes are modified.

[0043] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0044] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0045] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0046] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0047] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A charging pile CAN bus baud rate adaptive method, characterized in that: The following steps are involved: Get CAN receive and send messages, count the results of each frame, According to the results of each frame, calculate the correct frame ratio; If the correct frame ratio is within the preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level and all nodes are modified.

2. The charging pile CAN bus baud rate adaptive method according to claim 1 is characterized in that: The CAN baud rates include 5kb / s, 10kb / s, 20kb / s, 50kb / s, 100kb / s, 125kb / s, 250kb / s, 500kb / s, 800kb / s and 1000kb / s.

3. The charging pile CAN bus baud rate adaptive method according to claim 2 is characterized in that: If the correct frame ratio is within the preset value, the CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level, and all nodes are modified, including: The correct frame ratio is greater than or equal to 95 and less than 100%, and the CAN receive and send messages are re-acquired; The correct frame ratio is equal to 100%, and the CAN baud rate is judged to be the maximum rate. If the CAN baud rate is the maximum rate, the process ends; otherwise, the CAN baud rate is increased by one level, and all nodes are modified; If the correct frame ratio is less than 95%, determine whether the CAN baud rate is the minimum rate. If the CAN baud rate is the minimum rate, the process ends; otherwise, reduce the CAN baud rate by one level and modify all nodes.

4. The charging pile CAN bus baud rate adaptive method according to claim 1 is characterized in that: The CMU sends an adaptive request signal when a communication error occurs, the baud rate is increased, or the baud rate is decreased, and the remaining nodes adjust the baud rate according to the adaptive request signal.

5. The charging pile CAN bus baud rate adaptive method according to claim 1 is characterized in that: It also includes a CAN baud rate adaptive method for newly added nodes; The method for self-adapting the CAN baud rate of a newly added node comprises the following steps: Set the CAN baud rate and receive messages through the filter; If the received message is wrong, a receive data error interrupt is generated, and the error message count is increased by one. 10 rounds of training baud rate configuration table, otherwise set the filter to receive the message; If the received message is correct, a correct data reception interrupt is generated, and the number of correct messages is increased by one.

10. Save the current baud rate, otherwise set the filter to receive the message.

6. The charging pile CAN bus baud rate adaptive method according to claim 5 is characterized in that: The receiving time of the message received by the filter is once every 10ms.

7. The charging pile CAN bus baud rate adaptive method according to claim 5 is characterized in that: Before setting the CAN baud rate, initialization parameters are also included; The initialization parameters include: CAN baud rate configuration table, error message count clearing, and correct message count clearing.

8. A charging pile CAN bus baud rate adaptive system, characterized in that: include: The acquisition module is used to obtain CAN receiving and sending messages and count the results of each frame; A calculation module, used to calculate the correct frame ratio according to the result of each frame; The adjustment module is used to correct the frame ratio within the preset value. The CMU maintains the current setting, otherwise the CAN baud rate is increased or decreased by one level and all nodes are modified.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the charging pile CAN bus baud rate adaptation method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the charging pile CAN bus baud rate adaptation method as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Communication rate adjusting method and device, equipment and storage medium

    CN120547013A

  • CAN communication anti-interference method and device based on BMS architecture and electronic equipment

    CN120785676A