Detection method and system of crankshaft position sensor

By collecting multivariate correlation data and using filtering algorithms and improved neural network models to detect crankshaft position sensors, the problem of difficulty in capturing fault hazards in a timely manner in the existing technology is solved, and the stable operation of the engine is guaranteed.

CN119642869AActive Publication Date: 2025-03-18JIANGSU YUXIN SENSOR TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411788748.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The existing crankshaft position sensor detection methods are difficult to capture potential fault hazards in a timely manner, and cannot predict sensor failures in a comprehensive, accurate and in advance, affecting the stable operation of the engine.

Method used

Multiple related data are collected around the crankshaft position sensor, including temperature and humidity, vibration frequency, etc., and filtering algorithms and neural network models are used for data preprocessing and fault detection. Specific steps include data acquisition, filtering and normalization, building and improving neural network models and training, and detecting sensor failures in real time.

Benefits of technology

It realizes in-depth monitoring, accurate analysis and early warning of the working status of the crankshaft position sensor, improves the reliability and timeliness of detection, and ensures the stable operation of the engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119642869A_ABST
    Figure CN119642869A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sensor detection, in particular to a crankshaft position sensor detection method and system, and the method comprises the steps: cooperatively collecting multivariate correlation data around a crankshaft position sensor, and collecting the environment temperature and humidity of the crankshaft position sensor through a temperature and humidity sensor; the acceleration sensor collects the vibration frequency of the engine where the crankshaft position sensor is located according to the set sampling frequency; data preprocessing is carried out after data acquisition is completed, power line interference and high-frequency noise are filtered out through a filtering algorithm, abnormal values are eliminated, and normalization is carried out; after data preprocessing is completed, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained; and after the training is completed, inputting the preprocessed data acquired in real time into the model, and outputting a detection result. By combining the improved neural network algorithm, the operation state of the crankshaft position sensor is accurately detected, the risk of sudden failure is reduced, and stable operation of the engine and related equipment is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sensor detection, and in particular to a detection method and system for a crankshaft position sensor. Background Art

[0002] As one of the core components of the engine control system, the crankshaft position sensor is used to accurately monitor the position and speed of the crankshaft, thereby achieving precise control of the ignition timing, fuel injection timing, etc. However, under actual working conditions, the engine's operating conditions are complex and changeable, and the crankshaft position sensor is susceptible to interference from a variety of factors, such as electromagnetic interference, mechanical vibration, temperature gradient changes, self-aging and wear, etc., which can cause its output signal to deviate, lose steps, or have abnormal intensity, affecting engine performance and even causing fault shutdown. At present, traditional detection methods based on threshold comparison and simple signal feature statistics are difficult to capture potential fault hazards in a timely manner, and cannot comprehensively, accurately and in advance predict sensor failures. They cannot meet the needs of modern engines for efficient and reliable operation, and often lead to false alarms, missed alarms, and passive maintenance delays, affecting the stable operation of the engine. Summary of the invention

[0003] In view of the above-mentioned technical deficiencies, the present invention provides a detection method and system for a crankshaft position sensor.

[0004] The present invention is achieved through the following technical solutions:

[0005] A method for detecting a crankshaft position sensor is provided, the method comprising the following steps:

[0006] Step S10: collecting relevant data around the crankshaft position sensor at the same time, collecting the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and collecting the vibration frequency of the engine where the crankshaft position sensor is located with the acceleration sensor according to the set sampling frequency;

[0007] Step S20: After data collection is completed, data preprocessing is performed, and a filtering algorithm is used to filter out power line interference and high-frequency noise, remove outliers, and perform normalization;

[0008] Step S30: after the data preprocessing is completed, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained;

[0009] Step S40: After the training is completed, the preprocessed data collected in real time is input into the model and the detection results are output;

[0010] Wherein, in said step S10, the multivariate correlation data collected around the crankshaft position sensor simultaneously includes pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time-stamped;

[0011] The crankshaft position sensor fault detection model based on the improved neural network in step S30 adopts a network architecture of a convolutional neural network combined with a long short-term memory network, and uses an attention mechanism in the network architecture to enhance the model's learning ability for the crankshaft position sensor operating data features;

[0012] Among them, after the training in step S40 is completed, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when there is no fault, the crankshaft position sensor is operating normally.

[0013] Preferably, in step S20, a filtering algorithm is used to filter out power line interference and high-frequency noise, and the step of removing abnormal values ​​includes:

[0014] Determine the filtering parameters: design Butterworth low-pass and high-pass filters according to the filtered power line interference, determine the cutoff frequency of the low-pass filter to remove the part of the pulse sequence data below the cutoff frequency, and determine the cutoff frequency of the high-pass filter to remove the part of the pulse sequence data above the cutoff frequency;

[0015] Filter calculation: After determining the filter parameters, the collected crankshaft signal wheel pulse sequence data and the sensor's own output pulse sequence data are substituted point by point into the filter algorithm formula, as shown in formula (1):

[0016] y[n]=a0x[0]+a1x[n-1]+…+a M x[nM]-b1y[n-1]-…-b N y[nN](1)

[0017] Where y[n] is the output signal at the current moment, n is the time index in the discrete time series, x[n] is the input signal at the current moment, x[n-1] is the input signal at the previous moment, x[nM] is the input signal at the previous M moments, y[n-1] is the output signal at the previous moment, y[nN] is the output signal at the previous N moments, a0, a1, a M , b1 and b Nis the filter coefficient, which is calculated according to the determined cutoff frequency and filter order. M represents M moments, N represents N moments, and each moment corresponds to a data point. The output is calculated in sequence according to the time series to obtain a pulse sequence that highlights the pulse characteristics and removes power line interference and high-frequency noise.

[0018] Calculation of statistical indicators: According to the collected data sequence, the statistical characteristics are calculated respectively, including the mean μ and the standard deviation σ. The calculation formula of the mean μ is shown in formula (2), and the calculation formula of the standard deviation σ is shown in formula (3):

[0019]

[0020] Among them, T i is the i-th data point, A is A data points;

[0021] Outlier determination: Based on the calculated mean μ and standard deviation σ, the 3-times standard deviation rule is used to determine the data greater than or equal to μ+3σ and less than or equal to μ-3σ as outliers and remove them.

[0022] The normalization in step S20 adopts the minimum-maximum normalization operation, and the maximum value T in the data after filtering out the power line interference and high-frequency noise and removing the abnormal values ​​is obtained. max and minimum value T min , calculate the normalized value point by point, and the normalized calculation formula is shown in formula (4):

[0023]

[0024] Among them, T inorm is the normalized value of the minimum and maximum values ​​of the ith point, T i is the i-th data point. After calculation, the input data are mapped to the interval [0,1].

[0025] Preferably, in step S30, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained, and the specific steps include:

[0026] Construction of training data set: Collect historical operation data of crankshaft position sensor and engine, including normal operation data and fault operation data, and classify them according to fault severity and fault cause, and randomly divide them into training set, validation set and test set in a ratio of 7:2:1; manually annotate fault operation data with detailed category labels, fault start timestamp and other information to enhance the learning accuracy of the model;

[0027] Optimization algorithm and multi-objective loss function design: Adopt the Adam optimization algorithm, set the initial learning rate λ0 and decay it according to the model training rounds until the model converges; design the composite loss function as shown in formula (5):

[0028] L=αL ce +βL mse (5)

[0029] Where L ce is the cross entropy loss supervised classification, which is used to ensure accurate fault type identification. mse is the mean square error loss, which indicates the deviation between the detected fault time and the actual time, and is used to ensure timely fault detection. α and β are weight coefficients, which are determined based on experience and validation set tuning;

[0030] Model construction: A network architecture combining a convolutional neural network with a long short-term memory network is adopted, and an attention mechanism is added, including an input layer, a convolution layer, a batch normalization layer, a long short-term memory network layer, an attention layer and a fully connected layer; the input data of the input layer is a multidimensional data matrix composed of the data collected in step S10, and the data matrix includes the crankshaft signal wheel pulse sequence characteristics, the sensor's own output pulse characteristics, the ambient temperature and humidity characteristics and the engine vibration spectrum characteristics. Each feature has a specific dimension after quantization. These dimensions are combined to determine the number of neurons in the input layer. The number of data contained in each batch is set according to the total number of input data. Each batch contains a certain number of data samples, and each sample contains vectors of all the above features; the convolution layer includes a set number and size of convolution kernels to capture specific patterns in the input data. ReLU is selected as the activation function in the convolution layer; the batch normalization layer is between the convolution layer and the long short-term memory network layer, and is used to standardize the input distribution of each network layer, accelerate network convergence and prevent gradient disappearance. The calculation formula is shown in formula (6):

[0031]

[0032] in is the normalized feature, x i is the original feature, μ j is the mean of the feature within the batch, σ j is the variance of the feature within the batch, j represents the jth batch, i represents the i-th feature within the batch, and c is a constant used to prevent division by 0; the LSTM network layer includes a set number of memory units, which are controlled by the forget gate, input gate, and output gate. The forget gate determines the discarded data, the input gate determines the added data, and the output gate determines the output data; the attention layer is between the LSTM network layer and the fully connected layer, and dynamically weights the features extracted by the LSTM network layer according to their importance. The attention score is calculated according to the feature scoring function, and the weight W is calculated by formula (7): i :

[0033]

[0034] Where nt is the number of features, score(x i ) is the attention score of the i-th feature, score(x j ) is the attention score of the jth feature, e is an exponential function, the sum of the weights of all features calculated is 1, and the calculated weight W i Multiply it with the corresponding feature vector, sum it up to get the weighted fusion feature vector, and pass it to the subsequent fully connected layer as input, so as to enhance the model's ability to distinguish key fault features; the output y of the fully connected layer is calculated by formula (7):

[0035] y=wx+d (7)

[0036] Where w is the weight matrix, d is the bias vector, and x is the output of the previous layer. The weight matrix w and the bias vector d are learned and adjusted through the back propagation algorithm. y is activated by the Softmax function to obtain the probability value corresponding to each fault category, and the sum of the probability values ​​is equal to 1.

[0037] Preferably, after the training in step S40 is completed, the preprocessed data collected in real time is input into the model, and the judgment rule for outputting the detection result is to select the fault category with the highest probability as the detection result, and when the probability value corresponding to the fault category with the highest probability is greater than or equal to the set threshold value P th , it is determined that a fault of this fault category has occurred; when the probability value corresponding to the fault category with the highest probability is less than the set threshold P th , it is judged as normal or the fault category is unclear, and it is necessary to further analyze other information or combine the outputs of multiple time steps for comprehensive judgment.

[0038] In addition, to achieve the above object, the present invention also provides a crankshaft position sensor detection system, the crankshaft position sensor detection system comprising:

[0039] Crankshaft position sensor data acquisition module: used to collect relevant data around the crankshaft position sensor at the same time, and collect the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and the acceleration sensor collects the vibration frequency of the engine where the crankshaft position sensor is located according to the set sampling frequency;

[0040] Crankshaft position sensor data preprocessing module: used for data preprocessing after data acquisition is completed, using filtering algorithms to filter out power line interference and high-frequency noise, remove outliers, and perform normalization;

[0041] Crankshaft position sensor fault detection model construction and training module: used to build and train the crankshaft position sensor fault detection model based on the improved neural network after data preprocessing is completed;

[0042] Crankshaft position sensor fault detection module: used to input the preprocessed data collected in real time into the model after training is completed, and output the detection results;

[0043] The crankshaft position sensor data acquisition module collects multivariate related data around the crankshaft position sensor at the same time, including pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time stamped;

[0044] The crankshaft position sensor fault detection model construction and training module constructs a crankshaft position sensor fault detection model based on an improved neural network, adopts a network architecture of a convolutional neural network combined with a long short-term memory network, and uses an attention mechanism in the network architecture to improve the model's learning ability for the crankshaft position sensor operating data features;

[0045] After the training is completed in the crankshaft position sensor fault detection module, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when no fault exists, the crankshaft position sensor is operating normally.

[0046] In addition, to achieve the above-mentioned purpose, the present invention also proposes a crankshaft position sensor detection device, which includes: a memory, a processor, and programs such as a crankshaft position sensor fault detection algorithm based on an improved neural network stored in the memory and run on the processor. The programs such as the crankshaft position sensor fault detection algorithm based on the improved neural network are steps to implement a crankshaft position sensor detection method as described above.

[0047] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, which includes programs such as a crankshaft position sensor fault detection algorithm based on an improved neural network, and when the programs such as the crankshaft position sensor fault detection algorithm based on an improved neural network are executed by a processor, a crankshaft position sensor detection method as described above is implemented.

[0048] The advantages and effects of the present invention are:

[0049] The present invention proposes a crankshaft position sensor detection method and system, which use sensor data processing combined with an improved neural network algorithm to accurately detect operating faults of the crankshaft position sensor, overcome the defects of the prior art, and achieve in-depth monitoring, precise analysis and early warning of faults of the crankshaft position sensor working state, thereby improving the reliability and timeliness of the crankshaft position sensor detection and ensuring the stable operation of the engine. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 The present invention is a flow chart of a method for detecting a crankshaft position sensor.

[0052] Figure 2 The present invention is a schematic diagram of the structure of a detection system of a crankshaft position sensor.

[0053] Figure 3 The present invention is a schematic block diagram of the structure of a detection electronic device for a crankshaft position sensor. DETAILED DESCRIPTION

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

[0055] The present invention provides a method for detecting a crankshaft position sensor, such as Figure 1 As shown, the following steps are included:

[0056] Step S10: Collect relevant data around the crankshaft position sensor at the same time, and collect the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and the acceleration sensor collects the vibration frequency of the engine where the crankshaft position sensor is located according to the set sampling frequency.

[0057] Among them, multivariate related data collected simultaneously around the crankshaft position sensor include pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time-stamped.

[0058] Step S20: After data collection is completed, data preprocessing is performed, and a filtering algorithm is used to filter out power line interference and high-frequency noise, remove outliers, and perform normalization.

[0059] Specifically, in step S20, a filtering algorithm is used to filter out power line interference and high-frequency noise, and the step of removing abnormal values ​​includes:

[0060] Determine the filtering parameters: design Butterworth low-pass and high-pass filters according to the filtered power line interference, determine the cutoff frequency of the low-pass filter to remove the part of the pulse sequence data below the cutoff frequency, and determine the cutoff frequency of the high-pass filter to remove the part of the pulse sequence data above the cutoff frequency;

[0061] Filter calculation: After determining the filter parameters, the collected crankshaft signal wheel pulse sequence data and the sensor's own output pulse sequence data are substituted point by point into the filter algorithm formula, as shown in formula (1):

[0062] y[n]=a0x[0]+a1x[n-1]+…+a M x[nM]-b1y[n-1]-…-b N y[nN](1)

[0063] Where y[n] is the output signal at the current moment, n is the time index in the discrete time series, x[n] is the input signal at the current moment, x[n-1] is the input signal at the previous moment, x[nM] is the input signal at the previous M moments, y[n-1] is the output signal at the previous moment, y[nN] is the output signal at the previous N moments, a0, a1, a M , b1 and b N is the filter coefficient, which is calculated according to the determined cutoff frequency and filter order. M represents M moments, N represents N moments, and each moment corresponds to a data point. The output is calculated in sequence according to the time series to obtain a pulse sequence that highlights the pulse characteristics and removes power line interference and high-frequency noise.

[0064] Calculation of statistical indicators: According to the collected data sequence, the statistical characteristics are calculated respectively, including the mean μ and the standard deviation σ. The calculation formula of the mean μ is shown in formula (2), and the calculation formula of the standard deviation σ is shown in formula (3):

[0065]

[0066] Among them, T i is the i-th data point, A is A data points;

[0067] Outlier determination: Based on the calculated mean μ and standard deviation σ, the 3-times standard deviation rule is used to determine the data greater than or equal to μ+3σ and less than or equal to μ-3σ as outliers and remove them.

[0068] The normalization in step S20 adopts the minimum-maximum normalization operation, and the maximum value T in the data after filtering out the power line interference and high-frequency noise and removing the abnormal values ​​is obtained. max and minimum value T min , calculate the normalized value point by point, and the normalized calculation formula is shown in formula (4):

[0069]

[0070] Among them, T inorm is the normalized value of the minimum and maximum values ​​of the ith point, T i is the i-th data point. After calculation, the input data are mapped to the interval [0,1].

[0071] Step S30: After the data preprocessing is completed, a crankshaft position sensor fault detection model based on the improved neural network is constructed and trained.

[0072] Among them, the crankshaft position sensor fault detection model based on the improved neural network adopts the network architecture of convolutional neural network combined with long short-term memory network, and uses the attention mechanism in the network architecture to enhance the model's learning ability of the crankshaft position sensor operating data characteristics.

[0073] Specifically, in step S30, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained, and the specific steps include:

[0074] Construction of training data set: Collect historical operation data of crankshaft position sensor and engine, including normal operation data and fault operation data, and classify them according to fault severity and fault cause, and randomly divide them into training set, validation set and test set in a ratio of 7:2:1; manually annotate fault operation data with detailed category labels, fault start timestamp and other information to enhance the learning accuracy of the model;

[0075] Optimization algorithm and multi-objective loss function design: Adopt the Adam optimization algorithm, set the initial learning rate λ0 and decay it according to the model training rounds until the model converges; design the composite loss function as shown in formula (5):

[0076] L=αL ce +βL mse (5)

[0077] Where L ce is the cross entropy loss supervised classification, which is used to ensure accurate fault type identification. mseis the mean square error loss, which indicates the deviation between the detected fault time and the actual time, and is used to ensure timely fault detection. α and β are weight coefficients, which are determined based on experience and validation set tuning;

[0078] Model construction: A network architecture combining a convolutional neural network with a long short-term memory network is adopted, and an attention mechanism is added, including an input layer, a convolution layer, a batch normalization layer, a long short-term memory network layer, an attention layer and a fully connected layer; the input data of the input layer is a multidimensional data matrix composed of the data collected in step S10, and the data matrix includes the crankshaft signal wheel pulse sequence characteristics, the sensor's own output pulse characteristics, the ambient temperature and humidity characteristics and the engine vibration spectrum characteristics. Each feature has a specific dimension after quantization. These dimensions are combined to determine the number of neurons in the input layer. The number of data contained in each batch is set according to the total number of input data. Each batch contains a certain number of data samples, and each sample contains vectors of all the above features; the convolution layer includes a set number and size of convolution kernels to capture specific patterns in the input data. ReLU is selected as the activation function in the convolution layer; the batch normalization layer is between the convolution layer and the long short-term memory network layer, and is used to standardize the input distribution of each network layer, accelerate network convergence and prevent gradient disappearance. The calculation formula is shown in formula (6):

[0079]

[0080] in is the normalized feature, x i is the original feature, μ j is the mean of the feature within the batch, σ j is the variance of the feature within the batch, j represents the jth batch, i represents the i-th feature within the batch, and c is a constant used to prevent division by 0; the LSTM network layer includes a set number of memory units, which are controlled by the forget gate, input gate, and output gate. The forget gate determines the discarded data, the input gate determines the added data, and the output gate determines the output data; the attention layer is between the LSTM network layer and the fully connected layer, and dynamically weights the features extracted by the LSTM network layer according to their importance. The attention score is calculated according to the feature scoring function, and the weight W is calculated by formula (7): i :

[0081]

[0082] Where n t is the number of features, score(x i ) is the attention score of the i-th feature, score(x j ) is the attention score of the jth feature, e is an exponential function, the sum of the weights of all features calculated is 1, and the calculated weight W iMultiply it with the corresponding feature vector, sum it up to get the weighted fusion feature vector, and pass it to the subsequent fully connected layer as input, so as to enhance the model's ability to distinguish key fault features; the output y of the fully connected layer is calculated by formula (7):

[0083] y=wx+d (7)

[0084] Where w is the weight matrix, d is the bias vector, and x is the output of the previous layer. The weight matrix w and the bias vector d are learned and adjusted through the back propagation algorithm. y is activated by the Softmax function to obtain the probability value corresponding to each fault category, and the sum of the probability values ​​is equal to 1.

[0085] Step S40: After the training is completed, the preprocessed data collected in real time is input into the model and the detection results are output.

[0086] Among them, after the training in step S40 is completed, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when there is no fault, the crankshaft position sensor is operating normally.

[0087] Specifically, after the training is completed in step S40, the preprocessed data collected in real time is input into the model, and the judgment rule for outputting the detection result is to select the fault category with the highest probability as the detection result, and when the probability value corresponding to the fault category with the highest probability is greater than or equal to the set threshold value P th , it is determined that a fault of this fault category has occurred; when the probability value corresponding to the fault category with the highest probability is less than the set threshold P th , it is judged as normal or the fault category is unclear, and it is necessary to further analyze other information or combine the outputs of multiple time steps for comprehensive judgment.

[0088] In addition, the present invention also proposes a detection system for a crankshaft position sensor, please refer to Figure 2 The crankshaft position sensor detection system comprises:

[0089] Crankshaft position sensor data acquisition module: used to collect relevant data around the crankshaft position sensor at the same time, and collect the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and the acceleration sensor collects the vibration frequency of the engine where the crankshaft position sensor is located according to the set sampling frequency;

[0090] Crankshaft position sensor data preprocessing module: used for data preprocessing after data acquisition is completed, using filtering algorithms to filter out power line interference and high-frequency noise, remove outliers, and perform normalization;

[0091] Crankshaft position sensor fault detection model construction and training module: used to build and train the crankshaft position sensor fault detection model based on the improved neural network after data preprocessing is completed;

[0092] Crankshaft position sensor fault detection module: used to input the preprocessed data collected in real time into the model after training is completed, and output the detection results;

[0093] Among them, the crankshaft position sensor data acquisition module collects multivariate related data around the crankshaft position sensor at the same time, including pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time-stamped;

[0094] Among them, the crankshaft position sensor fault detection model based on the improved neural network in the crankshaft position sensor fault detection model construction and training module adopts the network architecture of convolutional neural network combined with long short-term memory network, and uses the attention mechanism in the network architecture to improve the model's learning ability of the crankshaft position sensor operation data characteristics;

[0095] Among them, after the training is completed in the crankshaft position sensor fault detection module, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when there is no fault, the crankshaft position sensor is operating normally.

[0096] The crankshaft position sensor detection system provided by the present application adopts a crankshaft position sensor detection method in the above embodiment, which can solve the technical problem that the existing crankshaft position sensor detection method is difficult to capture potential fault hazards in time. Compared with the prior art, the beneficial effects of the crankshaft position sensor detection system provided by the present application are the same as the beneficial effects of the crankshaft position sensor detection method provided by the above embodiment, and other technical features in the crankshaft position sensor detection system are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0097] The present application provides a crankshaft position sensor detection device, the crankshaft position sensor detection device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a crankshaft position sensor detection method in the above-mentioned embodiment one.

[0098] Reference below Figure 3, which shows a schematic diagram of the structure of a crankshaft position sensor detection device suitable for implementing the embodiment of the present application. The crankshaft position sensor detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The detection device of a crankshaft position sensor shown is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.

[0099] Figure 3 The detection device of a crankshaft position sensor shown may include a processing system 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage system 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of a detection device of a crankshaft position sensor are also stored. The processing system 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input system 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication system 1009. The communication system 1009 can allow a detection device of a crankshaft position sensor to communicate wirelessly or wired with other devices to exchange data. Although a detection device of a crankshaft position sensor with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0100] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication system, or installed from a storage system 1003, or installed from a ROM 1002. When the computer program is executed by the processing system 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0101] The present application provides a crankshaft position sensor detection device, which adopts a crankshaft position sensor detection method in the above embodiment, and can solve the technical problem that the existing crankshaft position sensor detection method is difficult to timely capture potential fault hazards. Compared with the prior art, the beneficial effects of the crankshaft position sensor detection device provided by the present application are the same as the beneficial effects of the crankshaft position sensor detection method provided by the above embodiment, and the other technical features of the crankshaft position sensor detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0102] The various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0103] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for detecting a crankshaft position sensor are implemented.

[0104] The computer program product provided by the present application can solve the technical problem that the existing crankshaft position sensor detection method is difficult to timely capture potential fault hazards. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the crankshaft position sensor detection method provided by the above embodiment, which will not be repeated here.

[0105] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for detecting a crankshaft position sensor, characterized in that: The method comprises the following steps: Step S10: collecting relevant data around the crankshaft position sensor at the same time, collecting the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and collecting the vibration frequency of the engine where the crankshaft position sensor is located with the acceleration sensor according to the set sampling frequency; Step S20: After data collection is completed, data preprocessing is performed, and a filtering algorithm is used to filter out power line interference and high-frequency noise, remove outliers, and perform normalization; Step S30: after the data preprocessing is completed, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained; Step S40: After the training is completed, the preprocessed data collected in real time is input into the model and the detection results are output; In step S10, the multivariate correlation data including pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself are collected around the crankshaft position sensor at the same time; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time-stamped; In step S30, the crankshaft position sensor fault detection model based on the improved neural network is constructed by using a network architecture of a convolutional neural network combined with a long short-term memory network, and an attention mechanism is used in the network architecture to enhance the model's learning ability of the crankshaft position sensor operation data features; After the training in step S40 is completed, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when no fault exists, the crankshaft position sensor is operating normally.

2. The method for detecting a crankshaft position sensor according to claim 1, characterized in that: In step S20, a filtering algorithm is used to filter out power line interference and high-frequency noise, and the step of removing abnormal values ​​includes: Determine the filtering parameters: design Butterworth low-pass and high-pass filters according to the filtered power line interference, determine the cutoff frequency of the low-pass filter to remove the part of the pulse sequence data below the cutoff frequency, and determine the cutoff frequency of the high-pass filter to remove the part of the pulse sequence data above the cutoff frequency; Filter calculation: After determining the filter parameters, the collected crankshaft signal wheel pulse sequence data and the sensor's own output pulse sequence data are substituted point by point into the filter algorithm formula, as shown in formula (1): y[n]=a0x[n]+a1x[n-1]+…+a M x[n-M]-b1y[n-1]-…-b N y[n-N](1) Where y[n] is the output signal at the current moment, n is the time index in the discrete time series, x[n] is the input signal at the current moment, x[n-1] is the input signal at the previous moment, x[nM] is the input signal at the previous M moments, y[n-1] is the output signal at the previous moment, y[nN] is the output signal at the previous N moments, a0, a1, a M , b1 and b N is the filter coefficient, which is calculated according to the determined cutoff frequency and filter order. M represents M moments, N represents N moments, and each moment corresponds to a data point. The output is calculated in sequence according to the time series to obtain a pulse sequence that highlights the pulse characteristics and removes power line interference and high-frequency noise. Calculation of statistical indicators: According to the collected data sequence, the statistical characteristics are calculated respectively, including the mean μ and the standard deviation σ. The calculation formula of the mean μ is shown in formula (2), and the calculation formula of the standard deviation σ is shown in formula (3): Among them, T i is the i-th data point, A is A data points; Outlier determination: Based on the calculated mean μ and standard deviation σ, the 3-times standard deviation rule is used to determine the data greater than or equal to μ+3σ and less than or equal to μ-3σ as outliers and remove them.

3. The method for detecting a crankshaft position sensor according to claim 1, characterized in that: In step S20, a minimum-maximum normalization operation is performed to obtain the maximum value T of the data after filtering out power line interference and high-frequency noise and removing abnormal values. max and minimum value T min , calculate the normalized value point by point, and the normalized calculation formula is shown in formula (4): Among them, T inorm is the normalized value of the minimum and maximum values ​​of the ith point, T i is the i-th data point. After calculation, the input data are mapped to the interval [0,1].

4. The method for detecting a crankshaft position sensor according to claim 1, characterized in that: In step S30, a crankshaft position sensor fault detection model based on an improved neural network is constructed and trained, and the specific steps include: Construction of training data set: Collect historical operation data of crankshaft position sensor and engine, including normal operation data and fault operation data, and classify them according to fault severity and fault cause, and randomly divide them into training set, validation set and test set in the ratio of 7:2:1; manually annotate the fault operation data with detailed category labels and fault start timestamp information to enhance the learning accuracy of the model; Optimization algorithm and multi-objective loss function design: Adopt the Adam optimization algorithm, set the initial learning rate λ0 and decay it according to the model training rounds until the model converges; design the composite loss function as shown in formula (5): L=αL ce +βL mse (5) Where L ce is the cross entropy loss supervised classification, which is used to ensure accurate fault type identification. mse is the mean square error loss, which indicates the deviation between the detected fault time and the actual time, and is used to ensure timely fault detection. α and β are weight coefficients, which are determined based on experience and validation set tuning; Model construction: A network architecture combining a convolutional neural network with a long short-term memory network is adopted, and an attention mechanism is added, including an input layer, a convolution layer, a batch normalization layer, a long short-term memory network layer, an attention layer and a fully connected layer; the input data of the input layer is a multidimensional data matrix composed of the data collected in step S10, and the data matrix includes the crankshaft signal wheel pulse sequence characteristics, the sensor's own output pulse characteristics, the ambient temperature and humidity characteristics and the engine vibration spectrum characteristics. Each feature has a specific dimension after quantization. These dimensions are combined to determine the number of neurons in the input layer. The number of data contained in each batch is set according to the total number of input data. Each batch contains a certain number of data samples, and each sample contains vectors of all the above features; the convolution layer includes a set number and size of convolution kernels to capture specific patterns in the input data. ReLU is selected as the activation function in the convolution layer; the batch normalization layer is between the convolution layer and the long short-term memory network layer, and is used to standardize the input distribution of each network layer, accelerate network convergence and prevent gradient disappearance. The calculation formula is shown in formula (6): in is the normalized feature, x i is the original feature, μ j is the mean of the feature within the batch, σ j is the variance of the feature within the batch, j represents the jth batch, i represents the i-th feature within the batch, and c is a constant used to prevent division by 0; the LSTM network layer includes a set number of memory units, which are controlled by the forget gate, input gate, and output gate. The forget gate determines the discarded data, the input gate determines the added data, and the output gate determines the output data; the attention layer is between the LSTM network layer and the fully connected layer, and dynamically weights the features extracted by the LSTM network layer according to their importance. The attention score is calculated according to the feature scoring function, and the weight W is calculated by formula (7): i : where n t is the number of features, score(x i ) is the attention score of the i-th feature, score(x j ) is the attention score of the jth feature, e is an exponential function, the sum of the weights of all features calculated is 1, and the calculated weight W i Multiply it with the corresponding feature vector, sum it up to get the weighted fusion feature vector, and pass it to the subsequent fully connected layer as input, so as to enhance the model's ability to distinguish key fault features; the output y of the fully connected layer is calculated by formula (7): y=wx+d (7) Where w is the weight matrix, d is the bias vector, and x is the output of the previous layer. The weight matrix w and the bias vector d are learned and adjusted through the back propagation algorithm. y is activated by the Softmax function to obtain the probability value corresponding to each fault category, and the sum of the probability values ​​is equal to 1.

5. The method for detecting a crankshaft position sensor according to claim 1, characterized in that: After the training in step S40 is completed, the preprocessed data collected in real time is input into the model, and the judgment rule for outputting the detection result is to select the fault category with the highest probability as the detection result, and when the probability value corresponding to the fault category with the highest probability is greater than or equal to the set threshold value P th , it is determined that a fault of this fault category has occurred; when the probability value corresponding to the fault category with the highest probability is less than the set threshold P th , it is judged as normal or the fault category is unclear, and it is necessary to further analyze other information or combine the outputs of multiple time steps for comprehensive judgment.

6. A crankshaft position sensor detection system, characterized in that: The detection system of the crankshaft position sensor comprises: Crankshaft position sensor data acquisition module: used to collect relevant data around the crankshaft position sensor at the same time, and collect the ambient temperature and humidity of the crankshaft position sensor through the temperature and humidity sensor, and the acceleration sensor collects the vibration frequency of the engine where the crankshaft position sensor is located according to the set sampling frequency; Crankshaft position sensor data preprocessing module: used for data preprocessing after data acquisition is completed, using filtering algorithms to filter out power line interference and high-frequency noise, remove outliers, and perform normalization; Crankshaft position sensor fault detection model construction and training module: used to construct and train the crankshaft position sensor fault detection model based on the improved neural network after data preprocessing is completed; Crankshaft position sensor fault detection module: used to input the preprocessed data collected in real time into the model after training is completed, and output the detection results; The crankshaft position sensor data acquisition module collects multivariate related data around the crankshaft position sensor at the same time, including pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and the output pulse sequence data of the crankshaft position sensor itself; the temperature and humidity sensor and the acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data are all time stamped; The crankshaft position sensor fault detection model construction and training module constructs a crankshaft position sensor fault detection model based on an improved neural network, adopts a network architecture of a convolutional neural network combined with a long short-term memory network, and uses an attention mechanism in the network architecture to improve the model's learning ability for the crankshaft position sensor operating data features; After the training is completed in the crankshaft position sensor fault detection module, the preprocessed data collected in real time is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when a fault exists, the crankshaft position sensor operation fault is output, and the detected crankshaft position sensor fault type and the cause of the fault are output; when no fault exists, the crankshaft position sensor is operating normally.

7. A crankshaft position sensor detection device, characterized in that: The detection device of the crankshaft position sensor comprises: A memory, a processor, and a crankshaft position sensor detection program stored in the memory and executable on the processor, wherein the crankshaft position sensor detection program, when executed by the processor, implements a crankshaft position sensor detection method as described in any one of claims 1 to 5.

8. A computer program product, characterized in that The computer program product comprises a crankshaft position sensor detection program, and when the crankshaft position sensor detection program is executed by a processor, the crankshaft position sensor detection method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Detection device and method for crankshaft position sensor

    CN101358858A

  • Fault detecting system of crankshaft position sensor signal for automobile and detecting method

    CN106837576A

  • Crankshaft, transmission or camshaft sensor, diagnosis system and method implementing such a sensor

    CN111373225A

  • Method and equipment for detecting position of engine crankshaft

    CN117147167A

  • Camshaft or crankshaft sensor for automotive vehicle and diagnostic method for such a sensor

    US20170322053A1