Fault diagnosis method and device, electronic equipment and vehicle
Through automated testing processes, the EPS controller is injected into faults and diagnosed, and errors and high cost problems caused by manual dependencies are solved, achieving high accuracy and reliability troubleshooting.
Patent Information
- Application Number
- CN202411265357.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-13
AI Technical Summary
The existing EPS controller fault diagnosis relies on manual labor, is prone to errors and has high labor costs, and cannot accurately simulate sensor fault conditions.
Through the automated testing process, set up a target test environment for the electric power steering controller, inject different types of faults, and diagnose them through fault status information, and store them in memory to achieve automated fault diagnosis.
It improves the accuracy and reliability of diagnostic results, reduces labor costs, avoids errors caused by frequent manual power-up and down operations, and can accurately simulate fault conditions.
Smart Images

Figure CN119127552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive electronic technology, and in particular to a fault diagnosis method, device, electronic equipment and vehicle. Background Art
[0002] The torque sensor is used in the EPS (Electric Power Steering) steering gear to detect the hand torque on the steering wheel. The EPS controller determines the driver's steering intention based on the hand torque on the steering wheel and adjusts the steering assist to provide more comfortable steering feedback. The existing torque sensor can output 4 torque signals, namely main torque signal 1, main torque signal 2, sub-torque signal 1, and sub-torque signal 2. The 4 torque signals can be transmitted to the ECU (Electronic Control Unit) through the SPC (Short Pulse-width modulation Code) / SENT (Signal Edge Nibble Transmission) protocol. The EPS controller software needs to monitor the status of the torque sensor to perform fault diagnosis and troubleshooting.
[0003] The current practice is to use a torque sensor fixture for testing. This test method requires manual control of the output torque and manual injection of faults. Moreover, since the torque sensor fault is an irrecoverable fault within the current ignition cycle, when executing multiple test cases, it is necessary to frequently perform manual power-on and power-off operations and connect to the XCP (Universal Measurement and Calibration Protocol) for calibration and reading fault diagnosis information. The above method relies on manual labor, is prone to errors, and leads to inaccurate or unreliable results and high labor costs. In addition, when reproducing the problem of a sensor fault, the test environment cannot accurately simulate the fault condition. Summary of the invention
[0004] In view of this, the present invention aims to propose a fault diagnosis method, device, electronic equipment and vehicle to solve the problem that the existing EPS controller fault diagnosis relies on manual labor, is prone to errors and has high labor costs, and at the same time, when reproducing the problem of sensor failure, the test environment cannot accurately simulate the fault condition.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0006] A first aspect of an embodiment of the present application provides a fault diagnosis method, the method comprising:
[0007] Set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier for the test case to be executed;
[0008] When it is determined that the target test environment is normal, a plurality of test cases to be executed are obtained through the target local variable identifier, and different types of target faults are injected into the electric power steering controller under test according to the plurality of test cases to be executed;
[0009] Acquire corresponding different target fault state information according to different types of injected target faults, and store the information in a target memory of the tested electric power steering controller;
[0010] Restarting the electric power steering controller under test through a preset automated test process;
[0011] If it is detected after the restart operation that the target fault state information is in the historical record of the target memory, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed.
[0012] Optionally, setting a target test environment for the electric power steering controller under test through a preset automated test process through a preset automated test process includes:
[0013] Control the bus communication device to disconnect the communication connection with the electric power steering controller under test, and control the electric power steering controller under test to power off;
[0014] The electric power steering controller under test is adjusted to a standby state, wherein the enable signal of the electric power steering controller under test is in a disabled state, the vehicle speed signal is valid, and the current vehicle speed is a first vehicle speed;
[0015] Adjust the target torque sensor fault state signal and the unilateral half-byte transmission protocol original value control signal in the automated network test cabinet to a normal state, and control the electric power steering controller under test to be powered on;
[0016] Performing target operations on the electric power steering controller under test, wherein the target operations include initiating a diagnostic session operation, clearing diagnostic information, and reading fault codes;
[0017] When it is determined through the target operation that the electric power steering controller under test has no faults, the control bus communication device is controlled to establish a communication connection with the electric power steering controller under test.
[0018] Optionally, the test cases to be executed include at least one of a torque failure test case, a torque cross-check test case, a torque output consistency test case, and a boundary value check test case;
[0019] The injecting different types of target faults into the electric power steering controller under test according to the plurality of test cases to be executed comprises:
[0020] Acquire four output torque signals of the target torque sensor, wherein the fault state of the electric power steering controller under test is determined according to the states of the four output torque signals;
[0021] If the test case to be executed is a torque failure test case, a first type of target fault is injected into each output torque signal, every two output torque signals, every three output torque signals and four output torque signals respectively, wherein the first type of target fault includes a communication error fault, a cyclic redundancy check failure fault, a torque over-limit fault and a SENT signal status bit fault;
[0022] The obtaining corresponding different target fault status information according to different types of injected target faults includes:
[0023] According to the different types of injected target faults, different target fault state information corresponding to the tested electric power steering controller is obtained, wherein the target fault state information includes lighting information, diagnostic fault code and event identifier of the tested electric power steering controller;
[0024] If the lighting information meets the expected settings and the diagnostic fault code and event identifier are correct, it is determined that the single-way torque failure detection mechanism, the dual-way torque failure detection mechanism, the three-way torque failure detection mechanism and the four-way torque failure detection mechanism of the electric power steering controller under test are normal.
[0025] Optionally, after acquiring the four-way output torque signal of the target torque sensor, the method further includes:
[0026] If the test case to be executed is a torque cross-check test case, obtaining a preset cross-check pass logic and a priority of an output torque combination, wherein the output torque combination is obtained by any two-by-two combination of the four output torque signals;
[0027] Determining the validity of the four output torque signals;
[0028] If the four output torque signals are all valid, then selecting a first output torque signal of any one of the four output torque signals;
[0029] Modify the original value of the first output torque signal, and perform pairwise verification on the modified four output torque signals through logic according to a preset cross-verification;
[0030] If it is detected that the electric power steering controller under test indicates that the first output torque signal verification has failed, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the first output torque signal, then it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal.
[0031] Optionally, after determining the validity of the four output torque signals, the method further includes:
[0032] If the second output torque signal of any one of the four output torque signals is invalid, selecting the third output torque signal of any one of the three valid output torque signals;
[0033] Modify the original value of the third output torque signal, and perform pairwise verification on the three output torque signals after the modification through logic according to a preset cross-verification;
[0034] If it is detected that the electric power steering controller under test indicates that the third output torque signal verification fails, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the second output torque signal and the third output torque signal, it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal;
[0035] If two of the four output torque signals are invalid, selecting a fourth output torque signal of any one of the two valid output torque signals;
[0036] Modifying the original value of the fourth output torque signal, and verifying the modified two output torque signals through logic according to a preset cross-check;
[0037] If it is detected that the output torque of the electric power steering controller under test is 0Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal;
[0038] If three or more of the four output torque signals are invalid, and the output torque of the electric power steering controller under test is detected to be 0 Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal.
[0039] Optionally, after acquiring the four-way output torque signal of the target torque sensor, the method further includes:
[0040] If the test case to be executed is a torque output consistency test case, any two of the four output torque signals are disconnected;
[0041] Control the remaining two output torque signals to change within a preset range;
[0042] The first physical value corresponding to the original value of the remaining two output torque signals is calculated by the upper computer test platform;
[0043] Calculating the second physical values corresponding to the original values of the remaining two output torque signals by the electric power steering controller under test;
[0044] If the first physical value and the second physical value are consistent, it is determined that the torque output consistency test of the electric power steering controller under test is normal.
[0045] Optionally, after acquiring the four-way output torque signal of the target torque sensor, the method further includes:
[0046] If the test case to be executed is a boundary value check test case, any two output torque signals of the four output torque signals are disconnected;
[0047] Setting the target torque original values for the remaining two output torque signals according to the preset boundary values;
[0048] Obtain the target torque physical value through the target torque original value;
[0049] If the target torque physical value is within the preset range, it is determined that the boundary value check test of the electric power steering controller under test is normal.
[0050] Optionally, the restarting operation on the electric power steering controller under test through a preset automated test process includes:
[0051] For any type of first fault among the target faults, determining whether the tested electric power steering controller can be normally enabled after the first fault is injected;
[0052] If not, the target torque sensor fault state signal and the unilateral half-byte transmission protocol original value control signal in the automated network test cabinet are adjusted to a normal state through the target local variable identifier;
[0053] The electric power steering controller under test is adjusted to a power-off-allowed state, and the electric power steering controller under test is controlled to be powered on again after being powered off.
[0054] A second aspect of an embodiment of the present application provides a fault diagnosis device, the device comprising:
[0055] A first acquisition module is used to set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier of a test case to be executed;
[0056] A second acquisition module is used for acquiring a plurality of test cases to be executed through the target local variable identifier when determining that the target test environment is normal, and injecting different types of target faults into the electric power steering controller under test according to the plurality of test cases to be executed;
[0057] A third acquisition module, used for acquiring corresponding different target fault state information according to different types of injected target faults, and storing the information in a target memory of the tested electric power steering controller;
[0058] A first restart module, used for restarting the electric power steering controller under test through a preset automated test process;
[0059] The first determination module is used to determine that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed if it is detected that the target fault state information is in the historical record of the target memory after the restart operation.
[0060] A third aspect of an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0061] Memory, used to store computer programs;
[0062] The processor is used to perform any of the above-mentioned fault diagnosis methods when executing the program stored in the memory.
[0063] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the fault diagnosis method described in the first aspect of the present application are implemented.
[0064] A fifth aspect of an embodiment of the present application provides a vehicle, comprising: the above-mentioned fault diagnosis device.
[0065] Compared with the prior art, the fault diagnosis method, device, electronic device and vehicle of the present invention have the following advantages:
[0066] The present invention provides a fault diagnosis method, device, electronic equipment and vehicle, comprising: setting a target test environment for an electric power steering controller under test through a preset automated test process, and obtaining a target local variable identifier of a test case to be executed, so as to realize automatic and accurate construction of the test environment; when it is determined that the target test environment is normal, obtaining a number of test cases to be executed through the target local variable identifier, and injecting different types of target faults into the electric power steering controller under test according to the test cases to be executed; automatically obtaining the test cases to be executed through the target local variable identifier, and automatically injecting faults through the test cases to be executed, without relying on manual labor and improving the accuracy and reliability of the results, obtaining corresponding different target fault status information according to the injected different types of target faults, and storing it in a target memory of the electric power steering controller under test; restarting the electric power steering controller under test through a preset automated test process, and if it is detected that the target fault status information exists in the historical record of the target memory after the restart operation, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed. Implementing the restart operation through software control avoids the problem of frequent power on and off caused by manual operations, which is prone to errors and leads to inaccurate or unreliable results and high labor costs. The embodiment of the present invention performs fault diagnosis on the electric power steering controller under test through automated test processes and test cases. There is no need to manually adjust the test environment, inject faults, and power on and off, which improves the accuracy and reliability of the diagnostic results and reduces labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0068] Figure 1 is an architectural diagram of a fault diagnosis system according to an exemplary embodiment;
[0069] Figure 2 is a flowchart of a fault diagnosis method according to an exemplary embodiment;
[0070] Figure 3 is based on Figure 2 An exemplary embodiment shown is a flowchart of step 101 in a fault diagnosis method;
[0071] Figure 4 is a flowchart of another fault diagnosis method according to an exemplary embodiment;
[0072] Figure 5 is a block diagram of a fault diagnosis device according to an exemplary embodiment;
[0073] Figure 6 It is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0074] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention. Although the accompanying drawings show exemplary embodiments of the present application, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0075] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0076] The fault diagnosis method, device, electronic device and vehicle provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0077] The fault diagnosis method of the embodiment of the present invention is applied to a fault diagnosis system, which includes a bus communication device, a host computer test platform, an electric power steering controller under test, an automated network test cabinet, and a bus open device, such as Figure 1 As shown, the host computer test platform establishes a universal serial bus USB communication connection with the bus communication device, the bus communication device establishes a controller area network CAN communication connection with the bus open device and the electric power steering controller under test respectively, the bus open device establishes an Ethernet communication connection with the automated network test cabinet, and the automated network test cabinet establishes a communication connection with the electric power steering controller under test.
[0078] Among them, the host computer test platform (such as TSMaster test platform) is used to build and manage the automated test process (such as script) and test cases of fault diagnosis, and the test cases include at least one of torque failure test cases, torque cross-check test case design, torque output consistency test cases and boundary value check test cases. The bus communication device (such as TC1014) is used to receive the automated test process (such as script) and test cases in the host computer test platform, and set the target test environment for the electric power steering controller under test through the preset automated test process according to the automated test process, obtain the target local variable identifier of the test case to be executed, and when it is determined that the target test environment is normal, obtain a number of test cases to be executed through the target local variable identifier, and inject different types of target faults into the electric power steering controller under test according to the several test cases to be executed, obtain corresponding different target fault status information according to the injected different types of target faults, and store it in the target memory of the electric power steering controller under test, and restart the electric power steering controller under test through the preset automated test process. If the target fault status information is detected in the historical record of the target memory after the restart operation, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed. The bus open device is used to receive control messages in the automated test process sent by the bus communication device, and control the power supply signal and the simulated unilateral half-byte transmission protocol signal sent by the automated network test cabinet to the electric power steering controller under test according to the control message. The power supply signal is used to determine whether to supply power to the electric power steering controller under test; the electric power steering controller under test is used to receive different types of target faults injected, generate different target fault status information, and store it in the target memory of the electric power steering controller under test.
[0079] Reference Figure 2 , Figure 2 : is a flowchart of a fault diagnosis method according to an exemplary embodiment:
[0080] Step 101, setting a target test environment for the electric power steering controller under test through a preset automated test process, and obtaining a target local variable identifier of a test case to be executed.
[0081] The test cases to be executed in the embodiment of the present invention include at least one of a torque failure test case, a torque cross-check test case, a torque output consistency test case, and a boundary value check test case. Because there are multiple test cases in the host computer test platform, and different test cases are used to perform different tests, different identifiers are set for different test cases in advance to distinguish and mark different test cases. In addition, since multiple test cases may be used for the diagnostic test of the electric power steering controller, in order to determine the test cases to be executed required in the embodiment of the present invention from multiple test cases, a unified target local variable identifier will be added to the test cases to be used in the host computer test platform in advance, so as to facilitate the acquisition of the test cases to be executed according to the target local variable identifier.
[0082] For example, there are test cases A to F in the host computer test platform, among which the test cases to be executed are A, C, and F, so the target local variable identifier 0 is added to A, C, and F. Then, according to the target local variable identifier 0, test cases A, C, and F can be filtered out from test cases A to F.
[0083] In the process of performing fault diagnosis in the embodiment of the present invention, there are some common operations for different test cases, such as setting the initial test environment, power on and off, etc., so these common operations are uniformly set in the preset automated test process and called as needed. Before injecting faults through the test cases to be executed, the embodiment of the present invention needs to eliminate the influence of other faults on the diagnosis results, so the target test environment is first set for the electric power steering controller under test.
[0084] Further, step 101, such as Figure 3 As shown:
[0085] Step 1011, controlling the bus communication device to disconnect the communication connection with the electric power steering controller under test, and controlling the electric power steering controller under test to power off.
[0086] Step 1012, adjusting the electric power steering controller under test to a standby state, in which the enable signal of the electric power steering controller under test is in a disabled state, the vehicle speed signal is valid, and the current vehicle speed is a first vehicle speed.
[0087] Step 1013, adjusting the target torque sensor fault state signal and the single-side half-byte transmission protocol original value control signal in the automated network test cabinet to a normal state, and controlling the electric power steering controller under test to be powered on.
[0088] Step 1014, performing target operations on the electric power steering controller under test, the target operations including initiating a diagnostic session operation, clearing diagnostic information, and reading fault codes.
[0089] Step 1015: When it is determined through the target operation that the electric power steering controller under test has no faults, the bus communication device is controlled to establish a communication connection with the electric power steering controller under test.
[0090] Among them, the XCP (Universal Measurement and Calibration Protocol) communication connection is used to control the disconnection of the bus communication device and the electric power steering controller under test. The KL15 disconnection command is sent through the bus communication device to control the electric power steering controller under test to power off. The diagnostic information clearing operation refers to sending "14FF FF FF" to clear the diagnostic information, thereby clearing all current fault codes. The fault code reading operation refers to sending "19 0289" to read the DTC information to ensure successful clearing. The above settings can ensure that the test case to be executed is executed in a new ignition cycle, and the execution result will not be interfered by other fault information.
[0091] Step 102, when it is determined that the target test environment is normal, a number of test cases to be executed are obtained through target local variable identifiers, and different types of target faults are injected into the electric power steering controller under test according to the number of test cases to be executed.
[0092] In the embodiment of the present invention, when different types of target faults are injected into the electric power steering controller under test according to several test cases to be executed, the torque fault state signal is changed or the SENT original value control signal is changed to realize the simulation of the corresponding fault in the test case to be executed, and the injection of the target fault is realized (for example, the torque fault injection control signal and the SENT original value control signal are separated into two different messages. The fault injection control message includes: a communication error fault control signal and a cyclic redundancy check failure fault control signal, and different faults are injected through different control signals. The SENT original value control signal can accurately control the data in the SENT signal of the simulated torque, that is, the Raw value, to realize the simulation of torque over-limit fault, torque cross-check failure, torque boundary value test, torque output consistency test, etc., among which, the communication error fault, the cyclic redundancy check failure fault, the torque over-limit fault and the SENT signal status bit fault will cause the torque failure, so the communication error fault, the cyclic redundancy check failure fault, the torque over-limit fault and the SENT signal status bit fault are changed. The T signal status bit fault is set in the torque failure test case, the torque cross-check failure is set in the torque cross-check test case, the torque output consistency test is set in the torque output consistency test case, and the torque boundary value test is set in the boundary value check test case.
[0093] It should be noted that when executing the torque failure test case, including the test of single-channel torque failure, the test of dual-channel torque failure, the test of three-channel torque failure, and the test of four-channel torque failure, when testing the single-channel torque failure, the first type of target fault is injected into the four-channel torque signal respectively: communication error, cyclic redundancy CRC check failure, torque over-limit fault (including value exceeding the upper limit and value exceeding the lower limit), SENT signal status bit fault. It is judged whether the fault status and fault handling of the EPS controller meet expectations, and whether the corresponding diagnostic fault code DTC and event identifier EventID can be correctly reported. Here, whether the fault status and fault handling meet expectations means that the EPS controller lights up a yellow light. If it does, it is considered that the single-channel torque failure detection mechanism of the EPS controller is normal. When testing the dual-channel torque failure, the first type of target fault is injected into any two of the four-channel torque signals at the same time. Determine whether the fault status and fault handling of the EPS controller meet the expected yellow light, and whether the corresponding DTC and EventID can be correctly reported. If all of them are satisfied, it is considered that the two-way torque failure detection mechanism of the EPS controller is normal. When testing three-way torque failure, inject the first type of target fault into any three of the four torque signals at the same time. Determine whether the fault status and fault handling of the EPS controller meet the expected red light, and whether the corresponding DTC and EventID can be correctly reported. If all of them are satisfied, it is considered that the three-way torque failure detection mechanism of the EPS controller is normal. When testing four-way torque failure, inject the first type of target fault into all four torque signals at the same time. Determine whether the fault status and fault handling of the EPS controller meet the expected red light, and whether the corresponding DTC and EventID can be correctly reported. If all of them are satisfied, it is considered that the four-way torque failure detection mechanism of the EPS controller is normal. The specific steps include:
[0094] Acquire four output torque signals of the target torque sensor, wherein the fault state of the electric power steering controller under test is determined according to the states of the four output torque signals;
[0095] If the test case to be executed is a torque failure test case, a first type of target fault is injected into each output torque signal, every two output torque signals, every three output torque signals and four output torque signals respectively, and the first type of target fault includes a communication error fault, a cyclic redundancy check failure fault, a torque over-limit fault, and a SENT signal status bit fault;
[0096] Obtain the corresponding target fault status information according to the different types of target faults injected, including:
[0097] According to the different types of target faults injected, different target fault state information corresponding to the electric power steering controller under test is obtained, wherein the target fault state information includes light-on information, diagnostic fault code and event identifier of the electric power steering controller under test;
[0098] If the lighting information meets the expected settings and the diagnostic fault code and event identifier are correct, it is determined that the single-way torque failure detection mechanism, the dual-way torque failure detection mechanism, the three-way torque failure detection mechanism and the four-way torque failure detection mechanism of the electric power steering controller under test are normal.
[0099] Among them, communication error means that EPS does not receive the torque signal, that is, the torque signal is disconnected. When a communication error occurs, a torque over-limit fault will be reported at the same time, but a communication error fault may not exist when a torque over-limit fault occurs, so the torque over-limit fault is simulated separately.
[0100] The above steps can ensure that the EPS controller can accurately detect and respond to various torque failure faults of the torque sensor, thereby ensuring the safety and reliability of the vehicle.
[0101] Furthermore, when executing the torque cross-check test case, first determine the logic when the torque cross-check is normal. The torque cross-check is the check between the two effective torque original values within the EPS controller software. Because there are four output torque signals, there are six combinations of any two combinations, so the cross-check will be preset to check the six combinations through logic. If the check passes, the priority is also set for the output torque combination. The torque physical value corresponding to the original value of the torque signal is calculated through the decoding formula (Note: The original value of the torque signal is the RAW value of the SENT signal, and the RAW value range is [0,4095], and the torque physical value refers to the torque force value in Nm). Then, according to the priority of the output torque combination, the average value of the two torques with the highest priority is used as the internal control torque of the software. Among them, the decoding formula is a prior art, and the present invention will not be redundantly described here.
[0102] For example, the four output torque signals are represented by M1, M2, S1 and S2 respectively, and the cross-check pass logic is: abs((M1+M2)-4095)<206, abs((S1+S2)-4095)<206, abs((M1+S2)-4095)<206, abs((S1+M2)-4095)<206, abs(M1-S1)<206, abs(M2-S2)<206, and the priority of the output torque combination is: M1M2>S1S2>M1S2>M2S1>M1S1>M2S2. The above specific values can be adjusted according to actual conditions.
[0103] It should be noted that if any torque fails, the EPS controller software will no longer perform cross-checks and torque calculation output related to the torque in the current ignition cycle. For example, if M1 fails, there is no need to perform abs((M1+M2)-4095)<206, abs((M1+S2)-4095)<206, abs(M1-S1)<206 verification, and the priority at this time is S1S2>M2S1>M2S2, and the output torque is the average value of S1S2. When there are three or more torque failures, the EPS controller will stop working and no longer provide assistance.
[0104] The above explains how the torque cross check is performed under normal circumstances. The following will test whether the electric power steering controller under test can identify the torque cross check fault. The first is the test for torque failure. At this time, six groups of torque signals are cross-checked at the same time. If there is no torque cross check failure, the M1M2 torque average value should be used according to the priority. However, the original value of the torque signal will be modified so that it does not meet the torque cross check logic, and then the electric power steering controller under test can be identified. The specific steps include:
[0105] If the test case to be executed is a torque cross-check test case, the priority of the preset cross-check pass logic and output torque combination is obtained, and the output torque combination is obtained by any combination of two of the four output torque signals;
[0106] Determine the validity of the four-way output torque signal;
[0107] If the four output torque signals are all valid, then the first output torque signal of any one of the four output torque signals is selected;
[0108] Modify the original value of the first output torque signal, and perform pairwise verification on the modified four output torque signals through logic according to a preset cross-verification;
[0109] If it is detected that the electric power steering controller under test indicates that the first output torque signal verification has failed, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the first output torque signal, then it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal.
[0110] For example, the four output torque signals are represented by M1, M2, S1 and S2 respectively. The first output torque signal selected is M1. The original value of M1 is modified to increase the original value of M1 by 206. At this time, the six groups of torque cross-checks are checked, and it will be found that all the checks involving M1 have failed. It is determined whether the electric power steering controller under test reports the EventID corresponding to the failure of the M1 torque check, and the output torque is the average value of the S1S2 torque. If so, it is considered that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal. It should be noted that the first output torque signal can also be M2, S1 or S2, and the same detection steps need to be set for each output torque signal.
[0111] Furthermore, cross-check identification tests will be performed for single-way torque failure, two-way torque failure, three-way torque failure and more than three-way torque failure. The specific steps include:
[0112] If the second output torque signal of any one of the four output torque signals is invalid, then the third output torque signal of any one of the three valid output torque signals is selected;
[0113] Modify the original value of the third output torque signal, and perform pairwise verification on the modified three output torque signals through logic according to the preset cross-verification;
[0114] If it is detected that the electric power steering controller under test indicates that the third output torque signal verification fails, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the second output torque signal and the third output torque signal, it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal;
[0115] If two of the four output torque signals are invalid, a fourth output torque signal of any one of the two valid output torque signals is selected;
[0116] Modify the original value of the fourth output torque signal, and verify the modified two output torque signals through logic according to the preset cross-check;
[0117] If it is detected that the output torque of the electric power steering controller under test is 0Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal;
[0118] If three or more of the four output torque signals are invalid, and the output torque of the electric power steering controller under test is detected to be 0 Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal.
[0119] For example, for the test of single-channel torque failure, a fault is injected into M1 to make it fail, then all torque combinations involved in the verification of M1 torque will not be cross-checked, and the output torque is the average value of S1S2 torque; the original value of M2 is increased by 206, and it is determined whether the EPS software reports the cross-check failure EventID of M2 torque, and the current output torque is still the average value of S1S2 torque. If so, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal. It should be noted that if M1 fails, in addition to increasing the original value of M2 by 206, the original values of S1 and S2 can also be increased by 206 for testing, and M2 can also be controlled, S1 or S2 fails, and the test is also performed according to the above steps. For the test of dual-channel torque failure, simulate the failure of M1 and M2, and cross-check the remaining two channels of torque S1 and S2; increase the original value S1 of one of the remaining two channels by 206, and it will be reported that the cross-check of the remaining two channels of torque has failed, and there are no normal outputs in both channels at this time, so it is determined whether the output torque of the EPS controller under test is invalid, which is 0Nm, and the red light is on, and the power assist is stopped. If so, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal. For the test of three or more channels of invalid output torque signals, the torque cross-check is not performed directly, but it is determined whether the output torque of the EPS controller under test is invalid, which is 0Nm, and the red light is on, and the power assist is stopped. If so, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal.
[0120] Furthermore, the torque output consistency test case will be tested. The specific steps include:
[0121] If the test case to be executed is a torque output consistency test case, any two of the four output torque signals are disconnected;
[0122] Control the remaining two output torque signals to change within a preset range;
[0123] The first physical value corresponding to the original value of the remaining two output torque signals is calculated by the upper computer test platform;
[0124] Calculating the second physical values corresponding to the original values of the remaining two output torque signals by the electric power steering controller under test;
[0125] If the first physical value and the second physical value are consistent, it is determined that the torque output consistency test of the electric power steering controller under test is normal.
[0126] Furthermore, the boundary value check test case of the output torque is tested. The specific steps include:
[0127] If the test case to be executed is a boundary value check test case, any two output torque signals of the four output torque signals are disconnected;
[0128] Setting the target torque original values for the remaining two output torque signals according to the preset boundary values;
[0129] Obtain the target torque physical value through the target torque original value;
[0130] If the target torque physical value is within the preset range, it is determined that the boundary value check test of the electric power steering controller under test is normal.
[0131] For example, the preset range is set to [-7Nm, 7Nm]. Since the raw value of the torque is the RAW value of the SENT signal, and the RAW value range is [0, 4095], the preset boundary values are set to 0 and 4095. Since the output torque is a two-way torque output, M1 and M2 can be disconnected, and then the target torque raw value for S1 is set to 0, and the target torque raw value for S2 is set to 4095. At this time, the target torque raw value is converted into a target torque physical value according to the decoding formula, and then the average value is calculated. If the average value is within [-7Nm, 7Nm], it means that the boundary value check test of the electric power steering controller under test is normal.
[0132] Step 103 : acquiring corresponding different target fault status information according to the injected different types of target faults, and storing the information in the target memory of the electric power steering controller under test.
[0133] The target fault status information obtained in the embodiment of the present invention includes fault flag determination, fault level determination, EPS light status determination, DTC and EventID reading, and these information are stored in the target memory of the electric power steering controller under test. Because the power is not turned off, the information at this time does not belong to historical information.
[0134] Step 104 , restarting the electric power steering controller under test through a preset automated test process.
[0135] In the embodiment of the present invention, the torque sensor fault is an irrecoverable fault in the current ignition cycle, so after obtaining different target fault status information, fault recovery can be performed to prepare for the next test. The specific steps include:
[0136] For any type of first fault among the target faults, determining whether the electric power steering controller under test can be normally enabled after the first fault is injected;
[0137] If not, the target torque sensor fault state signal and the unilateral half-byte transmission protocol original value control signal in the automated network test cabinet are adjusted to a normal state through the target local variable identifier;
[0138] Adjust the electric power steering controller under test to a state that allows power-off, and control the electric power steering controller under test to power on again after powering off.
[0139] Among them, when the target fault is injected, the torque fault state control signal and the SENT original value control signal will be changed. At this time, they will be restored, and then the vehicle speed signal and enable signal corresponding to the normal power-off process of the EPS controller will be sent to control KL15 to disconnect, complete the power-off process, and disconnect the XCP connection, and then send the connect KL15 and connect XCP instructions to power on again.
[0140] Step 105: If it is detected that the target fault state information is in the historical record of the target memory after the restart operation, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed.
[0141] After determining to power on again, the embodiment of the present invention will determine whether the target fault status information exists in the historical record. If so, it is considered that the execution of this test case is completed. It should be noted that when executing the test case to be executed, since the fault is an unrecoverable fault, it is executed one by one. The target local variable identifier can mark multiple test cases, but another variable can be set internally to identify different test cases and also to determine when to jump out of the loop.
[0142] For example, there are test cases A to F in the upper computer test platform, among which the test cases to be executed are A, C, and F, so the target local variable identifier 0 is added to A, C, and F. Then, according to the target local variable identifier 0, test cases A, C, and F can be filtered out from test cases A to F, and then identifiers are added to distinguish A, C, and F. Therefore, the identifier of A is 0-0, the identifier of C is 0-1, and the identifier of F is 0-2. A is executed for the first time, and then the variable is added by 1 to get the identifier 0-1. At this time, C is executed according to the identifier, and the loop will jump out after F is executed.
[0143] The present invention provides a fault diagnosis method, device, electronic equipment and vehicle, comprising: setting a target test environment for an electric power steering controller under test through a preset automated test process, and obtaining a target local variable identifier of a test case to be executed, so as to realize automatic and accurate construction of the test environment; when it is determined that the target test environment is normal, obtaining a number of test cases to be executed through the target local variable identifier, and injecting different types of target faults into the electric power steering controller under test according to the test cases to be executed; automatically obtaining the test cases to be executed through the target local variable identifier, and automatically injecting faults through the test cases to be executed, without relying on manual labor and improving the accuracy and reliability of the results, obtaining corresponding different target fault status information according to the injected different types of target faults, and storing it in a target memory of the electric power steering controller under test; restarting the electric power steering controller under test through a preset automated test process, and if it is detected that the target fault status information exists in the historical record of the target memory after the restart operation, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed. Implementing the restart operation through software control avoids the problem of frequent power on and off caused by manual operations, which is prone to errors and leads to inaccurate or unreliable results and high labor costs. The embodiment of the present invention performs fault diagnosis on the electric power steering controller under test through automated test processes and test cases. There is no need to manually adjust the test environment, inject faults, and power on and off, which improves the accuracy and reliability of the diagnostic results and reduces labor costs.
[0144] Reference Figure 4 , Figure 4 FIG. 1 is a flowchart of another fault diagnosis method according to an exemplary embodiment.
[0145] First, the local variable identifier is set, and then the bus communication device is disconnected from the universal measurement and calibration protocol XCP connection of the electric power steering controller under test, and the electric power steering controller under test is controlled to be powered off, and the electric power steering controller under test is changed to standby state, and the sensor fault state signal and the single-sided half-byte transmission protocol original value control signal are adjusted to normal state, power on, fault reading, connect the universal measurement and calibration protocol, and execute the corresponding test case according to the target local variable identifier. The test case includes test case 1...n. After execution, an enable judgment is made. If it cannot be enabled, it is determined that the fault injection is successful. At this time, according to the target local variable identifier, the corresponding fault is restored. After restoration, the normal power-off process is performed, the universal measurement and calibration protocol connection is disconnected, and power is turned on again. The historical fault code is read, the local variable +1, and it is determined whether to continue to loop and execute the next test case. If so, it continues to execute. If not, it is powered off normally, and the automated test process is completed.
[0146] Based on the above embodiments, an embodiment of the present invention further provides a fault diagnosis device.
[0147] Reference Figure 5 , Figure 5 is a block diagram of a fault diagnosis device according to an exemplary embodiment, which may specifically include the following modules:
[0148] The first acquisition module 201 is used to set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier of a test case to be executed.
[0149] The second acquisition module 202 is used to acquire a plurality of test cases to be executed through a target local variable identifier when determining that the target test environment is normal, and inject different types of target faults into the electric power steering controller under test according to the plurality of test cases to be executed.
[0150] The third acquisition module 203 is used to acquire corresponding different target fault state information according to different types of injected target faults, and store the information in the target memory of the electric power steering controller under test.
[0151] The first restart module 204 is used to restart the electric power steering controller under test through a preset automated test process.
[0152] The first determination module 205 is configured to determine that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed if it is detected that the target fault status information is in the historical record of the target memory after the restart operation.
[0153] Optionally, the first acquisition module 201 specifically includes:
[0154] The first control submodule is used to control the bus communication device to disconnect the communication connection with the electric power steering controller under test, and control the electric power steering controller under test to power off.
[0155] The first setting submodule is used to adjust the electric power steering controller under test to a standby state, in which the enable signal of the electric power steering controller under test is in a disabled state, the vehicle speed signal is valid, and the current vehicle speed is a first vehicle speed.
[0156] The second setting submodule is used to adjust the target torque sensor fault state signal and the single-side half-byte transmission protocol original value control signal in the automated network test cabinet to a normal state, and control the electric power steering controller under test to power on.
[0157] The first operation submodule is used to perform target operations on the electric power steering controller under test, and the target operations include initiating a diagnostic session operation, clearing diagnostic information, and reading fault codes.
[0158] The second control submodule is used to control the bus communication device to establish a communication connection with the electric power steering controller under test when it is determined through target operation that the electric power steering controller under test has no faults.
[0159] Optionally, the test cases to be executed include at least one of a torque failure test case, a torque cross-check test case, a torque output consistency test case and a boundary value check test case.
[0160] The second acquisition module 202 specifically includes:
[0161] The first acquisition submodule is used to acquire four output torque signals of the target torque sensor, wherein the fault state of the electric power steering controller under test is determined according to the states of the four output torque signals.
[0162] The fault input submodule is used to inject the first type of target fault into each output torque signal, every two output torque signals, every three output torque signals and four output torque signals respectively if the test case to be executed is a torque failure test case. The first type of target fault includes communication error fault, cyclic redundancy check failure fault, torque over-limit fault and SENT signal status bit fault.
[0163] The third acquisition module 203 specifically includes:
[0164] The second acquisition submodule is used to obtain different target fault status information corresponding to the electric power steering controller under test according to different types of injected target faults. The target fault status information includes lighting information, diagnostic fault code and event identifier of the electric power steering controller under test.
[0165] The first determination submodule is used to determine that the single-way torque failure detection mechanism, the dual-way torque failure detection mechanism, the three-way torque failure detection mechanism and the four-way torque failure detection mechanism of the electric power steering controller under test are normal if the lighting information meets the expected settings and the diagnostic fault code and the event identifier are correct.
[0166] The third acquisition submodule is used to obtain the priority of the preset cross-check through logic and output torque combination if the test case to be executed is a torque cross-check test case. The output torque combination is obtained by combining any two of the four output torque signals.
[0167] The first judgment submodule is used to judge the validity of the four-way output torque signal.
[0168] The first screening submodule is used to screen out a first output torque signal of any one channel from the four output torque signals if all the four output torque signals are valid.
[0169] The first check submodule is used to modify the original value of the first output torque signal, and perform pairwise checks on the modified four output torque signals through logic according to a preset cross-check.
[0170] The second determination submodule is used to determine that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal if it is detected that the electric power steering controller under test indicates that the first output torque signal verification has failed, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the first output torque signal.
[0171] The second screening submodule is used to screen out any third output torque signal from the valid three output torque signals if the second output torque signal of any one of the four output torque signals is invalid.
[0172] The second check submodule is used to modify the original value of the third output torque signal, and perform pairwise checks on the modified three-way output torque signals through logic according to a preset cross-check.
[0173] The third determination submodule is used to determine that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal if it is detected that the electric power steering controller under test indicates that the third output torque signal verification has failed, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the second output torque signal and the third output torque signal.
[0174] The third screening submodule is used to screen out a fourth output torque signal of any one channel from the two valid output torque signals if two of the four output torque signals are invalid.
[0175] The third check submodule is used to modify the original value of the fourth output torque signal, and to check the modified two output torque signals through logic according to a preset cross check.
[0176] The fourth determination submodule is used to determine that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal if it is detected that the output torque of the electric power steering controller under test is 0 Nm and the red light is on.
[0177] The fifth determination submodule is used to determine that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal if three or more of the four output torque signals are invalid and the output torque of the electric power steering controller under test is detected to be 0 Nm and the red light is on.
[0178] The first disconnection submodule is used to disconnect any two output torque signals of the four output torque signals if the test case to be executed is a torque output consistency test case.
[0179] The third control submodule is used to control the remaining two output torque signals to change within a preset range.
[0180] The first calculation submodule is used to calculate the first physical value corresponding to the original value of the remaining two output torque signals through the host computer test platform.
[0181] The second calculation submodule is used to calculate the second physical values corresponding to the original values of the remaining two output torque signals through the electric power steering controller under test.
[0182] The sixth determination submodule is used to determine that the torque output consistency test of the electric power steering controller under test is normal if the first physical value and the second physical value are consistent.
[0183] The second disconnection submodule is used to disconnect any two output torque signals of the four output torque signals if the test case to be executed is a boundary value check test case.
[0184] The third setting submodule is used to set the target torque original value for the remaining two output torque signals according to the preset boundary value.
[0185] The fourth acquisition submodule is used to acquire the target torque physical value through the target torque original value.
[0186] The seventh determination submodule is used to determine whether the boundary value check test of the electric power steering controller under test is normal if the target torque physical value is within a preset range.
[0187] Optionally, the first restart module 204 specifically includes:
[0188] The second judgment submodule is used to judge whether the electric power steering controller under test can be normally enabled after the first fault is injected, for any type of first fault among the target faults.
[0189] The eighth determination submodule is used to adjust the target torque sensor fault state signal and the single-side half-byte transmission protocol original value control signal in the automated network test cabinet to a normal state through the target local variable identifier if it is not possible.
[0190] The fourth control submodule is used to adjust the electric power steering controller under test to a power-off-allowed state, and control the electric power steering controller under test to be powered on again after being powered off.
[0191] The present invention provides a fault diagnosis method, device, electronic equipment and vehicle, comprising: setting a target test environment for an electric power steering controller under test through a preset automated test process, and obtaining a target local variable identifier of a test case to be executed, so as to realize automatic and accurate construction of the test environment; when it is determined that the target test environment is normal, obtaining a number of test cases to be executed through the target local variable identifier, and injecting different types of target faults into the electric power steering controller under test according to the test cases to be executed; automatically obtaining the test cases to be executed through the target local variable identifier, and automatically injecting faults through the test cases to be executed, without relying on manual labor and improving the accuracy and reliability of the results, obtaining corresponding different target fault status information according to the injected different types of target faults, and storing it in a target memory of the electric power steering controller under test; restarting the electric power steering controller under test through a preset automated test process, and if it is detected that the target fault status information exists in the historical record of the target memory after the restart operation, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed. Implementing the restart operation through software control avoids the problem of frequent power on and off caused by manual operations, which is prone to errors and leads to inaccurate or unreliable results and high labor costs. The embodiment of the present invention performs fault diagnosis on the electric power steering controller under test through automated test processes and test cases. There is no need to manually adjust the test environment, inject faults, and power on and off, which improves the accuracy and reliability of the diagnostic results and reduces labor costs.
[0192] An embodiment of the present invention further provides an electronic device, Figure 6 is a structural block diagram of an electronic device provided by an embodiment of the present invention, such as Figure 6 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302, and the memory 303 communicate with each other through the communication bus 304.
[0193] Memory 303, used for storing computer programs;
[0194] The processor 301 is used to execute the program stored in the memory 303 to implement the following steps:
[0195] Set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier for the test case to be executed;
[0196] When it is determined that the target test environment is normal, a plurality of test cases to be executed are obtained through the target local variable identifier, and different types of target faults are injected into the electric power steering controller under test according to the plurality of test cases to be executed;
[0197] Acquire corresponding different target fault state information according to different types of injected target faults, and store the information in a target memory of the tested electric power steering controller;
[0198] Restarting the electric power steering controller under test through a preset automated test process;
[0199] If it is detected after the restart operation that the target fault state information is in the historical record of the target memory, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed.
[0200] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the fault diagnosis method as described in any of the above embodiments of the present application.
[0201] Based on the same inventive concept, another embodiment of the present application provides an embodiment of the present invention further providing a vehicle, which may specifically include: the above-mentioned fault diagnosis device.
[0202] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0203] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0204] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0205] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0206] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0207] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0208] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0209] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0210] The above is a detailed introduction to a fault diagnosis method, device, electronic device and vehicle provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope, and the content of this specification should not be understood as a limitation on the present application.
Claims
1. A fault diagnosis method, It is characterized in that The method comprises: Set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier for the test case to be executed; When it is determined that the target test environment is normal, a plurality of test cases to be executed are obtained through the target local variable identifier, and different types of target faults are injected into the electric power steering controller under test according to the plurality of test cases to be executed; Acquire corresponding different target fault state information according to different types of injected target faults, and store the information in a target memory of the tested electric power steering controller; Restarting the electric power steering controller under test through a preset automated test process; If it is detected after the restart operation that the target fault state information is in the historical record of the target memory, it is determined that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed.
2. The method according to claim 1, It is characterized in that The method of setting a target test environment for the electric power steering controller under test by using a preset automated test process includes: Control the bus communication device to disconnect the communication connection with the electric power steering controller under test, and control the electric power steering controller under test to power off; The electric power steering controller under test is adjusted to a standby state, wherein the enable signal of the electric power steering controller under test is in a disabled state, the vehicle speed signal is valid, and the current vehicle speed is a first vehicle speed; Adjust the target torque sensor fault state signal and the unilateral half-byte transmission protocol original value control signal in the automated network test cabinet to a normal state, and control the electric power steering controller under test to be powered on; Performing target operations on the electric power steering controller under test, wherein the target operations include initiating a diagnostic session operation, clearing diagnostic information, and reading fault codes; When it is determined through the target operation that the electric power steering controller under test has no faults, the control bus communication device is controlled to establish a communication connection with the electric power steering controller under test.
3. The method according to claim 1, It is characterized in that The test cases to be executed include at least one of a torque failure test case, a torque cross-check test case, a torque output consistency test case, and a boundary value check test case; The injecting different types of target faults into the electric power steering controller under test according to the plurality of test cases to be executed comprises: Acquire four output torque signals of the target torque sensor, wherein the fault state of the electric power steering controller under test is determined according to the states of the four output torque signals; If the test case to be executed is a torque failure test case, a first type of target fault is injected into each output torque signal, every two output torque signals, every three output torque signals and four output torque signals respectively, wherein the first type of target fault includes a communication error fault, a cyclic redundancy check failure fault, a torque over-limit fault and a SENT signal status bit fault; The obtaining corresponding different target fault status information according to different types of injected target faults includes: According to the different types of injected target faults, different target fault state information corresponding to the tested electric power steering controller is obtained, wherein the target fault state information includes lighting information, diagnostic fault code and event identifier of the tested electric power steering controller; If the lighting information meets the expected settings and the diagnostic fault code and event identifier are correct, it is determined that the single-way torque failure detection mechanism, the dual-way torque failure detection mechanism, the three-way torque failure detection mechanism and the four-way torque failure detection mechanism of the electric power steering controller under test are normal.
4. The method according to claim 3, It is characterized in that After acquiring the four-way output torque signal of the target torque sensor, the method further includes: If the test case to be executed is a torque cross-check test case, obtaining a preset cross-check pass logic and a priority of an output torque combination, wherein the output torque combination is obtained by any two-by-two combination of the four output torque signals; Determining the validity of the four output torque signals; If the four output torque signals are all valid, then selecting a first output torque signal of any one of the four output torque signals; Modify the original value of the first output torque signal, and perform pairwise verification on the modified four output torque signals through logic according to a preset cross-verification; If it is detected that the electric power steering controller under test indicates that the first output torque signal verification has failed, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the first output torque signal, then it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal.
5. The method according to claim 4, It is characterized in that After determining the validity of the four output torque signals, the method further includes: If the second output torque signal of any one of the four output torque signals is invalid, selecting the third output torque signal of any one of the three valid output torque signals; Modify the original value of the third output torque signal, and perform pairwise verification on the three output torque signals after the modification through logic according to a preset cross-verification; If it is detected that the electric power steering controller under test indicates that the third output torque signal verification fails, and the output torque is the torque average of the output torque combination with the highest priority after excluding the output torque combination including the second output torque signal and the third output torque signal, it is determined that the torque cross-verification failure detection mechanism of the electric power steering controller under test is normal; If two of the four output torque signals are invalid, selecting a fourth output torque signal of any one of the two valid output torque signals; Modifying the original value of the fourth output torque signal, and verifying the modified two output torque signals through logic according to a preset cross-check; If it is detected that the output torque of the electric power steering controller under test is 0Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal; If three or more of the four output torque signals are invalid, and the output torque of the electric power steering controller under test is detected to be 0 Nm and the red light is on, it is determined that the torque cross-check failure detection mechanism of the electric power steering controller under test is normal.
6. The method according to claim 3, It is characterized in that After acquiring the four-way output torque signal of the target torque sensor, the method further includes: If the test case to be executed is a torque output consistency test case, any two of the four output torque signals are disconnected; Control the remaining two output torque signals to change within a preset range; The first physical value corresponding to the original value of the remaining two output torque signals is calculated by the upper computer test platform; Calculating the second physical values corresponding to the original values of the remaining two output torque signals by the electric power steering controller under test; If the first physical value and the second physical value are consistent, it is determined that the torque output consistency test of the electric power steering controller under test is normal.
7. The method according to claim 3, It is characterized in that After acquiring the four-way output torque signal of the target torque sensor, the method further includes: If the test case to be executed is a boundary value check test case, any two output torque signals of the four output torque signals are disconnected; Setting the target torque original values for the remaining two output torque signals according to the preset boundary values; Obtain the target torque physical value through the target torque original value; If the target torque physical value is within the preset range, it is determined that the boundary value check test of the electric power steering controller under test is normal.
8. The method according to claim 1, It is characterized in that The restarting operation of the electric power steering controller under test by using a preset automated test process includes: For any type of first fault among the target faults, determining whether the tested electric power steering controller can be normally enabled after the first fault is injected; If not, the target torque sensor fault state signal and the unilateral half-byte transmission protocol original value control signal in the automated network test cabinet are adjusted to a normal state through the target local variable identifier; The electric power steering controller under test is adjusted to a power-off-allowed state, and the electric power steering controller under test is controlled to be powered on again after being powered off.
9. A fault diagnosis device, It is characterized in that The device comprises: A first acquisition module is used to set a target test environment for the electric power steering controller under test through a preset automated test process, and obtain a target local variable identifier of a test case to be executed; A second acquisition module is used for acquiring a plurality of test cases to be executed through the target local variable identifier when determining that the target test environment is normal, and injecting different types of target faults into the electric power steering controller under test according to the plurality of test cases to be executed; A third acquisition module, used for acquiring corresponding different target fault state information according to different types of injected target faults, and storing the information in a target memory of the tested electric power steering controller; A first restart module, used for restarting the electric power steering controller under test through a preset automated test process; The first determination module is used to determine that the fault diagnosis of the electric power steering controller under test based on the test case to be executed is completed if it is detected that the target fault state information is in the historical record of the target memory after the restart operation.
10. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the fault diagnosis method described in any one of claims 1-8 when executing the program stored in the memory.
11. A vehicle, It is characterized in that include: The fault diagnosis device as claimed in claim 9.
Citation Information
Cited By
Controller fault diagnosis test method and device and electronic equipment
CN119717775A
