Method for detecting a master program of a battery management system of a vehicle
By performing communication, operation, fault detection, and charging status detection of the main control program in the host computer, combined with relay high and low side drive detection, the problem of insufficient main control program detection in the prior art is solved, thereby improving the performance and safety of the battery management system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN XINGBIDA NETLINK TECH CO LTD
- Filing Date
- 2025-07-29
- Publication Date
- 2026-07-31
AI Technical Summary
The lack of detection of the main control program of the battery management system in the existing technology makes it impossible to ensure its normal communication and operation, which affects the safety and efficiency of the battery pack.
By deploying detection software in the host computer, communication detection, operation detection, fault detection, and charging status detection of the main control program are performed. Combined with high and low side drive detection of the relay, the normal operation of the main control program is ensured.
It enables accurate detection of the main control program, ensuring normal communication and stable operation, thereby improving the overall performance and safety of the battery management system.
Smart Images

Figure CN120972854B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery management system testing technology, and in particular to a method for testing the main control program of a vehicle's battery management system. Background Technology
[0002] Vehicles typically incorporate battery management systems (BMS), which play a crucial role, especially in electric vehicles, directly impacting the safe operation of the large battery packs that power them. The master control program within the BMS is its core software.
[0003] However, in the existing technology, before deploying the battery management system into the vehicle, only a series of functional tests are performed on the main control board of the battery management system, such as detecting standby current, detecting signal input and output functions, detecting voltage / current acquisition functions, and detecting insulation functions, but the main control program of the battery management system is not tested.
[0004] Therefore, there is an urgent need for a solution that can detect the main control program of the battery management system in a vehicle. Summary of the Invention
[0005] This application provides a method for detecting the main control program of a vehicle's battery management system, thereby solving the technical problem that the prior art lacks a method for detecting the main control program of a battery management system.
[0006] In a first aspect, this application provides a method for detecting the main control program of a vehicle's battery management system. The method is applied to a host computer, which has detection software deployed in it. The method includes:
[0007] The main control program of the vehicle's battery management system is tested to obtain program test results. The main control program test includes communication testing and operational testing, and the program test results characterize the communication and operational status of the main control program. The communication testing includes testing the Controller Area Network (CAN) bus associated with the main control program, including the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system. The operational testing includes fault detection and charging status detection. Communication testing, fault detection, and charging status detection are executed sequentially, with fault detection performed when communication testing passes, and charging status detection performed when fault detection passes. Testing stops if any test fails. A failed communication test indicates that at least one communication anomaly exists in the vehicle CAN bus, the charging CAN bus, or the internal CAN bus of the battery management system.
[0008] If the program detection result indicates that the main control program is normal, a control command is sent to the relay in the battery management system, and a control result message is received from the relay. The normality of the main control program indicates that communication detection, fault detection, and charging status detection all pass. Passing the communication detection indicates that the vehicle CAN bus, charging CAN bus, and the internal CAN bus of the battery management system are all communicating normally. The control command is used to instruct the relay to close, and the control result message indicates whether the relay is closed.
[0009] Based on the control result message, high and low side drive detection is performed on the relay to obtain the high and low side drive detection result; wherein, the high and low side drive detection result indicates whether the high and low side drive detection of the relay has passed.
[0010] In one possible design, the host computer also includes a digital input / output unit;
[0011] The control result message received from the relay includes:
[0012] Based on the detection software, the control result message fed back by the relay is received through the digital input / output unit.
[0013] In one possible design, the host computer also includes a digital input / output unit;
[0014] Based on the control result message, high-side and low-side drive detection is performed on the relay to obtain the high-side and low-side drive detection results, including:
[0015] If the control result message indicates that the relay is closed, the digital input / output unit sends a relay drive status read instruction to the main control program and receives the relay drive status message fed back by the main control program; wherein, the relay drive status read instruction is used to instruct the main control program to read the high and low side drive status of the relay.
[0016] The relay drive status message is analyzed and processed to obtain the high and low side drive detection results.
[0017] In one possible design, the relay drive status message is subjected to data analysis and processing to obtain the high-side and low-side drive detection results, including:
[0018] The high and low side drive status data included in the relay drive status message are compared with a pre-created drive status data table; wherein, the drive status data table includes high and low side drive status data of different relays.
[0019] If the high and low side drive status data in the relay drive status message of the same relay are found to be consistent with the high and low side drive status data of the relay in the drive status data table, then a high and low side drive detection result representing that the high and low side drive detection of the relay has passed is generated.
[0020] Otherwise, generate a high / low side drive detection result indicating that the high / low side drive detection of the relay has failed.
[0021] In one possible design, the main control program of the vehicle's battery management system is tested, and the program test results are obtained, including:
[0022] The communication status of the main control program is acquired and detected to obtain a communication detection result; wherein, the communication detection result indicates whether the communication of the main control program is normal.
[0023] If the communication detection result indicates that the communication of the main control program is normal, then the running status of the main control program is obtained and detected to obtain the running detection result; wherein, the running detection result indicates whether the main control program is running normally;
[0024] The program detection results include the communication detection results and the operation detection results.
[0025] In one possible design, the communication status of the main control program is acquired and detected to obtain communication detection results, including:
[0026] Obtain the CAN bus associated with the main control program; wherein the CAN bus is used for external and internal communication of the main control program;
[0027] If a target communication message is determined to exist on the CAN bus, a communication detection result indicating that the main control program's communication is normal is generated; otherwise, a communication detection result indicating that the main control program's communication is abnormal is generated.
[0028] In one possible design, the running status of the main control program is acquired and detected to obtain the running detection results, including:
[0029] The fault diagnosis message of the main control program is obtained, and the fault diagnosis message is processed by data analysis to obtain the fault detection result; wherein, the fault detection result indicates whether the main control program has a preset fault.
[0030] If the fault detection result indicates that the main control program does not have the preset fault, then the charging status message of the main control program is obtained and detected to obtain the charging status detection result; wherein, the charging status detection result indicates whether the charging status of the main control program is normal.
[0031] The operational detection results include the fault detection results and the charging status detection results.
[0032] In one possible design, the charging status message of the main control program is acquired and detected to obtain the charging status detection result, including:
[0033] The system acquires the charging status message of the main control program and performs a consistency check on the charging status data included in the charging status message with preset status parameters. The preset status parameters are data sent by the signal simulation unit to the main control program, indicating that the main control program's charging status is normal. The signal simulation unit is deployed in the host computer.
[0034] If the charging status data is consistent with the preset status parameters, a charging status detection result indicating that the main control program is in a normal charging state is generated; otherwise, a charging status detection result indicating that the main control program is in an abnormal charging state is generated.
[0035] In one possible design, the method further includes:
[0036] The target serial number of the main control board of the battery management system is written into the target memory; wherein, the data in the target memory is managed by the main control program;
[0037] Based on a preset time interval, the detection software reads the current serial number of the main control board stored in the target memory; and performs a consistency check between the current serial number and the target serial number.
[0038] If the current serial number matches the target serial number, a data detection result indicating that the main control program's data management is normal is generated; otherwise, a data detection result indicating that the main control program's data management is abnormal is generated.
[0039] Secondly, this application provides a detection device for the main control program of a vehicle's battery management system. The device is applied to a host computer, which has detection software deployed in it. The device includes:
[0040] The detection module is used to detect the main control program of the vehicle's battery management system and obtain the program detection results. The detection of the main control program includes communication detection and operational detection, and the program detection results characterize the communication and operational status of the main control program. The communication detection includes detecting the Controller Area Network (CAN) bus associated with the main control program, including the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system. The operational detection includes fault detection and charging status detection. Communication detection, fault detection, and charging status detection are executed sequentially, with fault detection performed when communication detection passes, and charging status detection performed when fault detection passes. Detection stops if any detection fails. A failed communication detection indicates that at least one communication anomaly exists in the vehicle CAN bus, the charging CAN bus, or the internal CAN bus of the battery management system.
[0041] The sending module is used to send control commands to the relays in the battery management system if the program detection results indicate that the main control program is normal. The normality of the main control program indicates that communication detection, fault detection and charging status detection are all passed. The passing of communication detection indicates that the vehicle CAN bus, charging CAN bus and the internal CAN bus of the battery management system are all communicating normally.
[0042] A receiving module is used to receive the control result message fed back by the relay; wherein the control command is used to instruct the relay to close, and the control result message indicates whether the relay is closed;
[0043] The detection module is further configured to perform high-low side drive detection on the relay based on the control result message, and obtain a high-low side drive detection result; wherein, the high-low side drive detection result indicates whether the high-low side drive detection of the relay has passed.
[0044] In one possible design, the host computer also includes a digital input / output unit;
[0045] The receiving module is also used to receive the control result message fed back by the relay through the digital input / output unit based on the detection software.
[0046] In one possible design, the host computer also includes a digital input / output unit;
[0047] The sending module is also used to send a relay drive status reading instruction to the main control program through the digital input / output unit if the control result message indicates that the relay is closed.
[0048] The receiving module is also used to receive the relay drive status message fed back by the main control program; wherein, the relay drive status reading instruction is used to instruct the main control program to read the high and low side drive status of the relay.
[0049] The detection module is also used to perform data analysis and processing on the relay drive status message to obtain the high and low side drive detection results.
[0050] In one possible design, the detection module further includes: a comparison module and a generation module.
[0051] The comparison module is used to compare the high and low side drive status data included in the relay drive status message with a pre-created drive status data table; wherein, the drive status data table includes high and low side drive status data of different relays.
[0052] The generation module is used for:
[0053] If the high and low side drive status data in the relay drive status message of the same relay are found to be consistent with the high and low side drive status data of the relay in the drive status data table, then a high and low side drive detection result representing that the high and low side drive detection of the relay has passed is generated.
[0054] Otherwise, generate a high / low side drive detection result indicating that the high / low side drive detection of the relay has failed.
[0055] In one possible design, the detection module is further configured to:
[0056] The communication status of the main control program is acquired and detected to obtain a communication detection result; wherein, the communication detection result indicates whether the communication of the main control program is normal.
[0057] If the communication detection result indicates that the communication of the main control program is normal, then the running status of the main control program is obtained and detected to obtain the running detection result; wherein, the running detection result indicates whether the main control program is running normally;
[0058] The program detection results include the communication detection results and the operation detection results.
[0059] In one possible design, the detection module further includes: an acquisition module for acquiring a CAN bus associated with the main control program; wherein the CAN bus is used for external and internal communication of the main control program;
[0060] The generation module is further configured to generate a communication detection result indicating that the main control program is communicating normally if it is determined that a target communication message exists on the CAN bus; otherwise, it generates a communication detection result indicating that the main control program is communicating abnormally.
[0061] In one possible design, the acquisition module is further configured to acquire the fault diagnosis message of the main control program;
[0062] The detection module is also used for:
[0063] The fault diagnosis message is processed by data analysis to obtain the fault detection result; wherein, the fault detection result indicates whether the main control program has a preset fault;
[0064] If the fault detection result indicates that the main control program does not have the preset fault, then the charging status message of the main control program is obtained and detected to obtain the charging status detection result; wherein, the charging status detection result indicates whether the charging status of the main control program is normal.
[0065] The operational detection results include the fault detection results and the charging status detection results.
[0066] In one possible design, the acquisition module is further configured to acquire the charging status message of the main control program;
[0067] The detection module is also used to perform consistency detection on the charging status data included in the charging status message and the preset status parameters; wherein, the preset status parameters are data sent by the signal simulation unit to the main control program, indicating that the main control program's charging status is normal, and the signal simulation unit is deployed in the host computer;
[0068] The generation module is further configured to generate a charging state detection result indicating that the charging state of the main control program is normal if the charging state data is consistent with the preset state parameters; otherwise, generate a charging state detection result indicating that the charging state of the main control program is abnormal.
[0069] In one possible design, the detection device for the main control program of the vehicle's battery management system further includes: a writing module and a reading module.
[0070] The writing module is used to write the target serial number of the main control board of the battery management system into the target memory; wherein the data in the target memory is managed by the main control program;
[0071] The reading module is used to read the current serial number of the main control board stored in the target memory through the detection software based on a preset time interval;
[0072] The detection module is also used to perform consistency detection between the current serial number and the target serial number;
[0073] The generation module is further configured to generate a data detection result indicating that the data management of the main control program is normal if the current serial number is consistent with the target serial number; otherwise, generate a data detection result indicating that the data management of the main control program is abnormal.
[0074] Thirdly, this application provides a host computer, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect above and various possible designs.
[0075] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described in the first aspect above and various possible designs.
[0076] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect and various possible designs of the first aspect.
[0077] The method for detecting the main control program of a vehicle's battery management system provided in this application detects the main control program of the vehicle's battery management system, including communication detection and operational detection, and obtains corresponding program detection results. The program detection results characterize the communication and operational status of the main control program. Communication detection includes detecting the CAN bus associated with the main control program, and operational detection includes fault detection and charging status detection. The detection of the main control program involves sequentially performing communication detection, fault detection, and charging status detection. If the program detection results indicate that the main control program is normal (i.e., communication detection, fault detection, and charging status detection all pass), a control command is sent to a relay in the battery management system, and a control result message is received from the relay. The control command instructs the relay to close, and the control result message indicates whether the relay is closed. Further, based on the control result message, high- and low-side drive detection is performed on the relay to obtain high- and low-side drive detection results. The high- and low-side drive detection results characterize whether the high- and low-side drive detection of the relay passes. The entire detection process of the main control program is decomposed into multiple independent but related layers, allowing each layer to focus on a specific function. Furthermore, by analyzing the different detection results provided by each layer, a relatively accurate detection result for the main control program can be obtained. Therefore, this application achieves the detection of the main control program of a battery management system and can obtain relatively accurate detection results. Attached Figure Description
[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0079] Figure 1 This is a schematic diagram of the host computer structure for the detection method of the main control program of the battery management system of a vehicle applicable to the embodiments of this application;
[0080] Figure 2 A flowchart illustrating the detection method for the main control program of the vehicle battery management system provided in this application embodiment. Figure 1 ;
[0081] Figure 3 A flowchart illustrating the detection method for the main control program of the vehicle battery management system provided in this application embodiment. Figure 2 ;
[0082] Figure 4 A schematic diagram of the structure of the detection device for the main control program of the vehicle battery management system provided in this application embodiment;
[0083] Figure 5 This is a hardware structure diagram of the host computer provided in an embodiment of this application.
[0084] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0085] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0086] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0087] In this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0088] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0089] In electric vehicles, the battery management system (BMS) is a critical component, responsible for monitoring and managing the performance and safety of the battery pack. Furthermore, since the battery pack is the sole power source in an electric vehicle, the performance of the BMS directly impacts the vehicle's driving range, power output, and charging efficiency.
[0090] As the core software of the battery management system, the main control program is responsible for executing all management and control functions. It needs to process large amounts of data in real time and respond within a very short period to ensure the safe and efficient operation of the battery pack. Furthermore, the main control program is also responsible for integration and communication with other systems in the vehicle besides the battery management system to ensure the coordinated operation of the entire vehicle system.
[0091] However, in existing technologies, the testing of battery management systems mainly focuses on the hardware level, that is, performing a series of functional tests on the main control board of the battery management system to ensure that the hardware components are working properly at the physical and electrical levels. These functional tests typically include standby current, signal input and output, voltage / current acquisition, and insulation function.
[0092] While testing the main control board of the battery management system is necessary, it does not cover all the functions of the battery management system. The main control program, as the core of the battery management system to realize its complex functions, is currently lacking in testing technology.
[0093] Therefore, it is necessary to study a scheme that can detect the main control program of the battery management system in a vehicle.
[0094] To address the aforementioned technical problems, the inventors, while researching a scheme for testing the main control program, considered that communication and operation are fundamental prerequisites for the normal functioning of the main control program. Based on this, the inventors first tested the communication and operational status of the main control program. Furthermore, considering that during the charging process of an electric vehicle, the main control program needs to control the on / off switching of relays in the battery management system, the inventors conducted high / low-side drive testing of the relays, and this testing occurred after confirming that the main control program was functioning normally. Thus, a scheme for testing the main control program of the battery management system in a vehicle was developed.
[0095] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0096] This application provides a method for detecting the main control program of a vehicle's battery management system, which is applied to a host computer. Explained, this host computer can be considered a detection platform for detecting the main control program.
[0097] Figure 1 This is a schematic diagram of the host computer structure for the detection method of the main control program of the vehicle battery management system applicable to the embodiments of this application, as shown below. Figure 1 As shown, the host computer is equipped with detection software, a digital input / output unit, and a signal simulation unit, and the signal simulation unit includes a charging connection signal simulation component and a charging temperature signal simulation component.
[0098] The digital input / output unit is used to acquire messages generated by the main control program, while the signal simulation unit is used to send relevant instructions to the main control program. Data transmission between the main control program and the detection software occurs via a Controller Area Network (CAN) bus.
[0099] based on Figure 1 The host computer structure is shown. Figure 2 A flowchart illustrating the detection method for the main control program of the vehicle battery management system provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the detection method for the main control program of the vehicle's battery management system applied to the host computer includes:
[0100] S201. Test the main control program of the vehicle's battery management system and obtain the program test results.
[0101] First, it's important to note that before testing the main control program using the detection software on the host computer, the data state in the detection software needs to be reset. This ensures that the detection software is not affected by data or states from other main control programs that have been previously tested. Explain that the detection software may record or save intermediate states, results, or configurations during operation. When testing a new main control program, previous data may lead to inaccurate results for the new program. Therefore, resetting the data state of the detection software ensures that each test is performed in a clean environment free of residual data, thereby improving the accuracy and reliability of the detection.
[0102] It should also be noted that since there are multiple main control programs awaiting testing, the specific main control program to be tested needs to be selected from among these programs. Considering that the main control programs are integrated on the main control board, and each main control board has a unique serial number, a barcode scanner can be used to scan the serial numbers of the main control boards containing the multiple main control programs awaiting testing. If the serial number of the specified main control program is not found among the scanned serial numbers, the testing of the specified main control program is terminated, and a corresponding test report is generated.
[0103] If the serial number of the main control board containing the specified main control program is found, the main control program on that board can be detected using detection software to obtain the corresponding program detection results. These results characterize the communication and operational status of the main control program, specifically including communication detection results and operational detection results. This means that the detection of the main control program in this step includes both communication and operational detection.
[0104] Specifically, the detection process for the main control program is as follows:
[0105] Step a1: Obtain and detect the communication status of the main control program, and obtain the communication detection results.
[0106] It's important to clarify that obtaining the communication status of the main control program refers to obtaining the CAN bus associated with the main control program. The CAN bus is a serial communication protocol used for external and internal communication of the main control program. Specifically, the main control program exchanges data with other systems outside the battery management system via the CAN bus, and also exchanges data between different units within the battery management system. For illustrative purposes, "other systems outside the battery management system" can refer to internal vehicle control units, external vehicle systems, or other systems located outside the vehicle.
[0107] Specifically, the CAN buses associated with the main control program include the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system. The vehicle CAN bus is used for communication between the main control program and other vehicle control units outside the battery management system; the charging CAN bus is used for communication between the main control program and the charging station that charges the vehicle; and the internal CAN bus of the battery management system is used for communication between different units within the battery management system.
[0108] Therefore, communication detection is required for the vehicle's CAN bus, the charging CAN bus, and the CAN bus within the battery management system. The method for detecting communication on these three CAN buses is roughly the same: determining whether a corresponding target communication message exists on each CAN bus.
[0109] For example, if VCU1_BMS_Ctrl (target communication message) is present on the vehicle's CAN bus, then the vehicle's CAN bus communication is normal; otherwise, the vehicle's CAN bus communication is abnormal. The detection methods for the charging CAN bus and the internal CAN bus of the battery management system are similar and will not be elaborated here.
[0110] It's important to clarify that only when the vehicle's CAN bus, charging CAN bus, and the battery management system's internal CAN bus all communicate normally can the main control program's communication be considered normal, and a communication detection result indicating normal communication in the main control program will be generated. If at least one of the vehicle's CAN bus, charging CAN bus, or the battery management system's internal CAN bus experiences a communication anomaly, the main control program's communication is considered abnormal, and a communication detection result indicating this anomaly will be generated. The communication detection result indicates whether the main control program's communication is normal.
[0111] Step a2: If the communication detection result indicates that the communication of the main control program is normal, then obtain the running status of the main control program and detect it to obtain the running detection result.
[0112] It should be understood that if the communication test fails, indicating a communication anomaly in the main control program, subsequent tests will cease. Conversely, if the communication test passes, indicating normal communication in the main control program, this embodiment will test the operation of the main control program, including two aspects: fault detection and charging status detection. The operation test results indicate whether the main control program is operating normally, specifically including fault detection results and charging status detection results.
[0113] Fault detection in the main control program requires acquiring its fault diagnosis messages. These messages are then analyzed to obtain the fault detection results. These results indicate whether the main control program has any pre-set faults.
[0114] Interpretive fault diagnosis messages include dedicated bytes for storing fault code identifiers, typically the first byte, as it usually carries the most important or basic information. By analyzing the fault diagnosis message, the fault code identifiers are obtained. These identifiers are then compared with a predefined fault code table to check for preset faults in the main control program. The fault code table includes different fault code identifiers and their corresponding fault descriptions.
[0115] For example, suppose we want to detect whether the main control program has a high-voltage interlock fault. We need to compare the fault code identifier contained in the fault diagnosis message of the main control program with the fault code identifier corresponding to the high-voltage interlock fault in the fault code table. If they match, it indicates that the main control program has a high-voltage interlock fault; otherwise, it indicates that the main control program does not have a high-voltage interlock fault.
[0116] Furthermore, if the fault detection result indicates that the main control program has a preset fault, i.e., the fault detection fails, subsequent detection is stopped. If the fault detection result indicates that the main control program does not have a preset fault, i.e., the fault detection passes, then the main control program undergoes a charging status detection. Specifically, the charging status message of the main control program is acquired and detected to obtain the charging status detection result. The charging status result indicates whether the main control program's charging status is normal.
[0117] It should be noted that this embodiment performs charging status detection on the main control program, including detecting the charging connection status, detecting the temperature of the connector of the car battery pack (i.e., the copper plate temperature), and detecting the temperature of the charging gun.
[0118] Explained, during the vehicle charging process, the main control program generates a series of charging status messages containing various information related to the charging status. These messages are used to monitor and manage the vehicle's charging process. Generally, for modularity and flexibility, the main control program may record different types of charging status information separately in different messages; that is, charging connection status information, copper plate temperature information, and charging gun temperature information may be recorded in different charging status messages.
[0119] Taking a charging status message containing charging connection status information as an example, the process of detecting the charging connection status is explained. First, the charging status message containing charging connection status information, such as BMU_SYSINFO17, generated by the main control program, is acquired. Then, the charging status data included in the charging status message, i.e., the charging connection status information, is checked for consistency with preset status parameters. The charging status data generally refers to the Connection Confirm (CC) signal, which is used to confirm the physical connection status of the charging interface.
[0120] If the charging status data matches the preset status parameters, the charging connection is considered normal; otherwise, the charging status is considered abnormal. The detection methods for the bronze plate temperature and charging gun temperature are similar and will not be elaborated here.
[0121] For example, when detecting the charging connection status, assuming the CC signal indicated by the preset status parameter is 3, then if the CC signal is also 3 in the charging status message containing charging connection status information, it indicates that the charging connection status is normal. When detecting the copper plate temperature, assuming the copper plate temperature indicated by the preset status parameter is 22℃~28℃, then if the copper plate temperature is between 22℃ and 28℃ in the charging status message containing copper plate temperature information, it indicates that the copper plate temperature is normal. When detecting the charging gun temperature, assuming the charging gun temperature indicated by the preset status parameter is also 22℃~28℃, then if the charging gun temperature is between 22℃ and 28℃ in the charging status message containing charging gun temperature information, it indicates that the charging gun temperature is normal. It should be understood that there may be more than one copper plate (or charging gun) temperature; all copper plate (or charging gun) temperatures must meet the temperature range indicated by the preset status parameter to indicate that the copper plate (or charging gun) temperature is normal.
[0122] It should be noted that the preset status parameters are the data sent by the signal simulation unit in the host computer to the main control program, indicating that the main control program's charging status is normal. Furthermore, the three preset status parameters involved in the above example—the preset status parameters for detecting the charging connection status, the preset status parameters for detecting the copper plate temperature, and the preset status parameters for detecting the charging gun temperature—are all different. Specifically, the preset status parameters involved in detecting the charging connection status are issued by the charging connection signal simulation component in the signal simulation unit; the preset status parameters involved in detecting the copper plate temperature and the preset status parameters involved in detecting the charging gun temperature are issued by the charging temperature signal simulation component in the signal simulation unit.
[0123] It should be understood that only when the charging connection status, copper plate temperature, and charging gun temperature are all within normal ranges can the main control program be considered to be in a normal charging state, and a charging state detection result indicating that the main control program is in a normal charging state will be generated. If at least one of the charging connection status, copper plate temperature, or charging gun temperature is in an abnormal state, the main control program is considered to be in an abnormal charging state, and a charging state detection result indicating that the main control program is in an abnormal charging state will be generated.
[0124] In one possible implementation, this embodiment further includes data detection of the main control program. Similarly, if the charging status detection result indicates an abnormal charging status of the main control program, subsequent detection is stopped; if the charging status detection result indicates a normal charging status of the main control program, further data detection is performed on the main control program. Specifically, the data detection involves writing the target serial number of the main control board of the battery management system into a target memory, such as an electrically erasable programmable read-only memory (EEPROM). The data in the target memory is managed by the main control program. Based on a preset time interval, the current serial number of the main control board stored in the target memory is read using detection software. A consistency check is performed between the current serial number and the target serial number. If the current serial number matches the target serial number, it indicates that the data transmission and data storage functions of the main control program are functioning correctly, generating a data detection result indicating normal data management of the main control program. If the current serial number does not match the target serial number, it indicates that the data transmission and data storage functions of the main control program are malfunctioning, generating a data detection result indicating abnormal data management of the main control program.
[0125] The processes of writing the target serial number to the target memory and reading the current serial number from the target memory are implemented by the main control program. Table 1 shows the process of writing the target serial number to the target memory, and Table 2 shows the process of reading the current serial number from the target memory.
[0126] Table 1
[0127]
[0128] Table 2
[0129]
[0130] Explained, whether writing or reading, each frame can only write (or read) 6 bits of data. However, the serial number of the main control board is generally 17 bits of data, so it needs to be written in 3 frames, i.e., the frame number is 1, 2 or 3.
[0131] It should also be explained that the data detection of the main control program can be regarded as a separate detection item, or it can be included in the detection of the main control program's operation status. That is, the detection of the main control program's operation status includes the detection of the main control program's data.
[0132] It should be noted that if the data detection of the main control program is considered part of the detection of the main control program's operational status, then the data detection of the main control program needs to be analyzed in conjunction with the charging status detection of the main control program. That is, only if both the charging status detection and data detection of the main control program are normal can the subsequent detection proceed; otherwise, the detection at this stage ends.
[0133] S102. If the program detection result indicates that the main control program is normal, then send a control command to the relay in the battery management system and receive the control result message fed back by the relay.
[0134] Specifically, the detection software sends control commands to the relay, which instruct the relay to close. Then, the digital input / output unit receives control result messages from the relay, indicating whether the relay is closed.
[0135] It should be noted that the control result message is actually generated by the main control program based on the relay's closing status. This is because a relay itself is an electrical switching device and does not have the capability to generate control result messages. The task of generating control result messages should be performed by the relay's administrator, i.e., the main control program.
[0136] This can be understood as follows: the detection software first sends a command to the main control program, instructing it to perform a relay closure operation. Then, based on this command, the main control program sends a control command to the relay to close. Next, the main control program generates a corresponding control result message based on the relay's closure status and sends this message to the detection software via a digital input / output unit.
[0137] S103. Based on the control result message, perform high and low side drive detection on the relay to obtain the high and low side drive detection results.
[0138] Specifically, if the control result message indicates that the relay is closed, a relay drive status read command is sent to the main control program via the digital input / output unit, and the relay drive status message fed back by the main control program is received. The relay drive status read command instructs the main control program to read the high and low side drive status of the relay. Afterwards, the relay drive status message is processed through data analysis to obtain the high and low side drive detection results.
[0139] The steps for interpreting and analyzing the relay drive status messages to obtain the high and low side drive detection results are as follows:
[0140] Step b1: Compare the high and low side drive status data included in the relay drive status message with the pre-created drive status data table.
[0141] The drive status data table includes high and low side drive status data for different relays.
[0142] Step b2: If the high and low side drive status data in the relay drive status message of the same relay are consistent with the high and low side drive status data of the relay in the drive status data table, then a high and low side drive detection result indicating that the high and low side drive detection of the relay has passed is generated; otherwise, a high and low side drive detection result indicating that the high and low side drive detection of the relay has failed is generated.
[0143] Next, a specific example will be used to explain in detail the high-side and low-side drive detection of the relays. In this specific example, the battery management system includes the following relays: a charging negative relay, a charging positive relay, a heating negative relay, a heating positive relay, a main positive relay, and a main negative relay. The charging positive relay includes charging positive 1 relay and charging positive 2 relay, and the heating positive relay includes heating positive 1 relay, heating positive 2 relay, and heating positive 3 relay.
[0144] It should be noted that closing the heating negative relay ensures the integrity of the circuit, thus enabling effective high- and low-side drive detection. In other words, closing the heating negative relay is a prerequisite for performing high- and low-side drive detection on the relays of the battery management system.
[0145] Therefore, firstly, based on the detection software, a corresponding closing control command is sent to the heating negative relay, and the control result message indicating the closing status of the heating negative relay is received from the main control program through the digital input / output unit. If the control result message indicates that the heating negative relay is closed, then the high and low side drive tests of the relays in the battery management system are performed sequentially according to the specified detection order.
[0146] Assume the specified detection sequence is: Charging negative relay → Charging positive 1 relay → Charging positive 2 relay → Heating positive 1 relay → Heating positive 2 relay → Main positive relay → Main negative relay → Heating positive 3 relay. This means that the charging negative relay is first tested for high / low side drive. If the charging negative relay passes the high / low side drive test, then the charging positive 1 relay is tested for high / low side drive, and so on. This process continues in the specified detection sequence until the high / low side drive test of the heating positive 3 relay is completed.
[0147] Taking the high-low side drive detection of the charging negative relay as an example, the process of high-low side drive detection is explained. First, based on the detection software, the corresponding closing control command is sent to the charging negative relay, and the control result message indicating the closing status of the charging negative relay is received by the main control program through the digital input / output unit.
[0148] If the control result message indicates that the charging negative relay is closed, the digital input / output unit sends a relay drive status read command to the main control program to read the high and low side drive status of the charging negative relay, and receives the relay drive status message about the charging negative relay from the main control program.
[0149] The high and low side drive status data of the charging negative relay included in the relay drive status message are compared with the drive status data table, which is shown in Table 3. If the high and low side drive status data of the charging negative relay included in the relay drive status message matches the high and low side drive status data of the charging negative relay included in the drive status data table, that is, if the high and low side drive status data of the charging negative relay included in the relay drive status message is "4128000000000000", then it indicates that the charging negative relay has passed the high and low side drive detection.
[0150] The high and low side drive detection of the remaining relays is similar to the high and low side drive detection process of the charging negative relay, and will not be described in detail here.
[0151] Table 3
[0152]
[0153] Therefore, the detection of the main control program in this embodiment includes communication detection, fault detection, charging status detection, data detection, and high / low side drive detection. It can be understood that the above detections are performed sequentially: communication detection → fault detection → charging status detection → data detection → high / low side drive detection.
[0154] If any test fails, the subsequent tests will not be performed, and a corresponding test report will be generated. The test report file name can be in the format of "main control board type + main control board serial number + test time". There are no specific requirements for the specific format of the test report file name.
[0155] The test report includes test time, communication test results, fault test results, charging status test results, data test results, high and low side drive test results, and overall test results of the main control program. Test results are categorized as either pass or fail, and if any test fails, the overall test result of the main control program is deemed as fail.
[0156] For example, if the charging status detection fails, data detection and high / low side drive detection will not be performed. In the generated detection report, the communication detection result and fault detection result will be passed, while the charging status detection result, data detection result, high / low side drive detection result, and the overall detection result of the main control program will be failed.
[0157] In summary, the detection method of the main control program of the vehicle's battery management system in this embodiment is described in summary. Figure 3 A flowchart illustrating the detection method for the main control program of the vehicle battery management system provided in this application embodiment. Figure 2 ,like Figure 3 As shown, the overall process of the detection method for the main control program of the vehicle's battery management system is as follows:
[0158] S301. Reset the data status in the detection software.
[0159] S302. Use a barcode scanner to scan the serial numbers of the main control boards containing multiple main control programs that are waiting to be tested.
[0160] S303. Does the serial number of the main control board where the specified main control program is located exist?
[0161] If yes, then execute S304; otherwise, execute S314.
[0162] S304. Perform communication detection on the main control program.
[0163] S305. Has the communication test passed? If yes, proceed to S306; otherwise, proceed to S314.
[0164] S306. Perform fault detection on the main control program.
[0165] S307. Has the fault detection passed? If yes, proceed to S308; otherwise, proceed to S314.
[0166] S308, Perform charging status detection on the main control program.
[0167] S309. Has the charging status detection passed? If yes, proceed to S310; otherwise, proceed to S314.
[0168] S310, Perform data detection on the main control program.
[0169] S311. Has the data check passed? If yes, proceed to S312; otherwise, proceed to S314.
[0170] S312. Perform high and low side drive detection on the relay.
[0171] S313. Check if the high / low side driver detection is successful. If yes, proceed to S314; otherwise, proceed to S314.
[0172] S314. Generate a search report.
[0173] In addition to the test results for each test, the search report may also include the reasons for any tests that failed.
[0174] The entire testing process for the main control program is automated by the host computer, eliminating the need for manual operation and improving testing efficiency. Actual testing of the main control system revealed that the entire testing process, starting from the barcode scanner's scan, can be completed in a very short time.
[0175] The method for detecting the main control program of the vehicle's battery management system provided in this application acquires and detects the communication status of the main control program to obtain communication detection results. If the communication detection results indicate that the main control program's communication is normal, the method acquires and detects the main control program's operation status to obtain operation detection results. Detecting the main control program's operation status includes sequentially performing fault detection and charging status detection; the operation detection results include fault detection results and charging status detection results. If the operation detection results indicate that the main control program is operating normally, a control command is sent to a relay in the battery management system, and a control result message is received from the relay. The control command instructs the relay to close, and the control result message indicates whether the relay is closed. Further, if the control result message indicates that the relay is closed, a relay drive status read command is sent to the main control program, and a relay drive status message is received from the main control program. Data analysis and processing are performed on the relay drive status message to obtain high-low side drive detection results. The high-low side drive detection results indicate whether the high-low side drive detection of the relay has passed. The entire detection process of the main control program is decomposed into multiple independent but related layers, allowing each layer to focus on a specific function. Furthermore, by analyzing the different detection results provided by each layer, a relatively accurate detection result for the main control program can be obtained. Therefore, this application achieves the detection of the main control program of a battery management system and can obtain relatively accurate detection results.
[0176] Figure 4 A schematic diagram of the structure of the detection device for the main control program of the vehicle battery management system provided in this application embodiment is shown below. Figure 4 As shown, the detection device 400 for the main control program of the vehicle's battery management system includes: a detection module 401, a sending module 402, and a receiving module 403.
[0177] The detection module 401 is used to detect the main control program of the vehicle's battery management system and obtain the program detection results. The detection of the main control program includes communication detection and operation detection. The program detection results represent the communication status and operation status of the main control program. Communication detection includes detecting the communication status of the CAN bus associated with the main control program. The CAN bus includes the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system. Operation detection includes fault detection and charging status detection. Communication detection, fault detection, and charging status detection are executed sequentially. Fault detection is performed when communication detection is successful, and charging status detection is performed when fault detection is successful. If any detection fails, the detection stops. A failed communication detection indicates that there is at least one communication anomaly in the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system.
[0178] The sending module 402 is used to send control commands to the relays in the battery management system if the program detection results indicate that the main control program is normal. The normal main control program indicates that the communication detection, fault detection and charging status detection are all passed. The communication detection is passed, indicating that the vehicle CAN bus, the charging CAN bus and the internal CAN bus of the battery management system are all communicating normally.
[0179] The receiving module 403 is used to receive control result messages from the relay; wherein, the control command is used to instruct the relay to close, and the control result message indicates whether the relay is closed.
[0180] The detection module 401 is also used to perform high-low side drive detection on the relay based on the control result message, and obtain the high-low side drive detection result; wherein, the high-low side drive detection result indicates whether the high-low side drive detection of the relay has passed.
[0181] In one possible design, a digital input / output unit is also deployed in the host computer;
[0182] The receiving module 403 is also used to receive control result messages fed back by the relay through the digital input / output unit based on the detection software.
[0183] In one possible design, a digital input / output unit is also deployed in the host computer;
[0184] The sending module 402 is also used to send a relay drive status reading instruction to the main control program through the digital input / output unit if the control result message indicates that the relay is closed.
[0185] The receiving module 403 is also used to receive relay drive status messages fed back by the main control program; wherein, the relay drive status reading instruction is used to instruct the main control program to read the high and low side drive status of the relay.
[0186] The detection module 401 is also used to perform data analysis and processing on the relay drive status message to obtain the high and low side drive detection results.
[0187] In one possible design, the detection module 401 further includes: a comparison module 404 and a generation module 405.
[0188] The comparison module 404 is used to compare the high and low side drive status data included in the relay drive status message with a pre-created drive status data table; wherein, the drive status data table includes the high and low side drive status data of different relays.
[0189] Module 405 is used for:
[0190] If the high and low side drive status data in the relay drive status message of the same relay are found to be consistent with the high and low side drive status data of the relay in the drive status data table, then a high and low side drive detection result representing that the high and low side drive detection of the relay has passed is generated.
[0191] Otherwise, generate a high / low side drive detection result indicating that the high / low side drive detection of the relay has failed.
[0192] In one possible design, the detection module 401 is also used for:
[0193] The communication status of the main control program is acquired and tested to obtain the communication test results; the communication test results indicate whether the communication of the main control program is normal.
[0194] If the communication detection result indicates that the communication of the main control program is normal, then the running status of the main control program is obtained and detected to obtain the running detection result; wherein, the running detection result indicates whether the main control program is running normally;
[0195] The program detection results include communication detection results and operation detection results.
[0196] In one possible design, the detection module 401 further includes: an acquisition module 406, used to acquire the CAN bus associated with the main control program; wherein the CAN bus is used for external and internal communication of the main control program;
[0197] The generation module 405 is also used to generate a communication detection result indicating that the main control program is communicating normally if it is determined that a target communication message exists on the CAN bus; otherwise, it generates a communication detection result indicating that the main control program is communicating abnormally.
[0198] In one possible design, the acquisition module 406 is also used to acquire fault diagnosis messages from the main control program;
[0199] The detection module 401 is also used for:
[0200] The fault diagnosis message is analyzed and processed to obtain the fault detection result; the fault detection result indicates whether the main control program has a preset fault.
[0201] If the fault detection result indicates that there is no preset fault in the main control program, then the charging status message of the main control program is obtained and detected to obtain the charging status detection result; wherein, the charging status detection result indicates whether the charging status of the main control program is normal.
[0202] The operational testing results include fault detection results and charging status detection results.
[0203] In one possible design, the acquisition module 406 is also used to acquire the charging status message of the main control program;
[0204] The detection module 401 is also used to perform consistency detection on the charging status data included in the charging status message and the preset status parameters; wherein, the preset status parameters are data sent by the signal simulation unit to the main control program, indicating that the charging status of the main control program is normal, and the signal simulation unit is deployed in the host computer.
[0205] The generation module 405 is also used to generate a charging state detection result indicating that the main control program is in a normal charging state if the charging state data is consistent with the preset state parameters; otherwise, it generates a charging state detection result indicating that the main control program is in an abnormal charging state.
[0206] In one possible design, the detection device 400 for the main control program of the vehicle's battery management system further includes: a writing module 407 and a reading module 408.
[0207] The writing module 407 is used to write the target serial number of the main control board of the battery management system into the target memory; wherein, the data in the target memory is managed by the main control program;
[0208] The reading module 408 is used to read the current serial number of the main control board stored in the target memory based on a preset time interval using detection software.
[0209] The detection module 401 is also used to perform consistency detection between the current serial number and the target serial number;
[0210] The generation module 405 is also used to generate a data detection result indicating that the data management of the main control program is normal if the current serial number is consistent with the target serial number; otherwise, it generates a data detection result indicating that the data management of the main control program is abnormal.
[0211] The detection device for the main control program of the vehicle battery management system provided in this application embodiment can be used to execute the detection method for the main control program of the vehicle battery management system in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0212] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. Additionally, these modules can be fully or partially integrated together, or implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0213] Figure 5 This is a schematic diagram of the host computer structure provided in an embodiment of this application. Figure 5 As shown, the host computer may include: transceiver 51, processor 52, and memory 53.
[0214] Processor 52 executes computer execution instructions stored in memory, causing processor 52 to perform the scheme in the above embodiments. Processor 52 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0215] The memory 53 is connected to the processor 52 via the system bus and completes communication between them. The memory 53 is used to store computer program instructions.
[0216] Transceiver 51 can be used to communicate and interact with other devices.
[0217] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0218] The host computer provided in this application embodiment can be used to execute the method provided in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0219] This application also provides a computer-readable storage medium storing computer-executable instructions that, when executed on a computer, cause the computer to perform the method provided in any of the above embodiments.
[0220] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the method provided in any of the above embodiments.
[0221] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0222] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0223] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0224] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0225] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0226] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0227] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0228] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0229] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0230] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting the main control program of a vehicle's battery management system, characterized in that, The method is applied to a host computer, which has detection software deployed in it. The method includes: The main control program of the vehicle's battery management system is tested to obtain program test results. The main control program test includes communication testing and operational testing, and the program test results characterize the communication and operational status of the main control program. The communication testing includes testing the Controller Area Network (CAN) bus associated with the main control program, including the vehicle CAN bus, the charging CAN bus, and the internal CAN bus of the battery management system. The operational testing includes fault detection and charging status detection. Communication testing, fault detection, and charging status detection are executed sequentially, with fault detection performed when communication testing passes, and charging status detection performed when fault detection passes. Testing stops if any test fails. A failed communication test indicates that at least one communication anomaly exists in the vehicle CAN bus, the charging CAN bus, or the internal CAN bus of the battery management system. If the program detection result indicates that the main control program is normal, a control command is sent to the relay in the battery management system, and a control result message is received from the relay. The normality of the main control program indicates that communication detection, fault detection, and charging status detection all pass. Passing the communication detection indicates that the vehicle CAN bus, charging CAN bus, and the internal CAN bus of the battery management system are all communicating normally. The control command is used to instruct the relay to close, and the control result message indicates whether the relay is closed. Based on the control result message, high and low side drive detection is performed on the relay to obtain the high and low side drive detection result; wherein, the high and low side drive detection result indicates whether the high and low side drive detection of the relay has passed.
2. The method according to claim 1, characterized in that, The host computer is also equipped with a digital input / output unit; The control result message received from the relay includes: Based on the detection software, the control result message fed back by the relay is received through the digital input / output unit.
3. The method according to claim 1, characterized in that, The host computer is also equipped with a digital input / output unit; Based on the control result message, high-side and low-side drive detection is performed on the relay to obtain the high-side and low-side drive detection results, including: If the control result message indicates that the relay is closed, the digital input / output unit sends a relay drive status read instruction to the main control program and receives the relay drive status message fed back by the main control program; wherein, the relay drive status read instruction is used to instruct the main control program to read the high and low side drive status of the relay. The relay drive status message is analyzed and processed to obtain the high and low side drive detection results.
4. The method according to claim 3, characterized in that, The relay drive status message is analyzed and processed to obtain the high and low side drive detection results, including: The high and low side drive status data included in the relay drive status message are compared with a pre-created drive status data table; wherein, the drive status data table includes high and low side drive status data of different relays. If the high and low side drive status data in the relay drive status message of the same relay are found to be consistent with the high and low side drive status data of the relay in the drive status data table, then a high and low side drive detection result representing that the high and low side drive detection of the relay has passed is generated. Otherwise, generate a high / low side drive detection result indicating that the high / low side drive detection of the relay has failed.
5. The method according to claim 1, characterized in that, The main control program of the vehicle's battery management system is tested, and the program test results are obtained, including: The communication status of the main control program is acquired and detected to obtain a communication detection result; wherein, the communication detection result indicates whether the communication of the main control program is normal. If the communication detection result indicates that the communication of the main control program is normal, then the running status of the main control program is obtained and detected to obtain the running detection result; wherein, the running detection result indicates whether the main control program is running normally; The program detection results include the communication detection results and the operation detection results.
6. The method according to claim 5, characterized in that, The communication status of the main control program is obtained and detected to obtain communication detection results, including: Obtain the CAN bus associated with the main control program; wherein the CAN bus is used for external and internal communication of the main control program; If a target communication message is determined to exist on the CAN bus, a communication detection result indicating that the main control program's communication is normal is generated; otherwise, a communication detection result indicating that the main control program's communication is abnormal is generated.
7. The method according to claim 5, characterized in that, The running status of the main control program is obtained and detected, and the running detection results are obtained, including: The fault diagnosis message of the main control program is obtained, and the fault diagnosis message is processed by data analysis to obtain the fault detection result; wherein, the fault detection result indicates whether the main control program has a preset fault. If the fault detection result indicates that the main control program does not have the preset fault, then the charging status message of the main control program is obtained and detected to obtain the charging status detection result; wherein, the charging status detection result indicates whether the charging status of the main control program is normal. The operational detection results include the fault detection results and the charging status detection results.
8. The method according to claim 7, characterized in that, The main control program acquires and detects the charging status message to obtain the charging status detection result, including: The system acquires the charging status message of the main control program and performs a consistency check on the charging status data included in the charging status message with preset status parameters. The preset status parameters are data sent by the signal simulation unit to the main control program, indicating that the charging status of the main control program is normal. The signal simulation unit is deployed in the host computer. If the charging status data is consistent with the preset status parameters, a charging status detection result indicating that the main control program is in a normal charging state is generated; otherwise, a charging status detection result indicating that the main control program is in an abnormal charging state is generated.
9. The method according to any one of claims 5 to 8, characterized in that, The method further includes: The target serial number of the main control board of the battery management system is written into the target memory; wherein, the data in the target memory is managed by the main control program; Based on a preset time interval, the detection software reads the current serial number of the main control board stored in the target memory; and performs a consistency check between the current serial number and the target serial number. If the current serial number matches the target serial number, a data detection result indicating that the main control program's data management is normal is generated; otherwise, a data detection result indicating that the main control program's data management is abnormal is generated.
10. A host computer, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 9.