Communication system of electric bicycle multi-substation wireless charging system
By designing hardware transceiver modules, CAN data frame reception storage modules and unpacking modules in the electric bicycle wireless charging system, using CAN bus protocol and identifier unpacking processing, the problem of unstable communication between the main station and the sub-station is solved, and efficient , a reliable communication system improves user experience and system reliability.
Patent Information
- Application Number
- CN202411763792.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the wireless charging system of electric bicycles, communication between the main station and the sub-station may be affected by bad weather and electromagnetic interference, resulting in signal instability, data loss or communication interruption, and data transmission delay or congestion problems have not been effectively resolved.
A communication system for electric bicycle multi-station wireless charging system is designed, including hardware transceiver module, CAN data frame reception and storage module and unpacking module. Data frames are processed through the CAN bus protocol, and depackaging and classification processing are used to implement processing and communication of different types of frame data.
It improves the flexibility and reliability of CAN communication, reduces the difficulty and cost of applying complex CAN communication, optimizes resource utilization, improves user experience, and provides a solid foundation for technological innovation and decision-making.
Smart Images

Figure CN119449502A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of radio transmission, and in particular relates to a communication system of a multi-substation wireless charging system for an electric bicycle. Background Art
[0002] Electric bicycles have now become an important mode of transportation. Their convenience, environmental protection and economy meet the needs of the general public. With the acceleration of urbanization and the growing demand for people's travel, the number of electric bicycles is showing a rising trend. The limitations and inconvenience of wired charging of electric bicycles lead to their general charging indoors, which violates relevant safety regulations and increases safety hazards such as fire. Wireless charging technology gets rid of the constraints of cables, making the charging process simpler and more efficient. Wireless charging technology can effectively improve the safety, environmental adaptability and space utilization efficiency of charging, and reduce the wear and tear of equipment. At present, wireless charging technology continues to develop and mature.
[0003] The good operation of the wireless charging system of electric bicycles requires the IoT cloud to efficiently monitor the user identity, charging mode, battery status and other information of the charging device. To meet this standard, large-scale wireless charging stations for electric bicycles must ensure good information exchange and communication between the main station and the substation, including charging parameter data and status data. Large-scale wireless charging stations for electric bicycles are usually deployed in outdoor environments, so the communication between the main station and the substation may be affected by bad weather, electromagnetic interference, etc., resulting in unstable communication signals, data loss or communication interruption. At the same time, with the continuous increase in the amount of data transmitted between the main station and the substation, the insufficient data transmission rate of the communication system may cause data transmission delays or congestion. At present, the synchronization and coordination mechanism between the substations of the wireless charging station for electric bicycles is not perfect, and the problem of data transmission delay and congestion has not been effectively solved; therefore, we need to propose a communication system for a multi-substation wireless charging system to solve the above problems and enable the main station and the substation to achieve reliable and effective communication. Summary of the invention
[0004] In view of the above problems, the present invention provides a communication system of a multi-substation wireless charging system for an electric bicycle, comprising: a hardware transceiver module, the hardware transceiver module is used to process a CAN hardware transceiver driver, and send and receive CAN bus data frames and remote control frames; A CAN data frame receiving and storing module, wherein the CAN data frame receiving and storing module stores the received CAN data frames for subsequent processing and calling; An unpacking module, wherein the unpacking module performs an unpacking operation using the identifier and divides the arbitration segment of the CAN data frame or the remote control frame into a plurality of regions; The area includes an identifier x with a fixed number for each substation, an identifier y representing different instructions or target functions, and an identifier z representing the frame type and frame function. During CAN communication, the identifiers are used to perform unpacking operations to classify and process different frame data.
[0005] Furthermore, the identifier z indicating the frame type and frame function has the following five conditions: 0-4: 0: indicates that the master station sends general instructions to the slave station, including instructions for power on, power off, and voltage increase. The specific instructions are determined by the identifier y representing different instructions or target functions. 1: Indicates that the master station sends data to the slave station. Each group of data is specified to be 16 bytes and is sent from the master station to the slave station in two batches. 2: Indicates that the master station sends a remote control command to the slave station, requiring the slave station to complete the corresponding command and the slave station determines whether to reply a data frame to the master station based on the specific command; 3: Indicates that the slave responds to the remote control command sent by the master to the slave. The slave reply data is specified as 16 bytes and is sent from the slave to the master twice. 4: Indicates that the slave station actively sends data to the master station. Each group of data is specified to be 16 bytes and is sent from the slave station to the master station in two batches.
[0006] Furthermore, when the identifier z representing the frame type and frame function is 0, 1, 2, or 4, the corresponding data segment is stored through the CAN data frame receiving storage module.
[0007] Furthermore, when the arbitration segment after the unpacking operation has the identifier y, the slave station executes the corresponding instruction and determines whether to return data according to the actual situation.
[0008] Furthermore, the process of the unpacking module classifying and processing different frame data is as follows: S1, send CAN frames through the master station and the slave station; S2, confirm whether filtering is required. If filtering is required, filter the useful CAN bus data frames or remote control frames through the master station and the slave station, and return to S1. If filtering is not required, unpack the arbitration segment; S3, distinguishing the substation to which the message belongs by the identifier x, and connecting to a specific substation according to the identifier x; S4, for the substation to which the message belongs, distinguish the frame type and frame function by the identifier z and process them respectively; S5, determine whether the identifier z is 0, 1, 2, 4. If the identifier z is 0, 1, 2, 4, store the CAN bus data frame, record the frame ID and the data segment content, and enter S6. If the identifier z is 3, directly enter S6; S6. Determine whether the arbitration segment contains the identifier y. If it contains the identifier y, execute the corresponding instruction or function. If it does not contain the identifier y, end without executing the corresponding instruction.
[0009] Furthermore, the hardware transceiver module includes a CAN controller for implementing the data link layer function in the CAN bus protocol, a microcontroller for executing program instructions and controlling the operation of the CAN controller, and a CAN transceiver for performing analog-to-digital signal conversion, and the microcontroller is connected to the CAN controller and the CAN transceiver respectively.
[0010] Furthermore, the process of the microcontroller executing program instructions and controlling the operation of the CAN controller is as follows: A1. When the system is powered on or reset, the microcontroller performs initialization operations; A2. The microcontroller receives the program code in the storage module according to the CAN data frame and executes it one by one according to the instructions; A3. The microcontroller exchanges data with external devices through input interfaces and output interfaces. The input interface reads external signals and converts them into digital data; the output interface converts digital data into corresponding analog signals or control signals to drive external devices to perform corresponding operations. A4. Real-time monitoring of whether an interrupt event occurs. When an interrupt event occurs, the microcontroller will immediately suspend the current task and process the interrupt request; when no interrupt event occurs, it will continue to drive the external device to perform the corresponding operation.
[0011] Furthermore, the process of the CAN controller automatically completing data encapsulation and CRC check code calculation according to the settings is as follows: B1. When the system is powered on or reset, the microcontroller will initialize the CAN controller; B2. When data needs to be sent, the microcontroller writes the data to be sent into the send buffer of the CAN controller and sets the corresponding send request flag. The CAN controller automatically completes the data encapsulation and CRC checksum calculation according to the settings, and then sends the data to the bus in the form of electrical signals through the CAN transceiver; B3. When the CAN transceiver detects data transmission on the bus, it converts the analog signal into a digital signal and sends it to the CAN controller. The CAN controller decapsulates and performs CRC check on the received data, stores it in the receiving buffer after confirming that the data is correct, and notifies the microcontroller to read the data through interruption or polling. B4. During data transmission, if an error is detected, the CAN controller will automatically record the error status and try to retransmit the erroneous data frame. For unrecoverable errors, the CAN controller will enter the offline state until the error is cleared.
[0012] Furthermore, in step B2, the calculation process of the CRC check code is as follows: B21. Set the original data frame to , the generated polynomial is ; The filled data frame is , where k is the degree of the generating polynomial; B22. Calculate CRC check code , ; B23, calculate the CRC check code Append to the end of the original data to form a new data frame ,Right now .
[0013] Furthermore, the CAN data frame receiving and storing module stores the received CAN data frame as follows: C1, receiving data frames from the CAN bus through the CAN controller; C2. Parse the received data frame to identify the identifier, data length code and data field of the data frame so as to extract valid information therein; C3. The parsed data is stored in a memory buffer or database for subsequent processing; C4. During the receiving and parsing process, the received data needs to be error checked; When performing error detection on the received data, the data is first checked and verified to verify the integrity of the data. If the checksum does not match, it indicates that the data has been tampered with or damaged during transmission, and the data needs to be received and checked again. If the checksum matches, check whether the data frame conforms to the format specification of the CAN protocol. The format specification of the CAN protocol includes whether the identifier, data length code and data field are correct. If the data does not conform to the format specification of the CAN protocol, the data needs to be converted to conform to the format specification of the CAN protocol. If the data conforms to the format specification of the CAN protocol, it is necessary to analyze whether the timing of the data frame meets expectations. If the timing of the data frame does not meet expectations, it means that there is an error in the data frame. The detected error information is recorded, and whether to perform error recovery operations is determined based on the nature and severity of the error. If the timing of the data frame meets expectations, it is necessary to perform logical analysis on the content of the data frame to ensure that there are no contradictions between the data.
[0014] The beneficial effects of the present invention are: The present invention achieves the coordinated work of the hardware transceiver module, the CAN data frame receiving and storage module and the unpacking module. The unpacking module divides the CAN arbitration segment into multiple areas, realizes the scheme of processing different types of frame data of different types only by ID resolution, defines different types of CAN frames to realize different communication functions, improves the flexibility of CAN communication, and reduces the difficulty and cost of applying complex CAN communication by software based on the existing CAN communication hardware.
[0015] The present invention not only improves the accuracy of data and the reliability of the system through the design of the CAN data frame receiving and storage module, but also optimizes resource utilization, enhances user experience, reduces maintenance costs, and provides a solid foundation for technological innovation and decision-making.
[0016] The present invention not only improves the integration and flexibility of the system through the setting of the hardware transceiver module, but also enhances the stability and real-time performance of the system, and provides users with an efficient, reliable and easy-to-maintain communication solution.
[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A system block diagram according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of classification rules according to an embodiment of the present invention is shown; Figure 3 A schematic diagram of a test case for classifying and processing different frame data according to an embodiment of the present invention is shown; Figure 4 A flowchart of classifying and processing different frame data according to an embodiment of the present invention is shown; Figure 5 A flowchart of executing program instructions and controlling the operation of a CAN controller according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 are within the scope of protection of the present invention.
[0021] The embodiment of the present invention provides a communication system for a multi-substation wireless charging system for an electric bicycle, such as Figure 1-5 As shown, it includes a hardware transceiver module, a CAN data frame receiving and storing module and an unpacking module. The hardware transceiver module is used to process the CAN hardware transceiver driver, send and receive CAN bus data frames and remote control frames; The hardware transceiver module includes a CAN controller for implementing the data link layer function in the CAN bus protocol, a microcontroller for executing program instructions and controlling the operation of the CAN controller, and a CAN transceiver for performing analog-to-digital signal conversion. The microcontroller is connected to the CAN controller and the CAN transceiver respectively. When working, the microcontroller initializes the CAN controller and sets communication parameters, including baud rate and working mode. When data needs to be sent, the microcontroller writes the data to be sent into the sending buffer of the CAN controller and sets the corresponding sending request flag. The CAN controller automatically completes the data encapsulation and CRC check code calculation according to the settings, and then sends the data to the bus in the form of electrical signals through the CAN transceiver; When the CAN transceiver detects data transmission on the bus, the CAN transceiver converts the analog signal into a digital signal and sends it to the CAN controller. The CAN controller unpacks and performs CRC check on the received data, stores it in the receive buffer after confirming that the data is correct, and notifies the microcontroller to read the data through interruption or polling. During the data transmission process, if an error is detected, the error type includes bit error and fill error. The CAN controller will automatically record the error status and try to retransmit the erroneous data frame. For unrecoverable errors, it will enter the offline state.
[0022] like Figure 5 As shown, the process of the microcontroller executing program instructions and controlling the operation of the CAN controller is as follows: A1. When the system is powered on or reset, the microcontroller performs initialization operations, including setting the clock source, initializing the memory and peripheral interfaces, so as to ensure that the microcontroller is in a reliable working state; A2. The microcontroller receives the program code in the storage module according to the CAN data frame and executes it one by one according to the instructions. The instructions include arithmetic operations, logical judgments, and data access operations to achieve specific functions. The order of program execution is determined by the program flow control instructions (such as conditional branches and loops); A3. The microcontroller exchanges data with external devices through input interfaces and output interfaces. The input interface reads external signals and converts them into digital data; the output interface converts digital data into corresponding analog signals or control signals to drive external devices to perform corresponding operations. A4. Real-time monitoring of whether an interrupt event occurs. When an interrupt event occurs, the microcontroller will immediately suspend the current task and process the interrupt request; when no interrupt event occurs, it will continue to drive the external device to perform the corresponding operation. The interrupt request comes from timers, external sensors, etc., which increases the microcontroller's ability to handle multi-tasking and real-time requirements.
[0023] The process of the CAN controller automatically completing data encapsulation and CRC check code calculation according to the settings is as follows: B1. When the system is powered on or reset, the microcontroller will initialize the CAN controller. The initialization operation includes setting the clock source, initializing the memory and peripheral interface, etc.
[0024] B2. When data needs to be sent, the microcontroller writes the data to be sent into the send buffer of the CAN controller and sets the corresponding send request flag. The CAN controller automatically completes the data encapsulation and CRC check code calculation according to the settings, and then sends the data to the bus in the form of electrical signals through the CAN transceiver.
[0025] The calculation process of the CRC check code is as follows: B21. Set the original data frame to , the generated polynomial is ; The filled data frame is , where k is the degree of the generating polynomial; B22. Calculate CRC check code , ; B23, calculate the CRC check code Append to the end of the original data to form a new data frame ,Right now ; By calculating the CRC check code, the accuracy and integrity of data transmission can be ensured.
[0026] B3. When the CAN transceiver detects data transmission on the bus, it converts the analog signal into a digital signal and sends it to the CAN controller. The CAN controller unpacks and performs CRC check on the received data, stores it in the receive buffer after confirming that the data is correct, and notifies the microcontroller to read the data through interruption or polling.
[0027] B4. During data transmission, if an error is detected (such as bit error, stuffing error, etc.), the CAN controller will automatically record the error status and try to retransmit the erroneous data frame. For unrecoverable errors, the CAN controller will enter the offline state until the error is cleared.
[0028] Before sending data, the CAN transceiver needs to convert the digital signal into an analog signal through a digital-to-analog converter. The converted analog signal is sent to the CAN bus through the CAN transceiver. The CAN transceiver is responsible for converting the digital signal into a level suitable for transmission on the bus; when data arrives on the CAN bus, the CAN transceiver receives it and converts it into a digital signal through the analog-to-digital converter. During the receiving process, the CAN transceiver also performs error detection (such as CRC check) to ensure the integrity of the data. After receiving new data, it is necessary to update the system status or trigger certain events, such as notifying the upper-level application that new data has arrived. In the process of receiving and sending data, it is necessary to manage resources reasonably, such as avoiding buffer overflow and releasing resources that are no longer used in time.
[0029] Integrating the CAN controller, microcontroller and CAN transceiver into one module simplifies system design, reduces the need for external components, and improves system reliability and stability. The CAN controller can automatically complete data packaging and CRC check code calculation, which reduces the burden on the microcontroller and improves data processing efficiency. It can also notify the microcontroller to read data through interrupts or polling, which can achieve fast data transmission and processing and meet applications with high real-time requirements. The hardware transceiver module complies with the CAN bus protocol standard and can be seamlessly connected to other devices that support the CAN protocol. It has good compatibility, and the modular design makes system maintenance and upgrades easier. It can improve system performance by replacing or upgrading individual components. Therefore, the setting of the hardware transceiver module not only improves the system's integration and flexibility, but also enhances the system's stability and real-time performance, providing users with an efficient, reliable and easy-to-maintain communication solution.
[0030] The CAN data frame receiving and storing module stores the received CAN data frames for subsequent processing and calling; The CAN data frame receiving and storing module stores the received CAN data frame as follows: C1, receiving data frames from the CAN bus through the CAN controller; C2. Parse the received data frame to identify the identifier, data length code and data field of the data frame so as to extract valid information therein; C3. The parsed data is stored in a memory buffer or database for subsequent processing; C4. During the receiving and parsing process, the received data needs to be error checked to ensure the integrity of the data; When performing error detection on the received data, the data is first checked and verified to verify the integrity of the data. If the checksum does not match, it indicates that the data has been tampered with or damaged during transmission, and the data needs to be received and checked again. If the checksum matches, check whether the data frame conforms to the format specification of the CAN protocol. The format specification of the CAN protocol includes whether the identifier, data length code and data field are correct. If the data does not conform to the format specification of the CAN protocol, the data needs to be converted to conform to the format specification of the CAN protocol. If the data conforms to the format specification of the CAN protocol, it is necessary to analyze whether the timing of the data frame meets expectations. Expectations include checking whether the inter-frame interval is reasonable and whether there are overly long frames. If the timing of the data frame does not meet expectations, it means that there is an error in the data frame. The detected error information is recorded, and whether to perform error recovery operations is determined based on the nature and severity of the error. If the timing of the data frame meets expectations, it is necessary to perform logical analysis on the content of the data frame to ensure that there are no contradictions between the data.
[0031] Through checksum inspection and format specification verification, the integrity and correctness of the received data frame are ensured, and the impact of erroneous data on the system is reduced; the parsed data is stored in the memory buffer or database for subsequent quick access and processing, and the built-in error detection and processing mechanism can automatically record the error status and try to retransmit the erroneous data frame. For unrecoverable errors, it enters the offline state, which improves the robustness of the system, converts data that does not conform to the CAN protocol format specification, ensures that all stored data complies with the standard, and facilitates data interoperability and consistency; by analyzing the timing of the data frame, it can identify potential communication problems, such as too long frames or unreasonable inter-frame intervals, which helps to optimize network performance; logical analysis is performed on the content of the data frame to ensure consistency between data and avoid problems caused by logical errors. Therefore, the design of the CAN data frame receiving and storage module not only improves the accuracy of the data and the reliability of the system, but also optimizes resource utilization, improves user experience, reduces maintenance costs, and provides a solid foundation for technological innovation and decision-making.
[0032] The unpacking module performs unpacking operation using the identifier and divides the arbitration segment of the CAN data frame or the remote control frame into a plurality of areas.
[0033] The area includes an identifier x with a fixed number for each substation, an identifier y representing different instructions or target functions, and an identifier z representing the frame type and frame function. During CAN communication, the identifier is used to perform unpacking operations to classify and process different frame data, thereby realizing different functions or data transmission.
[0034] The identifier z representing the frame type and frame function has the following five conditions: 0-4: 0: indicates that the master station sends general instructions to the slave station, including instructions for power on, power off, and voltage increase. The specific instructions are determined by the identifier y representing different instructions or target functions. 1: Indicates that the master station sends data to the slave station. Each group of data is specified to be 16 bytes and is sent from the master station to the slave station in two batches. 2: Indicates that the master station sends a remote control command to the slave station, requiring the slave station to complete the corresponding command and the slave station determines whether to reply a data frame to the master station based on the specific command; 3: Indicates that the slave responds to the remote control command sent by the master to the slave. The slave reply data is specified as 16 bytes and is sent from the slave to the master twice. 4: Indicates that the slave station actively sends data to the master station. Each group of data is specified to be 16 bytes and is sent from the slave station to the master station in two batches.
[0035] When the identifier z indicating the frame type and frame function is 0, 1, 2, or 4, the corresponding data segment is stored by the CAN data frame receiving storage module.
[0036] When the identifier y exists in the arbitration segment after the unpacking operation, the slave executes the corresponding instruction and determines whether to return data according to the actual situation.
[0037] The test cases for the unpacking module to classify and process different frame data are as follows Figure 3 The classification rules are as follows: Figure 2 As shown, the flow chart of the unpacking module for classifying and processing different frame data is as follows Figure 4 As shown, specifically including: S1, send CAN frames through the master station and the slave station; S2, confirm whether filtering is required. If filtering is required, filter useless CAN bus data frames or remote control frames through the master station and the slave station, and return to S1. If filtering is not required, unpack the arbitration segment; S3, distinguishing the substation to which the message belongs by the identifier x, and connecting to a specific substation according to the identifier x; S4, for the substation to which the message belongs, distinguish the frame type and frame function by the identifier z and process them respectively; S5, determine whether the identifier z is 0, 1, 2, 4. If the identifier z is 0, 1, 2, 4, store the CAN bus data frame, record the frame ID and the data segment content, and enter S6. If the identifier z is 3, directly enter S6; S6. Determine whether the arbitration segment contains the identifier y. If it contains the identifier y, execute the corresponding instruction or function. If it does not contain the identifier y, end without executing the corresponding instruction.
[0038] By dividing the arbitration segment of CAN into multiple areas, it is possible to distinguish and process different types of frame data of different types only by ID, define different types of CAN frames to achieve different communication functions, and improve the flexibility of CAN communication. The solution implemented by software based on the existing CAN communication hardware reduces the difficulty and cost of applying complex CAN communication.
[0039] During communication, the master station sends the data frame to the CAN bus through the hardware transceiver module. The data frame contains the identifier of the target substation, the instruction or the target function identifier, and the frame type and function identifier. The substation receives the data frame from the CAN bus through the hardware transceiver module. The received data frame first undergoes error detection to ensure the integrity of the data. The received data frame is stored in the CAN data frame receiving and storage module. The automated processing of the hardware transceiver module reduces the burden on the CPU and improves the overall efficiency of the system. The data frame is parsed and information such as the identifier, data length code, and data field are extracted. The unpacking module uses the identifier to unpack the data frame and divide the arbitration segment into multiple areas. According to the unpacking result, the system Different types of frames and instructions are classified and processed to achieve specific functions or data transmission. If an error occurs in the data frame during transmission, the hardware transceiver module will automatically retransmit the data frame. The unpacking module records any detected errors and takes corresponding recovery measures according to the severity of the error. The error detection and retransmission mechanism of the hardware transceiver module and the precise classification processing of the unpacking module ensure the reliability of data transmission. The flexible classification processing of the unpacking module enables the system to adapt to different communication requirements and instruction sets. Through the collaborative work of the hardware transceiver module, the CAN data frame receiving and storage module and the unpacking module, efficient, reliable and flexible communication can be achieved between the master station and the substation to meet various complex industrial control and automation requirements.
[0040] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A communication system for a multi-substation wireless charging system for electric bicycles, characterized by: include: A hardware transceiver module, which is used to process the CAN hardware transceiver driver and send and receive CAN bus data frames and remote control frames; A CAN data frame receiving and storing module, wherein the CAN data frame receiving and storing module stores the received CAN data frames for subsequent processing and calling; An unpacking module, wherein the unpacking module performs an unpacking operation using the identifier and divides the arbitration segment of the CAN data frame or the remote control frame into a plurality of regions; The area includes an identifier x with a fixed number for each substation, an identifier y representing different instructions or target functions, and an identifier z representing the frame type and frame function. During CAN communication, the identifiers are used to perform unpacking operations to classify and process different frame data.
2. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 1, characterized in that: The identifier z indicating the frame type and frame function has the following five conditions: 0-4: 0: indicates that the master station sends general instructions to the slave station, including instructions for power on, power off, and voltage increase. The specific instructions are determined by the identifier y representing different instructions or target functions. 1: Indicates that the master station sends data to the slave station. Each group of data is specified to be 16 bytes and is sent from the master station to the slave station in two batches. 2: Indicates that the master station sends a remote control command to the slave station, requiring the slave station to complete the corresponding command and the slave station determines whether to reply a data frame to the master station based on the specific command; 3: Indicates that the slave responds to the remote control command sent by the master to the slave. The slave reply data is specified as 16 bytes and is sent from the slave to the master twice. 4: Indicates that the slave station actively sends data to the master station. Each group of data is specified to be 16 bytes and is sent from the slave station to the master station in two batches.
3. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 2, characterized in that: When the identifier z indicating the frame type and frame function is 0, 1, 2, or 4, the corresponding data segment is stored by the CAN data frame receiving storage module.
4. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 3, characterized in that: When the identifier y exists in the arbitration segment after the unpacking operation, the slave executes the corresponding instruction and determines whether to return data according to the actual situation.
5. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 4, characterized in that: The process of classifying and processing different frame data by the unpacking module is as follows: S1, send CAN frames through the master station and the slave station; S2, confirm whether filtering is required. If filtering is required, filter the useful CAN bus data frames or remote control frames through the master station and the slave station, and return to S1. If filtering is not required, unpack the arbitration segment; S3, distinguishing the substation to which the message belongs by the identifier x, and connecting to a specific substation according to the identifier x; S4, for the substation to which the message belongs, distinguish the frame type and frame function by the identifier z and process them respectively; S5, determine whether the identifier z is 0, 1, 2, 4. If the identifier z is 0, 1, 2, 4, store the CAN bus data frame, record the frame ID and the data segment content, and enter S6. If the identifier z is 3, directly enter S6; S6. Determine whether the arbitration segment contains the identifier y. If it contains the identifier y, execute the corresponding instruction or function. If it does not contain the identifier y, end without executing the corresponding instruction.
6. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 5, characterized in that: The hardware transceiver module includes a CAN controller for implementing the data link layer function in the CAN bus protocol, a microcontroller for executing program instructions and controlling the operation of the CAN controller, and a CAN transceiver for performing analog-to-digital signal conversion. The microcontroller is connected to the CAN controller and the CAN transceiver respectively.
7. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 6, characterized in that: The process of the microcontroller executing program instructions and controlling the CAN controller is as follows: A1. When the system is powered on or reset, the microcontroller performs initialization operations; A2. The microcontroller receives the program code in the storage module according to the CAN data frame and executes it one by one according to the instructions; A3. The microcontroller exchanges data with external devices through input interfaces and output interfaces. The input interface reads external signals and converts them into digital data; the output interface converts digital data into corresponding analog signals or control signals to drive external devices to perform corresponding operations. A4. Real-time monitoring of whether an interrupt event occurs. When an interrupt event occurs, the microcontroller will immediately suspend the current task and process the interrupt request; when no interrupt event occurs, it will continue to drive the external device to perform the corresponding operation.
8. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 7, characterized in that: The process of the CAN controller automatically completing data encapsulation and CRC check code calculation according to the settings is as follows: B1. When the system is powered on or reset, the microcontroller will initialize the CAN controller; B2. When data needs to be sent, the microcontroller writes the data to be sent into the send buffer of the CAN controller and sets the corresponding send request flag. The CAN controller automatically completes the data encapsulation and CRC checksum calculation according to the settings, and then sends the data to the bus in the form of electrical signals through the CAN transceiver; B3. When the CAN transceiver detects data transmission on the bus, it converts the analog signal into a digital signal and sends it to the CAN controller. The CAN controller decapsulates and performs CRC check on the received data, stores it in the receiving buffer after confirming that the data is correct, and notifies the microcontroller to read the data through interruption or polling. B4. During data transmission, if an error is detected, the CAN controller will automatically record the error status and try to retransmit the erroneous data frame. For unrecoverable errors, the CAN controller will enter the offline state until the error is cleared.
9. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 8, characterized in that: In step B2, the calculation process of the CRC check code is as follows: B21. Set the original data frame to The generated polynomial is G()= ; The filled data frame is , where k is the degree of the generating polynomial; B22. Calculate CRC check code R , ; B23, calculate the CRC check code Append to the end of the original data to form a new data frame ,Right now .
10. The communication system of the multi-substation wireless charging system for electric bicycles according to claim 9, characterized in that: The CAN data frame receiving and storing module stores the received CAN data frame as follows: C1, receiving data frames from the CAN bus through the CAN controller; C2. Parse the received data frame to identify the identifier, data length code and data field of the data frame so as to extract valid information therein; C3. The parsed data is stored in a memory buffer or database for subsequent processing; C4. During the receiving and parsing process, the received data needs to be error checked; When performing error detection on the received data, the data is first checked and verified to verify the integrity of the data. If the checksum does not match, it indicates that the data has been tampered with or damaged during transmission, and the data needs to be received and checked again; If the checksum matches, check whether the data frame conforms to the format specification of the CAN protocol. The format specification of the CAN protocol includes whether the identifier, data length code and data field are correct. If the data does not conform to the format specification of the CAN protocol, the data needs to be converted to conform to the format specification of the CAN protocol. If the data conforms to the format specification of the CAN protocol, it is necessary to analyze whether the timing of the data frame meets expectations. If the timing of the data frame does not meet expectations, it means that there is an error in the data frame. The detected error information is recorded, and a decision is made whether to perform error recovery operations based on the nature and severity of the error. If the timing of the data frame meets expectations, a logical analysis of the content of the data frame is required to ensure that there are no contradictions between the data.
Citation Information
Patent Citations
Self-diagnosis method for communication protocols of safety I&C (Instrumentation and Control) system of nuclear power station
CN106888114A
Data transmission method and device based on satellite-borne optical fiber interface
CN112118042A
Long message data transceiving processing method and device based on CAN bus communication
CN118450018A
Universal serial port data transmission method and system
CN118842850A
CAN bus data collector and CAN bus analysis system
CN212572587U