CN115494740A - Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation - Google Patents
Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation Download PDFInfo
- Publication number
- CN115494740A CN115494740A CN202211012359.1A CN202211012359A CN115494740A CN 115494740 A CN115494740 A CN 115494740A CN 202211012359 A CN202211012359 A CN 202211012359A CN 115494740 A CN115494740 A CN 115494740A
- Authority
- CN
- China
- Prior art keywords
- simulation
- management system
- battery management
- test
- board card
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 86
- 238000004088 simulation Methods 0.000 title claims abstract description 75
- 238000004891 communication Methods 0.000 claims abstract description 11
- 238000001514 detection method Methods 0.000 claims description 20
- 238000002347 injection Methods 0.000 claims description 18
- 239000007924 injection Substances 0.000 claims description 18
- 238000000034 method Methods 0.000 claims description 11
- 230000003993 interaction Effects 0.000 claims description 9
- 230000009471 action Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 2
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 229910052744 lithium Inorganic materials 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000011217 control strategy Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000000178 monomer Substances 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B17/00—Systems involving the use of models or simulators of said systems
- G05B17/02—Systems involving the use of models or simulators of said systems electric
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
- Y02E60/10—Energy storage using batteries
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Tests Of Electric Status Of Batteries (AREA)
Abstract
A hardware-in-loop test bench based on MATLAB/Simulink system simulation comprises MATLAB/Simulink system simulation software, a communication board card, a signal simulation board card, a simulation battery pack subsystem, a sensor board card and a main controller, wherein an external simulation model of a control unit of a tested battery management system is built through the MATLAB/Simulink system simulation software, a test object of the battery management system is simulated, a simulation signal is generated and sent to the battery management system, the battery management system is tested by using the simulation signal, a BMS result and a self-test result are compared, the self-test result is used as a reference, the test precision of the battery management system is calculated, and the test result is obtained. The invention can increase the test accuracy and the test range, reduce the test cost and improve the test efficiency.
Description
Technical Field
The invention belongs to the technical field of automobile battery management systems, and particularly relates to a hardware-in-the-loop test bench based on MATLAB/Simulink system simulation.
Background
The battery system is used as an important component of the electric automobile, and the electrical performance and the safety performance of the battery system are directly related to the driving mileage and the safety guarantee of the electric automobile. In recent years, the energy density of a power lithium battery monomer and a system is remarkably improved, and the cycle life of the battery is gradually prolonged. The development of the lithium battery technology increases the endurance mileage of the pure electric vehicle, can better meet the living demands of people, and is further accepted by consumers. However, the safety problem of the electric vehicle caused by the power lithium battery is still worried by consumers. Thermal runaway of electric automobiles occurs due to mechanical abuse and electrical abuse factors such as collision and overcharge every year, and serious safety accidents are caused. For the stable development of the industry, comprehensive power battery test evaluation capability is required to support.
A Battery Management System (BMS), which is a core control system of an electric vehicle, plays a crucial role in monitoring the state of a power battery, managing the state of the power battery, and performing the performance of the power battery and the safety of the power battery, and the quality of the performance determines the competitiveness of the electric vehicle. After the BMS is applied to the electric automobile, the service life of the battery can be obviously prolonged, the service efficiency of the battery is improved, the endurance mileage of the electric automobile can be effectively increased, and the safety performance of the electric automobile is also strongly guaranteed. However, if the BMS malfunctions, serious safety hazards such as overcharge and overdischarge of the power battery may occur. Therefore, the functionality and reliability of the BMS are receiving more and more attention as the battery system is concerned, and standards for the BMS, such as QC/T897-2011 "technical conditions for battery management systems for electric vehicles", and GB/T38661 "technical conditions for battery management systems for electric vehicles", have made higher and higher demands on the BMS in the current standards, so that the BMS testing is an important research direction in the industry.
In terms of BMS testing, the current situation is that on one hand, BMS mostly runs as a part of a battery management system in a matched manner, mostly cannot run independently of the battery system, the workload is large and complex when the battery system is integrally tested, and meanwhile, when environmental and mechanical tests are performed, the battery management system is integrally large, and more resources and time are needed to adjust the state of a sample; on the other hand BMS is sealed inside the system when testing with battery system is whole, can't observe and debug the sample state fast, directly perceivedly, has increased the work degree of difficulty.
The current BMS detection equipment has the following characteristics: basically, detection is carried out on specific BMS products, and the method has no universality; the method is limited by manual testing, and a simulation battery pack subsystem of the detection equipment does not have the simulation capability of the working condition of the power battery pack in the full life cycle and cannot effectively detect and verify the working condition of the BMS in the service cycle; the centralized coordination control cannot be performed on various signals, so that the correctness of the implementation of the control strategy cannot be effectively verified.
Disclosure of Invention
Based on the situation, the invention provides a hardware-in-loop test bench based on MATLAB/Simulink system simulation, so as to increase the test accuracy and the test range, further reduce the test cost and improve the test efficiency.
The technical scheme of the invention is as follows:
a hardware-in-the-loop test bench based on MATLAB/Simulink system simulation comprises MATLAB/Simulink system simulation software, a communication board card, a signal simulation board card, a simulation battery pack subsystem, a sensor board card and a main controller.
The MATLAB/Simulink system simulation software is used for building an external simulation model of the control unit of the tested battery management system and simulating the actual operating environment of the tested battery management system.
And the main controller controls the simulation battery pack subsystem to generate a simulation signal of the battery pack according to the actual operation condition of the battery pack managed by the battery management system.
And the simulation battery pack subsystem sends the generated simulation signal to the battery management system and the sensor board card.
And the sensor board card detects the simulation signal.
And the communication board card acquires the detection result of the battery management system on the simulation signal.
And the main controller compares the detection result of the battery management system on the simulation signal with the detection result of the sensor board card on the simulation signal to obtain the precision of the battery management system on detecting the battery parameters.
Compared with the prior art, the invention utilizes the cooperation of the simulink model and the test bench, and can not only be used independently, but also be used for centralized coordination control on various signals, thereby verifying the correctness of the control strategy and increasing the test accuracy. The invention combines the characteristics of the rack board card, can also verify the electrical fault detection and protection functions of the BMS, and increases the test range. The invention does not need a hardware platform for simulating the battery pack subsystem, thereby reducing the test cost. The test platform has the advantages of short development period and strong reusability, can meet different battery management systems, and improves the test efficiency.
Drawings
FIG. 1 is a schematic structural diagram of a hardware-in-the-loop test bench for a Simulink-based real-time simulation battery management system
FIG. 2 is a signal interaction illustration diagram of a Simulink-based real-time simulation system with a BCU and a test bench of an object;
FIG. 3 is a flow chart of hardware-in-the-loop test control based on the Simulink real-time simulation system;
fig. 4 is a schematic flow chart of an embodiment of testing the hardware of the real-time simulation battery management system on the ring test bench based on Simulink.
Detailed Description
In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.
Fig. 1 shows an embodiment of the test bench, which includes MATLAB/Simulink system simulation software, a communication board, a complete vehicle signal simulation board, a simulation battery pack subsystem, a sensor board, a fault injection board, a human-computer interaction terminal, and a main controller.
In this embodiment, the communication board card, the entire vehicle signal simulation board card, the simulation battery pack subsystem, the sensor board card, the fault injection board card, the PXI main controller, the test case library and the human-computer interaction terminal are combined together to form an HIL main cabinet, and the interface switching board card is placed outside the HIL main cabinet so as to be convenient to replace.
In this embodiment, the MATLAB/Simulink system simulation software is used for building an external simulation model of the control unit of the battery management system to be tested, and simulating an actual operating environment of the battery management system to be tested.
In this embodiment, the main controller is configured to control the simulated battery pack subsystem to generate a simulation signal of the battery pack according to an actual operation condition of the battery pack managed by the battery management system; and the battery management system is also used for comparing the detection result of the battery management system on the simulation signal with the detection result of the sensor board card on the simulation signal to obtain the precision of the battery management system on detecting the battery parameters.
In a preferred embodiment, the host controller is a PXI host controller based on a PXI bus. The PXI main controller is respectively connected with the communication board card, the whole vehicle signal simulation board card, the module battery pack subsystem, the sensor board card and the fault injection board card through a PXI bus.
In this embodiment, the analog battery pack subsystem is configured to send the generated simulation signal to the battery management system and the sensor board.
In this embodiment, the sensor board is configured to detect the simulation signal.
In this embodiment, the communication board is configured to collect a detection result of the battery management system on the simulation signal.
In this embodiment, the vehicle signal simulation board card is used for simulating a vehicle signal.
In this embodiment, the fault injection board is configured to perform fault injection on the battery management system after the test accuracy of the battery management system meets the requirement, and determine whether the battery management system can detect a fault or generate a corresponding protection action.
In order to conveniently display the result of the main controller, the test bench can also provide a human-computer interaction terminal which is connected with the main controller and used for displaying the comparison result and the judgment result of the main controller and receiving a command to configure the test step of the test working condition in the test case, and a LabView control interface is preferably adopted on the human-computer interaction terminal.
The test bench simulates various parameters of a test object of the battery management system, namely a battery pack, generates the simulation signal, and then sends the simulation signal to the battery management system. And testing the battery management system by using the simulation signal, comparing the result of the BMS with the self-testing result, and outputting the testing result. The test bench compares the test result of the battery management system with the self-test result, and calculates the test precision of the battery management system by taking the self-test result as a reference.
Referring to fig. 2, the embodiment of the system for realizing the hardware-in-the-loop test control of the battery management system based on the Simulink real-time simulation system includes a PC, a CAN card, a battery management system controller and an information acquisition board card, wherein the CAN card is connected with the PC, the battery management system controller and the CAN card perform information interaction through a CAN bus, the signal acquisition board card performs information interaction with the battery management system through a hard-line signal, and the signal acquisition board card is connected with the PC.
Preferably, the PC is provided with MATLAB/Simulink software, a CAN card tool box and a signal acquisition tool box, the CAN card tool box software is connected with the CAN card through a hard line, and the signal acquisition tool box software is connected with the signal acquisition board card through a hard line.
Preferably, the signal acquisition board card comprises an analog input/output module, an analog-to-digital and digital-to-analog conversion module and a pulse width modulation module, and the digital input/output module, the analog-to-digital and digital-to-analog conversion module and the pulse width modulation module are all connected with the PC and the battery management system.
Referring to fig. 3, a construction process of a hardware-in-loop test bench based on a Simulink real-time simulation system is as follows:
first, hardware installation and configuration are performed.
And then MATLAB/Simulink system simulation software builds an external simulation model of the control unit of the tested battery management system to simulate the actual operating environment of the tested battery management system.
Next, a human-machine interaction interface (GUI) of the test system is designed using the APP Designer toolkit.
Then, the components in the GUI are associated with corresponding variables in the simulation model.
Then, the simulation mode of the Simulink system is set as a real simulation.
And then, performing hardware-in-loop test on the battery management system to be tested.
Referring to fig. 4, an embodiment of a specific process for testing the battery management system hardware in the ring test bench based on Simulink real-time simulation includes the following steps:
s1, reading a test condition from a test case library by the PXI main controller.
And S2, the PXI main controller generates a test working step according to the test working condition.
And S3, controlling the parameter output of the simulation battery pack subsystem according to the step data.
And S4, controlling the trigger signal output of the whole vehicle signal simulation board card according to the process step data.
And S5, reading the acquired data of the sensor board card.
And S6, reading BMS data through the communication board card.
And S7, comparing the BMS data with the data acquired by the sensor board card.
And S8, judging whether the index requirements are met.
And S9, recording the unqualified index if the index does not meet the index requirement.
And S10, judging whether all the process steps are finished.
And S11, if the test is finished, summarizing the test results, generating a report and outputting the test results.
And S12, displaying the test result on the main control interface.
For the above method, if the test accuracy of the battery management system meets the requirement, the input module of the signal input board card may be further used to perform fault injection on the battery management system, and determine whether the battery management system can detect a fault or generate a corresponding protection action.
The fault injection process specifically comprises the following steps: if the precision detection indexes of specific steps meet the requirements, injecting faults into each signal input channel of the BMS, if the BMS cannot detect the injected faults or cannot generate corresponding protection actions, recording the protection failure errors, finally judging whether the signal input channels do not implement fault injection, if so, starting the fault injection detection process of the next signal input channel, so far, completing fault injection detection of a single step, and when all the unqualified items of the steps are summarized, adding fault injection detection errors to judge whether the response of the BMS to the faults is qualified.
The above examples only represent some embodiments of the present invention, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention.
Claims (7)
1. A hardware-in-the-loop test bench based on MATLAB/Simulink system simulation is characterized by comprising MATLAB/Simulink system simulation software, a communication board card, a signal simulation board card, a simulation battery pack subsystem, a sensor board card and a main controller;
the MATLAB/Simulink system simulation software is used for building an external simulation model of a control unit of the tested battery management system and simulating the actual operation environment of the tested battery management system;
the simulation battery pack subsystem is configured to send the generated simulation signal to the battery management system and the sensor board card;
the sensor board card is configured to detect the simulation signal;
the communication board card is configured to acquire a detection result of the battery management system on the simulation signal;
the signal simulation board card is configured to simulate a finished automobile signal;
the main controller is configured to control the simulated battery pack subsystem to generate a simulation signal of the battery pack according to the actual operation condition of the battery pack managed by the battery management system; and the battery management system is also used for comparing the detection result of the battery management system on the simulation signal with the detection result of the sensor board card on the simulation signal to obtain the precision of the battery management system on detecting the battery parameters.
2. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench according to claim 1, wherein the main controller is a PXI main controller based on a PXI bus, and the PXI main controller is respectively connected with the communication board card, the whole vehicle signal simulation board card, the module battery pack subsystem and the sensor board card through the PXI bus.
3. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench according to claim 1 or 2, characterized in that the test bench simulates various parameters of a battery pack, which is a test object of the battery management system, first, generates the simulation signal, then sends the simulation signal to the battery management system, tests the battery management system by using the simulation signal, then compares the BMS result with the self-test result, calculates the test accuracy of the battery management system with the self-test result as a reference, and outputs the test result.
4. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench according to claim 3, further comprising a fault injection board card connected to the main controller, wherein if the test accuracy of the battery management system meets the requirement, fault injection is performed on the battery management system, and whether the battery management system can detect a fault or generate a corresponding protection action is determined.
5. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench of claim 4, wherein the fault injection comprises: and injecting faults into each signal input channel of the BMS, if the BMS cannot detect the injected faults or cannot generate corresponding protection actions, recording the protection failure errors, finally judging whether the fault injection is not carried out on any signal input channel, and if so, starting the fault injection detection process of the next signal input channel to finish the fault injection detection of the single step.
6. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench of claim 5, wherein a fault injection detection error needs to be added to determine whether the BMS response to the fault is qualified when all the faulty items in the process steps are summarized.
7. The MATLAB/Simulink system simulation-based hardware-in-the-loop test bench according to claim 1, further comprising a human-computer interaction terminal connected to the main controller, for displaying the comparison result and the judgment result of the main controller, and accepting a command to configure the test step of the test condition in the test case.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211012359.1A CN115494740A (en) | 2022-08-23 | 2022-08-23 | Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211012359.1A CN115494740A (en) | 2022-08-23 | 2022-08-23 | Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115494740A true CN115494740A (en) | 2022-12-20 |
Family
ID=84466934
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211012359.1A Pending CN115494740A (en) | 2022-08-23 | 2022-08-23 | Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115494740A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118051441A (en) * | 2024-04-03 | 2024-05-17 | 百思科新能源技术(青岛)有限公司 | Battery management unit software architecture and automatic code generation method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103543640A (en) * | 2013-09-30 | 2014-01-29 | 广东电网公司电力科学研究院 | Test system for battery management system |
-
2022
- 2022-08-23 CN CN202211012359.1A patent/CN115494740A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103543640A (en) * | 2013-09-30 | 2014-01-29 | 广东电网公司电力科学研究院 | Test system for battery management system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118051441A (en) * | 2024-04-03 | 2024-05-17 | 百思科新能源技术(青岛)有限公司 | Battery management unit software architecture and automatic code generation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103543640B (en) | The test macro of battery management system | |
CN203673055U (en) | Battery management system hardware-in-loop test platform rack | |
CN103323775B (en) | Balanced monitoring and test system used for battery module | |
CN103568863B (en) | Real-time monitoring and diagnosing system and method for battery management system of electric vehicle | |
CN111007840A (en) | Whole vehicle controller hardware-in-loop test platform and method | |
CN204480040U (en) | The test macro of fuel-cell vehicle entire car controller | |
CN102081145B (en) | Functional verification platform of battery management system | |
CN104298224A (en) | Automatic vehicle-mounted electronic control unit CAN bus communication testing device and system | |
CN103728968A (en) | Automatic test system for CAN network and ECU functions | |
CN106443545B (en) | Fault diagnosis and positioning system and method for battery management system of pure electric vehicle | |
CN107976630A (en) | A kind of battery assembly system intelligent measurement platform | |
CN110609491B (en) | Semi-physical simulation accident identification method and system for whole electric vehicle controller | |
CN111221326A (en) | System and method for realizing hardware-in-loop test control based on Simulink real-time simulation system | |
CN103558849A (en) | Method for achieving control strategy adjustment and network testing of blade electric vehicle | |
CN115494740A (en) | Hardware-in-the-loop test bench based on MATLAB/Simulink system simulation | |
CN203616466U (en) | Comprehensive tester and test equipment of battery management system | |
CN113534765A (en) | Real vehicle network test system | |
CN111273133B (en) | Insulation detection circuit diagnosis function test system and diagnosis method thereof | |
CN112611580A (en) | New energy automobile BMS hardware is at ring test platform | |
CN111324106A (en) | Vehicle control unit and battery management system combined hardware-in-the-loop test bench | |
CN106093664A (en) | Electric car conduction charging measurement system | |
CN114137346B (en) | Energy storage power station battery management system testing device based on number simulation real platform | |
CN104422891A (en) | Offline detection platform for battery assembly | |
Tavernini et al. | Real-time low-level simulation of hybrid vehicle systems for hardware-in-the-loop applications | |
CN111290304A (en) | Charging system evidence data acquisition platform between electric automobile and charging pile |
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 |