CN113094256A - BMS software testing method and electronic equipment - Google Patents

BMS software testing method and electronic equipment Download PDF

Info

Publication number
CN113094256A
CN113094256A CN202010019577.2A CN202010019577A CN113094256A CN 113094256 A CN113094256 A CN 113094256A CN 202010019577 A CN202010019577 A CN 202010019577A CN 113094256 A CN113094256 A CN 113094256A
Authority
CN
China
Prior art keywords
management system
test
battery management
layer
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010019577.2A
Other languages
Chinese (zh)
Other versions
CN113094256B (en
Inventor
杨荣春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongguan Amperex Technology Ltd
Original Assignee
Dongguan Amperex Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Amperex Technology Ltd filed Critical Dongguan Amperex Technology Ltd
Priority to CN202010019577.2A priority Critical patent/CN113094256B/en
Publication of CN113094256A publication Critical patent/CN113094256A/en
Application granted granted Critical
Publication of CN113094256B publication Critical patent/CN113094256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Secondary Cells (AREA)

Abstract

The application provides a BMS software testing method, which is applied to electronic equipment and comprises the following steps: dividing a battery management system into an application layer, a communication interface layer and a driving layer; responding to the fact that the battery management system works in a normal mode, the application layer obtains sampling information and state information from the driving layer through the communication interface layer, and executes a charging and discharging process according to the sampling information and the state information; responding to the battery management system working in a test mode, and receiving analog sampling information and analog state information sent by the upper computer; and receiving the test parameters sent by the upper computer, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result. The application also provides an electronic device. The BMS software testing method and the electronic equipment can improve testing efficiency.

Description

BMS software testing method and electronic equipment
Technical Field
The application relates to the technical field of computer software, in particular to a BMS software testing method and electronic equipment.
Background
In the BMS software development process, due to the existence of human factors, software defects are inevitable. In order to find out the defects of the software and ensure that the software meets the related functional requirements, the software needs to be tested. In software testing, tests aiming at grammars, structures, processes, interfaces and the like can be detected through a static test tool or through a white box test; and to the test of software function, just can test after needing to operate BMS software, whole test procedure needs the time spent more, and efficiency is not high.
Therefore, it is necessary to provide a test method that can solve the problems.
Disclosure of Invention
In view of the above, it is desirable to provide a BMS software testing method and an electronic device, which can improve testing efficiency.
An embodiment of the application provides a BMS software testing method, which is applied to electronic equipment and comprises the following steps: dividing a battery management system into an application layer, a communication interface layer and a driving layer; responding to the fact that the battery management system works in a normal mode, the application layer obtains sampling information and state information from the driving layer through the communication interface layer, and executes a charging and discharging process according to the sampling information and the state information; responding to the battery management system working in a test mode, and receiving analog sampling information and analog state information sent by the upper computer; and receiving the test parameters sent by the upper computer, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result.
In some embodiments of the present application, the test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time, the sampling information includes voltage, current, and temperature, and the state information includes an equilibrium state, an operating state, and a fault state.
In some embodiments of the present application, the method further comprises:
comparing whether the test result is consistent with the expected result;
confirming that the test is passed when the test result is consistent with the expected result;
confirming a test failure when the test result is inconsistent with the expected result.
In some embodiments of the present application, the method further comprises:
and switching a normal mode and a test mode of the battery management system.
In some embodiments of the present application, the switching between the normal mode and the test mode of the battery management system includes:
storing an operation mode flag into a memory, setting the operation mode flag to be a normal mode when the battery management system needs to operate in the normal mode, and burning the set operation mode flag into a BMS; when the battery management system needs to operate in a test mode, setting the operation mode mark as the test mode, and burning the set operation mode mark into the BMS;
storing the running mode mark into a memory, and modifying the mode mark in the memory into a normal mode through the upper computer when the battery management system needs to run in the normal mode; and when the battery management system needs to operate in a test mode, modifying the mode mark in the memory into the test mode through the upper computer.
In some embodiments of the present application, the application layer is configured to implement a function of the battery management system;
the communication interface layer isolates the application layer from the drive layer, ensures that the application layer cannot directly call the drive layer, provides a communication interface for the upper computer, and simultaneously encapsulates the functions and the interfaces of the drive layer for the application layer;
the driving layer provides hardware function driving for the battery management system.
An embodiment of the application provides a BMS software testing method, the method is applied to the host computer, the host computer is connected with battery management system communication via communication connection equipment, battery management system includes application layer, communication interface layer and driver layer, responds to battery management system work is in normal mode, the application layer passes through the communication interface layer follow the driver layer acquires sampling information and state information, and according to sampling information and state information execution charge-discharge process, the method includes:
responding to the battery management system working in a test mode, and sending analog sampling information and analog state information to the battery management system by the upper computer;
and receiving input parameters, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result.
An embodiment of the present application provides an electronic device, including:
a battery management system;
a processor; and
a memory in which a plurality of program modules are stored, the program modules being loaded by the processor and executing the BMS software testing method as described above to test the battery management system.
Compared with the prior art, the BMS software testing method and the electronic equipment have the advantages that the battery management system is designed in a layered mode and comprises an application layer, a communication interface layer and a driving layer; responding to the battery management system working in a test mode, and receiving analog sampling information and analog state information sent by the upper computer; and receiving the test parameters sent by the upper computer, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result. The functions of the drive layer and the interface layer of the battery management system can be generalized, and even in the incomplete development stage of the BMS of a new project, the developed BMS software application layer codes can be tested, so that the BMS software functions can be tested earlier, and more BMS software problems can be found out. In addition, the sampling signal and the state signal are acquired from the external equipment for testing (such as a charging simulation device) without waiting for connection of the external equipment. The effects of lower cost and higher test efficiency can be achieved.
Drawings
Fig. 1 is a schematic structural diagram of a BMS software testing system according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 3 is an application environment diagram of a BMS software testing system according to an embodiment of the present application.
Fig. 4 is a flowchart of a BMS software testing method applied to an upper computer according to an embodiment of the present application.
Fig. 5 is a flowchart of a BMS software testing method according to an embodiment of the present application applied to an electronic device.
Fig. 6 is a functional block diagram of a BMS software testing apparatus according to an embodiment of the present application.
Description of the main elements
Electronic equipment 1
BMS software testing system 10
Battery management system controller 101
Upper computer 102
Micro control unit 103
Battery management system 1030
Application layer 1031
Communication interface layer 1032
Drive layer 1033
External device 104
External device 20
Battery 11
Memory 12
Processor 13
BMS software testing device 60
Partitioning module 601
Receiving module 602
Processing module 603
Comparison module 604
The following detailed description will further illustrate the application in conjunction with the drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is further noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1 and 2, the BMS software testing System 10 includes a Battery Management System (BMS) controller 101 and an upper computer 102. The battery management system controller 101 is connected with the upper computer 102 through a communication connection device (not shown in the figure). The communication connection device may be a communication device with different communication formats, such as a Controller Area Network (CAN), a Universal Asynchronous Receiver/Transmitter (UART), RS-485, and Ethernet (Ethernet).
In the present embodiment, the battery management system controller 101 includes a Micro Controller Unit (MCU) 103 and an external device 104. A battery management system 1030 may be run in the micro control unit 103, where the battery management system 1030 includes an application layer 1031, a communication interface layer 1032, and a driver layer 1033.
In this embodiment, the application layer 1031 is used to implement various functions of the battery management system 1030. Such as charging, discharging, and power consumption management.
The communication interface layer 1032 isolates the application layer 1031 from the driver layer 1033, so as to ensure that the application layer 1031 does not directly call the driver layer 1033, and the communication interface layer 1032 provides a communication interface for the upper computer 102, and simultaneously encapsulates the functions and interfaces of the driver layer 1033 for use by the application layer 1031.
The driver layer 1033 provides hardware function drivers for the battery management system 1030. For example, hardware function drivers such as sampling, clock, interrupt, communication, storage, IO, etc. are provided for the battery management system 1030.
The upper computer 102 can perform function testing and software monitoring on the battery management system 1030. The upper computer 102 can be installed on a PC (personal computer) or an industrial touch screen (HMI) and other devices. When the battery management system controller 101 needs to be remotely accessed and controlled through the upper computer 102, the upper computer can also be installed in a webpage on a server. The upper computer 102 can monitor the running state of the battery management system 1030 and can also edit a test case so as to test the software function of the battery management system 1030.
In this embodiment, in order to facilitate testing of software functions of the battery management system 1030, the battery management system 1030 includes two operation modes: a normal mode and a test mode.
In response to the battery management system 1030 operating in the normal mode, the application layer 1031 obtains sampling information and state information from the driver layer 1033 through the communication interface layer 1032, and performs a charging and discharging process according to the sampling information and the state information. In this embodiment, the sampling information includes voltage, current, temperature, IO, and the like. The state information balances state, running state and fault state. The BMS software testing system 10 is communicatively connected to an external device 20 as shown in fig. 3. For example, the external device 20 is electrically connected to the driving circuit in the external device 104. The BMS software testing system 10 may also be electrically connected to the battery 11.
Specifically, in response to the battery management system 1030 operating in the normal mode, the application layer 1031 obtains the required sampling information and status information from the driver layer 1033 through the interface provided by the communication interface layer 1032. Meanwhile, the external device is driven by the driving layer 1033 to acquire the sampling information and the state information, and a charging and discharging process is executed according to the sampling information and the state information to test the BMS software. For example, the communication interface layer 1032 calls a driving interface of the bottom layer, and obtains an external sampling signal during the battery operation through an AFE (analog front end) and a sampling circuit. And converting the external sampling information through the sampling circuit to obtain an actual parameter value in the working process of the battery, and updating the parameter value to a corresponding interface. The application layer 1031 may obtain the real external information (such as the parameter value) by calling the communication interface layer 1032. Meanwhile, the application layer 1031 may also determine the state of the BMS according to the obtained external information, determine the state of the external device according to a predetermined policy, and then call the communication interface layer 1032 to control the external device, thereby implementing the control of the BMS on/off of the battery 11.
Responding to the battery management system 1030 working in a test mode, the upper computer 102 sends simulation sampling information and simulation state information to the battery management system 1030, the upper computer 102 receives input test parameters, and simulates a battery charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result. The test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time. The upper computer 102 also compares the test result with the expected result, and when the test result is consistent with the expected result, the test is confirmed to pass; confirming a test failure when the test result is inconsistent with the expected result.
Specifically, in response to the battery management system 1030 operating in a test mode. The application layer 1031 obtains the required sampling signal and status signal from the upper computer 102 through the interface provided by the communication interface layer 1032, and performs a test according to the sampling signal and status signal. The sampling signal and the state signal are obtained from the external equipment for testing (such as a charging simulation device) without waiting for the connection of the external equipment. The effects of lower cost and higher test efficiency can be achieved.
In response to the battery management system 1030 operating in a test mode. The driver layer 1033 continues to operate normally, the communication interface layer 1032 does not acquire sampling information of the driver layer and does not calculate actual parameter values, the communication interface layer 1032 acquires simulation data sent by the upper computer 102 and updates the simulation data to a corresponding interface, and the application layer 1031 can acquire the corresponding simulation data through the communication interface layer 1032. Because the simulation data is selected according to the actual operation condition of the battery management system 1030, the upper computer 102 can simulate the actual operation environment of the software of the battery management system 1030 by issuing different simulation data.
In this embodiment, the communication interface layer 1032 provides a device control interface to the application layer 1031, and the application layer 1031 calls the device control interface, so that the battery management system 1030 may further send a control command to an external device. Meanwhile, a control command that the BMS transmits to the external device is transmitted to the upper computer 102 through the driving layer 1033, so that the operation state and the control command of the battery management system 1030 can be confirmed.
When the upper computer 102 tests the functions of the battery management system 1030, the battery management system 1030 works in a test mode. The upper computer 102 is connected with the battery management system controller 101 by using a communication connection device, and sends the analog sampling information and the analog state information to the battery management system 1030 according to an agreed protocol. The protocol may be a standard CAN protocol, a UART protocol, an RS-485 protocol, and a TCP/IP protocol, depending on the external communication hardware of the battery management system controller 101. The upper computer 102 may display simulation data acquired by the application layer 1031 of the battery management system 1030, and also support setting of different test cases according to actual operating conditions of the battery management system 1030. The upper computer 102 also supports the design of test cases according to requirements, and the test cases can be used for testing voltage, temperature and current related abnormity and testing the current limiting and balancing functions of the BMS.
For example, in testing voltage, temperature and current related anomalies, the tester is allowed to enter a start parameter, an end parameter, a step size of parameter changes, expected results, and expected action time. When the input is completed and the test is started, the upper computer 102 starts timing, increases the step length of the parameter change on the initial parameter at regular time, and then sends the parameter to the battery management system 1030. After the expected action time is reached, the test result is obtained. Comparing the test result with the expected result. When the test result is consistent with the expected result, the test meets the expected result, and the test is confirmed to pass; and when the test result is inconsistent with the expected result, the test does not meet the expected result, and the test is confirmed to fail.
In the present embodiment, the normal mode and the test mode of the battery management system 1030 are also switched by:
first, in order to prevent the battery management system 1030 from abnormally switching between the normal mode and the test mode, the test mode is reserved only in the software development stage. When the battery management system 1030 is completely developed, the function of switching between the normal mode and the test mode needs to be deleted in software, and only the normal mode needs to be reserved.
In the second mode, the operation mode flag is stored in a memory (e.g., a nonvolatile memory) for switching convenience and ensuring that no switching abnormality occurs. For example, the run mode flag is stored in a macro-defined form or written into a FLASH space of the code, and cannot be modified. Specifically, when the battery management system 1030 needs to operate in the normal mode, the operation mode flag is set to be in the normal mode, and the set operation mode flag is burned into the battery management system 1030. As such, the battery management system 1030 will always operate in the normal mode. When the battery management system needs to operate in the test mode, the operation mode flag is set as the test mode, and the set operation mode flag is burned into the battery management system 1030. As such, the battery management system 1030 will always operate in the test mode.
And secondly, storing the operation mode mark in an external memory (EEPROM) or an internal memory (Flash) and allowing the upper computer to modify the operation mode mark. And developers can conveniently select the working mode according to the actual situation. Specifically, the operation mode flag is stored in a memory, when the battery management system 1030 needs to operate in a normal mode, the mode flag in the memory is modified to the normal mode by the upper computer, and the battery management system 1030 operates in the normal mode; when the battery management system 1030 needs to operate in a test mode, the mode mark in the memory is modified into the test mode through the upper computer, and the battery management system 1030 operates in the test mode.
In the present embodiment, the BMS software testing system 10 operates in the electronic device 1. The electronic device 1 includes, but is not limited to, a battery 11, a memory 12, and at least one processor 13. The elements may be connected by a bus or directly.
It should be noted that fig. 1 is only an example of the electronic device 1. In other embodiments, the electronic device 1 may also include more or fewer elements, or have a different configuration of elements. The electronic device 1 may be an electric motorcycle, an electric bicycle, an electric car, a mobile phone, a tablet computer, a digital assistant, a personal computer, or any other suitable rechargeable device.
In one embodiment, the battery 11 is a rechargeable battery for providing power to the electronic device 1. The battery 11 includes at least one battery cell (battery cell), which may be rechargeable in a recycling manner, and the type of the battery 11 is not particularly limited, and may include a lithium ion battery, a lithium polymer battery, a nickel cadmium battery, a nickel hydrogen battery, a nickel zinc battery, and the like. The battery 11 is logically connected to the processor 13 through a battery management system controller 101, so that functions of charging, discharging, power consumption management and the like are realized through the battery management system controller 101.
Although not shown, the electronic device 1 may further include a Wireless Fidelity (WiFi) unit, a bluetooth unit, a speaker, and other components, which are not described in detail herein.
Referring to fig. 4, fig. 4 is a flowchart illustrating a BMS software testing method according to an embodiment of the present application. The method is applied to an upper computer, the upper computer is in communication connection with a battery management system in the electronic equipment 1 through communication connection equipment, the battery management system comprises an application layer, a communication interface layer and a driving layer, the battery management system works in a normal mode in response to the battery management system, the application layer obtains sampling information and state information from the driving layer through the communication interface layer, and a charging and discharging process is executed according to the sampling information and the state information. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. The BMS software testing method may include the following steps.
And step S40, responding to the battery management system working in a test mode, and sending analog sampling information and analog state information to the battery management system by the upper computer.
In one embodiment, when the upper computer 102 tests the functions of the battery management system, the battery management system operates in a test mode. The upper computer 102 is connected with the battery management system by using communication connection equipment, and sends analog sampling information and analog state information to the battery management system according to an agreed protocol.
In response to the battery management system operating in a test mode. The driver layer continues to operate normally, the communication interface layer 1032 does not acquire sampling information of the driver layer and does not calculate actual parameter values, the communication interface layer 1032 acquires the simulation data sent by the upper computer 102 and updates the simulation data to the corresponding interface, and the application layer 1031 can acquire the corresponding simulation data through the communication interface layer 1032. Because the simulation data are selected according to the actual operation conditions of the BMS, the upper computer 102 can simulate the actual operation environment of the BMS software by issuing different simulation data.
And step S41, receiving the input parameters, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result. Wherein the test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time.
In this embodiment, the upper computer 102 further supports designing a test case as needed, and the test case can be used to test voltage, temperature, and current related abnormalities and also test current limiting and balancing functions of the BMS.
For example, in testing voltage, temperature and current related anomalies, the host computer 102 allows the tester to enter a start parameter, an end parameter, a step size of parameter changes, expected results, and expected action times. When the setting is completed and the test is started, the upper computer 102 starts timing, increases the step length of the parameter change on the initial parameter at regular time, and then sends the test parameter to the battery management system.
And step S42, comparing whether the test result is consistent with the expected result. When the test result is consistent with the expected result, the flow proceeds to step S43; when the test result is not consistent with the expected result, it is confirmed that the test is failed, and the flow returns to step S40.
In this embodiment, the test results are obtained after the expected action time is reached. Comparing the test result with the expected result. When the test result is consistent with the expected result, the test meets the expected result, the test is confirmed to pass, and the process is ended; and when the test result is inconsistent with the expected result, the test does not meet the expected result, and the test is confirmed to fail.
And step S43, judging the test result. And when the test result is consistent with the expected result, judging that the test is passed.
As can be seen from the steps S40-S43, in response to the battery management system operating in the test mode, the upper computer sends the analog sampling information and the analog state information to the battery management system, receives the input parameters, and simulates the charge and discharge process according to the parameters and the analog sampling information and the analog state information to obtain the test result. The sampling signal and the state signal are obtained from the external equipment for testing (such as a charging simulation device) without waiting for the connection of the external equipment. The effects of lower cost and higher test efficiency can be achieved.
Referring to fig. 5, fig. 5 is a flowchart illustrating a BMS software testing method according to an embodiment of the present application. The method is applied to the electronic device 1, wherein the electronic device 1 comprises a battery management system, and the battery management system is in communication connection with the upper computer 102 through a communication connection device. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. The BMS software testing method may include the following steps.
And step S50, dividing the battery management system into an application layer, a communication interface layer and a driving layer.
And step S51, responding to the normal working mode of the battery management system, the application layer acquires sampling information and state information from the driving layer through the communication interface layer, and executes a charging and discharging process according to the sampling information and the state information.
And step S52, responding to the battery management system working in the test mode, and receiving the analog sampling information and the analog state information sent by the upper computer.
In one embodiment, when the upper computer 102 tests the functions of the battery management system controller 101, the battery management system operates in a test mode. The upper computer 102 is connected with the battery management system controller 101 by using a communication connection device, and transmits the transmitted analog sampling information and analog state information to the battery management system according to an agreed protocol.
In response to the battery management system operating in a test mode. The driver layer continues to operate normally, the communication interface layer 1032 does not acquire sampling information of the driver layer and does not calculate actual parameter values, the communication interface layer 1032 acquires the simulation data sent by the upper computer 102 and updates the simulation data to the corresponding interface, and the application layer 1031 can acquire the corresponding simulation data through the communication interface layer 1032. Because the simulation data are selected according to the actual operation conditions of the BMS, the upper computer 102 can simulate the actual operation environment of the BMS software by issuing different simulation data.
And S53, receiving the test parameters sent by the upper computer, and simulating a charging and discharging process according to the test parameters, the simulation sampling information and the simulation state information to obtain a test result. Wherein the test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time.
In this embodiment, the upper computer 102 further supports designing a test case as needed, and the test case can be used to test voltage, temperature, and current related abnormalities and also test current limiting and balancing functions of the BMS.
For example, in testing voltage, temperature and current related anomalies, the host computer 102 allows the tester to enter a start parameter, an end parameter, a step size of parameter changes, expected results, and expected action times. When the setting is completed and the test is started, the upper computer 102 starts timing, increases the step length of the parameter change on the initial parameter at regular time, and then sends the test parameter to the battery management system.
And step S54, comparing whether the test result is consistent with the expected result. When the test result is consistent with the expected result, the flow proceeds to step S55; when the test result is not consistent with the expected result, it is confirmed that the test is failed, and the flow returns to step S52.
In this embodiment, the test results are obtained after the expected action time is reached. Comparing the test result with the expected result. When the test result is consistent with the expected result, the test meets the expected result, and the test is confirmed to pass; and when the test result is inconsistent with the expected result, the test does not meet the expected result, and the test is confirmed to fail.
And step S55, judging the test result. And when the test result is consistent with the expected result, judging that the test is passed.
As can be seen from the steps S50-S55, the application layer 1031 in the battery management system obtains the required sampling signal and status signal from the upper computer 102 through the interface provided by the communication interface layer 1032, and performs the test according to the sampling signal and status signal. By hierarchically designing the battery management system, the functions of the drive layer and the interface layer of the battery management system can be generalized, and even in the stage of incomplete development of a new project BMS, the developed BMS software application layer codes can be tested, so that the BMS software functions can be tested earlier, and more BMS software problems can be found out. In addition, the sampling signal and the state signal are acquired from the external equipment for testing (such as a charging simulation device) without waiting for connection of the external equipment. The effects of lower cost and higher test efficiency can be achieved.
In this embodiment, the BMS software testing method may further include: and switching a normal mode and a test mode of the battery management system. Wherein the normal mode and the test mode of the battery management system are switched by the following method:
storing an operation mode flag into a memory, setting the operation mode flag to be a normal mode when the battery management system needs to operate in the normal mode, and burning the set operation mode flag into a BMS; when the battery management system needs to operate in a test mode, setting the operation mode mark as the test mode, and burning the set operation mode mark into the BMS; or
Storing the running mode mark into a memory, and modifying the mode mark in the memory into a normal mode through the upper computer when the battery management system needs to run in the normal mode; and when the battery management system needs to operate in a test mode, modifying the mode mark in the memory into the test mode through the upper computer.
Referring to fig. 6, in one embodiment, in this embodiment, the BMS software testing device 60 may be divided into one or more modules, and the one or more modules are stored in the memory 12 and executed by at least one processor (in this embodiment, one processor 13) to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the BMS software testing device 60 in the electronic device 1. For example, the BMS software testing apparatus 60 may be divided into a dividing module 601, a processing module 602, a receiving module 603, and a comparing module 604 in fig. 6.
The dividing module 601 is configured to divide the battery management system into an application layer, a communication interface layer, and a driver layer; the processing module 602 is configured to respond to a normal operation mode of the battery management system, where the application layer obtains sampling information and state information from the driver layer through the communication interface layer, and performs a charging and discharging process according to the sampling information and the state information; the receiving module 603 is configured to receive, in response to that the battery management system works in a test mode, analog sampling information and analog state information sent by the upper computer; the processing module 602 is further configured to respond to the parameter received by the upper computer, and simulate a charging and discharging process according to the parameter, the simulation sampling information, and the simulation state information to obtain a test result; the comparing module 604 is configured to compare whether the test result is consistent with the expected result. Confirming that the test is passed when the test result is consistent with the expected result; confirming a test failure when the test result is inconsistent with the expected result.
In this embodiment, the memory 12 may be an internal memory of the electronic device 1, that is, a memory built in the electronic device 1. In other embodiments, the memory 12 may also be an external memory of the electronic device 1, i.e. a memory externally connected to the electronic device 1.
In some embodiments, the memory 12 is used for storing program codes and various data, for example, program codes of the BMS software testing device 60 installed in the electronic device 1, and realizes high-speed and automatic access to the program or data during the operation of the electronic device 1. For example, in the present embodiment, the BMS software testing device 60 is configured to obtain a required sampling signal and a required status signal from the upper computer 102, and perform a test according to the sampling signal and the status signal. The sampling signal and the state signal are obtained from the external equipment for testing (such as a charging simulation device) without waiting for the connection of the external equipment. The effects of lower cost and higher test efficiency can be achieved.
The memory 12 may include random access memory and may also include non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In an embodiment, the Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. The general purpose processor may be a microprocessor or the processor 13 may be any other conventional processor etc.
The modules in the BMS software testing device 60, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the embodiments of the methods. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It is understood that the above described division of modules is only one logical division, and that in actual implementation, there may be other divisions. In addition, functional modules in the embodiments of the present application may be integrated into the same processing unit, or each module may exist alone physically, or two or more modules are integrated into the same unit. The integrated module can be realized in a hardware mode, and can also be realized in a mode of hardware and a software functional module.
It will be evident to those skilled in the art that the application is not limited to the details of the illustrated embodiments and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (10)

1. A BMS software testing method is applied to electronic equipment and is characterized by comprising the following steps:
dividing a battery management system into an application layer, a communication interface layer and a driving layer;
responding to the normal mode of the battery management system, the application layer acquires sampling information and state information from the driving layer through the communication interface layer and executes a charging and discharging process according to the sampling information and the state information,
responding to the battery management system working in a test mode, and receiving analog sampling information and analog state information sent by an upper computer;
and receiving the test parameters sent by the upper computer, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result.
2. The BMS software testing method of claim 1, wherein the test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time, the sampling information includes voltage, current, and temperature, and the state information balances states, operating states, and fault states.
3. The BMS software testing method of claim 2, characterized in that the method further comprises:
comparing whether the test result is consistent with an expected result;
confirming that the test is passed when the test result is consistent with the expected result;
confirming a test failure when the test result is inconsistent with the expected result.
4. The BMS software testing method of claim 1, characterized in that the method further comprises:
and switching a normal mode and a test mode of the battery management system.
5. The BMS software testing method of claim 4, characterized in that the method further comprises:
the switching between the normal mode and the test mode of the battery management system includes:
storing an operation mode flag into a memory, setting the operation mode flag to be a normal mode when the battery management system needs to operate in the normal mode, and burning the set operation mode flag into a BMS; when the battery management system needs to operate in a test mode, setting the operation mode mark as the test mode, and burning the set operation mode mark into the BMS;
storing the running mode mark into a memory, and modifying the mode mark in the memory into a normal mode through the upper computer when the battery management system needs to run in the normal mode; and when the battery management system needs to operate in a test mode, modifying the mode mark in the memory into the test mode through the upper computer.
6. The BMS software testing method of claim 1,
the application layer is used for realizing the functions of the battery management system;
the communication interface layer isolates the application layer from the drive layer, ensures that the application layer cannot directly call the drive layer, provides a communication interface for the upper computer, and simultaneously encapsulates the functions and the interfaces of the drive layer for the application layer;
the driving layer provides hardware function driving for the battery management system.
7. A BMS software testing method is applied to an upper computer which is in communication connection with a battery management system through a communication connection device, and is characterized in that the battery management system comprises an application layer, a communication interface layer and a driving layer, the application layer acquires sampling information and state information from the driving layer through the communication interface layer in response to the battery management system working in a normal mode, and executes a charging and discharging process according to the sampling information and the state information, and the method comprises the following steps:
responding to the battery management system working in a test mode, and sending analog sampling information and analog state information to the battery management system by the upper computer;
and receiving input parameters, and simulating a charging and discharging process according to the parameters, the simulation sampling information and the simulation state information to obtain a test result.
8. The BMS software testing method of claim 7, wherein the test parameters include a start parameter, an end parameter, a step size of parameter change, an expected result, and an expected execution time, the sampling information includes voltage, current, and temperature, and the state information balances states, operating states, and fault states.
9. The BMS software testing method of claim 8, characterized in that the method further comprises:
comparing whether the test result is consistent with an expected result;
confirming that the test is passed when the test result is consistent with the expected result;
confirming a test failure when the test result is inconsistent with the expected result.
10. An electronic device, characterized in that the electronic device comprises:
a battery management system;
a processor; and
a memory in which a plurality of program modules are stored, the program modules being loaded by the processor and executing the BMS software testing method according to any one of claims 1 to 6 to test the battery management system.
CN202010019577.2A 2020-01-08 2020-01-08 BMS software testing method and electronic equipment Active CN113094256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010019577.2A CN113094256B (en) 2020-01-08 2020-01-08 BMS software testing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010019577.2A CN113094256B (en) 2020-01-08 2020-01-08 BMS software testing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN113094256A true CN113094256A (en) 2021-07-09
CN113094256B CN113094256B (en) 2023-06-27

Family

ID=76663418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010019577.2A Active CN113094256B (en) 2020-01-08 2020-01-08 BMS software testing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN113094256B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113937376A (en) * 2021-10-12 2022-01-14 东莞新能安科技有限公司 Electrochemical device management method, electrochemical device and electric equipment
CN114035026A (en) * 2021-11-05 2022-02-11 银芯微(无锡)科技有限公司 Micro control unit chip for battery management system and chip abnormity detection method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2423694A1 (en) * 2010-08-31 2012-02-29 ST-Ericsson SA Process for auto-testing a fully discharged battery, such as double-layer capacitor battery, and circuit for doing the same
CN104133124A (en) * 2013-05-03 2014-11-05 北京蔚蓝新业科技有限责任公司 Detection device for BMS (battery pack management system)
CN106707065A (en) * 2016-12-31 2017-05-24 安徽优旦科技有限公司 Battery management system standard DBC interface automatic testing system and method
WO2018028136A1 (en) * 2016-08-08 2018-02-15 北京新能源汽车股份有限公司 Battery management system testing system and method
CN108398611A (en) * 2018-05-10 2018-08-14 中航锂电技术研究院有限公司 Function test system based on minimum battery management system and its test method
CN108490279A (en) * 2018-01-26 2018-09-04 深圳市沃特玛电池有限公司 The test system and method for battery management system
US20180306868A1 (en) * 2017-04-25 2018-10-25 Korea University Of Technology And Education Industry-University Cooperation Method for predicting state of health of battery based on numerical simulation data
CN108803406A (en) * 2018-04-04 2018-11-13 山东大学 Task hierarchy system and method for electrokinetic cell and analog meter
CN109002393A (en) * 2018-06-29 2018-12-14 中国空间技术研究院 A kind of spaceborne energy management software closed loop test method
CN109031131A (en) * 2018-05-25 2018-12-18 山东大学 The real-time host system of the heterogeneous polynuclear of battery testing and analog meter and method
CN109471373A (en) * 2018-11-22 2019-03-15 北京新能源汽车股份有限公司 Hardware-in-loop simulation test system and device of bidirectional charger controller

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2423694A1 (en) * 2010-08-31 2012-02-29 ST-Ericsson SA Process for auto-testing a fully discharged battery, such as double-layer capacitor battery, and circuit for doing the same
CN104133124A (en) * 2013-05-03 2014-11-05 北京蔚蓝新业科技有限责任公司 Detection device for BMS (battery pack management system)
WO2018028136A1 (en) * 2016-08-08 2018-02-15 北京新能源汽车股份有限公司 Battery management system testing system and method
CN106707065A (en) * 2016-12-31 2017-05-24 安徽优旦科技有限公司 Battery management system standard DBC interface automatic testing system and method
US20180306868A1 (en) * 2017-04-25 2018-10-25 Korea University Of Technology And Education Industry-University Cooperation Method for predicting state of health of battery based on numerical simulation data
CN108490279A (en) * 2018-01-26 2018-09-04 深圳市沃特玛电池有限公司 The test system and method for battery management system
CN108803406A (en) * 2018-04-04 2018-11-13 山东大学 Task hierarchy system and method for electrokinetic cell and analog meter
CN108398611A (en) * 2018-05-10 2018-08-14 中航锂电技术研究院有限公司 Function test system based on minimum battery management system and its test method
CN109031131A (en) * 2018-05-25 2018-12-18 山东大学 The real-time host system of the heterogeneous polynuclear of battery testing and analog meter and method
CN109002393A (en) * 2018-06-29 2018-12-14 中国空间技术研究院 A kind of spaceborne energy management software closed loop test method
CN109471373A (en) * 2018-11-22 2019-03-15 北京新能源汽车股份有限公司 Hardware-in-loop simulation test system and device of bidirectional charger controller

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘凌飞等: "基于LabView 的动力电池BMS 测试系统的研究", 《汽车实用技术》, no. 17, pages 5 - 7 *
郭敏: "电池管理系统BMS性能测试装置方案设计", 《电子测量技术》, vol. 42, no. 11, pages 43 - 46 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113937376A (en) * 2021-10-12 2022-01-14 东莞新能安科技有限公司 Electrochemical device management method, electrochemical device and electric equipment
CN114035026A (en) * 2021-11-05 2022-02-11 银芯微(无锡)科技有限公司 Micro control unit chip for battery management system and chip abnormity detection method
CN114035026B (en) * 2021-11-05 2023-08-18 银芯微(无锡)科技有限公司 Micro control unit chip for battery management system and chip abnormality detection method

Also Published As

Publication number Publication date
CN113094256B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN108594792B (en) Hardware-in-loop test system and test equipment for bidirectional vehicle-mounted charger
CN103568863A (en) Real-time monitoring diagnostic system and diagnostic method for electromobile battery management system
CN109726061B (en) SoC chip verification method
CN113094256B (en) BMS software testing method and electronic equipment
CN113407393B (en) Chip verification method, terminal device, verification platform and storage medium
CN103323767B (en) A kind of method and system thereof of testing bluetooth module on embedded PCB A
CN114896158A (en) BMS testing method and testing device
CN113703792A (en) Firmware remote upgrade test method, device, server and medium
CN112860559A (en) Upgrade test system and method
CN112445670B (en) eMMC test method and device
CN116973757A (en) Battery capacity calibration method based on battery calibrator and related equipment
CN111596248A (en) Current collecting fault judgment method, device and equipment for current divider and storage medium
CN107391329B (en) Method, system and storage device for testing repeated use of mobile terminal
CN113358956B (en) Detection method, detection device and detection system of movable charging pile
CN114168482A (en) Test method of vehicle control unit
CN111965587B (en) Automatic test method and automatic test platform for stability of electric energy meter
CN115188093A (en) Automatic evaluation device for built-in video recording device of vehicle, system having the same, and method thereof
CN111726604A (en) Setting method and device of working mode data, terminal and readable storage medium
CN112003656A (en) System and method for testing vehicle-mounted wireless communication terminal assembly product
CN111896824B (en) Unattended reliability testing device and system
US20220357398A1 (en) Maintenance method and maintenance program for energy storage apparatus
CN117665457A (en) Automatic test method, device, equipment and medium for vehicle reservation charging function
CN115729587A (en) IED development management method, device, equipment and storage medium
CN117931637A (en) Automatic real vehicle testing method and device for vehicle-mounted information entertainment system, vehicle and storage medium
CN114610003A (en) Vehicle diagnosis method, apparatus, device, and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant