IMU (Inertial Measurement Unit) function test method and system of regional controller

By using an IMU simulator and software-based test cases to replace the traditional physical test bench, high-precision and low-cost testing of the IMU function of the area controller is achieved, solving the problems of high testing costs and insufficient flexibility, and improving the automation and adaptability of the testing system.

CN121596860APending Publication Date: 2026-03-03STARRY SKY PLAN (SHANGHAI) AUTOMOBILE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512033574.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In existing technologies, the functional testing of the regional controller IMU relies on physical test benches, which results in high testing costs, large space requirements, and insufficient repeatability and consistency of test results, making it difficult to meet the testing needs of high frequency and multiple scenarios.

Method used

An IMU simulator is used in conjunction with software-based test cases and protocol communication to replace the physical test bench. High-precision testing of IMU functions is achieved by generating test cases, converting data packets, and implementing communication interfaces.

Benefits of technology

It enables high-precision, low-cost IMU functional testing, improves testing flexibility and automation, reduces the need for manual intervention, and adapts to reliability verification under complex operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121596860A_ABST
    Figure CN121596860A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an IMU (Inertial Measurement Unit) function test method and system for a regional controller, and the method comprises the steps: generating a test case based on a test demand, and the test case comprises simulation parameters of acceleration and / or angular velocity; according to a preset communication protocol, analog parameters in the test case are converted into a protocol data packet, and the protocol data packet is sent to the tested area controller; and according to a control result of the tested area controller on the protocol data packet, determining an IMU function test result of the tested area controller. A physical rack is replaced by the IMU simulator, and software test cases and protocol communication are combined, so that high-precision and low-cost testing of the IMU function of the regional controller is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated testing, and in particular to a method and system for testing the IMU function of a region controller. Background Technology

[0002] As automotive electronic and electrical architecture evolves towards a "centralized computing + regional control" approach, regional controllers, as core devices integrating multiple functional modules, are widely used in modern intelligent vehicles. Regional controllers typically integrate sensors such as IMUs (Inertial Measurement Units) to collect key data such as vehicle attitude, acceleration, and angular velocity, providing fundamental support for functions like autonomous driving, vehicle stability control, and navigation. During the R&D and mass production phases, the functionality of the IMUs within the regional controllers requires high-precision testing to ensure their reliability under complex operating conditions.

[0003] Currently, IMU functional testing methods rely on dedicated physical test benches, which use mechanical devices to simulate the multi-axis acceleration and angular velocity changes of the IMU. The testing process requires a large amount of laboratory space, and the manufacturing cost of the test bench is directly related to the size and weight of the controller. Summary of the Invention

[0004] This application provides a method and system for testing the IMU function of a regional controller, in order to improve testing flexibility and testing accuracy.

[0005] In a first aspect, embodiments of this application provide a method for testing the IMU function of a region controller, the method comprising:

[0006] Based on the testing requirements, test cases are generated, which include simulated parameters of acceleration and / or angular velocity.

[0007] According to the preset communication protocol, the simulated parameters in the test cases are converted into protocol data packets and sent to the controller of the area under test;

[0008] The IMU function test results of the area controller under test are determined based on the control results of the protocol data packets by the area controller under test.

[0009] In one possible implementation, according to a preset communication protocol, the simulated parameters in the test cases are converted into protocol data packets and sent to the controller of the area under test, including:

[0010] Analyze the simulated acceleration and / or angular velocity parameters in the test cases;

[0011] According to the format requirements of the preset communication protocol, the parsed simulation parameters are encapsulated into data frames;

[0012] Data frames are sent to the controller of the area under test through the communication interface.

[0013] In one possible implementation, the parsed analog parameters are encapsulated into data frames according to the format requirements of a preset communication protocol, including:

[0014] Adjust the data frame sending frequency according to the dynamic load parameters in the test cases;

[0015] Simulated parameters for burst mode or gradual mode are inserted into the data frame. Burst mode involves continuous high-frequency transmission, while gradual mode involves gradual changes in data values.

[0016] In one possible implementation, the method further includes:

[0017] Insert an exception data field into the data frame. The exception data field includes an illegal address, an error check code, or an undefined instruction.

[0018] The abnormal data frame containing the abnormal data field is sent to the controller of the area under test through the communication interface.

[0019] In one possible implementation, the test cases include multiple test sequences, and the test cases also include response times; the method further includes:

[0020] After sending the last data frame corresponding to the test sequence to the controller of the area under test through the communication interface, wait for the response time and then send the data frame corresponding to the next test sequence.

[0021] In one possible implementation, the IMU functional test results of the area controller under test are determined based on the control results of the area controller under test on the protocol data packets, including:

[0022] Acquire the control signal output by the controller of the area under test after processing the protocol data packet;

[0023] The control signals are compared item by item with the expected results in the test cases to obtain the comparison results.

[0024] A test report is generated based on the comparison results. The test report includes the test pass / fail status and anomaly analysis.

[0025] In one possible implementation, the method further includes:

[0026] Control the power-on and power-off operations of the programmable power supply to provide power to the controller of the area under test.

[0027] Secondly, embodiments of this application provide an IMU function testing system for a region controller, comprising:

[0028] The test host is used to generate test cases based on test requirements;

[0029] The IMU simulator is used to convert the simulation parameters in the test cases into protocol data packets according to the preset communication protocol and send them to the controller of the area under test.

[0030] The test host is also used to receive the control results of the LAN controller under test on the protocol data packets, and to determine the IMU function test results of the LAN controller under test based on the control results of the LAN controller under test on the protocol data packets.

[0031] In one possible implementation, the IMU simulator includes:

[0032] A transceiver is used to receive test cases sent by the test host.

[0033] The microcontroller unit is used to parse the acceleration and / or angular velocity simulation parameters in the test cases, and encapsulate the parsed simulation parameters into data frames according to the format requirements of the preset communication protocol.

[0034] The communication interface connects to the microcontroller unit and is used to send the data frames generated by the microcontroller unit to the controller of the area under test.

[0035] In one possible implementation, the system further includes:

[0036] The programmable power supply has its control terminal connected to the test host and its output terminal connected to the controller of the area under test. It is used to supply power to the controller of the area under test according to the control of the test host.

[0037] This application provides a method and system for testing the IMU function of a regional controller. The method includes: generating test cases based on test requirements, the test cases including simulated parameters of acceleration and / or angular velocity; converting the simulated parameters in the test cases into protocol data packets according to a preset communication protocol and sending them to the regional controller under test; and determining the IMU function test result of the regional controller under test based on the control result of the regional controller under test on the protocol data packets. By replacing the physical test bench with an IMU simulator and combining software-based test cases with protocol communication, high-precision and low-cost testing of the regional controller's IMU function is achieved. Attached Figure Description

[0038] 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.

[0039] Figure 1 Schematic diagram of the IMU functional test system for the area controller provided in this application Figure 1 ;

[0040] Figure 2A flowchart illustrating the IMU function testing method for the area controller provided in this application. Figure 1 ;

[0041] Figure 3 A flowchart illustrating the IMU function testing method for the area controller provided in this application. Figure 2 ;

[0042] Figure 4 Schematic diagram of the IMU functional test system for the area controller provided in this application Figure 2 ;

[0043] Figure 5 This is a schematic diagram of a test process provided for this application.

[0044] 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

[0045] 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.

[0046] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0047] As automotive electronic and electrical architecture evolves towards a "centralized computing + regional control" approach, regional controllers, as core devices integrating multiple functional modules, are widely used in modern intelligent vehicles. Regional controllers typically integrate sensors such as IMUs (Inertial Measurement Units) to collect key data such as vehicle attitude, acceleration, and angular velocity, providing fundamental support for functions like autonomous driving, vehicle stability control, and navigation. During the R&D and mass production phases, the functionality of the IMUs within the regional controllers requires high-precision testing to ensure their reliability under complex operating conditions.

[0048] Currently, testing the IMU function within a regional controller typically employs a physical test bench simulation method. The process involves mounting the regional controller and IMU as a single unit on a test bench. The bench's mechanical movements simulate changes in acceleration and angular velocity along the X / Y / Z axes. The regional controller acquires IMU data and outputs control results. Test personnel verify the functionality by comparing the actual output with the expected values. This approach relies on complex mechanical structures and high-precision servo control systems. The test bench is expensive to manufacture, bulky, and occupies significant laboratory space. Furthermore, the motion control of the physical bench exhibits lag, making it difficult to achieve microsecond-level real-time data response. The simulation accuracy of multi-axis combined motion is limited by mechanical transmission errors, resulting in insufficient repeatability and consistency of test results. In addition, frequent adjustments to bench parameters are required during testing, leading to low automation, high manual intervention costs, and difficulty in meeting the demands of high-frequency, multi-scenario testing.

[0049] To address the aforementioned technical issues, this application provides a method for testing the IMU functionality of a region controller, applicable to IMU functional testing scenarios in automotive electronic and electrical architectures. As the core control unit of a smart car, the region controller needs to integrate IMU sensors to collect vehicle attitude data. During R&D, mass production testing, and after-sales maintenance phases, it is necessary to verify the functional correctness of the IMU under X / Y / Z axis acceleration, angular velocity, and combined operating conditions. Traditional testing relies on physical benches to simulate mechanical motion, but due to the complexity of the mechanical structure, it is difficult to meet the high-dynamic, high-frequency testing requirements. This application replaces the bench with an IMU simulator, combined with automated test case execution on a test PC, enabling direct IMU functional verification in a laboratory environment, adapting to the testing needs throughout the entire development lifecycle of the region controller.

[0050] In one embodiment, such as Figure 1 As shown, a functional testing system for an IMU of a regional controller is provided. The system includes:

[0051] Test host 101 is used to generate test cases based on test requirements;

[0052] The IMU simulator 102 is used to convert the simulation parameters in the test cases into protocol data packets according to the preset communication protocol and send them to the controller of the area under test.

[0053] The test host 101 is also used to receive the control results of the protocol data packets by the area controller under test, and to determine the IMU function test results of the area controller under test based on the control results of the protocol data packets.

[0054] The test host 101 refers to a computing device, such as a PC or server, used to run test software and generate test cases.

[0055] The IMU simulator 102 is an electronic device that simulates the output characteristics of an inertial measurement unit through a program. It includes a microcontroller unit (MCU) and a communication interface. Specifically, the IMU simulator 102 includes: a transceiver for receiving test cases sent by the test host 101; a microcontroller unit for parsing the acceleration and / or angular velocity simulation parameters in the test cases and encapsulating the parsed simulation parameters into data frames according to the format requirements of a preset communication protocol; and a communication interface connected to the microcontroller unit for sending the data frames generated by the MCU to the area under test controller. The communication interface uses a preset communication protocol to achieve communication with the area under test controller, such as SPI or I2C protocols.

[0056] The aforementioned test system is used to execute the IMU function test method for the area controller, thereby testing the IMU function of the area controller under test, such as... Figure 2 As shown, the method includes:

[0057] Step 201: Based on the test requirements, generate test cases, which include simulated parameters of acceleration and / or angular velocity;

[0058] Step 202: According to the preset communication protocol, the simulated parameters in the test case are converted into protocol data packets and sent to the controller of the area under test;

[0059] Step 203: Determine the IMU function test result of the area controller under test based on the control result of the area controller under test on the protocol data packets.

[0060] The area controller under test refers to the automotive electronic control unit with integrated IMU function, which is used to collect sensor data and execute control logic.

[0061] The preset communication protocol refers to the data transmission rules agreed upon between the IMU simulator 102 and the controller of the area under test, such as SPI or I2C protocols. Protocol data packets are data units that conform to the preset communication protocol format and contain encoded information of analog values ​​such as acceleration and angular velocity.

[0062] A test case is a set of predefined test inputs and expected outputs used to verify a specific function. After the test host 101 runs the test software, it generates test cases containing simulated acceleration and / or angular velocity parameters according to the test requirements, defining the simulated data, duration, and delay parameters for each test sequence. For example, a test case might be designed to verify the typical, minimum, maximum, and outlier values ​​of X-axis acceleration. The test host 101 decomposes the test case into four test sequences T1-T4, each containing corresponding simulated data. For instance, the typical X-axis acceleration in T1 is 10ms, lasting 500ms.

[0063] The test host 101 sends test cases to the IMU simulator 102 via a communication interface (such as CAN). The MCU in the IMU simulator 102 parses the test cases and converts the simulation parameters into protocol data packets that conform to the protocol format according to a preset communication protocol (such as SPI, I2C).

[0064] Protocol data packets are transmitted to the area controller under test (UDT) via the communication interface of IMU simulator 102. After receiving the data packets, the UDT processes the IMU input data based on its internal logic and outputs the corresponding control results. Test host 101 determines the IMU function test results of the UDT by comparing the expected output with the control results output by the UDT.

[0065] In one embodiment, the IMU function test result of the area controller under test is determined based on the control result of the area controller under test on the protocol data packets, including:

[0066] Acquire the control signal output by the controller of the area under test after processing the protocol data packet;

[0067] The control signals are compared item by item with the expected results in the test cases to obtain the comparison results.

[0068] A test report is generated based on the comparison results. The test report includes the test pass / fail status and anomaly analysis.

[0069] Among them, item-by-item comparison refers to verifying each parameter of the control signal (such as acceleration value and response time) against the expected result one by one.

[0070] The test host 101 receives control signals output by the controller of the area under test in real time via the CAN communication interface and compares them item by item with the expected results defined in the test cases, such as acceleration feedback values ​​and response times. After the comparison is completed, the test host 101 automatically generates a test report, marking the test pass / fail status and anomaly analysis, such as deviation values ​​and error types. This process, through automated data comparison and report generation, significantly reduces the need for manual intervention and improves testing efficiency.

[0071] The above-mentioned IMU function test process of the area controller under test realizes the virtual test of IMU function through software-based instructions and protocol communication, without relying on the mechanical movement of the physical test bench, thereby completing the verification of the area controller's IMU function.

[0072] In one embodiment, the testing system further includes:

[0073] The programmable power supply has its control terminal connected to the test host 101 and its output terminal connected to the controller of the area under test. It is used to supply power to the controller of the area under test according to the control of the test host 101.

[0074] Among them, a programmable power supply refers to a power supply device whose voltage and current output can be controlled by software, such as a programmable power supply controlled by a USB interface.

[0075] Power-on / off operation refers to simulating the start-up and shutdown process of a controller by controlling the on / off state of the power supply.

[0076] The programmable power supply provides stable power to the area controller under test (ADT) via a USB interface and performs power-on and power-off operations according to test case requirements, such as simulating power fluctuations. The test host 101 acquires the output data of the ADT in real time via CAN communication, compares it with the expected results, and generates a test report. This process, through the coordination of power control and data acquisition, achieves testing and verification of the controller's entire lifecycle (startup, operation, shutdown).

[0077] A complete testing system was constructed by controlling the power supply of a programmable power supply and acquiring real-time data from the test host 101. This technology solves the shortcomings of existing tests that cannot cover power fluctuations and dynamic data changes, ensuring the stability of the controller under complex operating conditions (such as power supply abnormalities and data abnormalities), while improving testing efficiency and accuracy through automated data comparison.

[0078] The testing system provided in this embodiment consists of three parts working collaboratively: a test host 101, a programmable power supply, and an IMU simulator 102. The test host 101 first writes test cases and sends them to the IMU simulator 102. The MCU of the IMU simulator 102 sends simulated data to the area controller via the SPI / I2C protocol. Simultaneously, the programmable power supply powers the area controller and controls its power-on and power-off via a USB interface. During the test, the area controller receives the IMU simulated data, executes its internal logic processing, and outputs control results. The test host 101 collects the output data of the area controller in real time via CAN communication and compares it with the expected results to verify the correctness of the function. The entire process requires no physical test bench; virtual testing of the IMU function is achieved through software-based instructions and protocol communication, thereby significantly reducing testing costs and improving real-time performance and automation.

[0079] In one embodiment, such as Figure 3 As shown, according to the preset communication protocol, the simulated parameters in the test cases are converted into protocol data packets and sent to the controller of the area under test, including:

[0080] Step 301: Analyze the acceleration and / or angular velocity simulation parameters in the test cases;

[0081] Step 302: According to the format requirements of the preset communication protocol, the parsed simulation parameters are encapsulated into data frames;

[0082] Step 303: Send the data frame to the controller of the area under test through the communication interface.

[0083] A data frame is a data unit that conforms to a communication protocol format and includes an address field, a data field, and a check field. For example, an SPI protocol data frame includes a start bit, data bits, and a stop bit. The communication interface is the physical connection interface between the MCU and the area under test controller, such as an SPI bus or an I2C bus.

[0084] After receiving the test cases sent by the test host 101, the MCU first parses the acceleration and / or angular velocity simulation parameters and encapsulates them into data frames containing address, data, and check fields according to the format requirements of a preset communication protocol (such as SPI). After encapsulation, the MCU sends the data frame byte by byte to the area under test (AUT) controller via a communication interface (such as the SPI bus). This process standardizes the data format through programmatic control, ensuring that the AUT controller can correctly parse the input data and execute the corresponding functional processing.

[0085] The method provided in the above embodiments achieves efficient and reliable communication between the IMU simulator 102 and the area controller under test through programmed data encapsulation of the MCU and standardized transmission of the communication interface. This technique solves the data transmission delay problem caused by mechanical errors in traditional physical test benches. Simultaneously, data integrity is improved through data frame verification mechanisms, such as CRC checksums, ensuring the accuracy of test results. Furthermore, the standardized communication interface design allows the IMU simulator 102 to be adapted to various area controllers, improving the versatility of the test system.

[0086] In one embodiment, the parsed simulation parameters are encapsulated into data frames according to the format requirements of a preset communication protocol, including:

[0087] Adjust the data frame sending frequency according to the dynamic load parameters in the test cases;

[0088] Simulated parameters for burst mode or gradual mode are inserted into the data frame. Burst mode involves continuous high-frequency transmission, while gradual mode involves gradual changes in data values.

[0089] Burst mode refers to a mode in which data frames are continuously transmitted at high frequency, such as sending a data frame every 10ms. Gradual mode refers to a mode in which the data value changes gradually, such as the acceleration value increasing linearly from 0.1g to 1.0g.

[0090] Burst mode and gradual mode involve dynamic load parameters. Dynamic load adjustment is introduced in the IMU simulator 102, where the MCU adjusts the transmission frequency and content of data frames based on the dynamic load parameters in the test cases. For example, in burst mode, the MCU continuously transmits data frames at a high frequency to simulate the response of the area controller under test (ADT) under sudden vibration; in gradual mode, the MCU gradually adjusts the acceleration values ​​in the data frames to verify the ADT's processing capability under dynamic operating conditions. This process achieves dynamic adjustment of load parameters through programmed control, covering the response test of the ADT under extreme operating conditions, such as sudden vibration and high-frequency data input.

[0091] The method provided in the above embodiments verifies the robustness of the area controller under extreme operating conditions through dynamic load adjustment. This technique solves the problem that existing tests cannot cover dynamic loads, ensuring the stability of the controller in complex environments. For example, in sudden high acceleration tests, the controller needs to quickly process high-frequency data and output control results, thereby exposing potential processing delays or logic errors.

[0092] In one embodiment, the method further includes:

[0093] Insert an exception data field into the data frame. The exception data field includes an illegal address, an error check code, or an undefined instruction.

[0094] The abnormal data frame containing the abnormal data field is sent to the controller of the area under test through the communication interface.

[0095] In this context, "illegal address" refers to an address field that exceeds the scope defined by the communication protocol, such as a slave device address that does not exist in the I2C protocol. "Error check code" refers to a check field that does not match the data field, such as a CRC checksum calculation error. "Undefined instruction" refers to an instruction field whose function is not specified in the communication protocol, such as an undefined register write instruction in the SPI protocol.

[0096] An abnormal data injection module is integrated into the IMU simulator 102 to actively generate data packets that do not conform to the protocol specifications, such as data bit errors, timing anomalies, and illegal instructions, in order to verify the fault tolerance mechanism of the area controller under test.

[0097] Specifically, after the normal data frame is sent, the MCU inserts abnormal data fields, such as illegal addresses and error check codes, into subsequent data frames, generating abnormal data frames. These abnormal data frames are sent to the area controller under test (ADT) via the communication interface, simulating data anomalies in a real-world scenario. Upon receiving the abnormal data frame, the ADT needs to determine, based on its internal logic, whether to enter fault-tolerant mode or trigger a fault diagnosis process.

[0098] The method provided in the above embodiments verifies the fault tolerance mechanism of the area controller when data is abnormal by actively injecting abnormal data fields, and can comprehensively evaluate the fault tolerance capability of the area controller when IMU data is abnormal. This technical approach solves the deficiency of existing tests that cannot cover abnormal input scenarios, ensuring that the area controller can take effective countermeasures (such as retry mechanisms and default value output) when communication failures or data errors occur, thereby improving the reliability of the system in complex environments.

[0099] In one embodiment, the test cases include multiple test sequences, and the test cases also include response times; the method further includes:

[0100] After sending the last data frame corresponding to the test sequence to the controller of the area under test through the communication interface, wait for the response time and then send the data frame corresponding to the next test sequence.

[0101] Response time refers to the time required for the area controller to process IMU data and output results.

[0102] After the test software in the test host 101 starts, it can automatically run each test sequence in the test case and send the data corresponding to the test sequence to the IMU simulator 102 via CAN communication. After receiving the test sequence data, the IMU simulator 102 sends the data to the controller of the area under test through the MCU according to the SPI / I2C protocol, and executes the subsequent test sequence after waiting for the response time.

[0103] If the test case includes test sequences T1 and T2, and test sequence T1 requires simulating typical values ​​of X-axis acceleration, the MCU of the IMU simulator 102 will generate data packets conforming to the SPI protocol (e.g., 0x01 0x0A 0x00) and send them to the area controller under test (UDT) via the communication interface. After the UDT processes the data, the IMU simulator 102 waits for a preset response time, such as 10ms, before entering test sequence T2.

[0104] The method provided in the above embodiments can accurately simulate the real-time data output of the IMU by controlling the data transmission cycle and response time through the program, thereby improving the test accuracy and real-time performance.

[0105] Below, a specific IMU functional testing method and system are presented; among them, such as Figure 4 As shown, the testing system mainly consists of three parts:

[0106] Part 1: The test PC serves as the test host, running the test content. It communicates with the area controller and IMU simulator via a CAN card, controlling the simulator to execute the test content. The USB-controlled programmable power supply powers the area controller and performs power-on / off functional tests.

[0107] Part 2, the programmable power supply, is connected to the PMIC (Power Management IC) of the area controller to supply power to the area controller.

[0108] Part 3, the IMU simulator, consists of an MCU and a transceiver. The transceiver receives commands from the test PC, while the MCU simulates a real IMU, communicating with the area controller according to the SPI / I2C protocol and outputting corresponding data according to the commands given by the test PC. The IMU simulator and the area controller are connected via the IMU interface, and the power supply is provided by the area controller.

[0109] The testing methods include:

[0110] (1) Test case writing and execution

[0111] Write test cases in the testing software on the test PC. These cases mainly include the data to be simulated for each test sequence, the test duration, and intermediate delay times. The table below shows an example of a test case.

[0112] Table 1 Test Cases

[0113]

[0114] Once started, the testing software can automatically run each test sequence in the test cases and send the test data to the IMU simulator via CAN communication.

[0115] (2) Simulation of test data

[0116] The IMU simulator receives test data from the test PC, buffers it in memory, and then sends the data to the area controller via SPI / I2C according to the IMU's protocol, following the transmission cycle and data content in the test sequence. After waiting for a response, it executes the subsequent test sequence.

[0117] (3) Test data analysis

[0118] After receiving the IMU data, the area controller processes it according to its own logic and then outputs the control result. The test PC acquires the control result output by the area controller, compares it with the expected result, and determines the IMU function test result.

[0119] In the IMU functional testing of the area controller provided in this application embodiment, acceleration testing, angular velocity testing, and calibration testing can be performed. In one embodiment, the entire process of testing acceleration, angular velocity, and calibration can be as follows: Figure 5 As shown.

[0120] The testing methods and systems provided in the above embodiments do not rely on physical test benches and can be used to complete tests in any laboratory environment, adapting to various testing scenarios. Eliminating the physical test bench significantly reduces the size and manufacturing cost of the testing equipment, improving laboratory space utilization. Data packets are generated by the MCU strictly following the SPI / I2C protocol, avoiding mechanical errors and ensuring the real-time performance and consistency of data output. Test cases are executed automatically by software, reducing manual intervention and supporting high-frequency, batch testing. Furthermore, this solution can be extended to virtual testing of other sensors (such as gyroscopes and barometers).

[0121] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0122] Based on the same inventive concept, this application also provides an IMU function testing device for a regional controller. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more IMU function testing device embodiments for regional controllers provided below can be found in the limitations of the IMU function testing method for regional controllers above, and will not be repeated here.

[0123] In one embodiment, the IMU functional testing device for the area controller includes a generation module, a parsing module, and a communication module, wherein:

[0124] The generation module is used to generate test cases based on test requirements. The test cases include simulated parameters of acceleration and / or angular velocity.

[0125] The parsing module is used to convert the simulated parameters in the test cases into protocol data packets according to the preset communication protocol and send them to the controller of the area under test.

[0126] The communication module is used to determine the IMU function test results of the area controller under test based on the control results of the protocol data packets by the area controller under test.

[0127] Each module in the aforementioned IMU function test device for the area controller can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0128] This application provides a computer device, including at least one processor and a memory. Optionally, the device further includes a communication component. The processor, memory, and communication component are connected via a bus.

[0129] In a specific implementation, at least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the above-described method.

[0130] The specific implementation process of the processor can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.

[0131] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0132] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0133] 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.

[0134] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0135] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0136] The aforementioned readable 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 readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0137] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0138] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components 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 units, and may be electrical, mechanical, or other forms.

[0139] The units described as separate components may or may not be physically separate. The components shown as units 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0141] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] 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.

[0143] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for testing the IMU function of a regional controller, characterized in that, The method includes: Based on the testing requirements, test cases are generated, which include simulated parameters of acceleration and / or angular velocity. According to the preset communication protocol, the simulated parameters in the test cases are converted into protocol data packets and sent to the controller of the area under test; The IMU function test result of the area controller under test is determined based on the control result of the protocol data packet by the area controller under test.

2. The method according to claim 1, characterized in that, The step of converting the simulated parameters in the test cases into protocol data packets according to a preset communication protocol and sending them to the controller of the area under test includes: Analyze the acceleration and / or angular velocity simulation parameters in the test cases; According to the format requirements of the preset communication protocol, the parsed simulation parameters are encapsulated into data frames; The data frame is sent to the controller of the area under test through the communication interface.

3. The method according to claim 2, characterized in that, The step of encapsulating the parsed simulation parameters into data frames according to the format requirements of the preset communication protocol includes: Adjust the data frame transmission frequency according to the dynamic load parameters in the test case; Simulated parameters for burst mode or gradual mode are inserted into the data frame. The burst mode is high-frequency continuous transmission, and the gradual mode is a gradual change in data value.

4. The method according to claim 3, characterized in that, The method further includes: An abnormal data field is inserted into the data frame. The abnormal data field includes an illegal address, an error check code, or an undefined instruction. The abnormal data frame containing the abnormal data field is sent to the tested area controller through the communication interface.

5. The method according to claim 2, characterized in that, The test cases include multiple test sequences, and the test cases also include response times; the method further includes: After sending the last data frame corresponding to the test sequence to the controller of the area under test through the communication interface, wait for the response time and then send the next data frame corresponding to the test sequence.

6. The method according to claim 1, characterized in that, The step of determining the IMU function test result of the area controller under test based on the control result of the protocol data packet by the area controller under test includes: Obtain the control signal output by the controller of the area under test after processing the protocol data packet; The control signals are compared item by item with the expected results in the test cases to obtain the comparison results; A test report is generated based on the comparison results. The test report includes the test pass / fail status and anomaly analysis.

7. The method according to claim 1, characterized in that, The method further includes: The power-on and power-off operations of the programmable power supply are controlled to supply power to the controller of the area under test.

8. A functional testing system for an IMU of a regional controller, characterized in that, include: The test host is used to generate test cases based on test requirements; An IMU simulator is used to convert the simulation parameters in the test cases into protocol data packets according to a preset communication protocol and send them to the controller of the area under test. The test host is also used to receive the control results of the area controller under test on the protocol data packets, and determine the IMU function test results of the area controller under test based on the control results of the area controller under test on the protocol data packets.

9. The system according to claim 8, characterized in that, The IMU simulator includes: A transceiver is used to receive test cases sent by the test host. The microcontroller unit is used to parse the acceleration and / or angular velocity simulation parameters in the test cases, and encapsulate the parsed simulation parameters into data frames according to the format requirements of the preset communication protocol. A communication interface, connected to the microcontroller unit, is used to send the data frames generated by the microcontroller unit to the controller of the area under test.

10. The system according to claim 8, characterized in that, The system also includes: A programmable power supply, the control terminal of which is connected to the test host and the output terminal of which is connected to the controller of the area under test, is used to supply power to the controller of the area under test according to the control of the test host.