Lightweight operating equipment anomaly detection method and system
By using lightweight algorithms and model conversion technology on low-power embedded devices, the problem of high computing resources and high professional knowledge requirements of vibration signal analysis methods is solved, real-time abnormality detection on resource-constrained devices is realized, reducing the number of problems in the vibration signal analysis method. System cost and energy consumption are improved, and equipment reliability and operation efficiency are improved.
Patent Information
- Application Number
- CN202410990063.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-13
AI Technical Summary
The existing vibration signal analysis methods consume a lot of computing resources, cannot realize real-time processing and analysis, and have high professional knowledge requirements, cannot adapt to changes in the operating state of the equipment, and are difficult to deploy on low-power embedded devices. Traditional machine learning methods are high There are limitations in terms of dimension and nonlinear data processing, and the deep learning model has large parameters and is not suitable for resource-constrained devices.
Using lightweight algorithms, data annotation is performed through isolated forest models, convolutional neural network model is trained, and tf.lite is used to convert it into a lightweight model, collect vibration signal data in real time for preprocessing and abnormal detection, and utilize low power consumption. Embedded devices are monitored and analyzed in real time.
Real-time monitoring and identification of abnormal situations in vibration sensor data on low-power embedded devices, reducing system costs and energy consumption, suitable for resource-constrained devices, can promptly detect equipment abnormalities and provide early warnings, and improve equipment reliability. and operational efficiency.
Smart Images

Figure CN119128708A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of equipment anomaly detection, and in particular relates to a lightweight operating equipment anomaly detection method and system. Background Art
[0002] In the field of industrial production and equipment monitoring, real-time monitoring and prediction of abnormal conditions of equipment are crucial to improving equipment reliability and operating efficiency. By installing vibration sensors on the equipment to detect mechanical vibration during operation and processing and analyzing the collected vibration signals, it is possible to determine whether the equipment is abnormal, mechanically degraded, and whether corresponding faults will occur. For example, vibration sensors are often used to detect abnormalities such as wear of ball bearings, wear of gearboxes, shaft tilt, imbalance, and mechanical looseness. At present, vibration monitoring and analysis adopt the form of vibration sensor + signal processing computing platform, because the traditional vibration signal analysis method has the problems of large computing resource consumption, inability to achieve real-time processing and analysis, high professional knowledge requirements, and the continuous vibration signal data collected by the vibration sensor cannot be processed on the local embedded processor for signal analysis. The vibration signal data needs to be transmitted to the signal processing computing platform through the network for processing. This requires the continuous vibration data collected by the vibration sensor to be uploaded to the signal processing computing platform in real time, resulting in high requirements for network transmission bandwidth and increasing the difficulty of deploying the overall system. The computing platform is usually a high-performance desktop computer. Traditional embedded algorithms, including Fourier transform, wavelet transform, time-frequency analysis, power spectrum density analysis, etc., are usually not applicable to anomaly detection. Simply and directly setting threshold anomaly detection, static thresholds are difficult to adapt to changing operating conditions or changes in normal behavior patterns of equipment;
[0003] Traditional vibration signal analysis methods mainly include frequency domain analysis, time domain analysis, and time-frequency domain analysis. These methods usually rely on professional domain knowledge and complex mathematical algorithms, have high requirements for computing and storage resources, and cannot achieve rapid processing and analysis of real-time data. In addition, traditional methods can often only diagnose specific types of faults, and have limited detection and diagnosis capabilities for new types of faults.
[0004] In the field of machine learning, traditional anomaly detection methods include statistical methods such as box plots and Z-score methods, distance-based methods such as K-means algorithm and LOF algorithm, density-based methods such as DBSCAN algorithm and Isolation Forest algorithm, etc. However, these methods have limitations in processing high-dimensional and nonlinear data, and require a large amount of labeled data and manual feature engineering, making them difficult to apply to low-power application scenarios.
[0005] In the field of deep learning, convolutional neural networks (CNNs) have achieved remarkable results in image, speech, and time series data processing. However, traditional deep learning models usually have large parameters and computational complexity, are not suitable for deployment on resource-constrained embedded devices, and are highly dependent on labeled data.
[0006] CN116188846A introduces a method and device for detecting equipment faults based on vibration images. The vibration image of the equipment is acquired through image acquisition. After feature extraction of the vibration image, a frequency-amplitude two-dimensional histogram of the vibration frequency and amplitude value of the vibration image is obtained. According to the preset classification convolutional neural network model, the acquired vibration image and frequency-amplitude histogram are classified and calculated, and the classification results for the vibration image and frequency-amplitude histogram are obtained. Finally, the abnormal fault of the equipment is judged according to the classification results. The invention adopts an image method, which requires the installation of a camera, has high installation requirements and high installation costs, and is difficult to implement. Summary of the invention
[0007] In order to solve the deficiencies in the prior art, the present invention provides a lightweight operating equipment abnormality detection method and system.
[0008] The present invention adopts the following technical solution: A lightweight operating device abnormality detection method, characterized by comprising:
[0009] Collect historical data of vibration signals of running equipment and perform data preprocessing on them, and use the vibration signal data after data preprocessing as a data set;
[0010] Inputting the data set into a pre-built isolation forest model for anomaly detection, labeling the data set according to the anomaly detection result, and using the labeled data set as a neural network training data set;
[0011] Using the neural network training data set to train the constructed running equipment anomaly detection model;
[0012] Convert the trained running equipment anomaly detection model into a lightweight running equipment anomaly detection model;
[0013] The vibration signal data of the running equipment to be detected is collected in real time and preprocessed, and the vibration signal data of the running equipment to be detected after data preprocessing is input into the lightweight running equipment abnormality detection model to perform running equipment abnormality detection. The present invention further includes the following preferred solutions:
[0014] The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the running equipment and / or the peak value of the vibration acceleration of the X, Y, and Z axes within a fixed time period.
[0015] Data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the mean of the data within a fixed time period and fill the missing values in the data with the mean of the data.
[0016] According to the anomaly detection results of the isolation forest model, the data set is labeled with device anomalies; normal data is labeled as 0 and abnormal data is labeled as 1.
[0017] The convolutional layer of the device anomaly detection model uses 64 convolution kernels of size 2×2×6.
[0018] The trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function.
[0019] The present application also claims protection for a lightweight operating equipment anomaly detection system based on the aforementioned anomaly detection method, characterized in that it includes a data acquisition preprocessing module, a neural network training data set construction module, an operating equipment anomaly detection model training module, a lightweight model conversion module and an operating equipment anomaly detection module:
[0020] The data acquisition and preprocessing module acquires historical data of vibration signals of the running equipment and performs data preprocessing on the historical data, and uses the vibration signal data after data preprocessing as a data set;
[0021] The neural network training data set construction module inputs the data set into a pre-constructed isolation forest model for anomaly detection, labels the data set according to the anomaly detection result, and uses the labeled data set as the neural network training data set;
[0022] The running equipment anomaly detection model training module uses the neural network training data set to train the constructed running equipment anomaly detection model;
[0023] The lightweight model conversion module converts the trained running equipment anomaly detection model into a lightweight running equipment anomaly detection model;
[0024] The operating equipment abnormality detection module collects vibration signal data of the operating equipment to be detected in real time, then preprocesses the collected vibration signal data, and transmits the vibration signal data of the operating equipment to be detected after data preprocessing in real time to the trained lightweight operating equipment abnormality detection model to perform operating equipment abnormality detection.
[0025] The present invention further includes the following preferred embodiments:
[0026] In the data acquisition preprocessing module and the operating equipment abnormality detection module, the vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the operating equipment within a fixed time period and / or the vibration acceleration peak value of the X, Y, and Z axes.
[0027] In the data acquisition preprocessing module and the operating equipment abnormality detection module, data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the data mean within a fixed time period and fill the missing values in the data with the data mean.
[0028] In the neural network training data set construction module, the data set is annotated with device anomalies according to the anomaly detection result of the isolation forest model; normal data is annotated with 0 and abnormal data is annotated with 1.
[0029] In the running device anomaly detection model training module, the convolution layer of the running device anomaly detection model uses 64 convolution kernels with a size of 2×2×6.
[0030] In the lightweight model conversion module, the trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function.
[0031] On the other hand, the present application discloses an electronic device, including a processor and a storage medium; the characteristics are:
[0032] The storage medium is used to store instructions;
[0033] The processor is used to operate according to the instructions to execute the aforementioned lightweight running device abnormality detection method.
[0034] The present application also discloses a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the lightweight running device anomaly detection method is implemented.
[0035] The beneficial effect of the present invention is that, compared with the prior art,
[0036] This system designs a lightweight operating equipment anomaly detection method and system for real-time monitoring and identification of anomalies in vibration sensor data.
[0037] Lightweight algorithm for vibration sensor: Traditional vibration sensor anomaly detection methods are usually based on complex machine learning or deep learning algorithms, which require a lot of computing resources and high-performance hardware support. However, this system uses a lightweight algorithm that can run on low-power embedded devices without complex hardware configuration, reducing system cost and energy consumption.
[0038] Vibration sensor for real-time monitoring: The device has real-time monitoring function, which can instantly receive and process the data of vibration sensor. Through real-time monitoring, abnormal conditions can be discovered in time, the possibility of failure can be reduced, and timely warning and fault diagnosis can be provided.
[0039] Abnormal Identification of Vibration Data of Operating Equipment: The device can effectively identify abnormal situations by processing and analyzing vibration sensor data using specially designed lightweight algorithms. Vibration patterns that are inconsistent with normal operating patterns can be captured through learning and pattern recognition of historical basic data.
[0040] Low-power sensor free deployment: Due to the use of lightweight algorithms, the device can not only run on resource-constrained devices, but also reduce the consumption of computing and storage resources by optimizing algorithms and data processing processes, thereby improving the efficiency and scalability of the system.
[0041] The present invention adopts a lightweight algorithm with a smaller model size and lower computational complexity, so it is suitable for resource-constrained embedded devices, without requiring a large amount of storage space and a high-performance processor. The present invention also uses vibration signal data collected by a vibration sensor, combined with machine learning and deep learning technology, to achieve real-time anomaly detection and classification of vibration signals, with lower computing and storage resource requirements, and is suitable for deployment scenarios of embedded devices. The system can realize real-time processing and analysis of vibration signals on embedded devices, realize rapid anomaly detection and classification, help to timely discover abnormal states of equipment and take corresponding measures, and improve the reliability and operating efficiency of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of a vibration sensor anomaly detection system based on a lightweight algorithm;
[0043] Figure 2 This is a schematic diagram of the network structure of the CNN model for vibration anomaly prediction;
[0044] Figure 3 It is a schematic diagram of the training process of the CNN model for vibration anomaly prediction. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0046] The present invention proposes a lightweight operating equipment abnormality detection method, see the attached Figure 1 , including vibration sensor data preparation, isolation forest for vibration anomaly labeling, CNN model establishment, model training, converting TensorFlow model to TensorFlow Lite model and importing TensorFlow Lite model to vibration sensor, and real-time prediction on vibration sensor.
[0047] The historical data of vibration signals of the running equipment are collected and preprocessed, and the vibration signal data after data preprocessing are used as the data set.
[0048] The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the running equipment within a fixed time period and the vibration acceleration peak values of the X, Y, and Z axes.
[0049] The data preprocessing includes data enhancement and standardization; wherein data enhancement is to calculate the mean value of the data within a fixed time period and fill the missing values in the data with the mean value of the data.
[0050] Construct an isolation forest model, input the data set obtained in step 1 into the isolation forest model for anomaly detection, and annotate the data set according to the anomaly detection results, and use the annotated data set as the neural network training data set.
[0051] According to the anomaly detection results of the isolation forest model, the data set is labeled with device anomalies; normal data is labeled as 0 and abnormal data is labeled as 1.
[0052] Build an operation equipment anomaly detection model based on convolutional neural network.
[0053] The convolutional layer of the device anomaly detection model uses 64 convolution kernels of size 2×2×6.
[0054] Use the neural network training data set to train the built running equipment anomaly detection model.
[0055] The trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function. The lightweight running device anomaly detection model is then imported into the embedded microcontroller unit of the low-power embedded vibration sensor.
[0056] The vibration signal data of the running equipment to be detected is collected in real time and subjected to the data preprocessing described in step 1. The vibration signal data of the running equipment to be detected after the data preprocessing is input in real time into the lightweight running equipment anomaly detection model imported into the microcontroller unit in step 5 to perform running equipment anomaly detection.
[0057] The present application also discloses a lightweight abnormality detection system for running equipment, which is deployed on a low-power embedded vibration sensor. The vibration sensor uses Cortex-M3, Cortex-M4, and Cortex-M7 cores, has a built-in DSP computing unit, runs at 64MHz to 480MHz, has a random access memory RAM space of 64KB to 256KB, and a read-only memory ROM storage space of generally 64MB to 1MB and can be expanded to hundreds of MB of hardware devices;
[0058] A system for a lightweight operating equipment anomaly detection method comprises a data acquisition preprocessing module, a neural network training data set construction module, an operating equipment anomaly detection model training module, a lightweight model conversion module and an operating equipment anomaly detection module.
[0059] The data acquisition and preprocessing module collects the historical data of the vibration signal of the running equipment and performs data preprocessing on it, and uses the vibration signal data after data preprocessing as the data set. The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the running equipment in a fixed time period and / or the vibration acceleration peak value of the X, Y, and Z axes; the data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the data mean in a fixed time period and fill the missing values in the data with the data mean.
[0060] The neural network training data set construction module inputs the data set into a pre-constructed isolation forest model for anomaly detection, labels the data set according to the anomaly detection result, and uses the labeled data set as the neural network training data set;
[0061] According to the anomaly detection results of the isolation forest model, the data set is labeled with device anomalies; normal data is labeled as 0 and abnormal data is labeled as 1.
[0062] The running equipment anomaly detection model training module uses the neural network training data set to train the constructed running equipment anomaly detection model;
[0063] The convolution layer of the device anomaly detection model uses 64 convolution kernels of size 2×2×6.
[0064] The lightweight model conversion module converts the trained running equipment anomaly detection model into a lightweight running equipment anomaly detection model;
[0065] The trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function.
[0066] The operating equipment abnormality detection module collects the vibration signal data of the operating equipment to be detected in real time, and then performs data preprocessing on the collected vibration signal data, and transmits the vibration signal data of the operating equipment to be detected after data preprocessing in real time to the trained lightweight operating equipment abnormality detection model to perform operating equipment abnormality detection. The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the operating equipment in a fixed time period and / or the vibration acceleration peak value of the X, Y, and Z axes; the data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the data mean in a fixed time period, and fill the missing values in the data with the data mean.
[0067] A low-power embedded vibration sensor is used to collect the vibration signal data of the running equipment to be detected in real time, and then the collected vibration signal data is enhanced and standardized; the enhanced and standardized vibration signal data is transmitted to the running equipment abnormality detection module in real time. The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the running equipment in a fixed time period and the vibration acceleration peak value of the X, Y, and Z axes.
[0068] The operating equipment anomaly detection module inputs the real-time data transmitted by the data acquisition preprocessing module into a trained lightweight operating equipment anomaly detection model to perform operating equipment anomaly detection.
[0069] Example 1
[0070] A preferred embodiment of the method for detecting abnormality of a lightweight running device of the present invention comprises the following steps:
[0071] Step 1: Collect historical data of vibration signals of the running equipment to be tested, perform preprocessing, and use the preprocessed vibration signal data as a data set;
[0072] 1.1 Collect historical data of vibration signals of the running equipment to be tested within a fixed time period through vibration sensors;
[0073] Vibration signal historical data, including the X-axis real-time vibration acceleration RMS value, Y-axis real-time vibration acceleration RMS value, Z-axis real-time vibration acceleration RMS value, X-axis vibration acceleration peak value, Y-axis vibration acceleration peak value, and Z-axis vibration acceleration peak value of the equipment within a fixed time period.
[0074] Use vibration sensors to obtain the real-time root mean square value and peak value of vibration acceleration of the X, Y, and Z axes of the running equipment to be tested, and store the collected data as a time series, including timestamps and corresponding vibration signal data values.
[0075] 1.2 Perform data enhancement and standardization preprocessing on the vibration signal time series obtained in step 1.1 and use it as a data set;
[0076] 1.2.1 Perform data enhancement on the vibration signal time series obtained in step 1.1;
[0077] The real-time vibration acceleration root mean square values of the device X, Y, and Z axes obtained in step 1.1 are xAxisVibrationAccelerationRMS, yAxisVibrationAccelerationRMS, and zAxisVibrationAccelerationRMS (unit: m / s 2 ). The X-axis real-time vibration acceleration root mean square value xAxisVibrationAccelerationRMS is a continuous variable, the Y-axis real-time vibration acceleration root mean square value yAxisVibrationAccelerationRMS is a continuous variable, and the Z-axis real-time vibration acceleration root mean square value zAxisVibrationAccelerationRMS is a continuous variable;
[0078] The peak values of the vibration acceleration of the equipment X, Y, and Z axes obtained in step 1.1 are
[0079] xAxisVibrationAccelerationPeak, yAxisVibrationAccelerationPeak, zAxisVibrationAccelerationPeak (unit: m / s 2 ). The X-axis vibration acceleration peak value xAxisVibrationAccelerationPeak is a continuous variable, the Y-axis vibration acceleration peak value yAxisVibrationAccelerationPeak is a continuous variable, and the Z-axis vibration acceleration peak value zAxisVibrationAccelerationPeak is a continuous variable;
[0080] Data enhancement is performed on the above vibration signal time series, which is to calculate the mean value of the data within a fixed time period and fill the missing values in the data with the mean value of the data.
[0081] 1.2.2 Standardize the vibration signal time series set after data enhancement in step 1.2.1 and use it as the dataset.
[0082] Since each time series in the vibration signal time series set after data enhancement is still a continuous variable, no further classification is required, and only standardization is required to ensure that the data is on the same scale.
[0083] The continuous variables that need to be standardized include xAxisVibrationAccelerationRMS, yAxisVibrationAccelerationRMS, zAxisVibrationAccelerationRMS, xAxisVibrationAccelerationPeak, yAxisVibrationAccelerationPeak, and zAxisVibrationAccelerationPeak after data enhancement. Subtract the original mean from each data and divide it by the original standard deviation to ensure that the mean is 0 and the standard deviation is 1, and then use the following formula for standardization:
[0084]
[0085] Among them, X s is the standardized data, X represents the original data, μ represents the mean, and σ represents the standard deviation.
[0086] 1.2.3 Take the standardized vibration signal time series set as the data set;
[0087] Step 2: Build an isolation forest model on a general-purpose computer platform, input the data set obtained in step 1 into the isolation forest model to annotate the abnormal vibration data of the running equipment, and use the annotated data set as the neural network training data set;
[0088] 2.1 Construct an isolation forest model;
[0089] Use Python programming sklearn machine learning library to import isolation forest related libraries, take the data set obtained in step 1 as input, and build an isolation forest model. Set the parameters of the isolation forest algorithm, where the number of random trees generated in the forest is recorded as n_estimators, set to 100; the number of samples to build subtrees is recorded as max_samples, set to 256; the proportion of abnormal data in the given data set is recorded as contamination, set to 0.1; the number of features to build each subtree is recorded as max_features, set to 1; whether sampling is with or without replacement is recorded as bootstrap, set to False, that is, sampling without replacement is performed; the number of jobs running in parallel when running standardization and prediction functions is recorded as n_jobs, set to None, that is, 1;
[0090] 2.2 Input the data set obtained in step 1 into the isolation forest model to annotate the abnormal vibration data of the running equipment and obtain the neural network training data set;
[0091] Use the constructed isolation forest model to train the data set. According to the training results of the isolation forest model, classify the equipment vibration data into two categories: normal equipment vibration data and abnormal equipment vibration data. Label the normal equipment vibration data as 0; label the abnormal equipment vibration data as 1. Restore the labeled data as the neural network training data set. Convert the neural network training data set into tensor form.
[0092] Step 3: Use TensorFlow to build a deep learning CNN model on a cloud server or local high-performance device;
[0093] See attached Figure 2 , is to use TensorFlow to build a deep learning CNN model on a cloud server or a local high-performance device, including a network structure of convolutional layers, activation functions, pooling layers, and fully connected layers; the input data is input into the convolutional layer, and the fully connected layer is responsible for the output. The size of the input layer matches the basic data dimension of the vibration sensor to be classified, and the number of neurons in the output layer is the number of predicted results for abnormal classification, that is, the normal vibration data of the device is 0 and the abnormal vibration data of the device is 1.
[0094] 3.1 The number of training rounds for the CNN model is preferably set to 10,000 rounds;
[0095] 3.2 Building CNN model:
[0096] Processing input data: The size of the input layer matches the basic data dimension of the vibration sensor to be classified. The X-axis real-time vibration acceleration root mean square value xAxisVibrationAccelerationRMS, the Y-axis real-time vibration acceleration root mean square value yAxisVibrationAccelerationRMS, the Z-axis real-time vibration acceleration root mean square value zAxisVibrationAccelerationRMS, the X-axis vibration acceleration peak value
[0097] xAxisVibrationAccelerationPeak, Y-axis vibration acceleration peak
[0098] yAxisVibrationAccelerationPeak, Z-axis vibration acceleration peak
[0099] zAxisVibrationAccelerationPeak is organized into a multi-channel image with one feature per channel.
[0100] In the design of the convolution layer, the present invention uses 64 convolution kernels of size 2×2×6, each of which performs convolution operation with the input data to capture the important features of the data. The convolution operation is realized by sliding the convolution kernel on the input data. The convolution operation multiplies the value of the corresponding position of the convolution kernel with the input data, and then sums them to obtain the value of the corresponding position in the output feature map. That is, the output value is obtained by performing a dot product of the convolution kernel and the input data and accumulating them. Each input channel is equipped with an independent convolution kernel, and the convolution results are superimposed by channel to form the final output feature map.
[0101] When introducing the activation function layer, the present invention adds a layer of activation function after the convolution layer to enhance the nonlinear expression ability of the model. The present invention selects ReLU, i.e., Rectified Linear Unit, as the activation function, which can convert linear output into nonlinear form. The mathematical expression of the ReLU activation function is: Activation(x) = max(0,x), where x is the value of the convolution layer output without being processed by the activation function, and Activation(x) is the result of x being processed by the Relu activation function;
[0102] In the design of the pooling layer, the present invention adopts the average pooling method to downsample the feature map. In this process, the pooling layer aggregates the feature values in each region and converts them into an average value, thereby reducing the spatial size of the feature map and helping to reduce the computational complexity. This operation helps to extract the main features and maintain the robustness of the model.
[0103] In the setting of the fully connected layer, each neuron is connected to all neurons in the previous layer. This connection method can effectively integrate the information of the previous layer and generate real-time energy consumption prediction results. The fully connected layer plays an important role in the model. Through this layer, the model can learn higher-level feature representations from the output of the previous layer and produce the final prediction results.
[0104] Regarding the setting of the output layer, the present invention only sets one unit for prediction of abnormal classification.
[0105] 3.3 Adjust model parameters during training through loss function;
[0106] In order to measure the difference between the predicted value and the true value, the present invention selects the mean square error MSE as the loss function, which is calculated as follows:
[0107]
[0108] Among them, y p Represents the predicted value, y trepresents the true value, n represents the number of samples, and i is an integer between 1 and n. The present invention uses a stochastic gradient descent SGD optimizer to train the model to minimize the loss function.
[0109] Step 4: Use the neural network training data set obtained in step 2 to perform CNN model training optimization. During the training process, the present invention adjusts the hyperparameters to optimize the performance of the model and retains the best model for subsequent use;
[0110] See attached Figure 3 , the training process includes:
[0111] 4.1 Input the neural network training data set into the CNN model;
[0112] 4.2CNN model outputs predicted values;
[0113] 4.3 Calculate the mean square error based on the predicted value and the true value;
[0114] 4.4 Reset the gradient and update the network parameters and hyperparameters through SGD to minimize the loss function;
[0115] 4.5 Determine whether the number of training rounds has been reached. If not, return to 4.1. If so, end.
[0116] Step 5: Convert the running equipment anomaly detection model trained in step 4 into a lightweight running equipment anomaly detection model; and import the lightweight running equipment anomaly detection model into the embedded microcontroller unit of the low-power embedded vibration sensor;
[0117] The saved running device anomaly detection model is a TensorFlow model. The trained TensorFlow model is converted to a TensorFlow Lite model, i.e., a lightweight running device anomaly detection model, through the tf.lite.TFLiteConverter function. Then, the converted TensorFlow Lite model is saved and imported into the embedded MCU microcontroller unit of the vibration sensor;
[0118] Step 6: Collect the vibration signal data of the running equipment to be detected in real time and perform the data preprocessing described in step 1, input the vibration signal data of the running equipment to be detected after data preprocessing into the lightweight running equipment abnormality detection model imported into the microcontroller unit in step 5 in real time, perform running equipment abnormality detection, and save the abnormal vibration data.
[0119] 6.1 Initially set up the lightweight model on the embedded MCU. Define the operation registration function to register the operations used in the model, that is, register a main function to call the lightweight model on the embedded MCU. Define the memory and delay analysis function, and write functions to analyze memory usage and record reasoning delay; the reasoning delay, that is, the reasoning time exceeds the set threshold; record performance indicators such as reasoning delay and memory usage. Among them, reasoning is the process of using the model to detect whether abnormal vibration data of the equipment occurs.
[0120] Since the input and output of the lightweight model are both tensors, and the process of detecting whether the data is abnormal based on the input data needs to be implemented by an interpreter, a TensorFlow Lite Micro interpreter object is created for reasoning and memory analysis; tensor memory is allocated on the device to store input and output data; the data collected by the sensor is set to the input tensor form to ensure that the data format matches the requirements of the model input tensor;
[0121] 6.2 Collect the vibration signal data of the running equipment to be tested in real time, and preprocess it according to the data preprocessing described in step 1, and then call the interpreter's Invoke() method to perform the real-time reasoning process. The interpreter will calculate the real-time output tensor of the model according to the value of the input tensor, and use the performance analyzer to record the performance indicators of the real-time reasoning process. The performance indicators include inference delay, memory usage and other indicators, and print the memory allocation in real time. Check in real time whether the reasoning result is abnormal, that is, whether it is 1. If an abnormality is detected in real time, print and save the result. Printing refers to displaying information on the display.
[0122] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0123] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0124] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0125] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A lightweight operating device abnormality detection method, characterized in that: include: Collect historical data of vibration signals of running equipment and perform data preprocessing on them, and use the vibration signal data after data preprocessing as a data set; Inputting the data set into a pre-built isolation forest model for anomaly detection, labeling the data set according to the anomaly detection result, and using the labeled data set as a neural network training data set; Using the neural network training data set to train the constructed running equipment anomaly detection model; The trained running equipment anomaly detection model is converted into a lightweight running equipment anomaly detection model; the vibration signal data of the running equipment to be detected is collected in real time and subjected to data preprocessing; the vibration signal data of the running equipment to be detected after data preprocessing is input into the lightweight running equipment anomaly detection model to perform running equipment anomaly detection.
2. The method for detecting abnormalities of lightweight running equipment according to claim 1, characterized in that: The vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the running equipment and / or the peak value of the vibration acceleration of the X, Y, and Z axes within a fixed time period.
3. The method for detecting abnormalities of lightweight running equipment according to claim 1, characterized in that: Data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the mean of the data within a fixed time period and fill the missing values in the data with the mean of the data.
4. The method for detecting abnormalities of lightweight running equipment according to claim 1, characterized in that: According to the anomaly detection results of the isolation forest model, the data set is labeled with device anomalies; normal data is labeled as 0 and abnormal data is labeled as 1.
5. The method for detecting abnormalities of lightweight running equipment according to claim 1, characterized in that: The convolutional layer of the device anomaly detection model uses 64 convolution kernels of size 2×2×6.
6. The method for detecting abnormalities of lightweight running equipment according to claim 1, characterized in that: The trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function.
7. A lightweight operating device anomaly detection system using the lightweight operating device anomaly detection method according to any one of claims 1 to 6, characterized in that: include: Data collection preprocessing module, neural network training data set construction module, running equipment anomaly detection model training module, lightweight model conversion module and running equipment anomaly detection module; The data acquisition and preprocessing module acquires historical data of vibration signals of the running equipment and performs data preprocessing on the historical data, and uses the vibration signal data after data preprocessing as a data set; The neural network training data set construction module inputs the data set into a pre-constructed isolation forest model for anomaly detection, labels the data set according to the anomaly detection result, and uses the labeled data set as the neural network training data set; The running equipment anomaly detection model training module uses the neural network training data set to train the constructed running equipment anomaly detection model; The lightweight model conversion module converts the trained running equipment anomaly detection model into a lightweight running equipment anomaly detection model; The operating equipment abnormality detection module collects vibration signal data of the operating equipment to be detected in real time, then preprocesses the collected vibration signal data, and transmits the vibration signal data of the operating equipment to be detected after data preprocessing in real time to the trained lightweight operating equipment abnormality detection model to perform operating equipment abnormality detection.
8. The lightweight operating equipment abnormality detection system according to claim 7, characterized in that: In the data acquisition preprocessing module and / or the operating equipment abnormality detection module, the vibration signal data includes the root mean square value of the vibration acceleration of the X, Y, and Z axes of the operating equipment within a fixed time period and / or the vibration acceleration peak value of the X, Y, and Z axes.
9. The lightweight operating equipment abnormality detection system according to claim 7, characterized in that: In the data acquisition preprocessing module and / or the operating equipment abnormality detection module, data preprocessing includes data enhancement and standardization; the data enhancement is to calculate the data mean within a fixed time period and fill the missing values in the data with the data mean.
10. The lightweight operating equipment abnormality detection system according to claim 7, characterized in that: In the neural network training data set construction module, the data set is annotated with device anomalies according to the anomaly detection result of the isolation forest model; normal data is annotated with 0 and abnormal data is annotated with 1.
11. The lightweight operating equipment abnormality detection system according to claim 7, characterized in that: In the running device anomaly detection model training module, the convolution layer of the running device anomaly detection model uses 64 convolution kernels with a size of 2×2×6.
12. The lightweight operating equipment abnormality detection system according to claim 7, characterized in that: In the lightweight model conversion module, the trained running device anomaly detection model is converted into a lightweight running device anomaly detection model through the tf.lite.TFLiteConverter function.
13. An electronic device, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the lightweight operating device abnormality detection method according to claims 1-6.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for detecting abnormalities of a lightweight operating device described in claims 1 to 6 is implemented.
Citation Information
Patent Citations
Equipment fault detection method and device based on vibration image
CN116188846A
Cited By
Workshop operation state real-time monitoring management and control system
CN119357566A
Wearable device-based electric meter box data processing method and apparatus, and electronic device
CN119360360A
Overhead shuttle vehicle self-fault detection system for semiconductor manufacturing
CN120628625A
