Crankshaft sensor fault diagnosis method, and hot backup switching method and device based on physical redundancy
By employing a hot backup switching method based on physical redundancy, and utilizing eTPUA and eTPUB modules for crankshaft sensor fault diagnosis and signal switching, the problem of engine performance degradation caused by crankshaft sensor failure was solved, and the safe and stable operation of the engine was achieved.
Patent Information
- Application Number
- CN202411230185.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-03
AI Technical Summary
Crankshaft sensor failure can lead to reduced engine performance or even engine shutdown. Current technology makes it difficult to effectively diagnose and switch to backup sensors, affecting the safe and stable operation of the engine.
A hot backup switching method based on physical redundancy is adopted. Through independent processing and fault diagnosis of two crankshaft sensors, the eTPUA and eTPUB modules are used for signal judgment and switching. Combined with the tooth condition judgment criteria, an appropriate diagnosis time and number of times are designed to realize fault diagnosis and signal switching.
This improves the reliability of the engine control system, ensures the safe and stable operation of the engine, and avoids performance degradation and downtime risks caused by sensor failure.
Smart Images

Figure CN119122690B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of engine control technology, and in particular to a crankshaft sensor fault diagnosis method, a hot backup switching method and device based on physical redundancy. Background Technology
[0002] With the continuous development of engine electronic control systems, the complexity of electronic components, the degree of software integration, and the application of mechatronics are constantly increasing, leading to a continuous increase in the risk of systematic and random hardware failures. Crankshaft sensors and camshaft sensors, as crucial sensors in the engine's electronic fuel injection system, play a vital role in generating the essential timing and phase signals to ensure normal engine operation. They are extremely important for determining engine phase, engine speed, and accurately controlling the injection advance angle. When a crankshaft sensor malfunctions, various aspects of the engine, such as fuel supply and ignition, may become disordered, leading to reduced engine performance and, in severe cases, even engine shutdown or inability to start. Therefore, fault diagnosis of crankshaft signals is of great significance for ensuring the safe and reliable operation of the engine and for emission control. Summary of the Invention
[0003] The purpose of this application is to provide a crankshaft sensor fault diagnosis method, a hot backup switching method and device based on physical redundancy, which can realize crankshaft sensor fault diagnosis, thereby improving the reliability of the engine control system and ensuring the safe and stable operation of the engine.
[0004] To achieve the above objectives, this application provides the following solution:
[0005] In a first aspect, this application provides a crankshaft sensor fault diagnosis method, comprising: determining the fault diagnosis time and the number of diagnoses performed within the diagnosis time; when the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor is not a normal tooth state, a preliminary judgment is made that the crankshaft sensor has malfunctioned; the normal tooth state includes a normal counting state, a counting timeout state, a state before a missing tooth, and a state after a missing tooth; starting the timer according to the diagnosis time, and sequentially judging whether the tooth state corresponding to the real-time crankshaft speed signal output by the crankshaft sensor is a normal tooth state; if the current judgment result is different from the previous judgment result, returning to the "start" step. The diagnostic time is calculated, and the tooth state corresponding to the real-time crankshaft speed signal output by the crankshaft sensor is judged sequentially to see if it is a normal tooth state. If the current judgment result is the same as the previous judgment result, the next judgment is made to see if the tooth state corresponding to the real-time crankshaft speed signal output by the crankshaft sensor is a normal tooth state. This continues until the cumulative number of judgments within the diagnostic time reaches the diagnostic number. When the judgment result for each of the diagnostic number within the diagnostic time is negative, the crankshaft sensor is finally determined to be faulty. When the judgment result for each of the diagnostic number within the diagnostic time is positive, the crankshaft sensor is determined to be fault-free.
[0006] Secondly, this application provides a hot backup switching method based on physical redundancy, comprising: acquiring crankshaft speed signals output by two crankshaft sensors; the two crankshaft sensors being respectively arranged at different positions on the engine; obtaining a first fault diagnosis result and a second fault diagnosis result by using the aforementioned crankshaft sensor fault diagnosis method based on the crankshaft speed signal of each crankshaft sensor; generating a crankshaft status flag bit based on the first fault diagnosis result and the second fault diagnosis result; when both the first fault diagnosis result and the second fault diagnosis result indicate that the crankshaft sensor is fault-free, the crankshaft status flag bit is 1; when the first fault diagnosis result indicates that the crankshaft sensor is fault-free and the second fault diagnosis result indicates that the crankshaft sensor has failed, the crankshaft status flag bit is 2 ... When the crankshaft sensor malfunctions and the second fault diagnosis result indicates that the crankshaft sensor is not faulty, the crankshaft status flag is set to 3. When both the first and second fault diagnosis results indicate that the crankshaft sensor malfunctions, the crankshaft status flag is set to 4. Based on the crankshaft speed signal from each crankshaft sensor, the first instantaneous speed and the second instantaneous speed are calculated respectively. If there is no switch from the first instantaneous speed output to the second instantaneous speed and then back to the first instantaneous speed, and the crankshaft status flag is set to 3, the second instantaneous speed is output. If the crankshaft status flag is set to 1, 2, or 4, the first instantaneous speed is output. If there has been a switch from the first instantaneous speed output to the second instantaneous speed and then back to the first instantaneous speed, the first instantaneous speed is output.
[0007] Thirdly, this application provides a hot backup switching device based on physical redundancy, comprising: a microcontroller and a data selector. The signal input terminals of the eTPUA module and the eTPUB module in the microcontroller are respectively connected to the signal output terminals of two crankshaft sensors. The signal output terminals of both the eTPUA module and the eTPUB module in the microcontroller are connected to the data selector. The two crankshaft sensors are respectively arranged at the flywheel end and the free end of the engine. The eTPUA module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, uses the aforementioned crankshaft sensor fault diagnosis method to determine whether the crankshaft sensor has malfunctioned, obtaining a first fault diagnosis result. The eTPUB module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, uses the aforementioned crankshaft sensor fault diagnosis method to determine whether the crankshaft sensor has malfunctioned, obtaining a second fault diagnosis result. The data selector is used to generate a crankshaft status flag bit based on the first fault diagnosis result and the second fault diagnosis result; and to divide the crankshaft speed signal from each crankshaft sensor into... Do not calculate the first instantaneous speed and the second instantaneous speed. If there is no switch from the first instantaneous speed output to the second instantaneous speed and then back to the first instantaneous speed, and the crankshaft status flag is 3, then output the second instantaneous speed; if the crankshaft status flag is 1, 2, or 4, then output the first instantaneous speed. If there has been one switch from the first instantaneous speed output to the second instantaneous speed and then back to the first instantaneous speed, output the first instantaneous speed. Specifically, if both the first and second fault diagnosis results indicate that the crankshaft sensor is fault-free, the crankshaft status flag is 1; if the first fault diagnosis result indicates that the crankshaft sensor is fault-free and the second fault diagnosis result indicates that the crankshaft sensor is faulty, the crankshaft status flag is 2; if the first fault diagnosis result indicates that the crankshaft sensor is faulty and the second fault diagnosis result indicates that the crankshaft sensor is fault-free, the crankshaft status flag is 3; if both the first and second fault diagnosis results indicate that the crankshaft sensor is faulty, the crankshaft status flag is 4.
[0008] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0009] This application provides a crankshaft sensor fault diagnosis method. By designing the diagnosis time and number of diagnoses, and using the tooth state as the judgment criterion for crankshaft sensor fault diagnosis, the method realizes crankshaft sensor fault diagnosis, thereby improving the reliability of the engine control system and ensuring the safe and stable operation of the engine.
[0010] The hot backup switching device based on physical redundancy provided in this application performs independent processing, fault diagnosis and hot backup switching of two crankshaft signals based on the eTPUA module and eTPUB module in the microcontroller, which greatly improves the reliability of the engine control system. When a crankshaft sensor fails, the hot backup switching of the crankshaft signal can be achieved through the designed eTPU output state switching logic, thereby ensuring the safe and stable operation of the engine. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a crankshaft sensor fault diagnosis method according to an embodiment of this application;
[0013] Figure 2 This is a schematic diagram of a crankshaft speed signal provided in another embodiment of this application;
[0014] Figure 3 A schematic diagram illustrating the calculation process for diagnostic time and number of diagnoses is provided for another embodiment of this application;
[0015] Figure 4 This is a schematic diagram of the eTPU's working state provided in another embodiment of this application;
[0016] Figure 5 A schematic diagram of a crankshaft functional state machine provided in another embodiment of this application;
[0017] Figure 6 A schematic diagram of a prediction window provided for another embodiment of this application;
[0018] Figure 7 A schematic diagram illustrating the principle of fault code generation and clearing provided in another embodiment of this application;
[0019] Figure 8 A flowchart illustrating a hot backup switching method based on physical redundancy provided in an embodiment of this application;
[0020] Figure 9 A schematic diagram of a hot backup switching device based on physical redundancy provided in an embodiment of this application;
[0021] Figure 10 A schematic diagram illustrating the switching logic of the eTPU output state provided in another embodiment of this application;
[0022] Figure 11 This is a schematic diagram illustrating the principle of hot backup switching using camshaft signals, provided for another embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0025] In one exemplary embodiment, such as Figure 1 As shown, a crankshaft sensor fault diagnosis method is provided, including the following steps 101 to 108. Wherein:
[0026] Step 101: Determine the diagnosis time of the fault and the number of diagnoses performed within the diagnosis time.
[0027] Step 102: When the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor is not a normal tooth state, it is preliminarily determined that the crankshaft sensor has malfunctioned; the normal tooth state includes normal counting state, counting timeout state, the state before the missing tooth and the state after the missing tooth.
[0028] Step 103: Start timing according to the diagnostic time and sequentially determine whether the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state.
[0029] Step 104: If the current judgment result is different from the previous judgment result, return to the step "Start timing according to the diagnostic time and sequentially judge whether the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state".
[0030] Step 105: If the current judgment result is the same as the previous judgment result, then continue to the next judgment to see if the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state.
[0031] Step 106: Until the cumulative number of judgments within the diagnostic time reaches the diagnostic count.
[0032] Step 107: When the result of each judgment within the diagnostic time is negative for the number of diagnostic attempts, the crankshaft sensor is finally determined to be faulty.
[0033] Step 108: When the result of each judgment of the number of diagnosis times within the diagnostic time is yes, the crankshaft sensor is determined to be fault-free.
[0034] By implementing steps 101 to 108 above, and by designing appropriate diagnostic time and number of diagnostics, the defects of misjudgment caused by excessively short diagnostic time and delayed fault code generation and clearing caused by excessively long diagnostic time are overcome. At the same time, the gear status is used as the basis for judging crankshaft sensor fault diagnosis, thereby realizing crankshaft sensor fault diagnosis, which improves the reliability of the engine control system and ensures the safe and stable operation of the engine.
[0035] This application uses the tooth status as the basis for judging crankshaft fault diagnosis. When the crankshaft is in normal operation, the tooth status continuously jumps between four states: normal counting state, counting timeout state, the state before the missing tooth, and the state after the missing tooth.
[0036] Figure 2 The signal displayed is the crankshaft speed signal (corresponding to a 60-tooth - 2-tooth engine signal disc). This means that one revolution of the signal disc normally consists of 58 teeth, with 2 missing teeth. Let the current tooth cycle be denoted as ToothPeroid, and the previous tooth cycle as ToothPeroidLast. Since the tooth cycle of a missing tooth is longer than that of a normal tooth, under ideal conditions with a constant engine speed, the missing tooth cycle T... 缺齿 The tooth cycle of normal teeth T正常齿 The relationship should satisfy: T 缺齿 =T 正常齿 ×(n 缺齿 +1), n 缺齿 This represents the number of missing teeth. In practical situations, considering speed fluctuations during actual operation, the following condition should be met: T 缺齿 ×P>T 正常齿 Where P is the proportionality coefficient, a number greater than 0 and less than 1. The closer the proportionality coefficient is to the reciprocal of the number of missing teeth, the stricter the missing tooth confirmation condition. The closer the proportionality coefficient is to 1, the easier it is to confirm the missing tooth. However, at this point, changes in the cycle ratio caused by speed fluctuations may lead to false confirmations in the program. In practical applications, the proportionality coefficient should be reasonably determined based on experiments. Therefore, by comparing the relationship between the current tooth cycle and the previous tooth cycle, it can be determined whether the current tooth is a normal tooth, the tooth before the missing tooth, a missing tooth, or the tooth after the missing tooth. When it is confirmed that the current tooth is the tooth after the missing tooth, it is considered that the missing tooth has been found. At this time, it will enter the normal counting state, that is, after finding the crankshaft missing tooth, every falling edge that is not adjacent to the missing tooth will enter this state. Figure 2 There are two missing teeth on the left side of the middle tooth. The tooth to the left of the missing tooth is numbered 57. The teeth between the missing left and right teeth are numbered from 0 to 57 from left to right. There are also two missing teeth on the right side of the middle tooth. The teeth to the right of the missing right tooth are numbered from 0 to 56 from left to right.
[0037] In another exemplary embodiment of this application, the duration from the normal state to the fault state and from the fault state back to the normal state is the diagnostic time. If the diagnostic time is too short, it is easy to cause misjudgment; if the diagnostic time is too long, it is easy to cause delays in fault code generation and fault code clearing. Furthermore, the diagnostic time is related to engine speed. Therefore, the diagnostic time and diagnostic count calculation scheme designed in this application is as follows: the time corresponding to 10 teeth (crankshaft signal disc teeth) at the current speed is taken as the diagnostic time, and the ratio of the diagnostic time to the diagnostic function loop time is taken as the diagnostic count, that is, the number of times the diagnostic function is executed within the diagnostic time. Figure 3 As shown, step 101 above is replaced by steps 201 to 206:
[0038] Step 201: Calculate the instantaneous tooth cycle corresponding to the crankshaft speed signal using the eTPUA and eTPUB modules in the microcontroller. The two crankshaft sensors are respectively located at the flywheel end and the free end of the engine.
[0039] Step 202: Calculate the instantaneous rotational speed using the minimum value of the two instantaneous tooth cycles.
[0040] Step 203: Use the time corresponding to the 10 teeth at the instantaneous rotational speed as the diagnostic time.
[0041] Step 204: Divide the diagnosis time by the preset diagnosis function loop time to obtain the initial number of diagnoses.
[0042] Step 205: If the initial number of diagnoses is less than or equal to the preset maximum number of diagnoses, then the initial number of diagnoses is taken as the number of diagnoses performed within the diagnosis time.
[0043] Step 206: If the initial number of diagnoses is greater than the preset maximum number of diagnoses, then the preset maximum number of diagnoses will be used as the number of diagnoses performed within the diagnosis time.
[0044] The working status of the eTPU (eTPUA module and eTPUB module) during operation is as follows: Figure 4 As shown in the diagram, for the eTPU, when the crankshaft is in a normal state, if an abnormality is detected in the crankshaft signal, it cannot be immediately determined that the crankshaft is faulty; this is an abnormal state. Only after the abnormal state persists for a period of time can it be determined that the crankshaft is faulty; this is a fault state. Similarly, when the crankshaft is in a fault state, if the crankshaft signal is detected to suddenly return to normal, it cannot be immediately determined that the crankshaft fault is cleared; this is an abnormal clearing state. Only after the abnormal clearing state persists for a period of time, i.e., after the normal signal persists for a period of time, can it be determined that the fault is cleared; this is a normal state.
[0045] The diagnostic time is the duration from the normal state to the fault state and from the fault state back to the normal state. If the diagnostic time is too short, it is easy to make a misjudgment; if the diagnostic time is too long, it is easy to cause a delay in fault code generation and fault code clearing. Moreover, the diagnostic time is related to the engine speed. Therefore, the diagnostic time and diagnostic count calculation scheme designed in this solution is as follows: the time corresponding to 10 teeth (crankshaft signal disc teeth) at the current speed is taken as the diagnostic time, and the ratio of the diagnostic time to the diagnostic function loop time is taken as the diagnostic count, that is, the number of times the diagnostic function is executed within the diagnostic time.
[0046] Figure 5 The diagram shows the crankshaft functional state machine. The functions performed in each of the four gear states and the transition conditions between states are detailed below:
[0047] S7: Normal counting state. This state accounts for the largest proportion of the crankshaft's operation. After a missing tooth is found, each falling edge that is not adjacent to the missing tooth will enter this state. In this state, the eTPU completes the calculation of the tooth cycle, providing source data for calculating the average crankshaft speed. At the same time, it also completes the numbering of the crankshaft signal disk teeth, marking the tooth after the missing tooth as number 0. Subsequently, each time a falling edge of the signal is detected, the tooth number is incremented by one. Each time the increment reaches the missing tooth, the tooth number is cleared to zero and the counting starts again. In the S7 state, it is also necessary to continuously check whether the current tooth number meets the tooth before the missing tooth. If the tooth number accumulates to the tooth before the missing tooth, the crankshaft state will jump to the S9 (tooth before missing tooth) state.
[0048] S8: Counting Timeout State. In state S7, the crankshaft sensor sometimes experiences signal tooth loss. To improve the reliability of the crankshaft function in handling poor signal conditions, a counting timeout state is designed. When no transition signal is detected in the prediction window set in state S7, the system enters state S8. In this state, it assumes a falling edge is received at the position of the prediction window and calculates the current tooth cycle based on the previously predicted falling edge, completing the operation of the normal counting state and opening the prediction window. If a transition is detected in the next prediction window, the crankshaft state returns to the normal counting state of S7. If no transition is detected, it is treated as a crankshaft timeout and jumps to an abnormal state.
[0049] like Figure 6 As shown, the eTPU subtracts the transition time of the first tooth from the transition time of the second tooth to obtain the signal tooth period ToothPerido. Based on the signal tooth period, the position of the next tooth is predicted to satisfy:
[0050] T1 = T0 + ToothPerido
[0051] Where T0 is the falling edge time of the second tooth, and T1 is the falling edge time of the next tooth predicted based on the ToothPerido tooth period. The prediction window is opened proportionally before and after the prediction position, i.e.:
[0052] T on =T0+ToothPerido-WindowRatio×ToothPerido
[0053] T off =T0+ToothPerido+WindowRatio×ToothPerido
[0054] Among them, T on T is the time to predict when the window opens. off To predict when the window closes, WindowRatio is the window coefficient of the prediction window. The width of the prediction window is determined by the window coefficient WindowRatio. The larger the window coefficient, the weaker the filtering effect on interference pulses. During normal operation, the window coefficient should be small. However, during the synchronization process when the engine is just starting, the speed is low and the crankshaft signal quality is poor. An excessively narrow window will make the synchronization conditions too strict, causing difficulties in starting synchronization. Therefore, the window coefficient is made into a parameter that can be modified by the host CPU. Different window coefficients are set according to the speed in the MPC5554 main program.
[0055] S9: The state before the missing tooth. The operation performed in the state before the missing tooth is similar to normal counting, except that the opening position of the prediction window will be moved backward. If a jump signal is detected in the prediction window, the crankshaft enters the S11 (the state after the missing tooth) state. If no jump signal is detected, it will be treated as a signal timeout and jump to an abnormal state.
[0056] S11: One Tooth After Missing a Tooth State. The one-tooth-after-missing-tooth state is the most important state for crankshaft function. In this state, the crankshaft is at tooth number 0 after the missing tooth, marking the start of a normal operating cycle. This state is used to check if the cycle ratio of missing teeth is reasonable. In one engine cycle, the crankshaft rotates two revolutions. If several missing teeth are evenly distributed on the crankshaft, multiple missing teeth will appear in one engine cycle. The crankshaft state cannot determine which missing tooth in the cycle it is from the current state. In this case, the accumulated tooth count in the cycle can be used for judgment. The accumulated tooth count is different from the tooth number and is not reset to zero after a missing tooth. Furthermore, it automatically fills in the missing tooth during the cycle. When the accumulated tooth count exceeds the total number of teeth in the cycle, one engine cycle is considered complete, the accumulated tooth count is reset to zero, and the system jumps back to state S7.
[0057] In another exemplary embodiment of this application, the method for calculating the instantaneous tooth period in step 201 above includes steps 301 to 303:
[0058] Step 301: Convert the crankshaft speed signal into a speed square wave signal.
[0059] Step 302: Detect the falling edge of the speed square wave signal and record the falling edge transition time of each speed square wave signal.
[0060] Step 303: Subtract the falling edge transition time of the next tooth from that of the previous tooth in the speed square wave signal, and then multiply the result by the clock period. The resulting value is taken as the instantaneous tooth period.
[0061] In another exemplary embodiment of this application, the method for calculating the instantaneous rotational speed in step 202 above includes steps 401 to 402:
[0062] Step 401: Calculate the product of the minimum value and the total number of teeth on the crankshaft signal disk to obtain the time it takes for the crankshaft to rotate one revolution.
[0063] Step 402: Convert the time for one revolution of the crankshaft to r / min to obtain the instantaneous speed.
[0064] The following example illustrates the calculation method for instantaneous tooth period and instantaneous rotational speed: Since the eTPU's clock frequency is 40MHz, the corresponding clock period is 1 / 40 × 10. -6 The instantaneous tooth period is T, which is the clock count value corresponding to the falling edge transition of the next tooth and the previous tooth. -6 Since the crankshaft signal disc has 60 teeth per revolution (with 2 missing teeth), the time corresponding to one revolution of the crankshaft is 60T / 40×10. -6 s, converted to r / min, is 40 × 10 6 / Tr / min represents the instantaneous rotational speed.
[0065] In another exemplary embodiment of this application, the method may further include steps 501 to 502. Wherein:
[0066] Step 501: When the crankshaft sensor is finally determined to be faulty, a fault code is generated.
[0067] Step 502: If the crankshaft sensor is determined to be fault-free, clear the fault code.
[0068] The schematic diagram of fault code generation and clearing is as follows: Figure 7 As shown. Figure 7 The specific plan shown is as follows:
[0069] (1) First, determine the state of the eTPU crankshaft based on the tooth state described above;
[0070] (2) If the tooth status is not any of the S7, S8, S9 and S11, then the crankshaft is in a fault condition. If no fault condition has occurred before, then the diagnostic time for 10 consecutive teeth at the current speed will be counted. If a fault condition occurs continuously, then the crankshaft is judged to be in a fault condition and a fault code is generated.
[0071] (3) If the tooth status is any of S7, S8, S9 or S11, then the crankshaft is not faulty. If a fault has occurred before, then start counting the diagnostic time for 10 consecutive teeth at the current speed. If no fault occurs consecutively, then the crankshaft is judged to be in normal condition and the fault code is cleared.
[0072] Based on the same inventive concept, embodiments of this application also provide a hot backup switching method based on physical redundancy using the crankshaft sensor fault diagnosis method described above. For example... Figure 8 As shown, the hot backup switching method based on physical redundancy includes the following steps 601 to 606. Wherein:
[0073] Step 601: Acquire the crankshaft speed signals output by the two crankshaft sensors. The two crankshaft sensors are respectively arranged at different positions on the engine.
[0074] Step 602: Based on the crankshaft speed signal of each crankshaft sensor, the above-described crankshaft sensor fault diagnosis method is used to obtain the first fault diagnosis result and the second fault diagnosis result.
[0075] Step 603: Generate a crankshaft status flag bit based on the first fault diagnosis result and the second fault diagnosis result; when both the first fault diagnosis result and the second fault diagnosis result indicate that the crankshaft sensor is not faulty, the crankshaft status flag bit is 1; when the first fault diagnosis result indicates that the crankshaft sensor is not faulty and the second fault diagnosis result indicates that the crankshaft sensor is faulty, the crankshaft status flag bit is 2; when the first fault diagnosis result indicates that the crankshaft sensor is faulty and the second fault diagnosis result indicates that the crankshaft sensor is not faulty, the crankshaft status flag bit is 3; when both the first fault diagnosis result and the second fault diagnosis result indicate that the crankshaft sensor is faulty, the crankshaft status flag bit is 4.
[0076] Step 604: Calculate the first instantaneous speed and the second instantaneous speed based on the crankshaft speed signal from each crankshaft sensor.
[0077] Step 605: If there is no situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, the second instantaneous speed is output if the crankshaft status flag is 3; the first instantaneous speed is output if the crankshaft status flag is 1, 2 or 4.
[0078] Step 606: When there has been a situation where the output has switched from the first instantaneous speed to the second instantaneous speed and then switched back to the first instantaneous speed, the first instantaneous speed will be output.
[0079] By implementing steps 601 to 606 above, when the crankshaft sensor malfunctions, the crankshaft signal can be switched using a hot backup switching method based on physical redundancy, thereby ensuring the safe and stable operation of the engine.
[0080] In another exemplary embodiment of this application, the method may further include: initializing a default output first instantaneous rotational speed signal.
[0081] The relationship between the fault diagnosis results and the crankshaft status flag can be summarized in the crankshaft status table shown in Table 1. In Table 1, the crankshaft status is represented by the CrankState flag, the crankshaft sensor in the first fault diagnosis result is represented by A, and the crankshaft sensor in the second fault diagnosis result is represented by B.
[0082] Table 1 Crankshaft Condition Table
[0083]
[0084]
[0085] The aforementioned crankshaft sensor fault diagnosis method and the hot backup switching method based on physical redundancy can be applied to engine control systems.
[0086] Based on the same inventive concept, embodiments of this application also provide a hot backup switching device based on physical redundancy, such as... Figure 9 As shown, the device includes a microcontroller and a data selector.
[0087] The signal input terminals of both the eTPUA and eTPUB modules in the microcontroller are connected to the signal output terminals of the crankshaft sensors, and the signal output terminals of both modules are connected to the data selector. The two crankshaft sensors are respectively located at the flywheel end and the free end of the engine.
[0088] The eTPUA module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, uses the above-mentioned crankshaft sensor fault diagnosis method to determine whether the crankshaft sensor has malfunctioned, and obtains a first fault diagnosis result.
[0089] The eTPUB module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, uses the above-mentioned crankshaft sensor fault diagnosis method to determine whether the crankshaft sensor has malfunctioned, and obtains a second fault diagnosis result.
[0090] The data selector is used to generate a crankshaft status flag based on the first fault diagnosis result and the second fault diagnosis result; to calculate the first instantaneous speed and the second instantaneous speed based on the crankshaft speed signal of each crankshaft sensor; when there is no situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, if the crankshaft status flag is 3, the second instantaneous speed is output; if the crankshaft status flag is 1, 2 or 4, the first instantaneous speed is output; when there has been a situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, the first instantaneous speed is output.
[0091] Specifically, when both the first and second fault diagnosis results indicate that the crankshaft sensor is not faulty, the crankshaft status flag is set to 1; when the first fault diagnosis result indicates that the crankshaft sensor is not faulty and the second fault diagnosis result indicates that the crankshaft sensor is faulty, the crankshaft status flag is set to 2; when the first fault diagnosis result indicates that the crankshaft sensor is faulty and the second fault diagnosis result indicates that the crankshaft sensor is not faulty, the crankshaft status flag is set to 3; and when both the first and second fault diagnosis results indicate that the crankshaft sensor is faulty, the crankshaft status flag is set to 4.
[0092] This application employs a redundant design, placing one crankshaft sensor at both the engine flywheel end and the free end. Two eTPU modules (eTPUA and eTPUB) within the 55xx series microcontroller (MCU) are used for independent processing and fault diagnosis of the two crankshaft signals. A data selector allows for hot-swap switching of the output injection signals generated by the two crankshaft signals, enabling efficient switching. Figure 9 As shown.
[0093] When faced with high-speed real-time tasks such as crankshaft signal processing and fuel injection output, the timer modules of traditional microcontrollers frequently cause CPU interrupts, consuming CPU computing resources and limiting the microcontroller's processing power. However, the 55xx series and subsequent 56xx and 57xx series microcontrollers integrate an eTPU (Enhanced Time Processing Unit) module, specifically designed to handle complex control, high-speed I / O, and timing algorithms. The addition of the eTPU module frees the microcontroller's CPU from frequent interrupts caused by complex timing, allowing for greater system throughput and improving control system performance. The eTPU module is a programmable I / O controller with its own kernel and memory system. It can independently perform complex timing processing and I / O management, essentially acting as a fully automatic coprocessor.
[0094] This application designs a scheme for independent processing, fault diagnosis, and hot backup switching of two crankshaft signals based on two eTPU modules (eTPUA and eTPUB) in the 55xx series microcontroller.
[0095] In one example, the hot-swap switching device based on physical redundancy further includes a conditioning circuit. The signal input terminal of the conditioning circuit is connected to the signal output terminal of the crankshaft sensor, and the signal output terminal of the conditioning circuit is connected to the signal input terminals of the eTPUA module and the eTPUB module in the microcontroller. The conditioning circuit is used to convert the crankshaft speed signal output by the crankshaft sensor into a speed square wave signal.
[0096] The crankshaft sensor signal is processed by the conditioning circuit in the ECU, which converts the crankshaft sensor output signal into a 0-5V square wave signal and inputs it into the crankshaft function channel of the eTPU. Synchronization is completed in the eTPU, and raw data is provided for speed calculation.
[0097] Crankshaft sensors typically include magnetoelectric speed sensors and Hall effect speed sensors. Magnetoelectric speed sensors output crankshaft speed signals in the form of sine waves or sawtooth waves. This signal needs to be processed by conditioning circuitry through filtering, shaping, and amplification to be converted into a square wave signal that the microcontroller can recognize and receive. Hall effect speed sensors, on the other hand, output crankshaft speed signals that are themselves square wave signals. The square wave signal output by the Hall effect speed sensor needs to be matched with the input signal voltage required by the microcontroller. For example, if the square wave signal output by the Hall effect speed sensor is a 0-5V voltage signal, while the microcontroller requires an input signal voltage of 3.3V, then a conditioning circuit is needed to convert the 0-5V voltage signal into a 0-3.3V voltage signal.
[0098] The eTPU status can be determined based on the generated fault codes. Since the two eTPU modules, eTPUA and eTPUB, process and diagnose the two crankshaft signals independently, a total of four crankshaft statuses will be generated, as shown in Table 1.
[0099] The switching logic for the eTPU output state is designed based on different crankshaft conditions. During operation, the eTPU outputs in only two states: eTPUA or eTPUB. The switching logic is as follows: Figure 10 As shown. Figure 10 In the ETPU_AB_SWITCH setting, 0 indicates no switchover has occurred, while ETPU_AB_SWITCH = 1 indicates a switchover has taken place. The specific switchover logic is as follows:
[0100] (1) During initialization, eTPUA output is used by default to calculate instantaneous rotational speed;
[0101] (2) Read the crankshaft status flag CrankState during operation;
[0102] (3) If the crankshaft status flag CrankState=3, that is, only eTPUA is faulty and eTPUA and eTPUB have not been switched, then use eTPUB output;
[0103] (4) If the crankshaft status flag CrankState = 2 or 4, that is, only eTPUB is faulty or both eTPUA and eTPUB are faulty, then use eTPUA output.
[0104] To prevent frequent switching of eTPU output state during operation, if eTPUA has already switched to eTPUB once, then after eTPUB switches back to eTPUA, no further switching will occur.
[0105] This application designs a scheme for independent processing, fault diagnosis, and hot backup switching of two crankshaft signals based on two eTPU modules (eTPUA and eTPUB) in a microcontroller. By selecting the output signals of the two modules through a data selector, hot backup switching of the instantaneous speed signals generated by the two crankshaft signals can be achieved, which can greatly improve the reliability of the engine control system. Furthermore, when one crankshaft sensor fails, the hot backup switching of the crankshaft signal can be achieved through the designed eTPU output state switching logic, thereby ensuring the safe and stable operation of the engine.
[0106] This application uses two crankshaft signals for hot backup switching; alternatively, camshaft signals can also be used for hot backup switching, such as... Figure 11 As shown.
[0107] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for diagnosing crankshaft sensor faults, characterized in that, The crankshaft sensor fault diagnosis method includes: Determine the time required to diagnose the fault and the number of diagnoses performed within that timeframe; When the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor is not a normal tooth state, it is preliminarily determined that the crankshaft sensor is faulty; the normal tooth state includes normal counting state, counting timeout state, the state before the missing tooth, and the state after the missing tooth. Start timing according to the diagnostic time and sequentially determine whether the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state; If the current judgment result is different from the previous judgment result, return to the step "start timing according to the diagnostic time and sequentially judge whether the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state"; If the current judgment result is the same as the previous judgment result, then continue to the next judgment to see if the tooth state corresponding to the crankshaft speed signal output by the crankshaft sensor in real time is a normal tooth state; Until the cumulative number of judgments within the diagnostic time reaches the specified number of diagnoses; If the result of each judgment within the diagnostic time period is negative for the specified number of diagnostic attempts, the crankshaft sensor is ultimately determined to be faulty. If the result of each of the above diagnostic times is "yes" within the diagnostic time, the crankshaft sensor is determined to be fault-free. Determine the fault diagnosis time and the number of diagnoses performed within that time, specifically including: The instantaneous tooth cycle corresponding to the crankshaft speed signals output by the two crankshaft sensors is calculated by the eTPUA and eTPUB modules in the microcontroller; the two crankshaft sensors are respectively arranged at the flywheel end and the free end of the engine; The instantaneous rotational speed is calculated using the minimum value of two instantaneous tooth cycles; The time corresponding to the 10 teeth at the instantaneous rotational speed is taken as the diagnostic time; Divide the diagnosis time by the preset diagnosis function loop time to obtain the initial number of diagnoses; If the initial number of diagnoses is less than or equal to the preset maximum number of diagnoses, then the initial number of diagnoses will be used as the number of diagnoses performed within the diagnosis time. If the initial number of diagnoses is greater than the preset maximum number of diagnoses, then the preset maximum number of diagnoses will be used as the number of diagnoses performed within the diagnosis time. Specifically, calculating the instantaneous tooth period corresponding to the crankshaft speed signal output by the crankshaft sensor includes: The crankshaft speed signal is converted into a speed square wave signal; Detect the falling edge of the speed square wave signal and record the falling edge transition time of each speed square wave signal; Subtract the falling edge transition time of the next tooth from that of the previous tooth in the speed square wave signal, and then multiply the result by the clock period to obtain the instantaneous tooth period. The calculation of instantaneous rotational speed using the minimum value of two instantaneous tooth cycles specifically includes: Calculate the product of the minimum value and the total number of teeth on the crankshaft signal disk to obtain the time it takes for the crankshaft to rotate one revolution; Convert the time it takes for the crankshaft to rotate one revolution to the unit of r / min to obtain the instantaneous speed.
2. The crankshaft sensor fault diagnosis method according to claim 1, characterized in that, The crankshaft sensor fault diagnosis method also includes: When a crankshaft sensor malfunction is finally determined, a fault code is generated; Clear the fault code if the crankshaft sensor is determined to be fault-free.
3. A hot backup switching method based on physical redundancy, characterized in that, include: The crankshaft speed signals output by two crankshaft sensors are acquired; the two crankshaft sensors are respectively arranged at different positions on the engine. Based on the crankshaft speed signal of each crankshaft sensor, the crankshaft sensor fault diagnosis method according to any one of claims 1-2 is used to obtain a first fault diagnosis result and a second fault diagnosis result. Based on the first fault diagnosis result and the second fault diagnosis result, a crankshaft status flag is generated. When both the first and second fault diagnosis results indicate that the crankshaft sensor is not faulty, the crankshaft status flag is 1. When the first fault diagnosis result indicates that the crankshaft sensor is not faulty, and the second fault diagnosis result indicates that the crankshaft sensor is faulty, the crankshaft status flag is 2. When the first fault diagnosis result indicates that the crankshaft sensor is faulty, and the second fault diagnosis result indicates that the crankshaft sensor is not faulty, the crankshaft status flag is 3. When both the first and second fault diagnosis results indicate that the crankshaft sensor is faulty, the crankshaft status flag is 4. Based on the crankshaft speed signal from each crankshaft sensor, calculate the first instantaneous speed and the second instantaneous speed respectively; If there is no situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, the second instantaneous speed is output if the crankshaft status flag is 3; the first instantaneous speed is output if the crankshaft status flag is 1, 2, or 4. When there has been a situation where the output has switched from the first instantaneous speed to the second instantaneous speed and then switched back to the first instantaneous speed, the first instantaneous speed will be output.
4. The hot backup switching method based on physical redundancy according to claim 3, characterized in that, Also includes: Initialize the default output to the first instantaneous speed signal.
5. A hot backup switching device based on physical redundancy, characterized in that, The hot backup switching device based on physical redundancy includes: a microcontroller and a data selector; The signal input terminals of the eTPUA module and the eTPUB module in the microcontroller are respectively connected to the signal output terminals of the two crankshaft sensors. The signal output terminals of the eTPUA module and the eTPUB module in the microcontroller are both connected to the data selector. The two crankshaft sensors are respectively arranged at the flywheel end and the free end of the engine. The eTPUA module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, to determine whether the crankshaft sensor has malfunctioned using the crankshaft sensor fault diagnosis method according to any one of claims 1-2, and obtain a first fault diagnosis result. The eTPUB module is used to receive the crankshaft speed signal output by the crankshaft sensor, and based on the crankshaft speed signal, to determine whether the crankshaft sensor has malfunctioned using the crankshaft sensor fault diagnosis method according to any one of claims 1-2, and obtain a second fault diagnosis result. The data selector is used to generate a crankshaft status flag based on the first fault diagnosis result and the second fault diagnosis result; to calculate the first instantaneous speed and the second instantaneous speed based on the crankshaft speed signal of each crankshaft sensor; when there is no situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, if the crankshaft status flag is 3, the second instantaneous speed is output; if the crankshaft status flag is 1, 2, or 4, the first instantaneous speed is output; when there has been a situation where the output switches from the first instantaneous speed to the second instantaneous speed and then back to the first instantaneous speed, the first instantaneous speed is output. Specifically, when both the first and second fault diagnosis results indicate that the crankshaft sensor is not faulty, the crankshaft status flag is set to 1; when the first fault diagnosis result indicates that the crankshaft sensor is not faulty and the second fault diagnosis result indicates that the crankshaft sensor is faulty, the crankshaft status flag is set to 2; when the first fault diagnosis result indicates that the crankshaft sensor is faulty and the second fault diagnosis result indicates that the crankshaft sensor is not faulty, the crankshaft status flag is set to 3; and when both the first and second fault diagnosis results indicate that the crankshaft sensor is faulty, the crankshaft status flag is set to 4.
6. The hot backup switching device based on physical redundancy according to claim 5, characterized in that, The hot backup switching device based on physical redundancy also includes: a conditioning circuit; The signal input terminal of the conditioning circuit is connected to the signal output terminal of the crankshaft sensor, and the signal output terminal of the conditioning circuit is connected to the signal input terminals of the eTPUA module and the eTPUB module in the microcontroller. The conditioning circuit is used to convert the crankshaft speed signal output by the crankshaft sensor into a speed square wave signal.
Citation Information
Patent Citations
On-line fault detection method and system for diesel engine
CN106382165A
Actuating mechanism fault-tolerant control method and device for steer-by-wire system
CN117184219A