A detection method and system for a crankshaft position sensor

By collecting multiple related data and building an improved neural network fault detection model, the existing crankshaft position sensor detection method is solved, and efficient and reliable fault detection and early warning are achieved, ensuring the stable operation of the engine.

CN119642869BActive Publication Date: 2025-06-10JIANGSU YUXIN SENSOR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411788748.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-06-10
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 meet the needs of efficient and reliable operation of modern engines, which often lead to fault false alarms, missed alarms and passive lag in repairs.

Method used

By collecting multiple related data around the crankshaft position sensor, including ambient temperature and humidity and engine vibration frequency, filtering algorithms are used to remove interference and noise, and a fault detection model based on improved neural networks is built, and a convolutional neural network is used to combine long and short-term memory networks and attention mechanisms for fault detection.

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 CN119642869B_ABST
    Figure CN119642869B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of sensor detection, and specifically relates to a detection method and system for a crankshaft position sensor. The method includes: collaboratively collecting multi-source associated data around the crankshaft position sensor, collecting the ambient temperature and humidity of the crankshaft position sensor through a temperature and humidity sensor, and collecting the vibration frequency of the engine where the crankshaft position sensor is located by an acceleration sensor according to a set sampling frequency; 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, eliminate outliers, and perform normalization; after data preprocessing is completed, a fault detection model for the crankshaft position sensor based on an improved neural network is constructed and trained; after training is completed, the preprocessed data of the real-time collected data is input into the model to output a detection result. By combining an improved neural network algorithm, the present invention accurately detects the operating state of the crankshaft position sensor, reduces the risk of sudden faults, and ensures the stable operation of the engine and related equipment.
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 particularly 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 information such as the position and speed of the crankshaft, and then achieve precise control of the ignition timing, fuel injection timing, etc. However, under actual working conditions, the operating conditions of the engine are complex and variable, and the crankshaft position sensor is easily interfered by various factors, such as electromagnetic interference, mechanical vibration, temperature gradient change, and its own aging and wear, resulting in deviation, loss of steps or abnormal intensity of its output signal, affecting the engine performance and even causing the engine to stop due to failure. At present, traditional detection means based on threshold comparison and simple signal feature statistics are difficult to capture potential fault hazards in a timely manner, unable to comprehensively, accurately and predict sensor faults in advance, and cannot meet the requirements of the efficient and reliable operation of modern engines, often resulting in false alarms, missed alarms and passive and lagged maintenance of faults, affecting the stable operation of the engine. Summary of the Invention

[0003] The present invention aims at the above-mentioned existing technical deficiencies and provides a detection method and system for a crankshaft position sensor.

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

[0005] A detection method for a crankshaft position sensor is provided, and the method includes the following steps:

[0006] 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 a 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;

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

[0008] Step S30: After the data preprocessing is completed, construct and train a fault detection model for the crankshaft position sensor based on an improved neural network;

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

[0010] Among them, the simultaneous acquisition of multi - variable associated data around the crankshaft position sensor in step S10 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 acquired data all carry time stamps.

[0011] Among them, in step S30, the construction of the fault detection model for the crankshaft position sensor based on the improved neural network adopts a network architecture combining a convolutional neural network and a long - short - term memory network, and an attention mechanism is used in the network architecture to improve the model's learning ability for the operating data characteristics of the crankshaft position sensor.

[0012] Among them, in step S40, after training is completed, the pre - processed data of the real - time acquired data is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when there is a fault, the operating fault of the crankshaft position sensor is output, and at the same time, the detected fault type of the crankshaft position sensor and the cause of the fault are output; when there is no fault, it is output that the crankshaft position sensor is operating normally.

[0013] Preferably, in step S20, the filtering algorithm is used to filter out power line interference and high - frequency noise, and the steps of removing outliers include:

[0014] Determine the filtering parameters: According to the power line interference to be filtered, Butterworth low - pass and high - pass filters are designed. Determine the cut - off frequency of the low - pass filter to remove the part of the pulse sequence data below this cut - off frequency, and determine the cut - off frequency of the high - pass filter to remove the part of the pulse sequence data above this cut - off frequency.

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

[0016] y[n]=a 0 x[0]+a 1 x[n - 1]+…+a M x[n - M]-b 1 y[n - 1]-…-b N y[n - N](1)

[0017] Among them, 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 1 moment, x[n - M] is the input signal at the previous M moments, y[n - 1] is the output signal at the previous 1 moment, y[n - N] is the output signal at the previous N moments, a 0 、a 1 、a M, b 1 and b N are filter coefficients, calculated according to the determined cut-off frequency and filter order. M represents M moments, and N represents N moments, with each moment corresponding to a data point; the output is calculated sequentially 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, calculate the statistical characteristic quantities respectively, including the mean μ and the standard deviation σ. The calculation formula of the mean μ is shown in Equation (2), and the calculation formula of the standard deviation σ is shown in Equation (3):

[0019]

[0020] where T i is the i-th data point, and A is A data points;

[0021] Judgment of outliers: According to the calculated mean μ and standard deviation σ, using the three-standard-deviation rule, the data greater than or equal to μ + 3σ and less than or equal to μ - 3σ are judged as outliers and removed.

[0022] Among them, the normalization in step S20 adopts the min-max normalization operation. According to the maximum value T max and the minimum value T min in the data after filtering power line interference and high-frequency noise and removing outliers, calculate the normalized value point by point. The normalization calculation formula is shown in Equation (4):

[0023]

[0024] where T inorm is the value after min-max normalization of the i-th point, T i is the i-th data point, and after calculation, the input data are all mapped to the interval [0, 1].

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

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

[0027] Design of the optimization algorithm and multi-objective loss function: Use the Adam optimization algorithm, set the initial learning rate λ 0And decay according to the number of model training rounds until the model converges; design a composite loss function as shown in Equation (5):

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

[0029] where L ce is the cross - entropy loss for supervised classification, used to ensure accurate discrimination of fault types, and L mse is the mean squared error loss, representing the deviation between the detected fault time and the true time, used to ensure timely fault detection. α and β are trade - off coefficients, determined by tuning according to experience and the validation set;

[0030] Model construction: Adopt a network architecture that combines a convolutional neural network and a long - short - term memory network, and add an attention mechanism, including an input layer, a convolutional 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 multi - dimensional data matrix composed of the data collected in step S10. The data matrix includes the crankshaft signal wheel pulse sequence feature, the sensor's own output pulse feature, the environmental temperature and humidity feature, and the engine vibration spectrum feature. Each feature has a specific dimension after quantization. Combine these dimensions to determine the number of neurons in the input layer. Set the number of data included in each batch 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 - mentioned features; The convolutional layer includes a set number and size of convolutional kernels, used to capture specific patterns in the input data. ReLU is selected as the activation function in the convolutional layer; The batch normalization layer is between the convolutional layer and the long - short - term memory network layer, used to standardize the input distribution of each network layer, accelerate network convergence and prevent gradient disappearance. The calculation formula is as shown in Equation (6):

[0031]

[0032] where is the normalized feature, x i is the original feature, μ j is the mean of the features within the batch, σ j is the variance of the features within the batch, j represents the j - th batch, i represents the i - th feature within the batch, and c is a constant used to prevent division by zero; The long - short - term memory network layer includes a set number of memory units. Inside the memory units, data are controlled by a forget gate, an input gate, and an output gate. The forget gate determines the data to be discarded, the input gate determines the data to be added, and the output gate determines the data to be output; The attention layer is between the long - short - term memory network layer and the fully - connected layer. Dynamically assigns weights according to the importance of the features extracted by the long - short - term memory network layer, calculates the attention scores according to the feature scoring function, and calculates the weight W i :

[0033]

[0034] 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 j-th feature, e is the exponential function, and the sum of the weights of all calculated features is 1. Multiply the calculated weight W i by the corresponding feature vector and sum to obtain the weighted fused feature vector, which is passed as input to the subsequent fully connected layer to enhance the model's discriminative ability for key fault features; the output y of the fully connected layer is calculated by Equation (7):

[0035] y = wx + d (7)

[0036] where w is the weight matrix, d is the bias vector, x is the output of the previous layer, the weight matrix w and the bias vector d are learned and adjusted by the backpropagation algorithm, and y passes through the Softmax activation 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 is completed in step S40, the preprocessed data of the real-time collected data is input into the model, and the judgment rule for the output detection result is to select the fault category with the highest probability as the detection result. When the probability value corresponding to the fault category with the highest probability is greater than or equal to the set threshold P th , it is determined that a fault of this fault category occurs; when the probability value corresponding to the fault category with the highest probability is less than the set threshold P th , it is determined to be normal or the fault category is not clear, and other information needs to be further analyzed or a comprehensive judgment needs to be made by combining the outputs of multiple time steps.

[0038] In addition, to achieve the above object, the present invention also proposes a detection system for a crankshaft position sensor, and the detection system for a crankshaft position sensor includes:

[0039] Crankshaft position sensor data acquisition module: used to simultaneously collect relevant data around the crankshaft position sensor, and collect the ambient temperature and humidity of the crankshaft position sensor through a 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 to perform data preprocessing after data collection is completed, filter out power line interference and high-frequency noise using a filtering algorithm, remove outliers, and perform normalization;

[0041] Crankshaft Position Sensor Fault Detection Model Construction and Training Module: Used to construct and train a crankshaft position sensor fault detection model based on an improved neural network after data preprocessing;

[0042] Crankshaft Position Sensor Fault Detection Module: Used to input the preprocessed data of the real-time collected data into the model after training and output the detection result;

[0043] In the crankshaft position sensor data acquisition module, multiple correlated data are simultaneously collected around the crankshaft position sensor, 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; a temperature and humidity sensor and an acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data all carry timestamps;

[0044] In the crankshaft position sensor fault detection model construction and training module, a crankshaft position sensor fault detection model based on an improved neural network is constructed using a network architecture that combines a convolutional neural network and a long short-term memory network, and an attention mechanism is used in the network architecture to improve the model's learning ability for the operating data characteristics of the crankshaft position sensor;

[0045] In the crankshaft position sensor fault detection module, after training, the preprocessed data of the real-time collected data is input into the model, and the output detection result is whether there is a fault in the crankshaft position sensor; when there is a fault, the operating fault of the crankshaft position sensor is output, and at the same time, the detected fault type of the crankshaft position sensor and the cause of the fault are output; when there is no fault, it is output that the crankshaft position sensor is operating normally.

[0046] In addition, to achieve the above object, the present invention also proposes a detection device for a crankshaft position sensor, the device includes: a memory, a processor, and programs such as a crankshaft position sensor fault detection algorithm based on an improved neural network stored on the memory and operable on the processor, and the programs such as the crankshaft position sensor fault detection algorithm based on an improved neural network are steps for implementing a detection method for a crankshaft position sensor as described above.

[0047] In addition, to achieve the above object, the present invention also provides a computer program product, the computer program product 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, they implement a detection method for a crankshaft position sensor as described above.

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

[0049] A detection method and system for a crankshaft position sensor proposed by the present invention accurately detect the operating faults of the crankshaft position sensor by combining sensor data processing with an improved neural network algorithm, overcome the defects of the prior art, realize in-depth monitoring, precise analysis and early warning of faults of the crankshaft position sensor, improve the reliability and timeliness of the detection of the crankshaft position sensor, and ensure the stable operation of the engine. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0051] Figure 1 It is a flowchart of a detection method for a crankshaft position sensor of the present invention.

[0052] Figure 2 It is a schematic structural diagram of a detection system for a crankshaft position sensor of the present invention.

[0053] Figure 3 It is a schematic block diagram of the structure of an electronic device for detecting a crankshaft position sensor of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.

[0055] The present invention provides a detection method for a crankshaft position sensor, as Figure 1 shown, including the following steps:

[0056] Step S10: Simultaneously collect relevant data around the crankshaft position sensor, and collect the ambient temperature and humidity of the crankshaft position sensor through a temperature and humidity sensor, and collect the vibration frequency of the engine where the crankshaft position sensor is located by an acceleration sensor according to a set sampling frequency.

[0057] Among them, simultaneously collecting multi-source associated data around the crankshaft position sensor includes pulse sequence data derived from the mechanical displacement of the crankshaft signal wheel and 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 all carry time stamps.

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

[0059] Specifically, the steps of using a filtering algorithm to filter out power line interference and high-frequency noise and remove outliers in step S20 include:

[0060] Determine filtering parameters: According to the power line interference to be filtered, Butterworth low-pass and high-pass filters are designed. Determine the cut-off frequency of the low-pass filter to remove the part of the pulse sequence data below this cut-off frequency, and determine the cut-off frequency of the high-pass filter to remove the part of the pulse sequence data above this cut-off frequency;

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

[0062] y[n] = a 0 x[0] + a 1 x[n - 1] + … + a M x[n - M] - b 1 y[n - 1] - … - b N y[n - N](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 1 moment, x[n - M] is the input signal at the previous M moments, y[n - 1] is the output signal at the previous 1 moment, y[n - N] is the output signal at the previous N moments, a 0 、a 1 、a M 、b 1 and b N are filter coefficients, calculated according to the determined cut-off frequency and filter order. M represents M moments, N represents N moments, and each moment corresponds to a data point; calculate the output sequentially 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] Statistical index calculation: According to the collected data sequence, calculate the statistical characteristic quantities respectively, including the mean μ and the standard deviation σ. The calculation formula of the mean μ is shown in Equation (2), and the calculation formula of the standard deviation σ is shown in Equation (3):

[0065]

[0066] where T i is the i-th data point, and A is A data points;

[0067] Outlier determination: According to the calculated mean μ and standard deviation σ, the 3-sigma rule is adopted to determine and remove the data that is greater than or equal to μ + 3σ and less than or equal to μ - 3σ as outliers.

[0068] Among them, the normalization in step S20 adopts the min-max normalization operation. According to the maximum value T max and the minimum value T min in the data after filtering power line interference and high-frequency noise and removing outliers, the normalized values are calculated point by point. The normalization calculation formula is shown in Equation (4):

[0069]

[0070] Among them, among them, T inorm is the value after min-max normalization of the i-th point, and T i is the i-th data point. After calculation, the input data is mapped to the interval [0, 1].

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

[0072] Among them, the construction of the crankshaft position sensor fault detection model based on the improved neural network adopts the network architecture of the convolutional neural network combined with the long short-term memory network, and the attention mechanism is used in the network architecture to improve the learning ability of the model for the characteristics of the crankshaft position sensor operation data.

[0073] Specifically, in step S30, the construction and training of the crankshaft position sensor fault detection model based on the improved neural network specifically includes the following steps:

[0074] Training dataset construction: Collect the historical operation data of the crankshaft position sensor and the engine, including normal operation data and fault operation data, and classify them according to the severity of the fault and the cause of the fault. Randomly split them into a training set, a validation set, and a test set according to the ratio of 7:2:1; Manually annotate detailed category labels, fault start timestamps, etc. for the fault operation data to enhance the learning accuracy of the model;

[0075] Optimization algorithm and multi-objective loss function design: The Adam optimization algorithm is adopted, and the initial learning rate λ 0 is set and decays according to the number of model training rounds until the model converges; Design a composite loss function, as shown in Equation (5):

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

[0077] Among them, L ceFor cross - entropy loss supervised classification, it is used to ensure accurate discrimination of fault types, L mse is the mean squared error loss, which represents the deviation between the detected fault time and the real time, and is used to ensure timely fault detection. α and β are trade - off coefficients, which are determined by tuning according to experience and the validation set;

[0078] Model construction: Adopt a network architecture that combines a convolutional neural network and a long short - term memory network, and add an attention mechanism, including an input layer, a convolutional 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 multi - dimensional data matrix composed of the data collected in step S10. The data matrix includes the crankshaft signal wheel pulse sequence feature, the sensor's own output pulse feature, the environmental temperature and humidity feature, and the engine vibration spectrum feature. Each feature has a specific dimension after quantization. Combine these dimensions to determine the number of neurons in the input layer. Set the number of data included in each batch 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 - mentioned features; The convolutional layer includes a set number and size of convolutional kernels, which are used to capture specific patterns in the input data. ReLU is selected as the activation function in the convolutional layer; The batch normalization layer is between the convolutional layer and the long short - term memory network layer, which is used to standardize the input distribution of each network layer, accelerate network convergence and prevent gradient disappearance. The calculation formula is shown in Equation (6):

[0079]

[0080] where is the normalized feature, x i is the original feature, μ j is the mean of the features within the batch, σ j is the variance of the features within the batch, j represents the j - th batch, i represents the i - th feature within the batch, and c is a constant used to prevent division by zero; The long short - term memory network layer includes a set number of memory units, and the internal memory units are controlled by a forget gate, an input gate, and an output gate. The forget gate determines the data to be discarded, the input gate determines the data to be added, and the output gate determines the data to be output; The attention layer is between the long short - term memory network layer and the fully - connected layer, dynamically assigns weights according to the importance of the features extracted by the long short - term memory network layer, calculates the attention score according to the feature scoring function, and calculates the weight W through Equation (7) i :[[]]END]]

[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 j-th feature, e is the exponential function, and the sum of the weights of all calculated features is 1. The calculated weight W i is multiplied by the corresponding feature vector, and the sum is used to obtain the weighted fusion feature vector, which is passed as input to the subsequent fully connected layer to enhance the model's discrimination ability for key fault features; the output y of the fully connected layer is calculated by Equation (7):

[0083] y = wx + d (7)

[0084] where w is the weight matrix, d is the bias vector, x is the output of the previous layer, the weight matrix w and the bias vector d are learned and adjusted through the backpropagation algorithm, and y passes through the Softmax activation 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 training is completed, the preprocessed data of the real-time collected data is input into the model, and the detection result is output.

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

[0087] Specifically, in step S40, after training is completed, the preprocessed data of the real-time collected data 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. When the probability value corresponding to the fault category with the highest probability is greater than or equal to the set threshold P th , it is determined that a fault of this fault category occurs; when the probability value corresponding to the fault category with the highest probability is less than the set threshold P th , it is determined to be normal or the fault category is not clear, and other information needs to be further analyzed or a comprehensive judgment needs to be made by combining the outputs of multiple time steps.

[0088] In addition, the present invention also proposes a detection system for a crankshaft position sensor. Please refer to Figure 2 , the described detection system for a crankshaft position sensor includes:

[0089] Crankshaft position sensor data acquisition module: used to simultaneously collect relevant data around the crankshaft position sensor, collect the ambient temperature and humidity of the crankshaft position sensor through a 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: It is used to perform data preprocessing after data acquisition. A filtering algorithm is adopted 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: It is used to construct and train a crankshaft position sensor fault detection model based on an improved neural network after data preprocessing is completed;

[0092] Crankshaft Position Sensor Fault Detection Module: It is used to input the preprocessed data of the real-time collected data into the model after training is completed and output the detection result;

[0093] Among them, in the crankshaft position sensor data acquisition module, multiple correlated data are simultaneously collected around the crankshaft position sensor, 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; a temperature and humidity sensor and an acceleration sensor are installed on the engine where the crankshaft position sensor is located; the collected data all carry timestamps;

[0094] Among them, in the crankshaft position sensor fault detection model construction and training module, a crankshaft position sensor fault detection model based on an improved neural network is constructed using a network architecture that combines a convolutional neural network and a long short-term memory network, and an attention mechanism is used in the network architecture to improve the model's learning ability for the operating data characteristics of the crankshaft position sensor;

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

[0096] A detection system for a crankshaft position sensor provided by this application adopts a detection method for a crankshaft position sensor in the above embodiment, and can solve the technical problem that it is difficult for the existing crankshaft position sensor detection method to capture potential fault hazards in a timely manner. Compared with the prior art, the beneficial effects of a detection system for a crankshaft position sensor provided by this application are the same as those of a detection method for a crankshaft position sensor provided by the above embodiment, and other technical features in the detection system for a crankshaft position sensor are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.

[0097] This application provides a detection device for a crankshaft position sensor. The detection device for a crankshaft position sensor includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute a detection method for a crankshaft position sensor in Embodiment 1 above.

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

[0099] Figure 3A detection device for a crankshaft position sensor as shown may include a processing system 1001 (such as a central processing unit, a graphics processing unit, 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 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of a detection device for a crankshaft position sensor are also stored. The processing system 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may 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: Liquid Crystal Display), 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 for a crankshaft position sensor to communicate with other devices wirelessly or wiredly to exchange data. Although a detection device for 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 shown systems. More or fewer systems can be alternatively implemented or had.

[0100] Specifically, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. 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 contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication system, or installed from the storage system 1003, or installed from the ROM 1002. When the computer program is executed by the processing system 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.

[0101] A detection device for a crankshaft position sensor provided by the present application adopts a detection method for a crankshaft position sensor in the above-mentioned embodiment, and can solve the technical problem that it is difficult for the existing detection method of a crankshaft position sensor to capture potential fault hazards in a timely manner. Compared with the prior art, the beneficial effects of a detection device for a crankshaft position sensor provided by the present application are the same as those of a detection method for a crankshaft position sensor provided by the above-mentioned embodiment, and other technical features in the detection device for a crankshaft position sensor are the same as those disclosed in the method of the previous embodiment, and will not be elaborated herein.

[0102] Each part 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 a suitable manner in any one or more embodiments or examples.

[0103] This application also provides a computer program product, including a computer program, and the steps of a detection method of a crankshaft position sensor as described above are implemented when the computer program is executed by a processor.

[0104] The computer program product provided by this application can solve the technical problem that it is difficult to timely capture potential fault hazards in the existing detection method of a crankshaft position sensor. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the detection method of a crankshaft position sensor provided by the above embodiments, and will not be elaborated herein.

[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 equivalent technologies, the present invention also intends to include these changes and modifications.

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 the improved neural network is constructed and trained; Step S40: After the training is completed, the pre-processed 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