Vehicle fault test method, storage medium and electronic equipment
By setting the characteristic signal properties of each sensor signal, a combined test of multiple or multiple faults of EPS is achieved, which solves the problems of inefficient testing and inaccurate fault determination time in the prior art, and improves the efficiency of fault testing and accuracy.
Patent Information
- Application Number
- CN202411258687.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-24
AI Technical Summary
The existing EPS sensor fault testing methods are inefficient in testing, and multiple or multiple combinations of fault testing cannot be implemented simultaneously, and the fault determination time of EPS cannot be accurately tested.
By determining the correct value, fault value, fault start time and fault duration of each characteristic signal under each sensor signal, it is possible to realize any combination of multiple or multiple faults, trigger the timing of the fault test time, and according to the characteristics The signal state adjustment fault value output is output, and the fault status information of the electronic power steering system is read.
It improves the efficiency and testing range of fault testing, and can accurately test the fault determination time of the electronic power steering system, and realizes combined testing of multiple or multiple faults.
Smart Images

Figure CN119178617A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle safety testing, and in particular to a vehicle fault testing method, storage medium and electronic equipment. Background Art
[0002] EPS (Electronic Power Steering) is a system that uses a steering motor to assist the driver in steering. When the vehicle turns, EPS can control the steering motor to output a power torque of appropriate size and direction based on the various sensor signals detected by the sensors installed on the steering gear to assist the driver in steering. When the sensor fails, the sensor signal received by the steering motor may be unreliable. If the power torque output by the EPS-controlled steering motor is determined based on unreliable sensor signals, it will bring huge safety risks to driving.
[0003] At present, the sensor test for EPS mainly tests whether EPS has a diagnostic mechanism for sensors by creating various faults of sensor signals. The fault creation method is usually to manually input the fault value of the sensor signal, and the fault recovery method is to manually input the correct value of the sensor signal. This fault testing method has low test efficiency, cannot implement multiple or multi-channel combined fault tests at the same time, and cannot accurately test the fault judgment time of EPS. Summary of the invention
[0004] The present application provides a vehicle fault testing method, storage medium and electronic device to solve the problem that the current fault testing method has low testing efficiency and cannot accurately test the fault determination time of EPS.
[0005] In order to solve the above problems, this application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a vehicle fault testing method, the method comprising:
[0007] Determine characteristic attributes of at least one characteristic signal of at least one sensor signal; the characteristic attributes include a correct value, a fault value, a fault start time, and a fault duration corresponding to each of the characteristic signals;
[0008] In response to the fault injection instruction, triggering the timing of the fault test time, and determining the fault end time corresponding to at least one of the characteristic signals based on the fault start time and fault duration corresponding to each of the at least one characteristic signal;
[0009] For any of the characteristic signals, when the fault test time reaches the fault start time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is output to the electronic power steering system; when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is output to the electronic power steering system;
[0010] Determine the maximum value among the fault end times corresponding to at least one of the characteristic signals as the fault test end time;
[0011] When the fault test time is greater than the fault test end time, the fault state information of the electronic power steering system is read.
[0012] In an embodiment of the present application, the sensor signal is an SPC signal, and at least one of the characteristic signals includes one or more of a minimum time unit, a state bit, a data value, and a cyclic redundancy check value of the SPC signal;
[0013] The step of determining a characteristic attribute of at least one characteristic signal of at least one sensor signal comprises:
[0014] Based on a first input parameter for the minimum time unit, determining a correct value, a fault value, a fault start time and a fault duration corresponding to the minimum time unit; and / or,
[0015] Based on a second input parameter for the status bit, determining a correct value, a fault value, a fault start time, and a fault duration corresponding to the status bit; and / or,
[0016] Based on a third input parameter for the data value, determining a correct value, a fault value, a fault start time, and a fault duration corresponding to the data value; and / or,
[0017] Based on a fourth input parameter for the cyclic redundancy check value, a fault value, a fault start time and a fault duration corresponding to the cyclic redundancy check value are determined, and based on a preset verification algorithm, a correct value corresponding to the cyclic redundancy check value is determined.
[0018] In one embodiment of the present application, the third input parameter includes a target test parameter;
[0019] The step of determining a correct value corresponding to the data value based on a third input parameter for the data value comprises:
[0020] Based on the target test parameter and a preset parameter conversion algorithm, a correct value corresponding to the data value is determined.
[0021] In an embodiment of the present application, the step of determining the correct value corresponding to the cyclic redundancy check value based on a preset check algorithm includes:
[0022] Determine the fault value or the correct value corresponding to the state bit output to the electronic power steering system as the actual value corresponding to the state bit; and determine the fault value or the correct value corresponding to the data value output to the electronic power steering system as the actual value corresponding to the data value;
[0023] Based on the actual values corresponding to the status bit and the data value respectively and the check algorithm, a correct value corresponding to the cyclic redundancy check value is determined.
[0024] In an embodiment of the present application, the method further includes:
[0025] For any of the characteristic signals, when the fault test time is less than or equal to the fault end time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to a first state flag; the first state flag indicates that the characteristic signal has been injected with a fault;
[0026] For any of the characteristic signals, when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to a second state flag; the second state flag indicates that no fault has been injected into the characteristic signal.
[0027] In an embodiment of the present application, the method further includes:
[0028] Generate a test message based on an actual value corresponding to at least one of the characteristic signals and the fault injection state;
[0029] The test message is sent to the controller area network.
[0030] In an embodiment of the present application, the method further includes:
[0031] In response to the fault injection instruction, setting a fault injection start flag to a third state flag; the third state flag is used to indicate that a fault is being injected into the electronic power steering system;
[0032] In the case where the fault test time is greater than the fault test end time, setting the test end flag to a fourth state flag; the fourth state flag is used to indicate that the fault injection into the electronic power steering system has been completed;
[0033] In response to a reset instruction, the fault injection start flag is set to the fifth state flag, and the test end flag is set to the sixth state flag; the fifth state flag is used to indicate that no fault has been injected into the electronic power steering system, and the sixth state flag is used to indicate that the fault injection into the electronic power steering system has not been completed.
[0034] In an embodiment of the present application, the method further includes:
[0035] When the fault injection start flag is the third state flag, triggering timing of the fault test time;
[0036] When the fault injection start flag is not the third state flag, the fault test time is cleared.
[0037] In a second aspect, based on the same inventive concept, an embodiment of the present application provides a vehicle fault testing device, the device comprising:
[0038] A parameter determination module, used to determine characteristic attributes of at least one characteristic signal of at least one sensor signal; the characteristic attributes include a correct value, a fault value, a fault start time and a fault duration corresponding to each of the characteristic signals;
[0039] A first time determination module, configured to trigger timing for a fault test time in response to a fault injection instruction, and determine a fault end time corresponding to at least one of the characteristic signals based on a fault start time and a fault duration corresponding to each of the at least one characteristic signals;
[0040] a fault testing module, for any of the characteristic signals, when the fault testing time reaches the fault starting time corresponding to the characteristic signal, outputting the fault value corresponding to the characteristic signal to the electronic power steering system; and when the fault testing time is greater than the fault ending time corresponding to the characteristic signal, outputting the correct value corresponding to the characteristic signal to the electronic power steering system;
[0041] A second time determination module, used to determine the maximum value among the fault end times corresponding to at least one of the characteristic signals as the fault test end time;
[0042] The fault reading module is used to read the fault status information of the electronic power steering system when the fault test time is greater than the fault test end time.
[0043] In an embodiment of the present application, the sensor signal is an SPC signal, and at least one of the characteristic signals includes one or more of a minimum time unit, a state bit, a data value, and a cyclic redundancy check value of the SPC signal;
[0044] The parameter determination module comprises:
[0045] a first parameter determination submodule, configured to determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the minimum time unit based on a first input parameter for the minimum time unit; and / or
[0046] A second parameter determination submodule is configured to determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the state bit based on a second input parameter for the state bit; and / or
[0047] A third parameter determination submodule is configured to determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the data value based on a third input parameter for the data value; and / or
[0048] The fourth parameter determination submodule is used to determine the fault value, fault start time and fault duration corresponding to the cyclic redundancy check value based on the fourth input parameter of the cyclic redundancy check value, and determine the correct value corresponding to the cyclic redundancy check value based on a preset verification algorithm.
[0049] In one embodiment of the present application, the third input parameter includes a target test parameter;
[0050] The third parameter determination submodule includes:
[0051] The first correct value determination unit is used to determine the correct value corresponding to the data value based on the target test parameter and a preset parameter conversion algorithm.
[0052] In an embodiment of the present application, the fourth parameter determination submodule includes:
[0053] an actual value determination unit, configured to determine a fault value or a correct value corresponding to the state bit output to the electronic power steering system as the actual value corresponding to the state bit; and to determine a fault value or a correct value corresponding to the data value output to the electronic power steering system as the actual value corresponding to the data value;
[0054] The second correct value determination unit is used to determine the correct value corresponding to the cyclic redundancy check value based on the actual values corresponding to the status bit and the data value and the check algorithm.
[0055] In one embodiment of the present application, the vehicle fault testing device further includes:
[0056] A first setting module is used for, for any of the characteristic signals, when the fault test time is less than or equal to the fault end time corresponding to the characteristic signal, determining the fault value corresponding to the characteristic signal as the actual value of the characteristic signal, and setting the fault injection state of the characteristic signal to a first state flag; the first state flag indicates that the characteristic signal has been injected with a fault;
[0057] The second setting module is used to determine the correct value corresponding to the characteristic signal as the actual value of the characteristic signal for any of the characteristic signals, and set the fault injection state of the characteristic signal to a second state flag bit when the fault test time is greater than the fault end time corresponding to the characteristic signal; the second state flag bit indicates that no fault has been injected into the characteristic signal.
[0058] In one embodiment of the present application, the vehicle fault testing device further includes:
[0059] A message generation module, used to generate a test message based on an actual value corresponding to at least one of the characteristic signals and the fault injection state;
[0060] The message sending module is used to send the test message to the controller area network.
[0061] In one embodiment of the present application, the vehicle fault testing device further includes:
[0062] A third setting module, configured to, in response to the fault injection instruction, set a fault injection start flag to a third state flag; the third state flag is used to indicate that a fault is being injected into the electronic power steering system;
[0063] a fourth setting module, configured to set a test end flag to a fourth state flag when the fault test time is greater than the fault test end time; the fourth state flag is configured to indicate that the fault injection into the electronic power steering system has been completed;
[0064] A reset module is used to respond to a reset instruction, set the fault injection start flag to a fifth state flag, and set the test end flag to a sixth state flag; the fifth state flag is used to indicate that no fault has been injected into the electronic power steering system, and the sixth state flag is used to indicate that the fault injection into the electronic power steering system has not been completed.
[0065] In one embodiment of the present application, the vehicle fault testing device further includes:
[0066] A timing trigger module, configured to trigger timing for the fault test time when the fault injection start flag is the third state flag;
[0067] The timing clearing module is used to clear the fault test time when the fault injection start flag is not the third state flag.
[0068] In the third aspect, based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium on which an executable program is stored. When the executable program is executed by a processor, the vehicle fault testing method proposed in the first aspect of the present application is implemented.
[0069] In a fourth aspect, based on the same inventive concept, an embodiment of the present application provides an electronic device, including:
[0070] A memory for storing an executable program;
[0071] processor;
[0072] When the executable program is executed by the processor, the vehicle fault testing method proposed in the first aspect of the present application is implemented.
[0073] Compared with the prior art, this application has the following advantages:
[0074] A vehicle fault testing method provided in an embodiment of the present application first determines the characteristic attributes of at least one characteristic signal for at least one sensor signal; then, in response to a fault injection instruction, triggers the timing of the fault test time, and determines the fault end time corresponding to at least one characteristic signal based on the fault start time and fault duration corresponding to each of the at least one characteristic signal; and then, for any characteristic signal, when the fault test time reaches the fault start time corresponding to the characteristic signal, outputs the fault value corresponding to the characteristic signal to the electronic power steering system; when the fault test time is greater than the fault end time corresponding to the characteristic signal, outputs the correct value corresponding to the characteristic signal to the electronic power steering system; the maximum value among the fault end times corresponding to each of the at least one characteristic signal is determined as the fault test end time; and then, when the fault test time is greater than the fault test end time, reads the fault status information of the electronic power steering system. The embodiment of the present application sets the correct value, fault value, fault start time and fault duration corresponding to each characteristic signal under each sensor signal, so that the fault corresponding to each characteristic signal can be independently controlled. Then, according to the test requirements, multiple or multi-path faults can be arbitrarily combined to implement multiple or multi-path combined fault testing, effectively improving the test efficiency and test range, and at the same time being able to accurately test the fault judgment time of the electronic power steering system. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0076] Figure 1 is a flowchart of a vehicle fault testing method in one embodiment of the present application;
[0077] Figure 2 It is a functional module schematic diagram of a vehicle fault testing device in one embodiment of the present application;
[0078] Figure 3 It is a structural schematic diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] It should be noted that when EPS is assisting with steering, it usually determines the direction and magnitude of the target assistance based on the steering wheel torque collected by the torque sensor and the steering wheel angle signal collected by the steering wheel angle sensor, and then drives the power motor to provide steering assistance based on the direction and magnitude of the target assistance. When the torque sensor or the steering wheel angle sensor fails, it may cause EPS to have a steering failure, thus posing a driving safety hazard.
[0081] As the concept and regulations of functional safety in the vehicle field continue to develop and improve, the requirements for controller fault diagnosis are becoming more and more stringent. Especially when it comes to EPS steering function, it is closely related to driving safety. Limited by the fault tolerance time of EPS safety goals, EPS requires the fault diagnosis time of sensors to be in milliseconds. And with the continuous development of intelligent driving, sensors with redundant architectures are more widely used, and the diagnostic logic of torque sensors has also expanded from single-channel to multi-channel.
[0082] However, the current fault testing method can usually only perform single-path fault detection on EPS, and when testing each fault, it is necessary to manually inject faults and manually eliminate faults, which has low test efficiency and cannot simultaneously implement multiple or multi-path combined fault testing; at the same time, since this method can only test whether EPS can implement fault diagnosis, it cannot accurately test the fault judgment time of EPS.
[0083] In view of the low testing efficiency of current fault testing methods and the problem that they are unable to accurately test the fault determination time of EPS, the present application aims to provide a vehicle fault testing method. By setting the correct value, fault value, fault start time and fault duration corresponding to each characteristic signal under each sensor signal, the fault corresponding to each characteristic signal can be independently controlled, and then, according to the test requirements, multiple or multi-channel faults can be arbitrarily combined to realize multiple or multi-channel combined fault testing, effectively improving the test efficiency and test range, and at the same time being able to accurately test the fault determination time of the electronic power steering system.
[0084] Reference Figure 1 , shows a vehicle fault testing method of the present application, which may include the following steps:
[0085] S101: Determine a characteristic attribute of at least one characteristic signal of at least one sensor signal.
[0086] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, or an electronic device with the above functions, and this implementation does not impose specific restrictions on the type of the execution subject. This implementation will be described using a simulation device as the execution subject, and the simulation device is connected to the sensor interface of the EPS to be tested.
[0087] In this embodiment, the characteristic attributes include the correct value, fault value, fault start time and fault duration corresponding to any characteristic signal.
[0088] It should be noted that at least one sensor signal may include a torque signal and / or an angle signal, wherein the torque signal is used to simulate the steering wheel torque acquired by the torque sensor, and the angle signal is used to simulate the steering wheel angle signal acquired by the steering wheel angle sensor.
[0089] In this embodiment, for sensors using a redundant architecture, a corresponding number of multi-channel sensor signals can be configured accordingly. For example, if the EPS is connected to torque sensors A1, A2, B1, and B2, the characteristic attribute of at least one characteristic signal of the four sensor signals can be set respectively.
[0090] In this embodiment, the characteristic signal represents the signal parameter in the corresponding sensor signal that can cause sensor failure. For example, for a torque sensor with four torque signals of A1, A2, B1 and B2, when the CRC (Cyclic Redundancy Check) of the torque signal of A1 of the torque sensor is abnormal or the State (state bit) is abnormal, it will cause sensor failure. Then "CRC" and "State" can be used as characteristic signals of the torque signal of A1, and the tester can set the characteristic attributes corresponding to "CRC" and "State" according to the test requirements.
[0091] In this embodiment, in order to achieve a comprehensive test of sensor faults, one or more corresponding characteristic signals may be set for different sensor models and specifications, wherein each characteristic signal may be understood as a fault test item.
[0092] It should be further explained that the correct value of the characteristic signal represents the correct simulation parameter value output by the simulation device to the EPS; the fault value of the characteristic signal represents the incorrect parameter value output by the simulation device to the EPS; the fault start time of the characteristic signal represents the time when the simulation device outputs the fault value to the EPS; and the fault duration of the characteristic signal represents the duration for which the simulation device continues to output the fault value to the EPS.
[0093] In a specific implementation, the simulation device is configured with a human-computer interaction module, which can be a physical button or a human-computer interaction interface such as a display screen. The tester can input corresponding parameters through the human-computer interaction module according to the test requirements, and the simulation device determines the characteristic attributes of at least one characteristic signal for at least one sensor signal based on the input parameters.
[0094] S102: In response to a fault injection instruction, trigger timing for a fault test time, and determine a fault end time corresponding to at least one characteristic signal based on a fault start time and a fault duration corresponding to at least one characteristic signal.
[0095] In this embodiment, after completing the configuration of the characteristic attributes, the tester can trigger the fault injection instruction by operating the preset fault injection start button. The simulation device responds to the fault injection instruction and triggers the test process.
[0096] In this embodiment, in order to achieve unified control of all characteristic signals, the timing of the fault test time will be triggered. If the fault test time starts from 0ms, the current value of the fault test time represents the duration of the entire fault test. For example, when the fault test time reaches 12ms, the duration of the entire fault test is 12ms.
[0097] In this embodiment, the simulation device can automatically calculate the fault end time corresponding to each characteristic signal according to the fault start time and fault duration in each characteristic signal. For example, if the fault start time of a characteristic signal is 0ms and the fault duration is 5ms, then the fault end time of the characteristic signal is 5ms; if the fault start time of a characteristic signal is 5ms and the fault duration is 10ms, then the fault end time of the characteristic signal is 15ms.
[0098] S103: For any characteristic signal, when the fault test time reaches the fault start time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is output to the electronic power steering system; when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is output to the electronic power steering system.
[0099] In this embodiment, since each characteristic signal has its own corresponding correct value, fault value, fault start time and fault duration, when the tester needs to test multiple characteristic signals, the multiple characteristic signals can be independently controlled in parallel.
[0100] In a specific implementation, the simulation device can, for any characteristic signal, start injecting the fault value corresponding to the characteristic signal into the EPS when the fault test time reaches the fault start time corresponding to the characteristic signal; if the simulation device detects that the fault test time is greater than the fault end time corresponding to the characteristic signal, it will immediately stop the fault injection and output the correct value corresponding to the characteristic signal to the EPS. In this way, based on the fault test time, the simulation device can accurately control the fault occurrence time and fault end time of each fault with an accuracy of up to 1ms. For example, the fault duration of a characteristic signal can be set to 12ms, then within 12ms, the simulation device can send a fault value to the EPS every 1ms.
[0101] S104: Determine the maximum value among the fault end times corresponding to at least one characteristic signal as the fault test end time.
[0102] In this embodiment, after calculating the fault end time of the characteristic signal, the simulation device determines the maximum value of the fault end time of multiple characteristic signals as the fault test end time. That is, the fault injection end time indicates the time when the simulation device stops injecting faults into the EPS.
[0103] In a specific implementation, let the fault start time of the characteristic signal n be T_start_n, and the fault duration be T_dura_n, then the fault end time of the characteristic signal n is (T_start_n+T_dura_n).
[0104] In one example, if each sensor signal has 4 characteristic signals, the four sensor signals include 16 characteristic signals in total, and the fault test end time T max =max((T_start_1+T_dura_1), (T_start_2+T_dura_2),…, (T_start_16+T_dura_16)); when T>T max , it indicates that the fault injection operation has been completed.
[0105] S105: When the fault test time is greater than the fault test end time, read the fault status information of the electronic power steering system.
[0106] In this embodiment, when the simulation device detects that the fault test time is greater than the fault test end time, it means that all fault injection operations have been completed. At this time, by reading the fault status information of EPS, it can be verified whether EPS has detected the corresponding fault.
[0107] In this embodiment, by executing the above-mentioned vehicle fault testing method, the simulation device can accurately test the fault determination time of the EPS.
[0108] For example, two fault injection tests can be set for the CRC fault of the A1 road of the torque sensor: in the first fault injection test, the CRC fault duration is set to 11ms; in the second fault injection test, the CRC fault duration is set to 12ms. The fault status information of the EPS is read as follows: in the first fault injection test, the EPS does not report the A1 road sensor fault; in the second fault injection test, the EPS reports the A1 road sensor fault. It can be verified that the fault judgment time of the EPS is 12ms.
[0109] In this embodiment, by executing the above-mentioned vehicle fault testing method, the simulation device can also implement a combined fault test in which two or more faults occur simultaneously.
[0110] Exemplarily, the test requirement of the simulation device is: verify that when a state exception occurs on A1, a CRC exception occurs on B1, and the fault duration = 12ms, the EPS will enter a completely failed state. Then the "fault start time" of the state exception on A1 and the CRC exception on B1 can be set to 0ms, and the "fault duration" can be set to 12ms, thereby ensuring that the two faults occur at the same time and end at the same time after 12ms. If the EPS fault status information is read as "complete failure", the above verification is completed.
[0111] In this embodiment, by executing the above-mentioned vehicle fault testing method, the simulation device can also implement a combined fault test of two or more faults occurring successively.
[0112] For example, the test requirements of the simulation equipment are: verify that EPS reports A1 sensor abnormality for various faults occurring in A1 when the cumulative duration is ≥ 12ms. Then, it can be set that CRC abnormality occurs in A1 signal at 0-4ms and state abnormality occurs at 5-12ms, so that the cumulative time of A1 abnormality is 12ms. If the EPS fault status information is read as "A1 sensor abnormality", the above verification is completed.
[0113] The vehicle fault testing method provided in the embodiment of the present application sets the correct value, fault value, fault start time and fault duration corresponding to each characteristic signal under each sensor signal, so that the fault corresponding to each characteristic signal can be independently controlled, and then according to the test requirements, multiple or multi-path faults can be arbitrarily combined to realize multiple or multi-path combined fault testing, effectively improving the test efficiency and test range, and at the same time being able to accurately test the fault judgment time of the electronic power steering system.
[0114] In a feasible implementation, considering that the sensor usually transmits steering wheel torque information or steering wheel angle signal to EPS through SPC (Short PWM Code) signal, therefore, when the sensor signal is SPC signal, based on the characteristics of SPC signal, at least one characteristic signal may include one or more of the minimum time unit, state bit, data value and cyclic redundancy check value of SPC signal; S101 may specifically include the following sub-steps:
[0115] S101 -A: Based on a first input parameter for a minimum time unit, determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the minimum time unit.
[0116] In this embodiment, the sensor signal may also be a PWM (Pulse Width Modulation) signal. In this case, the at least one characteristic signal represents a PWM signal parameter that may cause a sensor failure.
[0117] It should be noted that due to the low data resolution of PWM signals and the increasing complexity of sensors and EPS controllers in smart driving vehicles, the electromagnetic interference generated is also increasing. Traditional PWM communication methods are gradually unable to meet the safety communication requirements between EPS controllers and vehicles. Therefore, SPC signals with higher resolution and stronger anti-interference capabilities are currently used to achieve communication between sensors and EPS.
[0118] It should be further explained that the SPC signal is an enhanced communication protocol based on the SENT (Single Edge Nibble Transmission) protocol. It realizes data transmission through the pulse width between the falling edges of two adjacent cycles. The minimum time unit (Tick) of the SPC signal represents the basis for determining the pulse width encoding in the SPC protocol, which determines the time interval between two adjacent falling edges, thereby determining the transmitted data value.
[0119] In a specific implementation, the tester can input the first input parameter for the minimum time unit through the human-computer interaction module of the simulation device, so that the simulation device can determine the correct value, fault value, fault start time and fault duration corresponding to the minimum time unit.
[0120] In this embodiment, the correct value of the minimum time unit can be set to a range value. For example, when the minimum time unit is 2.5 μs, the correct value of the minimum time unit can be set to 2 μs-3 μs; the fault value of the minimum time unit is the time beyond the range value, such as 3.1 μs.
[0121] S101 -B: Based on the second input parameter for the status bit, determine the correct value, fault value, fault start time and fault duration corresponding to the status bit.
[0122] It should be noted that the state bit (State) of the SPC signal is a component of the data frame and is used to represent the current state information of the sensor.
[0123] In a specific implementation, the tester can input a second input parameter for the status bit through the human-computer interaction module of the simulation device, so that the simulation device can determine the correct value, fault value, fault start time and fault duration corresponding to the status bit. The correct value of the status bit can be set to 0, and the fault value of the status bit can be set to 1.
[0124] S101 -C: Based on a third input parameter for the data value, determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the data value.
[0125] It should be noted that the data value (DataValue) of the SPC signal is determined by measuring the pulse width between the falling edges of two adjacent cycles. Each pulse represents a part of the data, and different data values can be transmitted through different pulse widths. For example, for the torque signal, the EPS can determine the transmitted data value by measuring and decoding the SPC signal, and then determine the corresponding torque value based on the data value.
[0126] In a specific implementation, the tester can input a third input parameter through the human-computer interaction module of the simulation device for the data value, so that the simulation device can determine the correct value, fault value, fault start time and fault duration corresponding to the data value.
[0127] In this embodiment, the third input parameter includes a target test parameter; S101-C may specifically include the following sub-steps:
[0128] S101-C-1: Determine the correct value corresponding to the data value based on the target test parameter and the preset parameter conversion algorithm.
[0129] It should be noted that the target test parameter refers to the sensor parameter set by the tester, and the target test parameter can be a torque value or an angle value. For example, when testing a torque sensor, the tester can input the target test parameter as 10 N·m.
[0130] In this embodiment, in order to realize the simulation of the SPC signal, the simulation device will convert the target test parameter into a correct value corresponding to the data value according to a preset parameter conversion algorithm.
[0131] It should be noted that the parameter conversion algorithm is used to convert the target test parameter into a data value in the SPC signal, which can reflect the corresponding relationship between the target test parameter and the data value. The parameter conversion algorithm can be determined according to the test item requirements, and sensors of different specifications can use different parameter conversion algorithms. For example, the parameter conversion algorithm used in test item 1 can specify that the data value corresponding to 10N·m is 3712, and the parameter conversion algorithm used in test item 2 can specify that the DataValue value corresponding to 7N·m is 3712.
[0132] In this embodiment, the simulation device can automatically calculate the correct value corresponding to the corresponding data value according to the target test parameters input by the tester, thereby effectively simplifying the tester's operation and improving test efficiency.
[0133] S101-D: Based on the fourth input parameter for the cyclic redundancy check value, determine the fault value, fault start time and fault duration corresponding to the cyclic redundancy check value, and based on a preset verification algorithm, determine the correct value corresponding to the cyclic redundancy check value.
[0134] It should be noted that the cyclic redundancy check value (CRC) of the SPC signal is obtained by performing specific mathematical operations on some data fields in the data frame. This operation includes a series of bit operations, such as bitwise exclusive OR (XOR), bit shift, etc., and finally generates a specific value, namely the CRC check value. This value is then appended to the end of the data frame as a check field (CRC Nibble). When the data frame is received, the receiver will use the same CRC algorithm to operate on the received data frame to generate a new CRC check value. The receiver then compares this newly generated CRC value with the CRC check field attached to the data frame. If the two values are the same, it can be considered that there is no error in the data frame during transmission; if they are different, it indicates that the data may have been damaged or tampered with.
[0135] In a specific implementation, the tester can input a fourth input parameter for the cyclic redundancy check value through the human-computer interaction module of the simulation device, so that the simulation device can determine the fault value, fault start time and fault duration corresponding to the data value, and determine the correct value corresponding to the cyclic redundancy check value based on a preset verification algorithm.
[0136] In this embodiment, the data field (ie, data value) and the status field (ie, status bit) in the SPC signal can be used to automatically calculate through a verification algorithm. Specifically, S101-D may include the following sub-steps:
[0137] S101-D-1: Determine the fault value or correct value corresponding to the status bit output to the electronic power steering system as the actual value corresponding to the status bit; and determine the fault value or correct value corresponding to the data value output to the electronic power steering system as the actual value corresponding to the data value.
[0138] In this embodiment, the actual value represents the parameter value actually used when the simulation device outputs the SPC signal. Taking the status bit as an example, when the fault test time is less than or equal to the fault end time corresponding to the status bit, the actual value output by the simulation device to the EPS is the fault value of the status bit; when the fault test time of the status bit is greater than the fault end time corresponding to the status bit, the actual value output by the simulation device to the EPS is the correct value of the status bit.
[0139] S101-D-2: Based on the actual values corresponding to the status bit and the data value and the verification algorithm, determine the correct value corresponding to the cyclic redundancy check value.
[0140] In this embodiment, the verification algorithm can also be determined according to the test item requirements, that is, sensors of different specifications can use different verification algorithms, such as a cyclic redundancy check algorithm, or a verification algorithm agreed upon with the sensor supplier.
[0141] In this implementation, the simulation device can automatically calculate the correct value corresponding to the corresponding cyclic redundancy check value during the test process by setting the check algorithm.
[0142] Exemplarily, a torque sensor with 4 SPC signals is used as an example for feature decomposition. The 4 SPC signals of the sensor include: A1 torque signal, A2 torque signal, B1 torque signal, and B2 torque signal. For each SPC signal, there are 4 characteristic signals related to sensor failure: the minimum time unit (Tick) of the SPC signal, the state bit (State), the cyclic redundancy check value (CRC), and the data value (DataValue). Therefore, for a torque sensor with 4 torque signals, a total of 16 features are decomposed, numbered as feature 1, feature 2, ..., feature 16, as shown in Table 1.
[0143] Table 1 Characteristic signal decomposition table of four-way torque sensor
[0144] A1 Road A2 Road B1 Road B2 Road Tick Feature 1 Feature 5 Feature 9 Feature 13 State Feature 2 Feature 6 Feature 10 Feature 14 CRC Feature 3 Feature 7 Feature 11 Feature 15 DataValue Feature 4 Feature 8 Feature 12 Feature 16
[0145] In this embodiment, for any characteristic signal among characteristics 1 to 16, before performing a fault test, the characteristic attributes of the characteristic signal can be set, and the characteristic attributes include: correct value, fault value, fault start time and fault duration. In this way, by setting parameters for the characteristic attributes of each characteristic signal, a combination test of multiple or multi-path faults can be achieved.
[0146] In a feasible implementation manner, the vehicle fault testing method may further include the following steps:
[0147] S201: For any characteristic signal, when the fault test time is less than or equal to the fault end time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to the first state flag; the first state flag indicates that the characteristic signal has been injected with a fault.
[0148] In this embodiment, in order to facilitate fault testing and data analysis, two additional characteristic attributes including actual value and fault injection state are configured for any characteristic signal. Thus, each characteristic signal can include six characteristic attributes: correct value, fault value, actual value, fault start time, fault duration and fault injection state.
[0149] S202: For any characteristic signal, when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to the second state flag; the second state flag indicates that the characteristic signal has not been injected with a fault.
[0150] In this embodiment, the fault injection state indicates whether a fault is injected into the current characteristic signal.
[0151] Exemplarily, the first state bit can be represented by 1, and the second state bit can be represented by 0. When the fault injection state is 0, the actual value = the correct value, indicating that the characteristic signal has not been injected with a fault; when the fault injection state is 1, the actual value is a fault value, that is, the actual value ≠ the correct value, indicating that the characteristic signal has been injected with a fault.
[0152] In this embodiment, the actual value and fault injection state of each characteristic signal will be updated in real time during the fault test according to the magnitude relationship between the fault end time of each characteristic signal and the fault test time. During the fault test process, the simulation device will store the actual value and fault injection state of the characteristic signal at each moment.
[0153] In this embodiment, by configuring six characteristic attributes for each characteristic signal, the tester can observe the fault test process in a timely and comprehensive manner, and it is also convenient for the tester to perform data analysis on the fault test process.
[0154] In a feasible implementation manner, the vehicle fault testing method may further include the following steps:
[0155] S301: Generate a test message based on an actual value and a fault injection state corresponding to at least one characteristic signal.
[0156] In this embodiment, the simulation device can generate a test message according to a preset update cycle. That is, a test message is generated every preset update cycle according to the actual value and fault injection state corresponding to at least one characteristic signal.
[0157] Exemplarily, based on features 1 to 16 provided by the four-way torque sensor shown in Table 1, with reference to Table 2, an example table of a test message is shown.
[0158] Table 2 Test message example table
[0159]
[0160]
[0161]
[0162]
[0163] It should be noted that the actual values of some features can be converted into physical values according to needs to achieve the purpose of simplifying data.
[0164] S302: Send the test message to the controller area network.
[0165] In this embodiment, considering that vehicles usually use CAN (Controller Area Network) bus for data communication, the simulation device will generate a test message based on the CAN protocol and send the test message to the CAN bus. In this way, the tester can read the test message from the CAN bus and observe the test records of the simulation device at each moment in a comprehensive and intuitive manner based on the test message, that is, it can intuitively understand when the simulation device injected a fault, when the injected fault was cancelled, and the duration of the fault.
[0166] In a specific implementation, in order to ensure that the update information of the SPC signal monitored from the CAN bus is not lost, the message period of the simulation device for the test message can be set to be less than or equal to the data transmission period of the simulation device for the EPS. For example, when the data transmission period of the simulation device is 1ms, that is, when the simulation device sends a fault value or a correct value to the EPS every 1ms, the message period can be set to ≤1ms, for example, to 1ms.
[0167] In this implementation, all the contents of the test message shown in Table 2 may be arranged in the same CAN FD (CAN with Flexible Data-Rate) message according to the format requirements of the CAN protocol, and sent out in real time with a period of 1 ms.
[0168] In this embodiment, by sending out test messages reflecting the fault injection situation in real time through CAN communication, closed-loop monitoring and data preservation of the fault injection state can be achieved. In this way, the simulation device records the fault injection process by saving the test data, which is convenient for the tester to perform data analysis later.
[0169] In a feasible implementation manner, the vehicle fault testing method may further include the following steps:
[0170] S401: In response to a fault injection instruction, a fault injection start flag is set to a third state flag.
[0171] In this implementation, the third state flag is used to indicate a positive electronic power steering system injection fault.
[0172] In this embodiment, in order to achieve orderly control of the fault injection process by the simulation device, a fault injection start flag is set to indicate whether the simulation device injects a fault into the electronic power steering system at any time.
[0173] In this embodiment, after the simulation device sets the fault injection start flag to the third state flag, the third state flag can also be implemented through the human-computer interaction interface, so that the tester can observe in real time whether the simulation device is injecting faults into the electronic power steering system.
[0174] In the specific implementation, the simulation device also updates the test progress bar in real time on the human-computer interaction interface according to the fault test time and the end time of the fault test to display the specific fault test progress. For example, when the fault test time is 0ms, the test progress bar displays 0%, and when the fault test time reaches the end time of the fault test, the test progress bar displays 100%.
[0175] In this embodiment, the simulation device can also control the timing of the timer according to the position of the fault injection start flag. Specifically, the simulation device can trigger the timing of the fault test time when it is detected that the fault injection start flag is the third state flag; when the fault injection start flag is not the third state flag, the fault test time is reset.
[0176] In this embodiment, by setting the trigger logic and reset logic of the fault test time, automatic timing and automatic reset of the fault test time can be achieved without the need for manual triggering or manual reset by the tester, thereby reducing the operational burden of the tester.
[0177] S402: When the fault test time is greater than the fault test end time, the test end flag is set to the fourth state flag.
[0178] In this implementation, the fourth state flag is used to indicate that the fault injection into the electronic power steering system has been completed.
[0179] In a specific implementation, after the simulation device sets the test end flag to the fourth state flag, the fourth state flag can also be implemented through a human-computer interaction interface, so that the tester can be informed in time that the fault injection has been completed.
[0180] S403: In response to the reset instruction, the fault injection start flag is set to the fifth state flag, and the test end flag is set to the sixth state flag.
[0181] In this implementation, the fifth state flag is used to indicate that the fault injection into the electronic power steering system is not completed, and the sixth state flag is used to indicate that the fault injection into the electronic power steering system is not completed.
[0182] In this embodiment, the tester can trigger the fault injection instruction through the preset fault injection start button. After completing the fault injection, the tester can also trigger the reset instruction through the fault injection start button; or trigger the reset instruction through a separately configured reset button. Among them, the fault injection start button and the reset button can be physical buttons or virtual buttons.
[0183] In this embodiment, once the tester presses the reset command, the fault injection start flag bit and the test end flag bit will be reset to the initial state. Among them, the fifth state flag bit and the sixth state flag bit can both be represented by 0, and the third state flag bit and the fourth state flag bit can both be represented by 1.
[0184] In this implementation, by setting the fault injection start flag and the test end flag, the tester can timely and intuitively observe whether the simulation device has completed the fault test.
[0185] Exemplarily, the tester can complete the fault injection test of the four-way torque sensor by following the steps below:
[0186] Step 1: The tester pre-sets the test process in the human-computer interaction interface. That is, the characteristic attributes are set, including the target test parameters (i.e. torque value) and the fault value, fault start time, and fault duration of each characteristic signal. Among them, the default setting values of the fault start time and fault duration are 0, and the tester can modify them according to the test requirements.
[0187] Step 2: The tester clicks the fault injection start button on the human-computer interaction interface. The simulation device sets the fault injection start flag to 1, and the timer triggers the timing of the fault test time T.
[0188] Step 3: The simulation device injects faults for each characteristic signal according to the corresponding fault start time and fault duration. For characteristic n, its fault start time is T_start_n, its fault duration is T_dura_n, and its fault end time is T_start_n+T_dura_n. When T_start_n<T≤(T_start_n+T_dura_n), the actual value of the characteristic signal = the fault value; otherwise, the actual value of the characteristic signal = the correct value.
[0189] Step 4: When the simulation device detects that the fault test time T>max((T_start_1+T_dura_1), ..., (T_start_16+T_dura_16)), the test end flag is automatically set to 1 in the human-computer interaction interface to prompt the tester that the fault injection is completed.
[0190] Step 5: The tester clicks the fault injection start button on the human-computer interaction interface again. The simulation device sets the fault injection start flag to 0 and the test end flag on the human-computer interaction interface to 0, preparing for the next fault injection.
[0191] Specifically, combined with Table 1, the simulation device can complete the following three types of tests:
[0192] (1) Test on EPS fault determination time.
[0193] Test requirement: Verify that the fault judgment time of EPS for abnormal sensor A1 state is 12ms (the normal value of A1 state is 0, and the abnormal value is 1).
[0194] Test idea: By setting the "fault duration", the duration of the fault can be precisely controlled (accuracy is 1ms). Two fault injections are set: for the first fault injection, the fault duration is set to 11ms, and for the second fault injection, the fault duration is set to 12ms. Result judgment: After the first fault injection, EPS did not report the A1 sensor fault, and after the second fault injection, EPS reported the A1 sensor fault, proving that the fault judgment time is 12ms.
[0195] Test preconditions: EPS, simulation equipment, data monitoring and recording nodes are all connected to the same CAN bus; the simulation equipment is connected to the EPS torque sensor interface; EPS is powered on without faults. The data monitoring and recording node is used to read the fault code of EPS.
[0196] Testing process:
[0197] ①The tester sets up the interactive interface (first fault injection).
[0198] Set the characteristic attributes of characteristic 2: fault value = 1, fault start time = 0, fault duration = 11;
[0199] Feature attributes of features 1, 3 to 16: Fault duration = 0.
[0200] ② The tester clicks the fault injection start button on the interactive interface, setting the fault injection start mark to 1 and starting the timer.
[0201] ③The output of the simulation device changes with the fault test time T.
[0202] When 0<T≤11ms,
[0203] Feature attributes of feature 2: actual value = 1, fault injection status = 1 (injected);
[0204] Feature attributes of features 1, 3 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0205] Test end flag = 0 (not ended);
[0206] When T>11ms,
[0207] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0208] Feature attributes of features 1, 3 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0209] Test end flag = 1 (end).
[0210] ④ When the tester observes that the test end mark position of the interactive interface is 1, he clicks the fault injection start button of the interactive interface again to make the fault injection start mark position 0 and the test end mark position 0.
[0211] ⑤The tester reads the EPS fault code through the data monitoring and recording node: no fault.
[0212] ⑥The tester sets up the interactive interface (second fault injection).
[0213] Set the characteristic attributes of characteristic 2: fault value = 1, fault start time = 0, fault duration = 12;
[0214] Feature attributes of features 1, 3 to 16: Fault duration = 0.
[0215] ⑦ The tester clicks the fault injection start button on the interactive interface, setting the fault injection start mark to 1 and starting the timer.
[0216] ⑧The output of the simulation device changes with the fault test time T.
[0217] When 0<T≤12ms,
[0218] Feature attributes of feature 2: actual value = 1, fault injection status = 1 (injected);
[0219] Feature attributes of features 1, 3 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0220] Test end flag = 0 (not ended);
[0221] When T>12ms,
[0222] Feature attributes of feature 2: actual value = 0, fault injection status = 0 (not injected)
[0223] Feature attributes of features 1, 3 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0224] Test end flag = 1 (end).
[0225] ⑨ When the tester observes that the test end mark position on the interactive interface is 1, he clicks the fault injection start button on the interactive interface again to make the fault injection start mark position 0 and the test end mark position 0.
[0226] ⑩The tester reads the EPS fault code through the data monitoring and recording node: Torque sensor A1 line fault.
[0227] Conclusion: The fault judgment time of EPS is 12ms.
[0228] (2) Combined fault testing for simultaneous faults on two or more paths.
[0229] Test requirement: Verify that when a state abnormality occurs on A1, a CRC abnormality occurs on B1, and the fault duration = 12ms, EPS will enter a complete failure state (the normal value of the state of A1 is 0, and the abnormal value is 1; when the torque value is 0, the correct CRC value of B1 is 8).
[0230] Test idea: By setting the "fault start time" of the A1 state exception and the B1 CRC exception to 0ms and the "fault duration" to 12ms, it can be ensured that the two faults occur at the same time and end at the same time after lasting for 12ms.
[0231] Test prerequisites: EPS, simulation equipment, data monitoring and recording nodes are all connected to the same CAN bus; the simulation equipment is connected to the EPS torque sensor interface; EPS is powered on without any faults.
[0232] Testing process:
[0233] ①The tester sets up the interactive interface (first fault injection).
[0234] Set torque value = 0Nm;
[0235] Feature attributes of feature 2: fault value = 1, fault start time = 0, fault duration = 12;
[0236] Feature attributes of feature 11: fault value = 15, fault start time = 0, fault duration = 12;
[0237] Feature attributes of features 1, 3 to 10, and 12 to 16: Fault duration = 0.
[0238] ② The tester clicks the fault injection start button on the interactive interface, setting the fault injection start mark to 1 and starting the timer.
[0239] ③The output of the simulation device changes with the fault test time T.
[0240] When 0<T≤12ms,
[0241] Feature attributes of feature 2: actual value = 1, fault injection status = 1 (injected);
[0242] Feature attributes of feature 11: actual value = 15, fault injection status = 1 (injected);
[0243] Feature attributes of features 1, 3-10, 12-16: actual value = correct value, fault injection state = 0 (not injected);
[0244] Test end flag = 0 (not ended);
[0245] When T>12ms,
[0246] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0247] Feature attributes of feature 11: actual value = 8, fault injection state = 0 (not injected);
[0248] Feature attributes of features 1, 3-10, 12-16: actual value = correct value, fault injection state = 0 (not injected);
[0249] Test end flag = 1 (end).
[0250] ④ When the tester observes that the test end mark position on the interactive interface is 1, he clicks the fault injection start button on the interactive interface again to make the fault injection start mark position 0 and the test end mark position 0.
[0251] ⑤The tester reads the EPS fault status through the "Data Monitoring and Recording Node": complete failure.
[0252] Conclusion: When a state exception occurs on A1, a CRC exception occurs on B1, and the fault duration = 12ms, EPS will enter a complete failure state.
[0253] (3) Combined fault testing for two or more paths where faults occur successively.
[0254] Test requirements: For abnormalities in A1 (including tick, state, CRC, and DataValue abnormalities), verify that EPS reports abnormalities in A1 sensor when the cumulative duration is ≥12ms for various faults in A1. (The normal value of A1 tick is 2 to 3; the normal value of state is 0, and the abnormal value is 1; when the torque value is 7Nm, the DataValue value of A1 is 3711, and the correct CRC value is 5; when the DataValue value of A1 is 3712, the correct CRC value is 3; the normal value range of DataValue is 384 to 3711).
[0255] Test idea: By setting the interactive panel, the A1 signal will have a tick fault at 0-3ms, a state fault at 4-6ms, a CRC fault at 7-9ms, and a DataValue fault at 10-12ms, so that the cumulative time of the A1 abnormality is 12ms.
[0256] Test prerequisites: EPS, simulation equipment, data monitoring and recording nodes are all connected to the same CAN bus; the simulation equipment is connected to the EPS torque sensor interface; EPS is powered on without any faults.
[0257] Testing process:
[0258] ①The tester sets up the interactive interface (first fault injection).
[0259] Set torque value = 7Nm;
[0260] Feature attributes of feature 1: fault value = 3.1, fault start time = 0, fault duration = 3;
[0261] Feature attributes of feature 2: fault value = 1, fault start time = 3, fault duration = 3;
[0262] Feature attributes of feature 3: fault value = 15, fault start time = 6, fault duration = 3;
[0263] Feature attributes of feature 4: fault value = 3712, fault start time = 9, fault duration = 3;
[0264] Feature attributes of features 5 to 16: Fault duration = 0.
[0265] ② The tester clicks the fault injection start button on the interactive interface, setting the fault injection start mark to 1 and starting the timer.
[0266] ③The output of the simulation device changes with the fault test time T.
[0267] When 0<T≤3ms,
[0268] Feature attributes of feature 1: actual value = 3.1, fault injection status = 1 (injected);
[0269] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0270] Feature attributes of feature 3: actual value = 5, fault injection state = 0 (not injected);
[0271] Feature attributes of feature 4: actual value = 3711, fault injection status = 0 (not injected);
[0272] Feature attributes of features 5 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0273] Test end flag = 0 (not ended);
[0274] When 3<T≤6ms,
[0275] Feature attributes of feature 1: actual value = 2.5, fault injection state = 0 (not injected);
[0276] Feature attributes of feature 2: actual value = 1, fault injection status = 1 (injected);
[0277] Feature attributes of feature 3: actual value = 7, fault injection state = 0 (not injected);
[0278] Feature attributes of feature 4: actual value = 3711, fault injection status = 0 (not injected);
[0279] Feature attributes of features 5 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0280] Test end flag = 0 (not ended);
[0281] When 6<T≤9ms,
[0282] Feature attributes of feature 1: actual value = 2.5, fault injection state = 0 (not injected);
[0283] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0284] Feature attributes of feature 3: actual value = 15, fault injection status = 1 (injected);
[0285] Feature attributes of feature 4: actual value = 3711, fault injection status = 0 (not injected);
[0286] Feature attributes of features 5 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0287] Test end flag = 0 (not ended);
[0288] When 9<T≤12ms,
[0289] Feature attributes of feature 1: actual value = 2.5, fault injection state = 0 (not injected);
[0290] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0291] Feature attributes of feature 3: actual value = 3, fault injection state = 0 (not injected);
[0292] Feature attributes of feature 4: actual value = 3712, fault injection status = 1 (injected);
[0293] Feature attributes of features 5 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0294] Test end flag = 0 (not ended);
[0295] When T>12ms,
[0296] Feature attributes of feature 1: actual value = 2.5, fault injection state = 0 (not injected);
[0297] Feature attributes of feature 2: actual value = 0, fault injection state = 0 (not injected);
[0298] Feature attributes of feature 3: actual value = 5, fault injection state = 0 (not injected);
[0299] Feature attributes of feature 4: actual value = 3711, fault injection status = 0 (not injected);
[0300] Feature attributes of features 5 to 16: actual value = correct value, fault injection status = 0 (not injected);
[0301] Test end flag = 1 (end).
[0302] ④ When the tester observes that the test end mark position of the interactive interface is 1, he clicks the fault injection start button of the interactive interface again to make the fault injection start mark position 0 and the test end mark position 0.
[0303] ⑤The tester reads the EPS fault code through the "Data Monitoring and Recording Node": Torque sensor A1 line fault.
[0304] Conclusion: When the cumulative duration of various faults occurring in the A1 road is ≥12ms, EPS can report the A1 road sensor abnormality.
[0305] The vehicle fault testing method provided in the embodiment of the present application sets the correct value, fault value, fault start time and fault duration corresponding to each characteristic signal under each sensor signal, so that the fault corresponding to each characteristic signal can be independently controlled, and then, according to the test requirements, multiple or multi-path faults can be arbitrarily combined to achieve multiple or multi-path combined fault testing, effectively improve the test efficiency and test range, and accurately test the fault judgment time of the electronic power steering system; at the same time, by sending the test message reflecting the fault injection situation in real time through CAN communication, closed-loop monitoring and data preservation of the fault injection state can be achieved, which is convenient for the test personnel to conduct subsequent review and data analysis.
[0306] In the second aspect, based on the same inventive concept, refer to Figure 3 The embodiment of the present application provides a vehicle fault testing device, the vehicle fault testing device 300 includes:
[0307] The parameter determination module 201 is used to determine the characteristic attributes of at least one characteristic signal of at least one sensor signal; the characteristic attributes include the correct value, fault value, fault start time and fault duration corresponding to each of the characteristic signals;
[0308] A first time determination module 202 is used to trigger timing for a fault test time in response to a fault injection instruction, and determine a fault end time corresponding to at least one characteristic signal based on a fault start time and a fault duration corresponding to each of the at least one characteristic signal;
[0309] The fault testing module 203 is used for outputting the fault value corresponding to the characteristic signal to the electronic power steering system when the fault testing time reaches the fault starting time corresponding to the characteristic signal for any characteristic signal; and outputting the correct value corresponding to the characteristic signal to the electronic power steering system when the fault testing time is greater than the fault ending time corresponding to the characteristic signal;
[0310] The second time determination module 204 is used to determine the maximum value of the fault end time corresponding to each of the at least one characteristic signal as the fault test end time;
[0311] The fault reading module 205 is used to read the fault status information of the electronic power steering system when the fault test time is greater than the fault test end time.
[0312] In one embodiment of the present application, the sensor signal is an SPC signal, and the at least one characteristic signal includes one or more of a minimum time unit, a state bit, a data value, and a cyclic redundancy check value of the SPC signal;
[0313] The parameter determination module 201 includes:
[0314] A first parameter determination submodule is configured to determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the minimum time unit based on a first input parameter for the minimum time unit; and / or,
[0315] A second parameter determination submodule is used to determine a correct value, a fault value, a fault start time and a fault duration corresponding to the state bit based on a second input parameter for the state bit; and / or,
[0316] A third parameter determination submodule is configured to determine a correct value, a fault value, a fault start time, and a fault duration corresponding to the data value based on a third input parameter for the data value; and / or,
[0317] The fourth parameter determination submodule is used to determine the fault value, fault start time and fault duration corresponding to the cyclic redundancy check value based on the fourth input parameter for the cyclic redundancy check value, and determine the correct value corresponding to the cyclic redundancy check value based on a preset verification algorithm.
[0318] In one embodiment of the present application, the third input parameter includes a target test parameter;
[0319] The third parameter determination submodule includes:
[0320] The first correct value determination unit is used to determine the correct value corresponding to the data value based on the target test parameter and a preset parameter conversion algorithm.
[0321] In an embodiment of the present application, the fourth parameter determination submodule includes:
[0322] an actual value determination unit, configured to determine a fault value or a correct value corresponding to a state bit output to the electronic power steering system as an actual value corresponding to the state bit; and to determine a fault value or a correct value corresponding to a data value output to the electronic power steering system as an actual value corresponding to the data value;
[0323] The second correct value determination unit is used to determine the correct value corresponding to the cyclic redundancy check value based on the actual values corresponding to the state bit and the data value and the verification algorithm.
[0324] In one embodiment of the present application, the vehicle fault testing device 200 further includes:
[0325] A first setting module is used for, for any characteristic signal, when the fault test time corresponding to the characteristic signal is less than or equal to the fault duration, determining the fault value corresponding to the characteristic signal as the actual value of the characteristic signal, and setting the fault injection state of the characteristic signal to a first state flag; the first state flag indicates that the characteristic signal has been injected with a fault;
[0326] The second setting module is used to determine the correct value corresponding to the characteristic signal as the actual value of the characteristic signal for any characteristic signal, and set the fault injection state of the characteristic signal to a second state flag bit when the fault test time corresponding to the characteristic signal is greater than the fault duration; the second state flag bit indicates that the characteristic signal has not been injected with a fault.
[0327] In one embodiment of the present application, the vehicle fault testing device 200 further includes:
[0328] A message generation module, used to generate a test message based on an actual value and a fault injection state corresponding to each of at least one characteristic signal;
[0329] The message sending module is used to send the test message to the controller area network.
[0330] In one embodiment of the present application, the vehicle fault testing device 200 further includes:
[0331] A third setting module is used to respond to the fault injection instruction and set the fault injection start flag to a third state flag; the third state flag is used to indicate a positive electronic power steering system injection fault;
[0332] A fourth setting module is used to set the test end flag to a fourth state flag when the fault test time is greater than the fault test end time; the fourth state flag is used to indicate that the fault injection into the electronic power steering system has been completed;
[0333] A reset module is used to respond to a reset instruction, set a fault injection start flag to a fifth state flag, and set a test end flag to a sixth state flag; the fifth state flag is used to indicate that no fault has been injected into the electronic power steering system, and the sixth state flag is used to indicate that the fault injection into the electronic power steering system has not been completed.
[0334] In one embodiment of the present application, the vehicle fault testing device 200 further includes:
[0335] A timing trigger module, used to trigger timing for fault test time when the fault injection start flag is the third state flag;
[0336] The timing clearing module is used to clear the fault test time when the fault injection start flag is not the third state flag.
[0337] It should be noted that the specific implementation of the vehicle fault testing device 200 of the embodiment of the present application refers to the specific implementation of the vehicle fault testing method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0338] In the third aspect, based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium on which an executable program is stored. When the executable program is executed by a processor, the vehicle fault testing method proposed in the first aspect of the present application is implemented.
[0339] It should be noted that the specific implementation of the computer-readable storage medium of the embodiment of the present application refers to the specific implementation of the vehicle fault testing method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0340] Fourthly, refer to Figure 3 Based on the same inventive concept, an embodiment of the present application provides an electronic device 300, including:
[0341] Memory 301, used for storing executable programs;
[0342] Processor 302;
[0343] When the executable program is executed by the processor 302, the vehicle fault testing method proposed in the first aspect of the present application is implemented.
[0344] It should be noted that the specific implementation of the vehicle 300 in the embodiment of the present application refers to the specific implementation of the vehicle fault testing method proposed in the first aspect of the embodiment of the present application, and will not be repeated here.
[0345] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, apparatuses, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take 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.
[0346] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. 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.
[0347] 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.
[0348] 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.
[0349] Although the preferred embodiments of the present invention 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 invention.
[0350] 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.
[0351] The above is a detailed introduction to a vehicle fault testing method, storage medium and electronic device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A vehicle fault testing method, characterized in that: The method comprises: Determine characteristic attributes of at least one characteristic signal of at least one sensor signal; the characteristic attributes include a correct value, a fault value, a fault start time, and a fault duration corresponding to each of the characteristic signals; In response to the fault injection instruction, triggering the timing of the fault test time, and determining the fault end time corresponding to at least one of the characteristic signals based on the fault start time and fault duration corresponding to each of the at least one characteristic signal; For any of the characteristic signals, when the fault test time reaches the fault start time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is output to the electronic power steering system; when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is output to the electronic power steering system; Determine the maximum value among the fault end times corresponding to at least one of the characteristic signals as the fault test end time; When the fault test time is greater than the fault test end time, the fault state information of the electronic power steering system is read.
2. The vehicle fault testing method according to claim 1, characterized in that: The sensor signal is an SPC signal, and at least one of the characteristic signals includes one or more of a minimum time unit, a state bit, a data value, and a cyclic redundancy check value of the SPC signal; The step of determining a characteristic attribute of at least one characteristic signal of at least one sensor signal comprises: Based on a first input parameter for the minimum time unit, determining a correct value, a fault value, a fault start time and a fault duration corresponding to the minimum time unit; and / or, Based on a second input parameter for the status bit, determining a correct value, a fault value, a fault start time, and a fault duration corresponding to the status bit; and / or, Based on a third input parameter for the data value, determining a correct value, a fault value, a fault start time, and a fault duration corresponding to the data value; and / or, Based on a fourth input parameter for the cyclic redundancy check value, a fault value, a fault start time and a fault duration corresponding to the cyclic redundancy check value are determined, and based on a preset verification algorithm, a correct value corresponding to the cyclic redundancy check value is determined.
3. The vehicle fault testing method according to claim 2, characterized in that: The third input parameter includes a target test parameter; The step of determining a correct value corresponding to the data value based on a third input parameter for the data value comprises: Based on the target test parameter and a preset parameter conversion algorithm, a correct value corresponding to the data value is determined.
4. The vehicle fault testing method according to claim 2, characterized in that: The step of determining a correct value corresponding to the cyclic redundancy check value based on a preset check algorithm comprises: Determine the fault value or the correct value corresponding to the state bit output to the electronic power steering system as the actual value corresponding to the state bit; and determine the fault value or the correct value corresponding to the data value output to the electronic power steering system as the actual value corresponding to the data value; Based on the actual values corresponding to the status bit and the data value respectively and the check algorithm, a correct value corresponding to the cyclic redundancy check value is determined.
5. The vehicle fault testing method according to claim 1, characterized in that: The method further comprises: For any of the characteristic signals, when the fault test time is less than or equal to the fault end time corresponding to the characteristic signal, the fault value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to a first state flag; the first state flag indicates that the characteristic signal has been injected with a fault; For any of the characteristic signals, when the fault test time is greater than the fault end time corresponding to the characteristic signal, the correct value corresponding to the characteristic signal is determined as the actual value of the characteristic signal, and the fault injection state of the characteristic signal is set to a second state flag; the second state flag indicates that no fault has been injected into the characteristic signal.
6. The vehicle fault testing method according to claim 5, characterized in that: The method further comprises: Generate a test message based on an actual value corresponding to at least one of the characteristic signals and the fault injection state; The test message is sent to the controller area network.
7. The vehicle fault testing method according to claim 1, characterized in that: The method further comprises: In response to the fault injection instruction, setting a fault injection start flag to a third state flag; the third state flag is used to indicate that a fault is being injected into the electronic power steering system; In the case where the fault test time is greater than the fault test end time, setting the test end flag to a fourth state flag; the fourth state flag is used to indicate that the fault injection into the electronic power steering system has been completed; In response to a reset instruction, the fault injection start flag is set to the fifth state flag, and the test end flag is set to the sixth state flag; the fifth state flag is used to indicate that no fault has been injected into the electronic power steering system, and the sixth state flag is used to indicate that the fault injection into the electronic power steering system has not been completed.
8. The vehicle fault testing method according to claim 7, characterized in that: The method further comprises: When the fault injection start flag is the third state flag, triggering timing of the fault test time; When the fault injection start flag is not the third state flag, the fault test time is cleared.
9. A computer-readable storage medium having an executable program stored thereon, characterized in that: When the executable program is executed by a processor, the vehicle fault testing method according to any one of claims 1 to 8 is implemented.
10. An electronic device, characterized in that: include: A memory for storing an executable program; processor; When the executable program is executed by the processor, the vehicle fault testing method according to any one of claims 1 to 8 is implemented.
