CAN signal simulation system and signal sending method applied to BMS-HIL test
The CAN signal simulation system solves the problems of high cost, poor scalability and complex wiring of battery simulators, and realizes BMS-HIL testing with low cost, high scalability and strong fault injection capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-13
AI Technical Summary
Existing battery simulators are costly, have poor scalability, complex wiring, and limited fault injection capabilities, making it difficult to simulate complex faults in large-scale battery packs.
A CAN signal simulation system is adopted, including a host computer, a real-time signal simulator, and a CAN board. It simulates CAN messages through a bus signal generation model to realize signal generation, encoding, and transmission, and supports fault injection.
It reduces equipment costs, improves scalability and fault injection capabilities, simplifies wiring, and enables safe and rapid injection of battery-related and communication-related faults.
Smart Images

Figure CN121657653A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicle technology, specifically to a CAN signal simulation system and signal transmission method for BMS-HIL testing. Background Technology
[0002] In the existing technology, the simulation of real batteries and battery packs is usually achieved by battery simulators.
[0003] While battery simulators can provide high-precision physical signals, their drawbacks are also very obvious, especially in terms of cost, scalability, wiring, and fault injection.
[0004] Its shortcomings are: 1. Battery simulator equipment is expensive. A high-precision, high-power, multi-channel battery simulator can cost hundreds of thousands or even millions of yuan. Moreover, the expansion cost is extremely high. To realistically simulate a battery pack with hundreds of cells, a simulator with hundreds of independent output channels is theoretically required, which is extremely costly.
[0005] 2. Limited Channels and Poor Scalability: The number of output channels in a battery simulator is a fixed hardware resource. Once the number of channels is exhausted, it cannot be expanded further unless new equipment is purchased. It cannot easily simulate large-scale battery packs. For battery packs with numerous modules and a large number of cells (such as those in electric vehicles), providing an independent voltage channel for each cell using a battery simulator is both engineeringly and economically difficult.
[0006] 3. The wiring is complex. Each analog channel needs to be physically connected to the BMS sampling harness with wires. Simulating a 188-cell battery pack means connecting 188 pairs of cables, which is a large and tedious wiring task. Moreover, the dense harness is prone to incorrect connection, short circuits, or poor contact, introducing unnecessary test fault points, and debugging and troubleshooting are also very time-consuming.
[0007] 4. Fault injection capability is biased towards the hardware level. Battery simulators excel at injecting hardware-level faults, such as open circuits or short circuits to ground in voltage sampling lines, abnormal current sensor signals, and total voltage drops. However, they are powerless to simulate complex faults at the data and communication levels, such as simulating multiple temperature sensor readings exhibiting a specific gradient distribution, simulating CAN communication timeouts, frame drops, and error frames. Summary of the Invention
[0008] The present invention aims to solve the technical problems mentioned in the background section above. The first aspect is to provide a CAN signal simulation system for BMS-HIL testing, thereby reducing equipment costs.
[0009] The second aspect of the present invention provides a signal transmission method applied to the CAN signal simulation system provided in the first aspect, thereby reducing expansion costs and improving scalability and fault injection capability.
[0010] According to the above-mentioned objectives of the present invention, the first aspect of the present invention provides a technical solution as follows: a CAN signal simulation system applied to BMS-HIL testing, comprising: The host computer has a built-in bus signal generation model. The bus signal generation model is automatically generated by importing DBC files and is used to configure the period, ID and transmission status of the generated signals. A real-time signal simulator, which communicates with a host computer, is used to simulate and generate signals based on the configuration of the bus signal generation model. The CAN board is electrically connected to the real-time signal simulator and communicates with the controller under test via the CAN bus. The CAN board is used to receive the simulation signals generated by the real-time signal simulator and send the encoded CAN message frames to the controller under test.
[0011] In some embodiments, the host computer and the real-time signal simulator are connected via an Ethernet port.
[0012] In some embodiments, the CAN board is integrated into a real-time signal simulator.
[0013] The second aspect of the present invention provides a signal transmission method, comprising the following steps: S1. Import the DBC file into the host computer, configure the CAN board and channel parameters, baud rate and the signal to be simulated, and generate the initial bus signal generation model. S2. Optimize and adjust the initial bus signal generation model according to the actual signal transmission requirements; S3. Compile the optimized and adjusted bus signal generation model to generate executable software code; S4. Load the executable software code into the real-time signal simulator for execution. The real-time signal simulator encodes the signal into a complete CAN message frame according to the DBC protocol. S5, the real-time signal simulator sends CAN message frames to the controller under test through the specified CAN board channel.
[0014] Furthermore, the optimization adjustments in step S2 include: In the trigger module of the bus signal generation model, set the enable / stop state of the message, the trigger mode and the sending period, and configure the messages to be sent out in a staggered manner; The triggering modes include periodic sending, manual sending, and conditional triggering.
[0015] Furthermore, the optimization adjustments in step S2 include: In the signal module of the bus signal generation model, the input model simulation signals are calibrated to simulate the voltage, temperature, or SOC information of the battery pack.
[0016] Furthermore, the optimization adjustments in step S2 include: In the CAN transmission module of the bus signal generation model, select the CAN board code and channel, and set the detailed parameters of signal type, signal ID, signal length, signal protocol, and signal bytes.
[0017] Furthermore, the signal types include extended frames and standard frames; the signal protocols include CAN protocol and CANFD protocol.
[0018] Furthermore, in step S1, configuring the signal to be simulated also includes confirming whether CRC verification is required and selecting the CRC verification method.
[0019] Furthermore, the executable software code is a Gya file. The host computer can parse the Gya file and load it into the real-time signal simulator for execution, so as to realize the pulling and parameter adjustment of signal mapping and perform BMS-HIL testing.
[0020] The advantages of this invention compared to existing technologies are: 1. Lower cost compared to using a battery simulator; 2. Good scalability; when test items change, only changes need to be made in the model; by selecting CAN boards and channels, the whole vehicle end and TMS end can also be simulated; 3. Simple wiring; each CAN channel only needs to be connected to 2 CAN buses; 4. Strong fault injection capability; it can easily inject battery-related faults (including single cell overvoltage / undervoltage, single cell overtemperature / low temperature, etc.) and communication faults (including message loss / timeout / error, verification error, etc.), and is safe, fast, and easy to automate.
[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the generation and optimization of the bus signal generation model according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the process of processing signals before and after processing by the real-time signal simulator according to an embodiment of the present invention. Detailed Implementation
[0023] The present invention will now be described in further detail.
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0025] BMS-HIL testing is a commonly used and effective testing method that connects a real BMS controller (hardware) to a simulation system (in-the-loop) that simulates the real battery and vehicle environment. In this way, the BMS can be safely, efficiently, and comprehensively tested under various normal, fault, and extreme conditions in the laboratory without using real, expensive, and hazardous battery packs and the entire vehicle.
[0026] like Figure 1 , Figure 2 As shown in the figure, this embodiment provides a CAN signal simulation system and signal transmission method for BMS-HIL testing, which realizes the simulation and transmission of bus messages in BMS-HIL testing. It can simulate message transmission from the board end, vehicle end, TMS end, etc., to construct the battery pack environment and vehicle environment in BMS-HIL testing.
[0027] Combination Figure 1 , Figure 2 As shown, the CAN signal simulation system for BMS-HIL testing provided in the first aspect of this embodiment includes a host computer, a real-time signal simulator, a CAN board, etc.
[0028] The host computer has a built-in bus signal generation model; the bus signal generation model is automatically generated by importing DBC, and the period, ID, and transmission status of the generated signals can be adjusted.
[0029] The real-time signal simulator communicates with the host computer via an Ethernet port; the real-time signal simulator simulates and generates signals according to the settings of the bus signal generation model and transmits them to the CAN board.
[0030] The CAN board is integrated on the real-time signal simulator and is electrically connected to the real-time signal simulator; the CAN board is also connected to the controller under test via the CAN bus. The CAN board is responsible for sending and receiving simulation signals.
[0031] The second aspect of this embodiment provides a signal transmission method applied to the CAN signal simulation system provided in the first aspect.
[0032] Combination Figure 1 , Figure 2 As shown, the signal transmission method steps are as follows: S1. Import DBC into the host computer, select the CAN board code and CAN channel, set the baud rate, select the signal to be simulated and sent, confirm whether CRC verification is required, select the CRC verification method, and generate the initial bus signal generation model. S2. Optimize and adjust the bus signal generation model based on actual signal transmission requirements.
[0033] S21. In the trigger module of the bus signal generation model, enable or stop sending of single, multiple, or all messages; set the signal trigger mode; set the sending period; set messages to be sent out of order to avoid signal congestion; the signal trigger modes include periodic sending, manual sending, and conditional triggering.
[0034] S22. In the signal module of the bus signal generation model, the content of the message can be set according to the actual signal transmission needs. The calibration of the transmitted information can be completed, and the calibration of information (voltage, temperature, SOC, etc.) of the battery pack simulation can be realized. This module can realize signal simulation by connecting to battery model, charging model, SOX model, etc. The simulated signal can be regarded as a "disguised" battery pack.
[0035] S23. In the CAN transmission module of the bus signal generation model, you can select the CAN board code and CAN channel; you can set the signal type, including extended frame and standard frame; you can set the signal ID and length; you can select the signal protocol, including CAN and CANFD; you can adjust the byte information of the signal, including byte name, length, data type, offset, etc.
[0036] S3. After the bus signal generation model is adjusted, it is compiled to generate the gya file, which is the conversion of the bus signal generation model into efficient and optimized software code.
[0037] S4. Load the software code into the real-time signal simulator via Ethernet. The real-time signal simulator executes the target code and encodes it into a complete CAN message frame according to the DBC protocol.
[0038] S5. CAN message frames are sent on the selected corresponding board channel; these CAN message frames are sent through the CAN board integrated with the real-time signal simulator, and are sent to the real CAN bus with precise timing, and finally sent to the controller under test.
[0039] In addition, the compiled Gya file can be loaded into a real-time signal simulator for execution. The host computer test software can parse the software to pull and adjust the parameters of signal mapping, and easily perform fault injection for BMS-HIL testing.
[0040] In summary, the CAN signal simulation system and signal transmission method for BMS-HIL testing provided in this embodiment have the following advantages: 1. Low cost: Especially in the fields of commercial vehicles and construction machinery, BMS-HIL testing faces a large number of PACK system batteries. The model can easily simulate hundreds of cells. If a high-precision, high-power, multi-channel battery simulator is used, the price will be very expensive. In comparison, this technology is much cheaper. 2. Excellent scalability: After initial hardware investment, the marginal cost is low. When test items change, adding or removing battery cells is very easy, requiring only changes in the model. If a battery simulator is used, the number of output channels needs to be increased, and its physical channels are limited, representing fixed hardware resources. Once the number of channels is exhausted, it cannot be expanded further unless new equipment is purchased. In this embodiment, based on the configuration of the CAN board and CAN channels, not only can the battery pack be simulated, but by selecting the appropriate CAN board and channels, the entire vehicle end, TMS end, etc., can also be simulated, demonstrating excellent scalability. 3. Simple wiring: Each CAN channel only needs to connect two CAN buses (CAN High and CAN Low) to the BMS communication port, and one set of wiring can transmit multiple signals. In contrast, the battery simulator requires connecting two physical wires to the BMS acquisition harness for each simulated cell. The wiring workload for multiple battery packs is huge, and it is prone to misconnection, omission, and short circuit. 4. Strong fault injection capability: It can easily inject battery-related faults (including single cell overvoltage / undervoltage, single cell overtemperature / low temperature, etc.) and communication faults (including message loss / timeout / error, check error, etc.), and it is safe, fast and easy to automate.
[0041] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A CAN signal simulation system for BMS-HIL testing, characterized in that, include: The host computer has a built-in bus signal generation model; the bus signal generation model is automatically generated by importing a DBC file and is used to configure the period, ID and transmission status of the generated signal. A real-time signal simulator, which is connected to the host computer, is used to simulate and generate signals according to the configuration of the bus signal generation model; The CAN board is electrically connected to the real-time signal simulator and communicates with the controller under test via the CAN bus. The CAN board is used to receive the simulation signals generated by the real-time signal simulator and send the encoded CAN message frames to the controller under test.
2. The CAN signal simulation system for BMS-HIL testing according to claim 1, characterized in that, The host computer and the real-time signal simulator are connected via an Ethernet port.
3. The CAN signal simulation system for BMS-HIL testing according to claim 1 or 2, characterized in that, The CAN board is integrated into the real-time signal simulator.
4. A signal transmission method, applied to the CAN signal simulation system as described in any one of claims 1-3, characterized in that, Includes the following steps: S1. Import the DBC file into the host computer, configure the CAN board and channel parameters, baud rate and the signal to be simulated, and generate the initial bus signal generation model. S2. Optimize and adjust the initial bus signal generation model according to the actual signal transmission requirements; S3. Compile the optimized and adjusted bus signal generation model to generate executable software code; S4. Load the executable software code into the real-time signal simulator for execution, and the real-time signal simulator encodes the signal into a complete CAN message frame according to the DBC protocol. S5. The real-time signal simulator sends the CAN message frame to the controller under test through the designated CAN board channel.
5. The signal transmission method according to claim 4, characterized in that, The optimization adjustments mentioned in step S2 include: In the trigger module of the bus signal generation model, the enable / stop state of the message, the trigger mode and the transmission period are set, and the messages are configured to be sent out in a staggered manner. The triggering modes include periodic sending, manual sending, and conditional triggering.
6. The signal transmission method according to claim 4, characterized in that, The optimization adjustments mentioned in step S2 include: In the signal module of the bus signal generation model, the input model simulation signal is calibrated to simulate the voltage, temperature, or SOC information of the battery pack.
7. The signal transmission method according to claim 4, characterized in that, The optimization adjustments mentioned in step S2 include: In the CAN transmission module of the bus signal generation model, select the CAN board code and channel, and set the detailed parameters of signal type, signal ID, signal length, signal protocol, and signal bytes.
8. The signal transmission method according to claim 7, characterized in that, The signal types include extended frames and standard frames; the signal protocols include CAN protocol and CANFD protocol.
9. The signal transmission method according to claim 4, characterized in that, In step S1, configuring the signal to be simulated also includes confirming whether CRC verification is required and selecting the CRC verification method.
10. The signal transmission method according to claim 4, characterized in that, The executable software code is a Gya file. The host computer can parse the Gya file and load it into the real-time signal simulator for operation, so as to realize the pulling and parameter adjustment of signal mapping and perform BMS-HIL testing.
Citation Information
Patent Citations
Method and system for testing electronic parking brake controller
CN114721351A
AMT control system fault diagnosis continuous automatic test method and system
CN115604152A
Simulation test device and method of battery management system and readable storage medium
CN119645751A
Instrument testing method and device, equipment, storage medium and program product
CN120668196A
Remote encryption information test and verification system and method
WO2024193004A1