Methods, apparatus and fault injection systems for testing electronic control units

By combining a DC power supply, a relay module, and a fault injection control module, the system automatically controls the fault injection of the electronic control unit, solving the problems of contact jitter and inaccurate time control caused by manual operation, and ensuring that the test results meet the ISO16750-2 standard.

CN116256578BActive Publication Date: 2026-05-26WEICHAI POWER CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEICHAI POWER CO LTD
Filing Date
2023-02-03
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the existing technology, fault injection during the testing of electronic control units requires manual operation, which leads to wire contact jitter and the inability to accurately control the fault injection time, affecting the test results and failing to meet the ISO16750-2 standard.

Method used

The system employs a combination of DC power supply, relay module, and fault injection control module. By controlling the connection relationship between the moving contact, normally closed contact, and normally open contact of the relay, the system automates fault injection and ensures that the electronic control unit meets electrical load standards under different fault conditions.

Benefits of technology

The system automates the injection of faults into the electronic control unit, ensuring the accuracy and compliance of test results and meeting the requirements of the ISO16750-2 standard.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116256578B_ABST
    Figure CN116256578B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and fault injection system for testing electronic control units (ECUs). The system injects faults into the ECU to determine whether the ECU meets electrical load standards under different fault conditions. The system includes a DC power supply, a relay module, and a fault injection control module. The DC power supply powers the relay module and the fault injection control module. The relay module, the DC power supply, and the fault injection control module are connected in series. The ECU, the DC power supply, the relay module, and the load are connected in series. The fault injection control module alters the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, thus subjecting the ECU to different fault states. This automates the fault injection process during ECU testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of testing electronic control units, and more particularly to a method, apparatus and fault injection system for testing electronic control units. Background Technology

[0002] In existing technology, the high and low sides of the electronic control unit (ECU) under test are led out with wires and connected to a signal or load. An open-circuit test is completed by manually disconnecting the wires from the signal or load; a short-circuit test is completed by manually connecting the high or low side to the positive or ground terminal of the power supply for one minute. However, in existing technology, during the manual fault injection process, the contact between the wires is subject to jitter, posing a risk of multiple brief fault injections, which affects the test results. Furthermore, the duration of manual fault injection cannot be precisely controlled, making it impossible to perform a one-minute fault injection as per the ISO 16750-2 test standard, thus impacting the test results.

[0003] Therefore, how to automate fault injection during the testing of electronic control units is a current research direction. Summary of the Invention

[0004] This invention provides a method, device, and fault injection system for testing electronic control units, which solves the problem that manual fault injection is required in the testing of electronic control units in the prior art, thus affecting the test results, and automates the fault injection process in the testing of electronic control units.

[0005] This invention provides a fault injection system for testing electronic control units (ECUs). The system injects faults into the ECU to determine whether the ECU meets electrical load standards under different fault conditions. The system includes a DC power supply, a relay module, and a fault injection control module. The DC power supply powers the relay module and the fault injection control module. The relay module, the DC power supply, and the fault injection control module are connected in series. The ECU, the DC power supply, the relay module, and the load are connected in series. The fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, thus subjecting the ECU to different fault states.

[0006] In one embodiment, when the fault injection control module injects a signal less than a preset threshold into each relay in the relay module, the electronic control unit and the load are in a connected state; when the fault injection control module injects a signal greater than or equal to a preset threshold into at least two relays in the relay module within a preset time interval, the electronic control unit is in one of the following fault states: both the high-level output terminal and the low-level output terminal of the electronic control unit's test channel are open-circuited, the high-level output terminal of the electronic control unit's test channel is short-circuited to ground, the low-level output terminal of the electronic control unit's test channel is short-circuited to ground, the high-level output terminal of the electronic control unit's test channel is short-circuited to the power supply, or the low-level output terminal of the electronic control unit's test channel is short-circuited to the power supply.

[0007] In one embodiment, the relay module includes four relays: a first relay, a second relay, a third relay, and a fourth relay. The fault injection control module has four power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, and a fourth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second and third relays. The moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel, and the normally closed contact of the second relay is connected to the low-level input terminal of the load. The moving contact of the third relay is connected to the high-level output terminal of the electronic control unit's test channel, and the normally closed contact of the third relay is connected to the high-level input terminal of the load. At least one of the first and fourth relays has a normally open or normally closed contact connected to a DC power supply. The first power output terminal is connected to one end of the coil of the first relay. The second power output terminal is connected to one end of the coil of the second relay. The third power output terminal is connected to one end of the coil of the third relay. The fourth power output terminal is connected to one end of the coil of the fourth relay.

[0008] In one embodiment, at least one of the first relay and the fourth relay has its normally open or normally closed contact connected to a DC power supply, including: the normally open contact of the first relay being connected to the high-level output terminal of the DC power supply, and the normally closed contact of the first relay being connected to the moving contact of the fourth relay; the normally open contact of the fourth relay being connected to the ground terminal of the DC power supply; or, the normally open contact of the first relay being connected to the ground terminal of the DC power supply, and the normally closed contact of the first relay being connected to the moving contact of the fourth relay; the normally open contact of the fourth relay being connected to the high-level output terminal of the DC power supply.

[0009] In one embodiment, at least one of the first relay and the fourth relay has its normally open or normally closed contact connected to a DC power supply, including: the normally open contact of the first relay is connected to the moving contact of the fourth relay; the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally closed contact of the fourth relay is connected to the high-level output terminal of the DC power supply; or, the normally open contact of the first relay is connected to the moving contact of the fourth relay; the normally closed contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply.

[0010] In one embodiment, the relay module includes five relays: a first relay, a second relay, a third relay, a fourth relay, and a fifth relay. The fault injection control module has five power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, and a fifth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second and third relays. The normally closed contact of the first relay is connected to the moving contact of the fourth relay. The moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel, and the normally closed contact of the second relay is connected to the low-level output terminal of the load. The input terminals are connected; the moving contact of the third relay is connected to the high-level output terminal of the electronic control unit's test channel, and the normally closed contact of the third relay is connected to the high-level input terminal of the load; the normally closed contact of the fourth relay is connected to the moving contact of the fifth relay, and the normally open contacts of the fourth and fifth relays are connected to a DC power supply; the first power supply output terminal is connected to one end of the coil of the first relay; the second power supply output terminal is connected to one end of the coil of the second relay; the third power supply output terminal is connected to one end of the coil of the third relay; the fourth power supply output terminal is connected to one end of the coil of the fourth relay; and the fifth power supply output terminal is connected to one end of the coil of the fifth relay.

[0011] In one embodiment, the normally open contacts of the fourth relay and the fifth relay are connected to a DC power supply, including: the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the high-level output terminal of the DC power supply; or, the normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the ground terminal of the DC power supply.

[0012] In one embodiment, the relay module includes six relays: a first relay, a second relay, a third relay, a fourth relay, a fifth relay, and a sixth relay; the fault injection control module has four power output terminals, including a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, a fifth power output terminal, and a sixth power output terminal; wherein, the moving contact of the first relay is connected to the normally open contacts of the fourth and fifth relays; the normally closed contact of the first relay is connected to the moving contact of the sixth relay; the moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel, and the normally closed contact of the second relay is connected to the low-level input terminal of the load; the normally open contact of the second relay is connected to the... The moving contact of the fifth relay is connected; the moving contact of the third relay is connected to the high-level output terminal of the test channel of the electronic control unit; the normally closed contact of the third relay is connected to the high-level input terminal of the load; the normally open contact of the third relay is connected to the moving contact of the fourth relay; the normally open contacts of the first relay and the sixth relay are connected to a DC power supply; the output terminal of the first power supply is connected to one end of the coil of the first relay; the output terminal of the second power supply is connected to one end of the coil of the second relay; the output terminal of the third power supply is connected to one end of the coil of the third relay; the output terminal of the fourth power supply is connected to one end of the coil of the fourth relay; the output terminal of the fifth power supply is connected to one end of the coil of the fifth relay; and the output terminal of the sixth power supply is connected to one end of the coil of the sixth relay.

[0013] In one embodiment, the normally open contacts of the first relay and the sixth relay are connected to a DC power supply, including: the normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the ground terminal of the DC power supply; or, the normally open contact of the first relay is connected to the ground terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the high-level output terminal of the DC power supply.

[0014] This invention also provides a method for testing an electronic control unit (ECU), the method comprising: the fault injection control module controlling each power output terminal in the fault injection control module to output a signal less than a preset threshold at a preset time interval, thereby connecting the moving contacts and normally closed contacts of each relay in the relay module, so that the ECU is in a connected state with the load; determining whether the first operating state of the ECU under test channel meets the electrical load standard; if the first operating state of the ECU under test channel does not meet the electrical load standard, returning a prompt to repair the ECU; or, if the first operating state of the ECU under test channel meets the electrical load standard, the fault injection control module changing the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at a preset time interval, so that the ECU is in different fault states, and determining the operating state of the ECU under test channel under different faults.

[0015] In one embodiment, the fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, causing the electronic control unit to be in different fault states, and determines the operating state of the electronic control unit's test channel under different faults. This includes: the fault injection control module controlling the corresponding target power output terminal to output a signal greater than or equal to a preset threshold, causing the moving contacts of the relays connected to the target power output terminal to connect to the normally open contacts, thus causing the electronic control unit's test channel to be in different fault states; after the preset time interval, the fault injection control module controls the corresponding target power output terminal to output a signal less than a preset threshold, causing the moving contacts of the relays connected to the target power output terminal to connect to the normally closed contacts, thus restoring the electronic control unit's test channel to normal connection; and determining whether the operating state of the electronic control unit's test channel under different faults meets the electrical load standard. If it is determined that the operating state under different faults does not meet the electrical load standard, the corresponding preset error message is returned.

[0016] The present invention also provides an apparatus for testing an electronic control unit, comprising a fault injection system for testing an electronic control unit as described in any of the preceding claims, or a method for performing testing an electronic control unit as described in any of the preceding claims.

[0017] The present invention provides a method, device, and fault injection system for testing electronic control units. By changing the connection relationship between a relay module and the electronic control unit, the DC power supply, the fault injection control module, and the load, and by combining the fault injection control module to change the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module, the connection relationship between the electronic control unit and the load and the DC power supply is changed, thereby placing the electronic control unit in different fault states, thus automating the fault injection process during the testing of the electronic control unit. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the structure of a relay provided by the present invention;

[0020] Figure 2 This is one of the schematic diagrams of a fault injection system for testing electronic control units provided by the present invention;

[0021] Figure 3 This is a second schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0022] Figure 4 This is the third schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0023] Figure 5 This is the fourth schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0024] Figure 6 This is the fifth schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0025] Figure 7 This is the sixth schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0026] Figure 8 This is the seventh schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0027] Figure 9 This is the eighth schematic diagram of the fault injection system for testing electronic control units provided by the present invention;

[0028] Figure 10 This is a flowchart illustrating the method for testing electronic control units provided by the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0030] To facilitate understanding, the background technology involved in this invention will be introduced first.

[0031] Regarding the testing standard ISO 16750-2, which is the national standard "Environmental Conditions and Tests for Electrical and Electronic Equipment of Road Vehicles," Part 2 classifies electrical loads into functional levels, namely Class A, Class B, Class C, Class D, and Class E. Specifically, the classification of each functional level is as follows:

[0032] Class A: A device or system is capable of performing all of its pre-designed functions during and after the application of a disturbance.

[0033] Class B: The device or system is capable of performing all its pre-designed functions during the applied disturbance. One or more parameters may exceed the specified deviation. All functions automatically return to normal operating range after the disturbance is stopped. Storage functionality should be maintained at Class A level.

[0034] Class C: A device or system that does not perform one or more of its pre-designed functions during the period of disturbance, but automatically returns to normal operation after the disturbance is stopped.

[0035] Class D: A device or system that, during the period of disturbance, does not perform one or more of its pre-designed functions until the disturbance is stopped and is automatically restored to normal operation by a simple “operation or use” reset action.

[0036] Class E: The apparatus or system fails to perform one or more of its intended functions during and after the application of a disturbance, and cannot be restored to normal operation without repair or replacement of the apparatus or system.

[0037] It is understandable that the levels of Class A, Class B, Class C, Class D, and Class E decrease sequentially. In practical applications, if a device or system can achieve a preset functional level after being subjected to the corresponding disturbances according to the preset regulations, it meets the electrical load standard; otherwise, it is considered not to meet the electrical load standard.

[0038] In this invention, the compliance of an electronic control unit (ECU) with electrical load standards can be determined by identifying its functional level under different fault states. For example, the electrical load standard stipulates that a type A ECU must meet Class B functional level requirements when both high-level and low-level output terminals are open. However, in practice, a type A ECU can only meet Class C, Class D, or Class E functional level requirements when both high-level and low-level output terminals are open, indicating that it does not meet the electrical load standard requirements. Conversely, if a type A ECU meets Class A or Class B functional level requirements when both high-level and low-level output terminals are open, it meets the electrical load standard requirements.

[0039] To facilitate understanding, the structure and function of the relays discussed in this article will be explained first.

[0040] Figure 1 A schematic diagram of a relay structure is shown. (For example...) Figure 1 As shown, the relay includes a moving contact 110, a normally closed contact 120, a normally open contact 130, and a coil 140. The normally closed contact 120 can be understood as follows: when the relay is not energized, its contacts are in a closed state (i.e., connected to the moving contact); it only becomes open (i.e., not connected to the moving contact) when the relay is energized. This type of contact is called a "normally closed contact." The normally open contact 130 can be understood as follows: when the relay is not energized, its contacts are in an open state (i.e., not connected to the moving contact); it only becomes closed (i.e., connected to the moving contact) when the relay is energized. The coil 140 is used to receive external current to control the connection between the moving contact 110 and the normally closed and normally open contacts 120 and 130.

[0041] In one embodiment, the present invention provides a fault injection system for testing an electronic control unit (ECU). The system injects faults into the ECU to determine whether the ECU meets electrical load standards under different fault conditions. The system includes a DC power supply, a relay module, and a fault injection control module. The DC power supply powers the relay module and the fault injection control module. The relay module, the DC power supply, and the fault injection control module are connected in series. The ECU, the DC power supply, the relay module, and the load are connected in series. The fault injection control module alters the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, thus subjecting the ECU to different fault states.

[0042] The following is combined Figures 2-10 The present invention describes a method, apparatus, and fault injection system for testing electronic control units.

[0043] Figure 2 This is one of the schematic diagrams of a fault injection system for testing electronic control units provided by the present invention. Figure 2 As shown, the fault injection system for testing electronic control units provided by the present invention includes: a DC power supply 210, a relay module 220, and a fault injection control module 230; wherein, the DC power supply 210 is used to supply power to the relay module 220 and the fault injection control module 230; the relay module 220 includes four relays, which are connected to the electronic control unit (ECU), the DC power supply 210, the fault injection control module 230, and a signal or load; the fault injection control module 230 causes the electronic control unit to be in different fault states by changing the connection relationship between the moving contacts and normally closed and normally open contacts of at least two of the four relays at preset time intervals.

[0044] It is understood that in this invention, the relay includes a moving contact, a normally closed contact, a normally open contact, and a coil. When the relay is not energized, the moving contact is connected to the normally open contact; when the relay is energized, the moving contact is connected to the normally closed contact. Furthermore, since the four relays are connected to the electronic control unit, the DC power supply 210, the fault injection control module 230, and the load, that is, by connecting the moving, normally closed, and normally open contacts of each relay to the corresponding ports of the electronic control unit, the DC power supply 210, the fault injection control module 230, and the load, and by combining this with the fault injection control module 230 changing the connection relationship between the moving contacts and the normally closed and normally open contacts of at least two of the four relays, the connection relationship between the electronic control unit and the load and the DC power supply is changed, thereby placing the electronic control unit in different fault states, thus completing the automatic fault injection process for testing the electronic control unit.

[0045] Based on the aforementioned fault injection system for testing electronic control units, the connection relationships between the relay module and the electronic control unit, the DC power supply, the fault injection control module, and the load are altered. Furthermore, the fault injection control module changes the connection relationships between the moving contacts, normally closed contacts, and normally open contacts of at least two relays in the relay module. This alters the connection relationships between the electronic control unit, the load, and the DC power supply, thereby placing the electronic control unit in different fault states and automating the fault injection process during the testing of the electronic control unit.

[0046] In one embodiment, when the fault injection control module injects a signal less than a preset threshold into each relay in the relay module, the electronic control unit and the load are in a connected state; when the fault injection control module injects a signal greater than or equal to a preset threshold into at least two relays in the relay module within a preset time interval, the electronic control unit is in one of the following fault states: both the high-level output terminal and the low-level output terminal of the electronic control unit's test channel are open-circuited, the high-level output terminal of the electronic control unit's test channel is short-circuited to ground, the low-level output terminal of the electronic control unit's test channel is short-circuited to ground, the high-level output terminal of the electronic control unit's test channel is short-circuited to the power supply, or the low-level output terminal of the electronic control unit's test channel is short-circuited to the power supply.

[0047] Signals with voltage values ​​less than the preset threshold can be understood as signals with voltage values ​​less than the relay's operating voltage. Similarly, signals with voltage values ​​greater than or equal to the preset threshold can be understood as signals with voltage values ​​greater than or equal to the relay's operating voltage.

[0048] Under normal circumstances, when no fault is injected, the electronic control unit should be in a normal connected state with the load. Since the fault injection control module can control the relays to control the connection state between the electronic control unit and the load, when the fault injection control module injects a signal less than a preset threshold into the four relays (i.e., when no fault is injected), the electronic control unit and the load are in a connected state.

[0049] Since the relay module includes at least four relays, and there are multiple connection methods between the DC power supply, the relay module and the fault injection control module, the electronic control unit and the load, the various connection methods will be described below.

[0050] Example 1

[0051] In Embodiment 1, the relay module includes four relays: a first relay, a second relay, a third relay, and a fourth relay. The fault injection control module has four power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, and a fourth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second and third relays. The moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel, and the normally closed contact of the second relay is connected to the low-level input terminal of the load. The moving contact of the third relay is connected to the high-level output terminal of the electronic control unit's test channel, and the normally closed contact of the third relay is connected to the high-level input terminal of the load. At least one normally open or normally closed contact of the first and fourth relays is connected to a DC power supply. The first power output terminal is connected to one end of the coil of the first relay. The second power output terminal is connected to one end of the coil of the second relay. The third power output terminal is connected to one end of the coil of the third relay. The fourth power output terminal is connected to one end of the coil of the fourth relay.

[0052] Example 2

[0053] Specifically, based on Embodiment 1, if the normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, the normally closed contact of the first relay is connected to the moving contact of the fourth relay, and the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, then the connection method of Embodiment 2 is formed.

[0054] For example, such as Figure 2As shown, the relay module 220 includes a first relay 2201, a second relay 2202, a third relay 2203, and a fourth relay 2204; the fault injection control module 230 includes a first power output terminal 2301, a second power output terminal 2302, a third power output terminal 2303, and a fourth power output terminal 2304. The connection relationships between the four relays and the electronic control unit (ECU), the DC power supply, the fault injection control module, and the load are also as shown. Figure 2 As shown. Figure 2 As shown, the moving contact of the first relay 2201 is connected to the normally open contacts of the second relay 2202 and the third relay 2203. The normally open contact of the first relay 2201 is connected to the high-level output terminal VCC of the DC power supply. The normally closed contact of the first relay 2201 is connected to the moving contact of the fourth relay 2204. The moving contact of the second relay 2202 is connected to the low-level output terminal L of the ECU's test channel. The normally closed contact of the second relay 2202 is connected to the low-level input terminal L of the load. The moving contact of the third relay 2203 is connected to the high-level output terminal H of the ECU's test channel. The normally closed contact of the third relay 2203 is connected to the high-level input terminal H of the load. The normally open contact of the fourth relay 2204 is connected to the ground terminal GND of the DC power supply. One end of the coil of each of the four relays is connected to one of the four power output terminals of the fault injection control module, and the other end of the coil of each relay is grounded. Specifically, the first power output terminal 2301 is connected to one end of the coil of the first relay; the second power output terminal 2302 is connected to one end of the coil of the second relay; the third power output terminal 2303 is connected to one end of the coil of the third relay; and the fourth power output terminal 2304 is connected to one end of the coil of the fourth relay.

[0055] Understandable. Figure 2 This invention provides only one possible connection method for the four relays, the electronic control unit, the DC power supply, the fault injection control module, and the load; the present invention does not limit the position of the four relays. Furthermore, the positional relationships of the first power output terminal, the second power output terminal, the third power output terminal, and the fourth target power output terminal can vary, and the present invention does not limit this.

[0056] It can also be understood that, firstly, by connecting the moving contact of the second relay to the low-level output terminal of the electronic control unit's (ECU) test channel and the normally closed contact of the second relay to the low-level input terminal of the load, the low-level output terminal of the ECU test channel and the low-level input terminal of the load are connected when the second relay is not energized. Similarly, when the second relay is energized, the low-level output terminal of the ECU test channel and the low-level input terminal of the load are open-circuited. Secondly, by connecting the moving contact of the third relay to the high-level output terminal of the ECU test channel and the normally closed contact of the third relay to the high-level input terminal of the load, the high-level output terminal of the ECU test channel and the high-level input terminal of the load are connected when the third relay is not energized. Similarly, when the third relay is energized, the low-level output terminal of the ECU test channel and the low-level input terminal of the load are open-circuited. Thirdly, combining the connection methods of the second and third relays with the ECU and the load, and further based on the connection methods of the first and fourth relays with the ECU and the load, control information can be injected into at least two relays to put the ECU in different fault states. Specifically, the detailed process of injecting control information into at least two relays to put the electronic control unit in different fault states can be found in the relevant descriptions below, but will not be elaborated here for the sake of brevity.

[0057] Example 3

[0058] It is understood that, in addition to the connection method in Embodiment 2 above, the connection relationships between the ground terminal GND and the high-level output terminal VCC of the DC power supply and the relays can be interchanged. That is, the ground terminal of the DC power supply can be connected to the normally open contact of the first relay as well as the normally open contact of the fourth relay; the ground terminal of the DC power supply can be connected to the normally open contact of the first relay as well as the normally open contact of the fourth relay; the high-level output terminal of the DC power supply can be connected to the normally open contact of the fourth relay as well as the normally open contact of the first relay.

[0059] Therefore, correspondingly, in Embodiment 3, based on Embodiment 1, the normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, the normally closed contact of the first relay is connected to the moving contact of the fourth relay, and the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, forming the connection method of Embodiment 3. Specifically, refer to... Figure 3 .

[0060] Figure 3 This is a second schematic diagram of a fault injection system for testing electronic control units provided by the present invention. It can be understood that... Figure 3 and Figure 2 The difference lies in the interchange of the connections between the DC power supply's ground terminal GND and the high-level output terminal VCC and the relay. Unlike... Figure 2 The ground terminal GND of the DC power supply is connected to the normally open contact of the fourth relay 2204. Figure 3 The ground terminal GND of the DC power supply is connected to the normally open contact of the first relay 2201; and unlike... Figure 2 The high-level output terminal VCC of the DC power supply is connected to the normally open contact of relay 2201. Figure 3 The high-level output terminal VCC of the DC power supply is connected to the normally open contact of relay 2204. The connection methods for other parts are the same. Figure 2 The same applies, so I will not repeat it here.

[0061] Example 4

[0062] It is understood that, in addition to the connection methods described in Embodiments 2 and 3 above, the normally open contact of the first relay can also be connected to the moving contact of the fourth relay; the normally open contact of the fourth relay can be connected to the ground terminal of the DC power supply, and the normally closed contact of the fourth relay can be connected to the high-level output terminal of the DC power supply. Specifically, refer to... Figure 4 The content shown.

[0063] Figure 4 This is the third schematic diagram of a fault injection system for testing electronic control units provided by the present invention. It can be understood that... Figure 4 and Figure 2 The difference lies in connecting the normally open contact of the first relay 2201 to the moving contact of the fourth relay 2204, while the normally closed contact of the first relay 2201 is not connected to the high-level output terminal of the DC power supply; the normally open contact of the fourth relay 2204 is connected to the ground terminal of the DC power supply, and the normally closed contact of the fourth relay 2204 is connected to the high-level output terminal of the DC power supply. Other connection methods are the same as... Figure 2 The same applies, so I will not repeat it here.

[0064] Example 5

[0065] It is understood that, in addition to the connection methods described in Embodiments 2, 3, and 4 above, the normally open contact of the first relay can also be connected to the moving contact of the fourth relay; the normally closed contact of the fourth relay can be connected to the ground terminal of the DC power supply; and the normally open contact of the fourth relay can be connected to the high-level output terminal of the DC power supply. Specifically, refer to... Figure 5 The content shown.

[0066] Figure 5 This is the fourth schematic diagram of a fault injection system for testing electronic control units provided by the present invention. It can be understood that... Figure 5 and Figure 4 The difference lies in the interchange of the connections between the DC power supply's ground terminal GND and the high-level output terminal VCC and the relay. The connection methods for other parts are the same. Figure 4 The same applies, so I will not repeat it here.

[0067] It is understandable that the relay module can be implemented not only with 4 relay modules, but also with more relays. For example, it can be implemented with 5 or 6 relays. The following describes the implementation with 5 relays in conjunction with Examples 6 to 8, and the implementation with 6 relays in conjunction with Examples 9 to 11.

[0068] Example 6

[0069] In Embodiment 6, the relay module includes five relays: a first relay, a second relay, a third relay, a fourth relay, and a fifth relay. The fault injection control module has five power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, and a fifth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second and third relays. The normally closed contact of the first relay is connected to the moving contact of the fourth relay. The moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel, and the normally closed contact of the second relay is connected to the low-level input of the load. The terminals are connected as follows: the moving contact of the third relay is connected to the high-level output terminal of the channel under test of the electronic control unit, and the normally closed contact of the third relay is connected to the high-level input terminal of the load; the normally closed contact of the fourth relay is connected to the moving contact of the fifth relay, and the normally open contacts of the fourth and fifth relays are connected to a DC power supply; the first power supply output terminal is connected to one end of the coil of the first relay; the second power supply output terminal is connected to one end of the coil of the second relay; the third power supply output terminal is connected to one end of the coil of the third relay; the fourth power supply output terminal is connected to one end of the coil of the fourth relay; and the fifth power supply output terminal is connected to one end of the coil of the fifth relay. Specifically, refer to... Figure 6 and Figure 7 The content shown.

[0070] Example 7

[0071] Example 7 is a possible implementation of Example 6, in which the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the high-level output terminal of the DC power supply, i.e. Figure 6 The connection method shown.

[0072] Understandable. Figure 6 and Figure 2 In contrast, instead of the normally open contact of the first relay 2201 being connected to the power supply VCC, the normally closed contact of the fourth relay 2204 is connected to the moving contact of the fifth relay 2205, and the normally open contact of the fifth relay 2205 is connected to the power supply VCC.

[0073] Example 8

[0074] Example 8 is another possible implementation of Example 6, in which the normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the ground terminal of the DC power supply, that is, as shown in Example 8. Figure 7 The connection method shown.

[0075] Understandable. Figure 7 and Figure 3 In contrast, instead of the normally open contact of the first relay 2201 being connected to the power supply GND, the normally closed contact of the fourth relay 2204 is connected to the moving contact of the fifth relay 2205, and the normally open contact of the fifth relay 2205 is connected to the power supply GND.

[0076] Example 9

[0077] In embodiment 9, the relay module includes six relays: a first relay, a second relay, a third relay, a fourth relay, a fifth relay, and a sixth relay. The fault injection control module has four power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, a fifth power output terminal, and a sixth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the fourth and fifth relays; the normally closed contact of the first relay is connected to the moving contact of the sixth relay; the moving contact of the second relay is connected to the low-level output terminal of the electronic control unit's test channel; the normally closed contact of the second relay is connected to the low-level input terminal of the load; and the normally open contact of the second relay is connected to the... The moving contact of the fifth relay is connected; the moving contact of the third relay is connected to the high-level output terminal of the test channel of the electronic control unit, and the normally closed contact of the third relay is connected to the high-level input terminal of the load; the normally open contact of the third relay is connected to the moving contact of the fourth relay; the normally open contacts of the first relay and the sixth relay are connected to a DC power supply; the output terminal of the first power supply is connected to one end of the coil of the first relay; the output terminal of the second power supply is connected to one end of the coil of the second relay; the output terminal of the third power supply is connected to one end of the coil of the third relay; the output terminal of the fourth power supply is connected to one end of the coil of the fourth relay; the output terminal of the fifth power supply is connected to one end of the coil of the fifth relay; and the output terminal of the sixth power supply is connected to one end of the coil of the sixth relay.

[0078] Example 10

[0079] Example 10 is a possible implementation of Example 9, in which the normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the ground terminal of the DC power supply, i.e. Figure 8 The connection method shown.

[0080] Understandable. Figure 8 and Figure 2 In contrast, the normally open contact of the second relay 2202 is connected to the moving contact of the fifth relay 2205, the normally open contact of the third relay 2203 is connected to the moving contact of the fourth relay 2204, the normally open contacts of the fourth relay 2204 and the fifth relay 2205 are both connected to the moving contact of the first relay 2201, the normally closed contact of the first relay 2201 is connected to the moving contact of the sixth relay 2206, and the normally open contact of the sixth relay 2206 is connected to the power supply GND.

[0081] Example 11

[0082] Example 11 is another possible implementation of Example 9, in which the normally open contact of the first relay is connected to the ground terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the high-level output terminal of the DC power supply, that is, as shown in Example 9. Figure 9 The connection method shown.

[0083] Understandable. Figure 9 and Figure 3 In contrast, the normally open contact of the second relay 2202 is connected to the moving contact of the fifth relay 2205, the normally open contact of the third relay 2203 is connected to the moving contact of the fourth relay 2204, the normally open contacts of the fourth relay 2204 and the fifth relay 2205 are connected to the moving contact of the first relay 2201, the normally closed contact of the first relay 2201 is connected to the moving contact of the sixth relay 2206, and the normally open contact of the sixth relay 2206 is connected to the power supply VCC.

[0084] Figure 10 This is one of the flowcharts illustrating the method for testing an electronic control unit provided by the present invention. It can be understood that... Figure 10 The method shown can be applied to a fault injection system for testing electronic control units as described above, and the method includes the following steps:

[0085] Step 1010: The fault injection control module controls each power output terminal in the fault injection control module to output a signal less than a preset threshold within a preset time interval, so that the moving contact and normally closed contact of each relay in the relay module are connected respectively, so that the electronic control unit is in a connected state with the load; and determines whether the first working state of the electronic control unit's test channel meets the electrical load standard.

[0086] For example, such as Figure 2 The connection relationship shown in the fault injection system for testing the electronic control unit is such that the first power output terminal, the second power output terminal, the third power output terminal, and the fourth power output terminal output signals less than a preset threshold, which means that the coils of the first relay, the second relay, the third relay, and the fourth relay are not energized. Therefore, the moving contacts of the first relay, the second relay, the third relay, and the fourth relay are connected to the normally closed contacts, and thus the electronic control unit is in a connected state with the load.

[0087] The first operating state of the electronic control unit (ECU) under test channel can be understood as the ECU being in a connected state with the load, i.e., the operating state of the ECU under normal load conditions. Whether the first operating state of the ECU under test channel meets the electrical load standard refers to whether the ECU under test channel meets the corresponding functional level type under normal operating conditions.

[0088] It is understandable that different types of electronic control units need to meet different functional level types in the first working state. Therefore, it can be determined whether the corresponding functional level type is met based on the specific type of electronic control unit in the actual test.

[0089] It is understandable that after step 1010, step 1020 or step 1030 can be further executed.

[0090] Step 1020: If it is determined that the first operating state of the channel under test of the electronic control unit does not meet the electrical load standard, return to the prompt to repair the electronic control unit.

[0091] Step 1030: If the first working state of the electronic control unit channel under test is determined to meet the electrical load standard, the fault injection control module changes the connection relationship between the moving contact and the normally closed contact and the normally open contact of at least two relays in the relay module at a preset time interval, so that the electronic control unit is in different fault states, and determines the working state of the electronic control unit channel under test under different faults.

[0092] It is understood that if the first operating state of the electronic control unit's channel under test is determined to meet the electrical load standard, it indicates that the electronic control unit's channel under test can operate normally. Therefore, the operating state of the electronic control unit's channel under test under different fault conditions can be further determined.

[0093] It's understandable. Figure 10 The content shown applies to any of the above embodiments of the fault injection system used for testing electronic control units.

[0094] The present invention provides a fault injection method for testing electronic control units. This method involves altering the connection relationships between a relay module and the electronic control unit, the DC power supply, the fault injection control module, and the load. By combining this with the fault injection control module, the method changes the connection relationships between the moving contacts, normally closed contacts, and normally open contacts of at least two relays in the relay module. This alters the connection relationships between the electronic control unit, the load, and the DC power supply, thereby placing the electronic control unit in different fault states and automating the fault injection process during the testing of the electronic control unit.

[0095] In one embodiment, the fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, causing the electronic control unit to be in different fault states, and determines the operating state of the electronic control unit's test channel under different faults. This includes: the fault injection control module controlling the corresponding target power output terminal to output a signal greater than or equal to a preset threshold, causing the moving contacts of the relays connected to the target power output terminal to connect to the normally open contacts, thus causing the electronic control unit's test channel to be in different fault states; after the preset time interval, the fault injection control module controls the corresponding target power output terminal to output a signal less than a preset threshold, causing the moving contacts of the relays connected to the target power output terminal to connect to the normally closed contacts, thus restoring the electronic control unit's test channel to normal connection; and determining whether the operating state of the electronic control unit's test channel under different faults meets the electrical load standard. If it is determined that the operating state under different faults does not meet the electrical load standard, the corresponding preset error message is returned.

[0096] In one embodiment, the fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at a preset time interval, so that the electronic control unit is in different fault states, and determines the working state of the electronic control unit's test channel under different faults. This includes: the fault injection control module controlling the second power output terminal and the third power output terminal to output signals greater than or equal to a preset threshold at a preset time interval, so that the moving contacts corresponding to the second relay and the third relay are connected to the normally open contacts, and the high-level output terminal and the low-level output terminal of the electronic control unit's test channel are both open circuit; after the preset time interval, the fault injection control module controls the second power output terminal and the third power output terminal to output signals less than a preset threshold, so that the moving contacts corresponding to the second relay and the third relay are connected to the normally closed contacts, so that the electronic control unit and the load are in a connected state; and determining whether the second working state of the electronic control unit's test channel meets the electrical load standard. If it is determined that the second working state does not meet the electrical load standard, a first preset error message is returned.

[0097] The preset time interval can be, for example, 1 minute, and the first preset error message can be, for example, "Error 1 occurred".

[0098] The second operating state of the electronic control unit (ECU) under test channel can be understood as the operating state of the ECU under test channel after both its high-level and low-level output terminals are open-circuited, and then the ECU is reconnected to the load. Whether the second operating state of the ECU under test channel conforms to the electrical load standard refers to whether the ECU under test channel meets the corresponding functional level type in the second operating state. It can be understood that different types of ECUs under test channels need to meet different functional level types in the second operating state. Therefore, whether it meets the corresponding functional level type can be determined according to the specific type of ECU in the actual test.

[0099] It is understood that the content of this embodiment applies to the above. Figures 2 to 9 Any of the corresponding embodiments.

[0100] In one embodiment, the fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, causing the electronic control unit to be in different fault states, and determines the operating state of the electronic control unit's test channel under different faults, including: the fault injection control module controls the second power output terminal and the fourth power output terminal to output signals greater than or equal to a preset threshold at preset time intervals, so that the moving contacts corresponding to the second relay and the fourth relay are connected to the normally open contacts respectively, and the low-level output terminal of the electronic control unit's test channel is short-circuited to ground or to the power supply; the fault After a preset time interval, the injection control module controls the second power output terminal and the fourth power output terminal to output signals less than a preset threshold, so that the moving contacts corresponding to the second relay and the fourth relay are connected to the normally closed contacts, so that the electronic control unit and the load are in a connected state; and determines whether the third working state after the low-level output terminal of the electronic control unit's test channel is grounded or the fourth working state after the low-level output terminal is short-circuited to the power supply meets the electrical load standard; if it is determined that the third working state does not meet the electrical load standard, a second preset error message is returned; if it is determined that the fourth working state does not meet the electrical load standard, a third preset error message is returned.

[0101] The preset time interval can be, for example, 1 minute, and the second preset error message can be, for example, "Error 2 occurred". The third preset error message can be, for example, "Error 3 occurred".

[0102] It is understood that, in conjunction with the aforementioned Embodiments 2 and 3, the corresponding fault injection system for testing the electronic control unit has at least the following characteristics: Figure 2 and Figure 3The connection method is shown. Specifically, for embodiment 2, that is, as shown... Figure 2 The connection method described in the text connects the moving contacts of the second and fourth relays to their normally open contacts, short-circuiting the low-level output terminal of the electronic control unit's test channel to ground, thus placing the electronic control unit's test channel in a third operating state. The third operating state of the electronic control unit's test channel can be understood as the operating state of the electronic control unit's test channel after short-circuiting its low-level output terminal to ground (GND) and then reconnecting the electronic control unit to the load. However, for embodiment 3, i.e.... Figure 3 The connection method described in the diagram connects the moving contacts of the second and fourth relays to their normally open contacts, short-circuiting the low-level output terminal of the electronic control unit's test channel to the power supply, thus placing the electronic control unit's test channel in its fourth operating state. The fourth operating state of the electronic control unit's test channel can be understood as the operating state of the test channel after short-circuiting its low-level output terminal to the high-level output terminal VCC of the DC power supply, thereby restoring the connection between the electronic control unit and the load. Whether the fourth operating state of the electronic control unit's test channel conforms to the electrical load standard refers to whether the fourth operating state of the electronic control unit's test channel in different embodiments meets the corresponding functional level type. It is understood that different types of electronic control unit test channels require different functional level types to be met in their corresponding fourth operating states in different embodiments. Therefore, whether it meets the corresponding functional level type can be determined based on the specific type of electronic control unit in the actual test.

[0103] Furthermore, similarly, for the aforementioned embodiment 4, i.e. Figure 4 In the system shown, the fault injection control module controls the first power output terminal, the second power output terminal, and the fourth power output terminal to output signals greater than or equal to a preset threshold within a preset time interval. This connects the moving contacts of the first power output terminal, the second relay, and the fourth relay to their normally open contacts, short-circuiting the low-level output terminal of the electronic control unit's test channel to ground, thus placing the electronic control unit's test channel in a third operating state. For the aforementioned embodiment 5, i.e. Figure 5 The system shown connects the moving contacts of the first power output terminal, the second relay, and the fourth relay to the normally open contacts, thereby short-circuiting the low-level output terminal of the electronic control unit's test channel to the power supply and putting the electronic control unit's test channel into the fourth operating state.

[0104] Similarly, for the aforementioned embodiment 7, i.e. Figure 6The system shown connects the moving contacts of the second and fourth relays to their normally open contacts, short-circuits the low-level output terminal of the electronic control unit's test channel to ground, and puts the test channel of the electronic control unit into a third operating state. For the aforementioned embodiment 8, i.e. Figure 7 The system shown connects the moving contacts of the second and fifth relays to their normally open contacts, short-circuits the low-level output terminal of the electronic control unit's test channel to the power supply, and puts the electronic control unit's test channel in the fourth working state.

[0105] Similarly, for the aforementioned embodiment 10, i.e. Figure 8 The system shown connects the moving contacts of the second, fifth, and sixth relays to their normally open contacts, short-circuiting the low-level output terminal of the electronic control unit's test channel to ground, thus placing the test channel of the electronic control unit in a third operating state. For the aforementioned embodiment 11, i.e. Figure 9 The system shown connects the moving contacts of the second, fifth, and sixth relays to their normally open contacts, short-circuits the low-level output terminal of the electronic control unit's test channel to the power supply, and puts the electronic control unit's test channel in the fourth operating state.

[0106] It is understood that the process of determining the corresponding third and fourth working states is only illustrated here as an example. Those skilled in the art can infer the process of determining other undescribed third and fourth working states by combining the schematic diagram and common knowledge. For the sake of brevity, it will not be described in detail here.

[0107] In one embodiment, the fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, so that the electronic control unit is in different fault states, and determines the working state of the electronic control unit's test channel under different faults, including: the fault injection control module controls the third power output terminal and the fourth power output terminal to output signals greater than or equal to preset thresholds at preset time intervals, so that the moving contacts of the third relay and the fourth relay are connected to their corresponding normally open contacts, and the high-level output terminal of the electronic control unit's test channel is short-circuited to ground or to the power supply; ... power output terminal are connected to their corresponding normally open contacts, and the high-level output terminal of the electronic control unit's test channel is short-circuited to ground or to the power supply; the fault injection control module controls After a preset time interval, the control module controls the third and fourth power output terminals to output signals less than a preset threshold, connecting the moving contacts of the third and fourth relays to their normally closed contacts, thus establishing a connection between the electronic control unit and the load. It then determines whether the fifth operating state (high-level output terminal to ground) or the sixth operating state (high-level output terminal short-circuited to power supply) of the electronic control unit's test channel meets the electrical load standard. If the fifth operating state does not meet the electrical load standard, a fourth preset error message is returned; if the sixth operating state does not meet the electrical load standard, a fifth preset error message is returned.

[0108] The preset time interval can be, for example, 1 minute, and the fourth preset error message can be, for example, "Error 4 occurred". The fourth preset error message can be, for example, "Error 5 occurred".

[0109] It is understood that, in conjunction with the aforementioned Embodiments 2 and 3, the corresponding fault injection system for testing the electronic control unit has at least the following characteristics: Figure 2 and Figure 3The connection methods are shown. In Embodiment 2, the moving contacts corresponding to the third and fourth relays are connected to their normally open contacts, short-circuiting the high-level output terminal of the electronic control unit's test channel to ground, placing the test channel in its fifth operating state. This fifth operating state can be understood as the state in which the electronic control unit's test channel is reconnected to the load after the high-level output terminal is short-circuited to ground. However, in Embodiment 3, the moving contacts corresponding to the third and fourth relays are connected to their normally open contacts, short-circuiting the high-level output terminal of the test channel to the power supply, placing the test channel in its sixth operating state. This sixth operating state can be understood as the state in which the electronic control unit's test channel is reconnected to the load after the high-level output terminal is short-circuited to the DC power supply's high-level output terminal VCC. Whether the sixth operating state of the electronic control unit (ECU) under test channel meets the electrical load standard refers to whether the ECU under test channel meets the corresponding functional level type in the sixth operating state under different embodiments. It is understood that different types of ECUs under test channels need to meet different functional level types in the sixth operating state under different embodiments. Therefore, whether it meets the corresponding functional level type can be determined based on the specific type of ECU in the actual test.

[0110] Understandably, this is only based on Figure 2 and Figure 3 The process of determining the fifth and sixth working states is illustrated using an example. Those skilled in the art can infer the process of determining the fifth and sixth working states in the connection relationships of other corresponding diagrams by combining the diagrams and common knowledge. For the sake of brevity, it will not be elaborated here.

[0111] It is also understood that the various fault states described above can be tested one by one. For example, if it is determined that the electronic control unit meets the corresponding functional level type in the second operating state, it can then proceed to determine whether the corresponding functional level type is met in the third operating state. It is also understood that this invention does not limit the testing order for the various fault states.

[0112] Furthermore, the present invention also provides an apparatus for testing an electronic control unit, the apparatus comprising any of the above-described fault injection systems for testing an electronic control unit or for performing any of the above-described methods for testing an electronic control unit.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fault injection system for testing electronic control units, characterized in that, The system is used to inject faults into the electronic control unit and determine whether the electronic control unit meets electrical load standards under different fault conditions. The system includes: DC power supply, relay module, and fault injection control module; among which, The DC power supply is used to power the relay module and the fault injection control module; The relay module, the DC power supply, and the fault injection control module are connected in series, and the electronic control unit, the DC power supply, the relay module, and the load are connected in series. The fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, thereby putting the electronic control unit into different fault states. When the fault injection control module injects a signal less than a preset threshold into each relay in the relay module, the electronic control unit and the load are in a connected state; when the fault injection control module injects a signal greater than or equal to a preset threshold into at least two relays in the relay module within a preset time interval, the electronic control unit is in one of the following fault states: both the high-level output terminal and the low-level output terminal of the electronic control unit's test channel are open-circuited, the high-level output terminal of the electronic control unit's test channel is short-circuited to ground, the low-level output terminal of the electronic control unit's test channel is short-circuited to ground, the high-level output terminal of the electronic control unit's test channel is short-circuited to the power supply, or the low-level output terminal of the electronic control unit's test channel is short-circuited to the power supply. The relay module includes four relays: a first relay, a second relay, a third relay, and a fourth relay. The fault injection control module has four power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, and a fourth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second relay and the third relay; The moving contact of the second relay is connected to the low-level output terminal of the channel under test of the electronic control unit, and the normally closed contact of the second relay is connected to the low-level input terminal of the load. The moving contact of the third relay is connected to the high-level output terminal of the channel under test of the electronic control unit, and the normally closed contact of the third relay is connected to the high-level input terminal of the load. At least one of the first relays and the fourth relay has its normally open or normally closed contact connected to a DC power supply. The first power output terminal is connected to one end of the coil of the first relay; the second power output terminal is connected to one end of the coil of the second relay; the third power output terminal is connected to one end of the coil of the third relay; and the fourth power output terminal is connected to one end of the coil of the fourth relay. At least one of the first and fourth relays has a normally open or normally closed contact connected to a DC power supply, including: The normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, and the normally closed contact of the first relay is connected to the moving contact of the fourth relay; the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply; or, The normally open contact of the first relay is connected to the ground terminal of the DC power supply, and the normally closed contact of the first relay is connected to the moving contact of the fourth relay; the normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply.

2. The fault injection system for testing electronic control units according to claim 1, characterized in that, At least one of the first and fourth relays has a normally open or normally closed contact connected to a DC power supply, including: The normally open contact of the first relay is connected to the moving contact of the fourth relay; the normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally closed contact of the fourth relay is connected to the high-level output terminal of the DC power supply; or, The normally open contact of the first relay is connected to the moving contact of the fourth relay; the normally closed contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply.

3. The fault injection system for testing electronic control units according to claim 1, characterized in that, The relay module includes five relays: a first relay, a second relay, a third relay, a fourth relay, and a fifth relay. The fault injection control module has five power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, and a fifth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the second and third relays; the normally closed contact of the first relay is connected to the moving contact of the fourth relay. The moving contact of the second relay is connected to the low-level output terminal of the channel under test of the electronic control unit, and the normally closed contact of the second relay is connected to the low-level input terminal of the load. The moving contact of the third relay is connected to the high-level output terminal of the channel under test of the electronic control unit, and the normally closed contact of the third relay is connected to the high-level input terminal of the load. The normally closed contact of the fourth relay is connected to the moving contact of the fifth relay, and the normally open contacts of the fourth and fifth relays are connected to a DC power supply. The first power output terminal is connected to one end of the coil of the first relay; the second power output terminal is connected to one end of the coil of the second relay; the third power output terminal is connected to one end of the coil of the third relay; the fourth power output terminal is connected to one end of the coil of the fourth relay; and the fifth power output terminal is connected to one end of the coil of the fifth relay.

4. The fault injection system for testing electronic control units according to claim 3, characterized in that, The normally open contacts of the fourth and fifth relays are connected to a DC power supply, including: The normally open contact of the fourth relay is connected to the ground terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the high-level output terminal of the DC power supply; or, The normally open contact of the fourth relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the fifth relay is connected to the ground terminal of the DC power supply.

5. The fault injection system for testing electronic control units according to claim 1, characterized in that, The relay module includes six relays: a first relay, a second relay, a third relay, a fourth relay, a fifth relay, and a sixth relay. The fault injection control module has six power output terminals: a first power output terminal, a second power output terminal, a third power output terminal, a fourth power output terminal, a fifth power output terminal, and a sixth power output terminal. The moving contact of the first relay is connected to the normally open contacts of the fourth and fifth relays; the normally closed contact of the first relay is connected to the moving contact of the sixth relay. The moving contact of the second relay is connected to the low-level output terminal of the channel under test of the electronic control unit; the normally closed contact of the second relay is connected to the low-level input terminal of the load; and the normally open contact of the second relay is connected to the moving contact of the fifth relay. The moving contact of the third relay is connected to the high-level output terminal of the channel under test of the electronic control unit; the normally closed contact of the third relay is connected to the high-level input terminal of the load; and the normally open contact of the third relay is connected to the moving contact of the fourth relay. The normally open contacts of the first relay and the sixth relay are connected to a DC power supply; The first power output terminal is connected to one end of the coil of the first relay; the second power output terminal is connected to one end of the coil of the second relay; the third power output terminal is connected to one end of the coil of the third relay; the fourth power output terminal is connected to one end of the coil of the fourth relay; the fifth power output terminal is connected to one end of the coil of the fifth relay; and the sixth power output terminal is connected to one end of the coil of the sixth relay.

6. The fault injection system for testing electronic control units according to claim 5, characterized in that, The normally open contacts of the first relay and the sixth relay are connected to a DC power supply, including: The normally open contact of the first relay is connected to the high-level output terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the ground terminal of the DC power supply; or, The normally open contact of the first relay is connected to the ground terminal of the DC power supply, and the normally open contact of the sixth relay is connected to the high-level output terminal of the DC power supply.

7. A method for testing electronic control units, characterized in that, The method, applied to a fault injection system for testing an electronic control unit as described in any one of claims 1 to 6, comprises: The fault injection control module controls each power output terminal in the fault injection control module to output a signal less than a preset threshold within a preset time interval, so that the moving contact and normally closed contact of each relay in the relay module are connected respectively, so that the electronic control unit is in a connected state with the load; and determines whether the first working state of the electronic control unit's test channel meets the electrical load standard. If the first operating state of the channel under test in the electronic control unit is determined to be inconsistent with the electrical load standard, a prompt to repair the electronic control unit will be returned; or, When the first working state of the electronic control unit channel under test is determined to meet the electrical load standard, the fault injection control module changes the connection relationship between the moving contact and the normally closed contact and the normally open contact of at least two relays in the relay module at a preset time interval, so that the electronic control unit is in different fault states, and determines the working state of the electronic control unit channel under test under different faults. The fault injection control module changes the connection relationship between the moving contacts and normally closed and normally open contacts of at least two relays in the relay module at preset time intervals, so that the electronic control unit is in different fault states, and determines the operating state of the electronic control unit's test channel under different fault conditions, including: The fault injection control module controls the corresponding target power output terminal to output a signal greater than or equal to a preset threshold, so that the moving contact and normally open contact of the relay connected to the target power output terminal are connected respectively, so that the electronic control unit's test channel is in different faults. After a preset time interval, the fault injection control module controls the corresponding target power output terminal to output a signal less than a preset threshold, thereby connecting the moving contact of the relay connected to the target power output terminal to the normally closed contact, and restoring the electronic control unit's test channel to normal connection. It also determines whether the operating state of the electronic control unit's test channel under different faults meets the electrical load standard. If the operating state under different faults does not meet the electrical load standard, it returns the corresponding preset error message.

8. A device for testing electronic control units, characterized in that, Includes the fault injection system for testing electronic control units as described in any one of claims 1 to 6, or the method for performing the electronic control unit as described in claim 7.