Abnormal vibration detection method, embedded device, computer readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-03-24
AI Technical Summary
Existing deep learning-based abnormal vibration detection methods are computationally intensive, difficult to deploy on embedded devices, unable to process vibration data in real time, and unable to handle the state when acceleration is 0. Furthermore, training the model requires re-collecting data, resulting in a huge workload.
By acquiring the reference data sequence of triaxial acceleration data of the target device and the target distance threshold, the target distance between the first data sequence on each axis and the reference data sequence is calculated, and then compared with the threshold to determine whether the device has abnormal vibration.
It enables rapid model training on devices with limited hardware resources, reduces the preparation period before deployment, and can achieve real-time detection result output under high-frequency acceleration data acquisition. It has low computational load and is suitable for embedded devices.
Smart Images

Figure CN121093231B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of abnormal vibration detection technology, and in particular to an abnormal vibration detection method, an embedded device, and a computer-readable storage medium. Background Technology
[0002] Abnormal vibration detection is mainly used in scenarios such as equipment operation monitoring and industrial structure safety management. By identifying the vibration status of equipment or structure (distinguishing between normal vibration and abnormal vibration), it can detect potential fault hazards in advance, avoid equipment damage, production interruption or even safety accidents caused by abnormal vibration, and ensure the continuity and efficiency of production or operation processes.
[0003] Currently, common solutions for abnormal vibration detection include deep learning-based methods. Deep learning-based abnormal vibration detection involves both supervised and unsupervised training processes. Supervised training requires collecting both normal and abnormal data simultaneously. During training, the normal and abnormal data need to be classified to train a classification model. For unsupervised data, a Visual Encryption Model (VAE) is typically used to reconstruct the original data. During training, only normal data is used; the model's input is normal data, and the model passes through an encoder and decoder. The model's output is a reconstruction of the input data. The distance between the original data and the reconstructed data output by the model is used to determine whether the data is abnormal.
[0004] However, deep learning-based abnormal vibration detection methods require re-acquiring and retraining the model for new vibration states, resulting in a huge workload. Furthermore, they cannot handle states where acceleration is zero, as the output of the deep learning feature map is also zero when acceleration is zero (when the model has no bias parameters). In practical applications, deep learning-based methods are computationally intensive, making them difficult to deploy on embedded devices and potentially preventing real-time processing of vibration data. Summary of the Invention
[0005] One objective of this application is to provide an abnormal vibration detection method, an embedded device, and a computer-readable storage medium to solve the technical problem of high computational load in abnormal vibration detection in related technologies.
[0006] In a first aspect, embodiments of this application provide an abnormal vibration detection method, including:
[0007] The reference data sequence of the three axes and the target distance threshold are obtained from the triaxial acceleration data of the target device. The reference data sequence includes multiple data points that are pre-collected and can cover the vibration cycle of the target device.
[0008] Acquire target data of the target device, the target data including the first data sequence of each of the three axes in the triaxial acceleration data collected at the current moment, the first data sequence including a first preset number of continuous data points;
[0009] Calculate multiple target distances between the first data sequence and the reference data sequence on each axis;
[0010] The target distance on each axis is compared one by one with the target distance threshold of the corresponding axis to obtain the detection result of the target data on each axis;
[0011] In response to an abnormal detection result on at least one axis, it is determined that the target device is experiencing abnormal vibration.
[0012] Optionally, calculating multiple target distances between the first data sequence and the reference data sequence on each axis includes:
[0013] Using the first data sequence on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, slide the window one data point at a time towards the end of the reference data sequence, and calculate the target distance between the first data sequence and multiple second data sequences, wherein the second data sequences include data points in the reference data sequence that are aligned with the sliding window.
[0014] Optionally, the step of comparing each target distance on each axis with the target distance threshold of the corresponding axis one by one to obtain the detection result of the target data on each axis includes:
[0015] Each target distance on each axis is compared with the target distance threshold of the corresponding axis to determine whether the detection result of the target data on each axis is normal.
[0016] If the target distance on any axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, then the detection result of that axis is normal.
[0017] If the target distance on any axis is not less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, and the end of the first data sequence is aligned with the end of the reference data sequence, then the detection result of that axis is abnormal.
[0018] Optionally, before acquiring the target distance thresholds for the three axes in the triaxial acceleration data of the target device, the process includes:
[0019] Obtain the reference data sequence for the three axes from the triaxial acceleration data of the target device;
[0020] A second preset number of third data sequences are randomly selected from the reference data sequence for each axis, and the third data sequence includes a first preset number of consecutive data points;
[0021] The target distance threshold is calculated based on the reference data sequence on each axis and the second preset number of the third data sequences.
[0022] Optionally, calculating the target distance threshold based on the reference data sequence on each axis and a second preset number of the third data sequences includes:
[0023] Using each of the third data sequences on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, the window slides point by point towards the end of the reference data sequence, calculating the target distance between the third data sequence and multiple fourth data sequences until the end of the third data sequence aligns with the end of the reference data sequence, thereby obtaining multiple target distances for the third data sequence. The fourth data sequence includes the data points in the reference data sequence that are aligned with the sliding window.
[0024] The distance threshold of the third data sequence is calculated based on multiple target distances for each third data sequence to obtain a second preset number of distance thresholds;
[0025] The target distance threshold for each axis is calculated based on a second preset number of distance thresholds on each axis.
[0026] Optionally, calculating the distance threshold of the target data sequence based on multiple target distances for each target data sequence includes:
[0027] Sort the multiple target distances of each target data sequence, delete the target distances with a distance of zero, and take the third preset number of target distances with the smaller sorted number as the distance set;
[0028] Calculate the average of all target distances in the distance set to obtain the distance threshold of the target data sequence.
[0029] Optionally, calculating the target distance threshold for each axis based on a second preset number of distance thresholds on each axis includes:
[0030] Calculate the average of the second preset number of distance thresholds on each axis to obtain the target distance threshold for each axis.
[0031] Optionally, the target distance is the Euclidean distance between the two data sequences.
[0032] Secondly, embodiments of this application provide an embedded device, including a memory and a processor. The memory is connected to the processor, and the processor is configured to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the embedded device implements the method described above.
[0033] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described above.
[0034] The embodiments of this application can achieve the following technical effects: The abnormal vibration detection method provided in this application includes: acquiring reference data sequences and target distance thresholds for three axes in the triaxial acceleration data of a target device, wherein the reference data sequences include multiple data points pre-collected to cover the vibration cycle of the target device; acquiring target data of the target device, wherein the target data includes first data sequences for each of the three axes in the triaxial acceleration data collected at the current moment, wherein the first data sequences include a first preset number of continuous data points; calculating multiple target distances between the first data sequences and the reference data sequences on each axis; comparing each target distance on each axis with the target distance threshold of the corresponding axis one by one to obtain the detection result of the target data on each axis; and determining that the target device has abnormal vibration in response to the detection result on at least one axis being abnormal. This application embodiment uses target distance calculation logic based on benchmark data sequence and target data to quickly complete the model training process, adapt to the training requirements of edge devices, reduce the preparation cycle before deployment, and improve the convenience of on-site application. This application embodiment only involves distance calculation and threshold comparison between data sequences, with low computational load, and can run stably on devices with limited hardware resources. It can achieve real-time output of detection results while ensuring high-frequency acceleration data acquisition. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the structure of an embedded device provided in an embodiment of this application;
[0037] Figure 2 This is a schematic diagram of the deployment of an embedded device provided in an embodiment of this application;
[0038] Figure 3 A flowchart illustrating an abnormal vibration detection method provided in an embodiment of this application;
[0039] Figure 4A schematic diagram comparing a reference data sequence and a first data sequence provided in an embodiment of this application;
[0040] Figure 5 A schematic diagram showing the data sequence provided in this application sliding on a reference data sequence;
[0041] Figure 6 This is a schematic diagram of the structure of an abnormal vibration detection device provided in an embodiment of this application;
[0042] Figure 7 This is a schematic diagram of the structure of an embedded device provided in another embodiment of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0044] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0045] In addition to the technical shortcomings mentioned in the technical background, the inventors also discovered that the mainstream technical solutions for abnormal vibration detection are currently divided into two categories: methods based on traditional machine learning and methods based on deep learning. Among them, detection methods based on traditional machine learning are further divided into supervised learning and unsupervised learning. Supervised learning requires both normal vibration data and abnormal vibration data to be input during the training phase. The model parameters are trained using two types of samples, aiming to enable the model to distinguish between the two types of data. Unsupervised learning, on the other hand, only uses normal vibration data during the training phase. It learns to construct the boundary of normal vibration patterns, which can be specifically represented as a vector distance metric or scalar value. During inference, if the data to be detected exceeds this boundary, it is judged as abnormal. However, this type of method has obvious shortcomings in scene adaptability. The model construction depends on normal vibration data of specific scenes. Affected by the uncertainty of equipment operating status and the inherent limitations of the algorithm, it cannot flexibly adapt to different scenes. When the vibration mode or frequency changes, it is easy to cause a decrease in detection accuracy and an increase in computation time, making it difficult to meet the real-time and accuracy requirements of practical applications.
[0046] Deep learning-based detection methods also include two paths: unsupervised learning and supervised learning. Unsupervised learning requires collecting massive amounts of normal vibration data to train the encoder and decoder of the model. During runtime, the encoder extracts features from the input data, the decoder reconstructs the data, and then the difference between the reconstructed data and the original data is used to determine anomalies. After training, the model is deployed to the target device. However, this method has a complex computational process. Supervised learning requires acquiring both normal and abnormal vibration data as training samples to complete model training. However, in practical applications, abnormal vibration events are random and sporadic, and abnormal states are diverse and uncertain, making it difficult to collect abnormal data and construct training datasets, which severely limits its engineering applications.
[0047] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an embedded device provided in an embodiment of this application. The embedded device 100 provided in this embodiment includes a triaxial accelerometer 10, a memory 20, and a microcontroller 30, with the microcontroller 30 electrically connected to the triaxial accelerometer and the memory 20 respectively.
[0048] The triaxial accelerometer 10 is used to measure the linear acceleration of the embedded device 100 along three orthogonal coordinate axes in space (usually defined as the X-axis, Y-axis, and Z-axis, corresponding to the horizontal, vertical, and longitudinal directions of the embedded device 100, respectively). Its core function is to convert the mechanical vibration of the embedded device 100 in the physical world into quantifiable electrical signals, and then output the acceleration values of the corresponding coordinate axes.
[0049] The memory 20 is used to permanently or temporarily store the data and intermediate results required for the operation of the embedded device 100. It has the characteristics of data read and write speed adapted to embedded scenarios, small hardware size, and low power consumption. It can be divided into non-volatile memory and volatile memory according to data storage requirements (such as storage duration and read and write frequency). It is a key component to ensure that the embedded device 100 can realize abnormal vibration detection.
[0050] The microcontroller 30 establishes communication with the triaxial accelerometer 10 through a peripheral interface (such as I2C or SPI), and can send acquisition commands to the triaxial accelerometer 10 to control it to acquire triaxial acceleration data at a preset frequency. Simultaneously, it coordinates the acquisition timing and data transmission speed to avoid data loss or delay. The microcontroller 30 establishes a connection with the memory 20 through a memory interface, and can write the triaxial acceleration data acquired by the triaxial accelerometer 10 into the memory 20. Furthermore, the microcontroller 30 can write intermediate results generated during abnormal vibration detection into the memory 20.
[0051] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating the deployment of an embedded device according to an embodiment of this application. The embedded device 100 includes a mounting device 40, which deploys the embedded device 100 onto a target device 200. The mounting device 40 includes a magnetic base and / or 3M adhesive and / or detachable screw holes, allowing for quick physical fixation based on the surface characteristics and installation space of the target device 200 without the need for additional customized mounting components. Specifically, the magnetic base is compatible with target devices 200 with metal surfaces, the 3M adhesive is compatible with target devices 200 with non-metallic surfaces, and the detachable screw holes are compatible with target devices 200 requiring screw installation. The embedded device 100 is fixed to the target device 200 via the mounting device 40, and triaxial acceleration data of the target device 200 is collected by a triaxial accelerometer 10.
[0052] Please see Figure 3 , Figure 3 This is a schematic flowchart of an abnormal vibration detection method provided in an embodiment of this application. The abnormal vibration detection method provided in this embodiment includes the following steps:
[0053] S31: Obtain the reference data sequence of the three axes and the target distance threshold from the triaxial acceleration data of the target device. The reference data sequence includes multiple data points that have been pre-collected and can cover the vibration cycle of the target device.
[0054] In step S31, the target distance threshold is the distance threshold on each of the three axes between the real-time acquired triaxial acceleration data and the triaxial acceleration data under normal vibration conditions. The reference data sequence and the target distance threshold are obtained during the training phase and saved to the embedded device's memory, which can be directly accessed during the inference phase.
[0055] It should be noted that the vibration type addressed in this application embodiment is regular vibration, also known as periodic vibration, which refers to the phenomenon that an object or system repeats its motion pattern at roughly regular time intervals. Unlike strictly periodic vibration, regular vibration allows for some deviation from a strict period, and can exhibit certain degrees of variation or fluctuation in amplitude, frequency, or phase. It can be understood that even in a static state, there is a general regularity, which falls under the category of regular vibration. Furthermore, the abnormal vibration detection method provided in this application embodiment can be divided into a training phase and an inference phase.
[0056] Specifically, during the training phase, the embedded device will collect triaxial acceleration data covering the vibration cycle of the target device using a triaxial accelerometer. Please refer to [link to relevant documentation]. Figure 4 Specifically, when an embedded device collects TS acceleration data points at a sampling rate SR, the total number of acceleration data samples across the three axes is 3. TS, the acceleration data of each axis, is used as a reference data sequence and stored in memory. The sampling rate SR can be adjusted according to the vibration frequency of the target device. In this embodiment, the sampling rate SR is set to 100. If the vibration frequency of the target device is high, the sampling rate SR of the embedded device can be increased. The values of the total number of samples and the sampling rate are related to the vibration period of the target device. The value of TS needs to be greater than the product of the vibration period of the target device and the sampling rate. In this embodiment, the value of TS is set to 192.
[0057] For each axis, a second preset number RD data sequences containing L consecutive data points are randomly extracted from the reference data sequence. It should be noted that the larger the value of the second preset number RD, the more sensitive the abnormal vibration detection method is. In this embodiment, the second preset number RD is set to 20 and L is set to 64.
[0058] Please see Figure 5The embedded device sequentially calculates the Euclidean distances between RD data sequences and a reference data sequence at different positions. Specifically, the embedded device uses the data sequences as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis and sliding towards the end of the reference data sequence point by point. Based on the data points in the data sequence and the reference data sequence aligned with the sliding window, the Euclidean distances between the data sequence and the reference data sequence at different positions are calculated. It can be understood that each data sequence will obtain TS-L+1 Euclidean distances with the reference data sequence. The TS-L+1 Euclidean distances of each data sequence are sorted, and Euclidean distances with a distance of 0 are removed. The average of the three smallest preset number AN Euclidean distances is calculated; specifically, the third preset number AN is set to 5, to obtain the distance threshold for that data sequence. It should be understood that each axis randomly extracts a second preset number RD data sequences from the reference data sequence, at which point each axis can obtain a second preset number RD distance threshold.
[0059] For each axis, calculate the average of the second preset number RD distance thresholds to obtain the target distance threshold for each axis, and save it to the memory.
[0060] S32: Acquire target data from the target device. The target data includes the first data sequence on each of the three axes in the triaxial acceleration data collected at the current moment. The first data sequence includes a first preset number of continuous data points.
[0061] In step S32, the first preset quantity is the preset length L of the first data sequence, and the first preset quantity L is set to 64. Specifically, please refer to the inference phase. Figure 4 The embedded device will collect the current three-axis acceleration data of the target device through the three-axis accelerometer, take the first preset number of continuous data points on each axis as the first data sequence, and obtain the first data sequence on each of the three axes, that is, obtain the target data of the target device.
[0062] S33: Calculate multiple target distances between the first data sequence and the reference data sequence on each axis.
[0063] In step S33, the target distance is the Euclidean distance between the first data sequence and the reference data sequence at different positions. Specifically, the embedded device uses the first data sequence on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis and sliding it point by point towards the end of the reference data sequence to calculate the target distance between the first data sequence and multiple second data sequences. The second data sequences include data points in the reference data sequence that are aligned with the sliding window.
[0064] S34: Compare the distance of each target on each axis with the target distance threshold of the corresponding axis one by one to obtain the detection result of the target data on each axis.
[0065] In step S34, specifically, the embedded device compares each target distance on each axis with the target distance threshold of the corresponding axis one by one to determine whether the detection result of the target data on each axis is normal. If the target distance on any axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, the detection result of that axis is normal. If the target distance on any axis is not less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, and the end of the first data sequence is aligned with the end of the reference data sequence, the detection result of that axis is abnormal.
[0066] It should be noted that the first preset number of times CT can be adjusted according to the ratio of the sampling rate SR of the embedded device to the vibration frequency of the target device. If the ratio is larger, the first preset number of times CT can be set larger; if the ratio is smaller, the first preset number of times CT can be set smaller. In this embodiment, the first preset number of times CT is set to 2.
[0067] S35: In response to an abnormal detection result on at least one axis, determine that there is abnormal vibration in the target equipment.
[0068] In step S35, specifically, if the detection result of one of the three axes of the target data is abnormal, then the target data is abnormal vibration data, and it is determined that the target device has abnormal vibration.
[0069] This application embodiment uses target distance calculation logic based on benchmark data sequence and target data to quickly complete the model training process, adapt to the training requirements of edge devices, reduce the preparation cycle before deployment, and improve the convenience of on-site application. This application embodiment only involves distance calculation and threshold comparison between data sequences, with low computational load, and can run stably on devices with limited hardware resources. It can achieve real-time output of detection results while ensuring high-frequency acceleration data acquisition.
[0070] In some embodiments, calculating multiple target distances between a first data sequence on each axis and a reference data sequence includes: using the first data sequence on each axis as a sliding window, sliding it point by point from the start of the reference data sequence on the corresponding axis toward the end of the reference data sequence, and calculating the target distances between the first data sequence and multiple second data sequences, wherein the second data sequences include data points in the reference data sequence aligned with the sliding window.
[0071] The target distance is the Euclidean distance between the first data sequence and the reference data sequence at different positions. Specifically, calculating multiple target distances between the first data sequence and the reference data sequence on each axis includes the following steps:
[0072] S331: For any axis in the three-axis acceleration data of the target device, the embedded device defines the first data sequence on that axis as a sliding window, and the length of the window is equal to the number of data points contained in the first data sequence, i.e., the first preset number.
[0073] S332: The embedded device controls the sliding window to slide from the beginning of the reference data sequence of the corresponding axis, along the end of the reference data sequence, with a step size of a single data point.
[0074] S333: During the sliding process, whenever the sliding window aligns with a certain position of the reference data sequence, the embedded device extracts continuous data points in the area overlapping with the sliding window in the reference data sequence to form a second data sequence; the number of data points in the second data sequence is equal to the length of the sliding window, and the position of its data points in the reference data sequence changes dynamically as the sliding window moves.
[0075] S334: The embedded device calculates the Euclidean distance between the sliding window (i.e., the first data sequence) and the corresponding second data sequence; repeats steps S332 to S333 until the end of the sliding window reaches the end of the reference data sequence, thus obtaining multiple Euclidean distances between the first data sequence and the reference data sequence on the axis.
[0076] Understandably, the above process applies to each axis in the three-axis acceleration data of the target device. By performing sliding window comparison and distance calculation on each axis, multiple Euclidean distances corresponding to each of the three axes can be obtained.
[0077] In some embodiments, multiple target distances between the first data sequence and the reference data sequence on each axis are calculated. Other distance calculation methods or similarity calculation methods can be used, including but not limited to Mahalanobis distance, Minkowski distance, cosine similarity, Manhattan distance, etc.
[0078] In some embodiments, the target distance on each axis is compared one by one with the target distance threshold of the corresponding axis to obtain the detection result of the target data on each axis, including the following steps:
[0079] S341: Compare the distance of each target on each axis with the target distance threshold of the corresponding axis one by one to determine whether the detection result of the target data on each axis is normal;
[0080] S342: If the target distance on any axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, then the detection result of that axis is normal.
[0081] S343: If the number of times the target distance is not continuously less than the target distance threshold of the corresponding axis on any axis, and the end of the first data sequence is aligned with the end of the reference data sequence, then the detection result of that axis is abnormal.
[0082] In step S341, the embedded device performs a comparison operation between the target distance and the threshold for each axis in the triaxial acceleration data of the target device: for each of the multiple target distances calculated by the sliding window on the axis, the values are compared with the target distance threshold of the axis to determine whether the vibration state represented by the target data on the axis is normal.
[0083] In step S342, when any axis meets the following condition, the embedded device determines that the detection result of the axis is normal: the value of the target distance on the axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive occurrences; wherein, the first preset number is a pre-set judgment threshold for characterizing the continuity of normal vibration. In this embodiment, the first preset number CT is set to 2.
[0084] It should be noted that if the target distance on any axis is less than the target distance threshold for the first preset number of consecutive occurrences, the calculation for that axis can be terminated directly without comparing all target distances.
[0085] In step S343, when any axis meets the following conditions, the embedded device determines that the detection result of the axis is abnormal: the target distance on the axis has not been less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, and the end of the current sliding window, that is, the end of the first data sequence, has been aligned with the end of the corresponding axis reference data sequence, that is, the sliding window has traversed all the effective comparison areas of the reference data sequence.
[0086] It should be noted that the above steps are performed independently for each of the three axes. By comparing the continuity of the target distance with the target distance threshold for each axis and judging the sliding termination condition, the detection result for each axis can be obtained.
[0087] In some embodiments, before obtaining the target distance thresholds for the three axes in the triaxial acceleration data of the target device, the following steps are included:
[0088] S41: Obtain the reference data sequence of the three axes from the triaxial acceleration data of the target device;
[0089] S42: Randomly extract a second preset number of third data sequences from the reference data sequence of each axis, wherein the third data sequence includes a first preset number of continuous data points;
[0090] S43: Calculate the target distance threshold based on the reference data sequence on each axis and the second preset number of third data sequences.
[0091] In step S41, specifically, the embedded device acquires triaxial acceleration data covering the vibration cycle of the target device using a triaxial accelerometer. Specifically, when the embedded device acquires TS acceleration data points at a sampling rate SR, the total number of acceleration data samples across the three axes is 3. TS, the TS acceleration data for each axis, is used as a reference data sequence and stored in memory.
[0092] The sampling rate SR can be adjusted according to the vibration frequency of the target device. In this embodiment, the sampling rate SR is set to 100. If the vibration frequency of the target device is high, the sampling rate SR of the embedded device can be increased. The values of the total number of samples and the sampling rate are related to the vibration period of the target device. The value of TS needs to be greater than the product of the vibration period of the target device and the sampling rate. In this embodiment, the value of TS is set to 192.
[0093] In step S42, the second preset quantity is a preset number RD of randomly selected third data sequences. Specifically, for each axis, a second preset quantity RD of data sequences containing a first preset quantity L of consecutive data points are randomly selected from the reference data sequence, i.e., the third data sequence. It should be noted that the larger the value of RD, the more sensitive the abnormal vibration detection method is. In this embodiment, the second preset quantity RD is set to 20, and the first preset quantity L is set to 64.
[0094] In some embodiments, the third data sequence may not be extracted from the reference data sequence, but may be randomly extracted from triaxial acceleration data under other normal vibration conditions.
[0095] In step S43, specifically, the embedded device sequentially calculates the Euclidean distance between the second preset number RD third data sequences and the reference data sequence at different positions. Specifically, the embedded device uses the third data sequence as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis and sliding it point by point towards the end of the reference data sequence. Based on the data points in the third data sequence and the reference data sequence aligned with the sliding window, the Euclidean distance between the third data sequence and the reference data sequence at different positions is calculated.
[0096] Understandably, each third data sequence will have TS-L+1 Euclidean distances to the baseline data sequence. The embedded device sorts the TS-L+1 Euclidean distances of each third data sequence in ascending order and removes those with a distance of 0. It then calculates the average of the first AN Euclidean distances, setting AN to 5, to obtain the distance threshold for that data sequence. It should be understood that each axis randomly extracts RD third data sequences from the baseline data sequence; therefore, each axis can obtain RD distance thresholds.
[0097] For each axis, the embedded device calculates the average of a second preset number RD distance thresholds to obtain the target distance threshold for each axis, and saves it to memory.
[0098] In some embodiments, the target distance threshold is calculated based on a reference data sequence on each axis and a second preset number of third data sequences, including the following steps:
[0099] S431: Using each third data sequence on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, slide the window one data point at a time towards the end of the reference data sequence, and calculate the target distance between the third data sequence and multiple fourth data sequences until the end of the third data sequence is aligned with the end of the reference data sequence, so as to obtain multiple target distances of the third data sequence. The fourth data sequence includes the data points in the reference data sequence that are aligned with the sliding window.
[0100] S432: Calculate the distance threshold of the third data sequence based on multiple target distances for each third data sequence to obtain a second preset number of distance thresholds.
[0101] S433: Calculate the target distance threshold for each axis based on the second preset number of distance thresholds on each axis.
[0102] In step S431, the target distance is the Euclidean distance between the third data sequence and the reference data sequence at different positions. For any axis in the three-axis acceleration data of the target device, the embedded device defines the third data sequence on that axis as a sliding window, the length of which is equal to the number of data points contained in the third data sequence, i.e., the first preset number. The embedded device controls the sliding window to slide from the starting position of the reference data sequence of the corresponding axis, along the end direction of the reference data sequence, with a step size of a single data point.
[0103] During the sliding process, whenever the sliding window aligns with a certain position in the reference data sequence, the embedded device extracts consecutive data points from the region overlapping with the sliding window in the reference data sequence to form a fourth data sequence. The number of data points in the fourth data sequence is equal to the length of the sliding window, and the position of the data points in the fourth data sequence within the reference data sequence changes dynamically as the sliding window moves. The embedded device calculates the Euclidean distance between the current sliding window (i.e., the third data sequence) and the corresponding fourth data sequence; until the end of the sliding window reaches the end position of the reference data sequence, multiple Euclidean distances between the third data sequence and the reference data sequence on that axis are obtained.
[0104] In step S432, it is understood that after step S431, each third data sequence will obtain TS-L+1 Euclidean distances with the reference data sequence. The embedded device calculates the distance threshold of each third data sequence based on the TS-L+1 Euclidean distances. It is understood that each axis randomly extracts a second preset number RD third data sequences from the reference data sequence, thus each axis can obtain a second preset number RD distance thresholds.
[0105] In step S433, specifically, the embedded device calculates the average of the second preset number RD distance thresholds on each axis to obtain the target distance threshold for each axis.
[0106] In some embodiments, calculating a distance threshold for a target data sequence based on multiple target distances for each target data sequence includes:
[0107] S4321: Sort the multiple target distances of each target data sequence, delete the target distances with zero distance, and take the third preset number of target distances with the smaller sorted distances as the distance set;
[0108] S4322: Calculate the average distance of all targets in the distance set to obtain the distance threshold of the target data sequence.
[0109] In step S4321, specifically, the embedded device sorts the TS-L+1 Euclidean distances of each third data sequence and deletes the Euclidean distances with a distance of 0, and takes the top three preset number AN Euclidean distances with smaller sorting as the distance set, with the third preset number AN set to 5.
[0110] In step S4322, the average value of all Euclidean distances in the distance set is calculated to obtain the distance threshold of the third data sequence.
[0111] It should be noted that in the above embodiments, there is no necessarily a certain order between the steps. Those skilled in the art can understand from the description of the embodiments of this application that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.
[0112] As another aspect of the embodiments of this application, this application provides an abnormal vibration detection device. The abnormal vibration detection device can be a software module, which includes several instructions stored in a memory. A processor can access the memory, call the instructions, and execute them to complete the abnormal vibration detection methods described in the various embodiments above.
[0113] In some embodiments, the abnormal vibration detection device can also be constructed from hardware components. For example, the abnormal vibration detection device can be constructed from one or more chips, which can work in coordination to complete the abnormal vibration detection method described in the various embodiments above. As another example, the abnormal vibration detection device can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0114] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an abnormal vibration detection device 600 provided in an embodiment of this application. The abnormal vibration detection device 600 provided in this embodiment of the application includes a first data acquisition module 601, a second data acquisition module 602, a target distance determination module 603, a target distance comparison module 604, and an abnormality detection module 605.
[0115] The first data acquisition module 601 is used to acquire the reference data sequence of the three axes and the target distance threshold in the triaxial acceleration data of the target device. The reference data sequence includes multiple data points pre-collected to cover the vibration cycle of the target device. The second data acquisition module 602 is used to acquire the target data of the target device. The target data includes the first data sequence of each of the three axes in the triaxial acceleration data collected at the current moment. The first data sequence includes a first preset number of continuous data points. The target distance determination module 603 is used to calculate multiple target distances between the first data sequence and the reference data sequence on each axis. The target distance comparison module 604 is used to compare each target distance on each axis with the target distance threshold of the corresponding axis one by one to obtain the detection result of the target data on each axis. The anomaly detection module 605 is used to determine that there is abnormal vibration in the target device in response to the detection result of at least one axis being abnormal.
[0116] The target distance determination module 603 is also specifically used to: take the first data sequence on each axis as a sliding window, start from the starting point of the reference data sequence on the corresponding axis, slide it one data point at a time towards the end of the reference data sequence, and calculate the target distance between the first data sequence and multiple second data sequences, wherein the second data sequence includes data points in the reference data sequence that are aligned with the sliding window.
[0117] The target distance determination module 603 is further specifically used to: compare each target distance on each axis with the target distance threshold of the corresponding axis one by one, and determine whether the detection result of the target data on each axis is normal; if the target distance on any axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, then the detection result of that axis is normal; if the target distance on any axis is not less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, and the end of the first data sequence is aligned with the end of the reference data sequence, then the detection result of that axis is abnormal.
[0118] The first data acquisition module 601 is also specifically used for: acquiring the reference data sequence of the three axes in the three-axis acceleration data of the target device; randomly extracting a second preset number of third data sequences from the reference data sequence of each axis, the third data sequence including a first preset number of continuous data points; and calculating the target distance threshold based on the reference data sequence on each axis and the second preset number of third data sequences.
[0119] The first data acquisition module 601 is further specifically used to: treat each third data sequence on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, and sliding it point by point towards the end of the reference data sequence, calculating the target distance between the third data sequence and multiple fourth data sequences, until the end of the third data sequence is aligned with the end of the reference data sequence, to obtain multiple target distances for the third data sequence, wherein the fourth data sequence includes the data points in the reference data sequence aligned with the sliding window. Based on the multiple target distances for each third data sequence, a distance threshold for the third data sequence is calculated to obtain a second preset number of distance thresholds; and based on the second preset number of distance thresholds on each axis, a target distance threshold for each axis is calculated.
[0120] The first data acquisition module 601 is also specifically used for: sorting multiple target distances of each target data sequence, deleting target distances with zero distance, and taking the third preset number of target distances with smaller sorting as the distance set; calculating the average value of all target distances in the distance set to obtain the distance threshold of the target data sequence.
[0121] The first data acquisition module 601 is also specifically used to: calculate the average value of the second preset number of distance thresholds on each axis, so as to obtain the target distance threshold for each axis.
[0122] It should be noted that the above-described abnormal vibration detection device can execute the abnormal vibration detection method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the abnormal vibration detection device can be found in the abnormal vibration detection method provided in the embodiments of this application.
[0123] See Figure 7 , Figure 7 This is a schematic diagram of an embedded device according to another embodiment of this application. The embedded device 100 includes one or more processors 71 and a memory 20. The memory 20 is connected to one or more processors 71, for example, via a bus.
[0124] Processor 71 is configured to support the embedded device 100 in performing the corresponding functions in the methods described in the above method embodiments. Processor 71 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0125] Memory 20 is used to store program code, etc. Memory 20 may include volatile memory (VM), such as random access memory (RAM); memory may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 20 may also include combinations of the above types of memory.
[0126] The memory 20 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the abnormal vibration detection method in the embodiments of this application. The processor 71 executes various functional applications and data processing of the abnormal vibration detection method and the abnormal vibration detection device by running the non-volatile software programs, instructions, and modules stored in the memory, that is, it realizes the functions of each module or unit of the abnormal vibration detection method and the abnormal vibration detection device provided in the above method embodiments.
[0127] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function. The data storage area may store data created based on the use of the abnormal vibration detection device. In some embodiments, the memory 20 may optionally include memory remotely located relative to the processor, which can be connected to the abnormal vibration detection device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0128] The one or more modules are stored in the memory. When executed by the one or more processors 71, they perform the abnormal vibration detection method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0129] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by an embedded device, cause the embedded device to perform the method described in the foregoing embodiments.
[0130] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0131] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for detecting abnormal vibrations, characterized in that, include: The reference data sequence of the three axes and the target distance threshold are obtained from the triaxial acceleration data of the target device. The reference data sequence includes multiple data points that are pre-collected and can cover the vibration cycle of the target device. Acquire target data of the target device, the target data including the first data sequence of each of the three axes in the triaxial acceleration data collected at the current moment, the first data sequence including a first preset number of continuous data points; Calculating multiple target distances between the first data sequence and the reference data sequence on each axis, wherein calculating multiple target distances between the first data sequence and the reference data sequence on each axis includes: Using the first data sequence on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, slide the window one data point at a time towards the end of the reference data sequence, and calculate the target distance between the first data sequence and multiple second data sequences, wherein the second data sequences include data points in the reference data sequence that are aligned with the sliding window; The target distance on each axis is compared one by one with the target distance threshold of the corresponding axis to obtain the detection result of the target data on each axis; In response to an abnormal detection result on at least one axis, it is determined that the target device is experiencing abnormal vibration.
2. The method according to claim 1, characterized in that, The step of comparing each target distance on each axis with the target distance threshold of the corresponding axis one by one to obtain the detection result of the target data on each axis includes: Each target distance on each axis is compared with the target distance threshold of the corresponding axis to determine whether the detection result of the target data on each axis is normal. If the target distance on any axis is less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, then the detection result of that axis is normal. If the target distance on any axis is not less than the target distance threshold of the corresponding axis for a first preset number of consecutive times, and the end of the first data sequence is aligned with the end of the reference data sequence, then the detection result of that axis is abnormal.
3. The method according to claim 1, characterized in that, Before acquiring the target distance thresholds for the three axes in the triaxial acceleration data of the target device, the process includes: Obtain the reference data sequence for the three axes from the triaxial acceleration data of the target device; A second preset number of third data sequences are randomly selected from the reference data sequence for each axis, and the third data sequence includes a first preset number of consecutive data points; The target distance threshold is calculated based on the reference data sequence on each axis and the second preset number of the third data sequences.
4. The method according to claim 3, characterized in that, The calculation of the target distance threshold based on the reference data sequence on each axis and a second preset number of the third data sequences includes: Using each of the third data sequences on each axis as a sliding window, starting from the beginning of the reference data sequence on the corresponding axis, the window slides point by point towards the end of the reference data sequence, calculating the target distance between the third data sequence and multiple fourth data sequences until the end of the third data sequence aligns with the end of the reference data sequence, thereby obtaining multiple target distances for the third data sequence. The fourth data sequence includes the data points in the reference data sequence that are aligned with the sliding window. The distance threshold of the third data sequence is calculated based on multiple target distances for each third data sequence to obtain a second preset number of distance thresholds; The target distance threshold for each axis is calculated based on a second preset number of distance thresholds on each axis.
5. The method according to claim 4, characterized in that, The calculation of the distance threshold for the third data sequence based on multiple target distances for each third data sequence includes: Sort the multiple target distances of each third data sequence in ascending order, delete the target distances with a distance of zero, and take the first third preset number of target distances as the distance set; Calculate the average distance of all targets in the distance set to obtain the distance threshold of the third data sequence.
6. The method according to claim 5, characterized in that, The calculation of the target distance threshold for each axis based on a second preset number of distance thresholds on each axis includes: Calculate the average of the second preset number of distance thresholds on each axis to obtain the target distance threshold for each axis.
7. The method according to any one of claims 1-6, characterized in that, The target distance is the Euclidean distance between the two data sequences.
8. An embedded device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the embedded device to implement the method as described in any one of claims 1-7 when executing the one or more computer programs.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Car collision detection method and device based on three-shaft acceleration sensor
CN104021601A
Collision detection method applied to automation device
CN110806261A