Crane fault diagnosis method and system based on data driving
By employing a data-driven approach combining multi-scale causal convolutional networks and gated attention units, along with a class of support vector machines and Bayesian networks, real-time prediction and probability ranking of crane faults were achieved. This addresses the shortcomings of traditional diagnostic methods and improves diagnostic accuracy and maintenance efficiency.
Patent Information
- Application Number
- CN202511592364.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-06
AI Technical Summary
Traditional crane fault diagnosis methods rely on regular maintenance and human experience, making it difficult to detect sudden faults in a timely manner. Furthermore, single-sensor alarm systems lack early warning capabilities and cannot meet the high reliability maintenance requirements of modern industry.
A data-driven fault diagnosis method is adopted, which analyzes multi-source data through multi-scale causal convolutional networks and gated attention units, and combines a class of support vector machines and directed acyclic Bayesian networks to achieve real-time prediction and probability ranking of faults.
It enables keen early warning of crane malfunctions, reduces unplanned downtime and safety accidents, improves diagnostic accuracy and maintenance efficiency, and lowers operation and maintenance costs.
Smart Images

Figure CN121479482A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of crane technology, and in particular relates to a data-driven crane fault diagnosis method and system. Background Technology
[0002] As core equipment in industrial sectors such as ports, construction, and manufacturing, the operational safety and reliability of cranes directly affect production efficiency, equipment assets, and personnel safety. Traditional fault diagnosis mainly relies on periodic inspections and manual experience. This method is highly dependent on the individual skill level of maintenance personnel, is difficult to standardize, and can easily lead to planned maintenance failing to detect sudden faults in a timely manner, resulting in "over-maintenance" or "under-maintenance," and high maintenance costs.
[0003] Furthermore, the widely adopted threshold-based single-sensor alarm systems can only provide "post-event" alarms after a fault has occurred or developed to a certain extent, lacking early warning capabilities. At the same time, single-sensor signals are insufficient to identify complex, slowly changing, or coupled faults, and simple thresholds are easily affected by fluctuations in operating conditions, leading to frequent false alarms and missed alarms. These traditional methods have significant shortcomings in terms of real-time performance and accuracy, failing to meet the urgent needs of modern industry for highly reliable operation and maintenance. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a data-driven crane fault diagnosis method. This method should be able to automatically learn effective fault characteristics from multi-source heterogeneous data, deeply mine temporal dependencies, and ultimately output probabilistically supported diagnostic results that can guide maintenance decisions.
[0005] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a data-driven crane fault diagnosis method, comprising the following steps: S1: Collect operating data of the crane's PLC control system and data from multiple sensors deployed on the crane, and preprocess the data to obtain a sequence of fused time-frequency features; S2: Input the fused time-frequency feature sequence output from step S1 into a multi-scale causal convolutional network combined with a gated attention unit for training. Capture long-short-term dependencies through residual connections and dilated convolutions, and optimize channel feature mapping with attention weights. S3: Real-time acquisition of operating conditions and sensor data, preprocessed according to step S1, and input into the model trained in step S2 to obtain the rolling prediction sequence of each sensor feature value; S4: Calculate the residual vector between the predicted sequence and the corresponding measured sequence, use a one-class support vector machine (SVM) to model the residual and dynamically generate anomaly discrimination boundaries. When the residual exceeds the boundary, trigger three levels of anomaly warning respectively, and record the anomaly node, time and deviation magnitude. S5: Construct a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. The network nodes represent each failure mode, and the edges represent causal dependencies. The early warning generated in step S4 is used as observation evidence to input the constructed Bayesian network, and the maximum likelihood is used to update the posterior distribution. The posterior probabilities of each fault hypothesis are sorted according to the node information gain, and the Top-N fault causes and their probabilities are output. S6: For each Top-N fault hypothesis, calculate the risk score by combining its posterior probability, the residual magnitude of the corresponding channel in step S4, and the frequency of the channel triggering anomalies in the most recent Wr sliding windows. Map the risk score to different risk levels according to the set threshold, and then send the risk level, main fault causes, and suggested handling solutions to the user terminal.
[0006] In some embodiments, the operating condition data of the crane's PLC control system in step S1 includes lifting height, running speed, load weight, braking status, etc.; the multi-source sensors include vibration sensors, strain sensors, temperature sensors, etc. Step S1 involves preprocessing the data to obtain the fused time-frequency feature sequence, including the following steps: Within a sliding window, a Kalman filter is used to simultaneously perform data time alignment and missing value estimation. Then, a short-time Fourier transform is performed on the filtered signal to extract high-frequency features. The high-frequency features are then merged and normalized with the original low-frequency operating condition data within a unified time step to obtain a fused time-frequency feature sequence.
[0007] In some embodiments, step S1 specifically includes the following steps: S1.1: Obtain low-frequency operating condition data from the crane PLC control system and multi-source high-frequency sensor data deployed in the crane lifting mechanism, main beam, and other parts. Set the low-frequency sampling period as Δtlow and the sampling period of each high-frequency channel as Δti, and construct a unified time step Δt. The Δt is the common minimum time step of Δtlow and each Δti, so that the data of each channel can be represented as an integer multiple of Δt. S1.2: The data of each channel is segmented on a unified time axis using a sliding window with window length W and step size S; preferably, W∈[1 s, 5 s] and S∈[0.1 s, 1 s]; S1.3: Establish a discrete state-space model for multi-channel observations within each window. , ,in , The Kalman gain is updated based on prediction. With posterior estimation This is to achieve time alignment of channels with different sampling frequencies on the Δt scale; when a channel has no valid observation at time k, it is used to... The corresponding observations and predictions fill in the missing values; in, Let k be the system state vector at discrete time k; For observation vectors; Here is the state transition matrix. The observation matrix; For process noise, For process noise covariance; To observe the noise, To observe the noise covariance; For prior state estimation; S1.4: Perform a short-time Fourier transform on the high-frequency signal after Kalman filtering within each window, using a Hamming window of length W, to obtain... and The amplitude spectrum of the sampled values forms a time-frequency feature matrix. The expression is as follows: dt in, Amplitude spectrum; This is a high-frequency time-domain signal after a certain path has undergone Kalman filtering; For the window function, a Hamming window with a window length of W is selected; This is the j-th time sampling point of the STFT (corresponding to the frame center within the window). , For time frames; For the first One angular frequency sampling point, L represents the frequency sampling point; S1.5: Distribute the PLC low-frequency operating data within each window according to a unified time base. Interpolation is performed, preferably using linear interpolation or spline interpolation, to obtain the aligned working condition sequence. ; S1.6: At each time point At this point, the high-frequency time-frequency feature vector is concatenated with the aligned low-frequency operating condition value in channel order to form a fused feature vector. ,in In order to be in The fused feature vector is formed by splicing time-frequency features with aligned PLC operating conditions.
[0008] S1.7: Normalize the fused feature vector by channel, preferably using zero-mean-unit-variance normalization or range normalization in the [0,1] interval, to obtain the normalized fused time-frequency domain feature sequence. ;in It is considered as a multi-channel input sequence of length J.
[0009] In some embodiments, step S2 specifically includes the following steps: S2.1: Denote the fused feature sequence output from step S1 as... After being processed through K layers of one-dimensional causal dilation convolution, the dilation rate of the k-th layer is... ,get ;in, ; It is a non-linear activation function; Residual connections and layer normalization are used to ensure gradient stability and training convergence of deep networks: ,in For 1×1 linear projection used for channel alignment; S2.2: Output of residuals Perform a linear mapping to obtain the query Key, Value: Calculate self-attention weights in the time dimension and obtain attention output ;in, Hiding dimensions for attention; The original residual features and attention-reconstructed features are fused element-wise using a gating mechanism: , ;in, For the Sigmoid function; For channel splicing, Element-wise multiplication; S2.3: Using real sensor features from the training set Features of model prediction output The mean squared error is used as the main loss, and an L2 regularization term is added to suppress overfitting, resulting in the loss function. : in, For the set of all trainable parameters, The L2 regularization coefficient; Iteratively update Θ using stochastic gradient descent with momentum (SGD with Momentum) until... Convergence or satisfaction of a preset threshold; S2.4: The final fused output of the Kth layer. Predicted sequences mapped to sensor features through fully connected layers. , as input for step S3; The above , , , , , , , All of them are trainable parameters.
[0010] In some embodiments, step S3 specifically includes the following steps: S3.1: At time t, collect PLC operating condition data and raw signals from multiple sensors in real time, and generate the latest window end time according to the process in step S1. The corresponding normalized fusion feature sequence: ; S3.2: with The input tensors of the model are constructed in chronological order. Its length J is consistent with the training input in step S2; S3.3: Will Input the causal dilated convolution and gated attention model trained in step S2 The rolling prediction sequence of sensor features for each target is obtained: , where H is the prediction step size; S3.4: The latest prediction The data is written to the prediction buffer and used together with newly acquired data from subsequent time steps as the window input for the next time step; simultaneously, the rolling sequence is... The data is then sent to the subsequent step S4 to calculate the residual between the prediction and the actual measurement and to determine any anomalies.
[0011] In some embodiments, step S4 specifically includes the following steps: S4.1: Obtain the measured vectors of the sensor features of each target at time t. The prediction vector output by step S3 Calculate the residual ; S4.2: Collect residual sample set from normal operating condition data Where N is the number of samples; the historical residual sample set under normal operating conditions Train a class of support vector machine models; the models use Gaussian radial basis kernel functions and set an upper limit parameter for the anomaly rate to form a decision boundary for distinguishing between normal and abnormal. S4.3: During the online phase, maintain a residual sliding window composed of the most recent sampling points, calculate the distribution of the first-class support vector machine decision values corresponding to each residual within the window, and use the preset percentile of the distribution as a dynamic threshold. When the decision value of the current residual is lower than the dynamic threshold, it is judged as abnormal. S4.4: Calculate the Euclidean norm of the residual amplitude And according to the first threshold Second threshold With the third threshold The classification is carried out, among which... , , , This represents the historical maximum residual value. , , The set weighting coefficients, ; When the anomaly criteria are met and at least the first threshold is reached, an anomaly warning signal of the corresponding level is issued according to the classification result; when At that time, a Level 1 warning is issued; when At that time, a level-two warning was issued; when At that time, a level-three warning will be issued; Record the abnormal node, the time of occurrence, and the deviation range, generate an early warning data packet containing the abnormal level, abnormal node, time, and deviation range, and output it to step S5 for subsequent probability diagnosis.
[0012] In some embodiments, step S5 specifically includes the following steps: S5.1: Construct a directed acyclic Bayesian network representing the causal relationships of crane failure modes. Among them, node set Denotes the set of directed edges representing M possible failure modes. To represent causal dependencies, each node The set of parent nodes is ; For each node Define conditional probability distribution , Store each configuration in the form of a table or function. Each probability value corresponds to an initial value based on historical failure statistics or expert experience. S5.2: Map the early warning results output in step S4 to the set of observed variables of a Bayesian network. The possible values of , where each The values can be categorized as normal, level 1, level 2, and level 3; this forms the vector of observed values for this study. When some evidence is missing, this component remains unobserved; when the evidence is uncertain, the likelihood weights of each value are provided in the form of soft evidence. Subsequently, under the established network structure Below, based on the set of conditional probability parameters Construction Likelihood And perform parameter updates, through EM iteration, with the current... Calculate the posterior weights of the latent variables and update the conditional probabilities of each node using weighted counts. The process continues until the likelihood gain falls below a preset threshold or the maximum number of iterations is reached. S5.3: In the updated version The marginal posterior probability of each failure mode is calculated and the candidate sequence is obtained by sorting them in descending order of probability. S5.4: Calculate the amount of uncertainty reduction brought about by each failure mode before and after evidence input as information gain. ,in ;in, Indicates failure mode The prior probability; Represents a node Marginal posterior probability of occurrence under evidence e; Then, the posterior probability and information gain are combined into a comprehensive score according to preset weights. ,in , , + =1; Based on overall score The top N failure modes are selected in descending order as the Top-N output, and the corresponding failure causes and their posterior probabilities are output.
[0013] In some embodiments, step S6 specifically includes the following steps: S6.1: For each Top-N fault assumption Obtain their posterior probabilities respectively. The residual amplitude of the corresponding channel in step S4 And the frequency with which the channel triggers an exception within the most recent Wr sliding windows. ; S6.2: Calculate the overall risk score for each fault. The expression is as follows: in, , , , ; This represents the historical maximum residual amplitude; Wr represents the number of sliding windows used to count the frequency of recent anomaly triggers. S6.3: Set a grading threshold, map the comprehensive risk score to different risk levels based on the grading threshold, and then send the risk level, main causes of failure and suggested handling solutions to the user terminal.
[0014] In some embodiments, step S6.3 sets a grading threshold and maps the comprehensive risk score to different risk levels based on the grading threshold, specifically as follows: Set three tiered thresholds , , , ; when When there is no risk, When it is low risk, At the time, it was considered a medium-risk period. It is a high-risk situation.
[0015] In a second aspect, the present invention provides a data-driven crane fault diagnosis system, which applies the above-mentioned data-driven crane fault diagnosis method. The system includes: The data acquisition and preprocessing unit communicates with the crane's PLC control system and the multi-source sensors deployed on the crane. It is used to acquire working condition data and sensor data, and preprocess the data to obtain a fused time-frequency feature sequence. The temporal learning unit, which is communicatively connected to the data acquisition and preprocessing unit, includes a model consisting of a multi-scale causal convolutional network combined with a gated attention unit. It is used to receive the fused time-frequency feature sequence during the training phase, capture long-short-term dependencies through residual connections and dilated convolutions, and optimize channel feature mapping using attention weights to obtain trained model parameters. The online prediction unit is communicatively connected to the time-series learning unit and the data acquisition and preprocessing unit. It is used to acquire working condition and sensor data in real time during the operation phase, generate input features according to the preprocessing process and input them into the trained model, and output a rolling prediction sequence of sensor feature values. An anomaly detection unit, which is communicatively connected to the online prediction unit, is used to calculate the residual vector between the rolling prediction sequence and the corresponding measured sequence. It uses a support vector machine to model the residual and dynamically generates anomaly detection boundaries based on online statistics. When the residual exceeds the boundary, it triggers three levels of anomaly warning and records the anomaly node, time and deviation magnitude. The probability diagnosis unit is communicatively connected to the anomaly determination unit. It constructs a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. The nodes of the network represent failure modes and the edges represent causal dependencies. It is used to take the warning generated by the anomaly determination unit as the input of observation evidence, update the posterior distribution using maximum likelihood, and sort the posterior probabilities of each fault hypothesis according to the node information gain, and output the Top-N fault causes and their probabilities. The risk scoring and alarm unit is communicatively connected to the probability diagnosis unit. It is used to calculate the risk score for each Top-N fault hypothesis by combining its posterior probability, the residual magnitude of the corresponding channel in the anomaly judgment unit, and the frequency of anomalies triggered by the channel in the most recent Wr sliding windows. The risk score is mapped to different risk levels according to a set threshold, and the risk level, main fault causes, and suggested handling solutions are sent to the user terminal through the communication interface.
[0016] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: This invention, through a multi-scale causal convolutional network and gated attention units, can deeply mine and simultaneously capture long- and short-term dependencies from fused time-frequency feature sequences, enabling rolling prediction of the operating status of critical components. Compared to traditional threshold alarms that can only be triggered after a fault occurs, this invention analyzes the residual between predicted and measured values and uses a type of support vector machine to dynamically generate anomaly discrimination boundaries, enabling it to keenly capture subtle early fault signs and achieve "pre-emptive" warnings. This provides maintenance personnel with valuable response time, effectively preventing unplanned downtime or even safety accidents caused by the escalation of faults.
[0017] This invention introduces a directed acyclic Bayesian network, using monitored early warning signals as evidence. It simulates expert thinking to perform uncertainty reasoning and maximum likelihood updates, ultimately outputting a Top-N list of fault causes ranked by probability. This process significantly reduces the reliance on individual expert experience in the diagnostic process, making diagnostic conclusions more objective and interpretable, and significantly improving the diagnostic accuracy of complex coupled faults.
[0018] This invention goes beyond simply identifying the causes of failures; it further designs a comprehensive risk scoring mechanism. This mechanism comprehensively considers multi-dimensional information such as posterior probability, real-time residual magnitude, and recent anomaly frequency to generate a quantified risk score and map it to different risk levels. This allows maintenance personnel to clearly distinguish the urgency and severity of failures, thereby developing differentiated maintenance strategies (such as immediate shutdown for inspection, close monitoring, or planned maintenance). This represents an upgrade from "preventive maintenance" to "predictive maintenance," significantly improving maintenance efficiency and reducing total lifecycle maintenance costs while ensuring safety. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a simplified implementation flowchart of the data-driven crane fault diagnosis method of the present invention; Figure 2 This is a schematic diagram of a system implementation structure corresponding to the data-driven crane fault diagnosis method of the present invention; Figure 3 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation
[0021] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1 See attached document Figure 1 As shown, this embodiment provides a data-driven crane fault diagnosis method, including the following steps: S1: Collects operating data from the crane's PLC control system and data from multiple sensors deployed on the crane, and preprocesses the data to obtain a fused time-frequency feature sequence, including: Within a sliding window, a Kalman filter is used to simultaneously perform data time alignment and missing value estimation. Then, a short-time Fourier transform is performed on the filtered signal to extract high-frequency features. The high-frequency features are then merged and normalized with the original low-frequency operating condition data within a unified time step to obtain a fused time-frequency feature sequence.
[0023] In this embodiment, step S1 specifically includes the following steps: S1.1: Acquire low-frequency operating condition data from the crane's PLC control system and multi-source high-frequency sensor data deployed in the crane's hoisting mechanism, main beam, and other parts. The crane's PLC control system operating condition data includes hoisting height, running speed, load weight, braking status, etc.; the multi-source sensors include vibration sensors, strain sensors, temperature sensors, etc.
[0024] Let the low-frequency sampling period be Δtlow and the sampling period of each high-frequency channel be Δti. Construct a unified time step Δt, where Δt is the minimum common time step between Δtlow and each Δti, so that the data of each channel can be represented as an integer multiple of Δt. S1.2: The data of each channel is segmented on a unified time axis using a sliding window with a window length W and a step size S; preferably, W∈[1 s, 5 s] and S∈[0.1 s, 1 s]. By segmenting the data using a sliding window with W and S, the signal is made approximately stable in local intervals, taking into account both real-time performance and statistical stability. This facilitates the extraction of fault symptoms such as transient impacts and short-term amplitude modulation, and enables online updates at the window level.
[0025] S1.3: Establish a discrete state-space model for multi-channel observations within each window. , ,in , The Kalman gain is updated based on prediction. With posterior estimation This is to achieve time alignment of channels with different sampling frequencies on the Δt scale; when a channel has no valid observation at time k, it is used to... The corresponding observations and predictions fill in the missing values; in, Let k be the system state vector at discrete time k; For observation vectors; Here is the state transition matrix. The observation matrix; For process noise, For process noise covariance; To observe the noise, To observe the noise covariance; This is a priori state estimation.
[0026] S1.4: Perform a short-time Fourier transform on the high-frequency signal after Kalman filtering within each window, using a Hamming window of length W, to obtain... and The amplitude spectrum of the sampled values forms a time-frequency feature matrix. The expression is as follows: dt in, Amplitude spectrum; This is a high-frequency time-domain signal after a certain path has undergone Kalman filtering; For the window function, a Hamming window with a window length of W is selected; This is the j-th time sampling point of the STFT (corresponding to the frame center within the window). , For time frames; For the first One angular frequency sampling point, L represents the frequency sampling point; S1.5: Distribute the PLC low-frequency operating data within each window according to a unified time base. Interpolation is performed, preferably using linear interpolation or spline interpolation, to obtain the aligned working condition sequence. ; S1.6: At each time point At this point, the high-frequency time-frequency feature vector is concatenated with the aligned low-frequency operating condition value in channel order to form a fused feature vector. ;in, In order to be in The fused feature vector is formed by concatenating time-frequency features with aligned PLC operating conditions. By concatenating high-dimensional time-frequency features with low-frequency operating condition scalars at the same time point, cross-modal mutual information and coupling relationships are fully preserved, reducing spurious correlations and covariate drift under single modes, and improving the ability of subsequent time-series networks to identify long- and short-term dependencies and operating condition switching.
[0027] S1.7: Normalize the fused feature vector by channel, preferably using zero-mean-unit-variance normalization or range normalization in the [0,1] interval, to obtain the normalized fused time-frequency domain feature sequence. ,in It is considered as a multi-channel input sequence of length J. Channel-level normalization suppresses the training bias caused by dimensional differences and range inconsistencies, stabilizes the gradient distribution and convergence speed of the subsequent multi-scale causal convolutional network combined with gated attention units, and constructs a uniform-scale residual space for One-Class SVM, improving the separability and transferability of anomaly boundaries.
[0028] S2: The fused time-frequency feature sequence output from step S1 is input into a multi-scale causal convolutional network combined with gated attention units for training. Long-short-term dependencies are captured through residual connections and dilated convolutions, and channel feature mappings are optimized using attention weights. Specifically, the steps include: S2.1: Denote the fused feature sequence output from step S1 as... After being processed through K layers of one-dimensional causal dilation convolution, the dilation rate of the k-th layer is... And left-filling is used to maintain causality, resulting in ;in, ; It is a non-linear activation function; and The convolution weights and biases are used. This step avoids future information leakage through causal convolution, ensuring the feasibility of online prediction; and it uses an expansion rate sequence to enable the receptive field to cover long-term dependencies with fewer layers, significantly reducing the number of parameters and inference latency compared to recurrent networks.
[0029] Residual connections and layer normalization are used to ensure gradient stability and training convergence of deep networks: ,in A 1×1 linear projection is used for channel alignment; deep training is stabilized through residual connections and layer normalization to mitigate gradient vanishing and exploding.
[0030] S2.2: Output of residuals Perform a linear mapping to obtain the query Key, Value: Calculate self-attention weights in the time dimension and obtain attention output ;in, Hiding dimensions for attention; The original residual features and attention-reconstructed features are fused element-wise using a gating mechanism: , ;in, For the Sigmoid function; For channel splicing, Element-wise multiplication; S2.3: Using real sensor features from the training set Features of model prediction output The mean squared error is used as the main loss, and an L2 regularization term is added to suppress overfitting, resulting in the loss function. : in, For the set of all trainable parameters, The L2 regularization coefficient; Iteratively update Θ using stochastic gradient descent with momentum (SGD with Momentum) until... Convergence or satisfaction of a preset threshold.
[0031] S2.4: The final fused output of the Kth layer. Predicted sequences mapped to sensor features through fully connected layers. This serves as the input for step S3. The above... , , , , , , , All of them are trainable parameters.
[0032] Step S2, while ensuring causality, achieves collaborative modeling of long-term and short-term dependencies and cross-channel correlations through the combination of "dilated convolution + residual stabilization + gated attention". This enhances the sensitivity and noise resistance to subtle fault modes under different operating conditions and load disturbances, and provides stable and generalizable high-precision prediction results for anomaly detection and probabilistic diagnosis in subsequent steps S3 to S6.
[0033] S3: Real-time acquisition of operating conditions and sensor data, preprocessed according to step S1, and input into the model trained in step S2 to obtain the rolling prediction sequence of each sensor feature value; specifically including the following steps: S3.1: At time t, collect PLC operating condition data and raw signals from multiple sensors in real time, and generate the latest window end time according to the process in step S1. The corresponding normalized fusion feature sequence: ; S3.2: with The input tensors of the model are constructed in chronological order. Its length J is consistent with the training input in step S2; S3.3: Will Input the causal dilated convolution and gated attention model trained in step S2 The rolling prediction sequence of sensor features for each target is obtained: H is the prediction step size, preferably H=1; when H=1, rolling output at the sampling period level can be achieved, which significantly reduces inference latency and improves deployment feasibility on edge devices.
[0034] S3.4: The latest prediction The data is written to the prediction buffer (prediction buffer B is a first-in-first-out structure, storing the most recent M-step predictions and measurements for window updates at the next time step), and used together with newly acquired data from subsequent time steps for the window input at the next time step; simultaneously, the rolling sequence is... The data is then sent to the subsequent step S4 to calculate the residual between the prediction and the actual measurement and to determine any anomalies.
[0035] In some embodiments, a confidence index for each prediction step is further constructed based on the output layer attention weights and / or recent residual variance. Confidence-weighted smoothing is performed to suppress short-term jitter caused by random disturbances and improve the stability of subsequent anomaly detection.
[0036] S4: Calculate the residual vector between the predicted sequence and the corresponding measured sequence. Use a one-class support vector machine (SVM) to model the residuals and dynamically generate anomaly detection boundaries. When the residuals exceed the boundaries, trigger three levels of anomaly warnings and record the anomaly node, time, and deviation magnitude. Specifically, this includes the following steps: S4.1: Obtain the measured vectors of the sensor features of each target at time t. The prediction vector output by step S3 Calculate the residual ; S4.2: Collect residual sample set from normal operating condition data Where N is the number of samples; the historical residual sample set under normal operating conditions A support vector machine model is trained; the model uses a Gaussian radial basis kernel function and sets an upper limit parameter for the anomaly rate to form a decision boundary for distinguishing between normal and abnormal data; under the premise of relying only on normal data, OC-SVM envelops the normal distribution through kernel mapping and margin maximization to avoid dependence on faulty samples.
[0037] S4.3: During the online phase, a residual sliding window composed of the most recent sampling points is maintained. The distribution of the first-class support vector machine decision values corresponding to each residual within the window is calculated, and the preset percentile of the distribution is used as a dynamic threshold (preferably 5%~10%). When the decision value of the current residual is lower than the dynamic threshold, it is judged as abnormal. By combining the adaptive update of the percentile threshold of the sliding window, the discrimination boundary can be automatically adjusted with the drift of the operating conditions and slight shift of the model, thereby reducing false alarms and false negatives.
[0038] S4.4: Calculate the Euclidean norm of the residual amplitude And according to the first threshold Second threshold With the third threshold The classification is carried out, among which... , , , This represents the historical maximum residual value. , , The set weighting coefficients, ; When the anomaly criteria are met and at least the first threshold is reached, an anomaly warning signal of the corresponding level is issued according to the classification result; when At that time, a Level 1 warning is issued; when At that time, a level-two warning was issued; when At that time, a level-three warning was issued; through and The hierarchical mapping forms a risk response gradient from mild to severe, enabling tiered alerts from trend deviations to acute anomalies. This helps to balance safety and maintenance costs and provides prior severity for subsequent probabilistic diagnosis.
[0039] Record the abnormal node (i.e., the sensor channel with the largest absolute residual value), the time of occurrence, and the deviation magnitude. Generate an early warning data packet containing the abnormality level, abnormal node, time, and deviation magnitude, and output it to step S5 for subsequent probability diagnosis.
[0040] S5: Construct a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. Network nodes represent various failure modes, and edges represent causal dependencies. Input the early warning generated in step S4 as observational evidence into the constructed Bayesian network, and update the posterior distribution using maximum likelihood. Sort the posterior probabilities of each fault hypothesis according to the node information gain, and output the Top-N fault causes and their probabilities. Specifically, this includes the following steps: S5.1: Construct a directed acyclic Bayesian network representing the causal relationships of crane failure modes. Among them, node set Denotes the set of directed edges representing M possible failure modes. To represent causal dependencies, each node The set of parent nodes is ; For each node Define conditional probability distribution , Store each configuration in the form of a table or function. Each probability value corresponds to an initial value, which is assigned based on the historical failure statistical frequency or expert experience.
[0041] By explicitly modeling failure modes as directed acyclic causal networks, the failure propagation path from the component level to the system level can be characterized. Combined with smooth priors, the overfitting and zero-frequency problems of probability estimation under small sample conditions are suppressed, thereby improving the robustness of the model in the early deployment stage.
[0042] S5.2: Map the early warning results output in step S4 to the set of observed variables of a Bayesian network. The possible values of , where each The values can be categorized as normal, level 1, level 2, and level 3; this forms the vector of observed values for this study. When some evidence is missing, this component remains unobserved; when the evidence is uncertain, the likelihood weights of each value are provided in the form of soft evidence.
[0043] Subsequently, under the established network structure Below, based on the set of conditional probability parameters Construction Likelihood And perform parameter updates, through EM iteration, with the current... Calculate the posterior weights of the latent variables (combinations of values for each failure mode), and update the conditional probabilities of each node using weighted counts. (Use Dirichlet / Laplacian smoothing for sparse data to avoid zero probability) until the likelihood gain is below a preset threshold or the maximum number of iterations is reached, at which point the process stops.
[0044] S5.3: In the updated version The marginal posterior probability of each failure mode is calculated and the candidate sequence is obtained by sorting them in descending order of probability.
[0045] S5.4: Calculate the amount of uncertainty reduction brought about by each failure mode before and after evidence input as information gain. ,in ;in, Indicates failure mode The prior probability (i.e., before the current input of evidence e) (probability of occurrence) Represents a node The marginal posterior probability occurring under evidence e; then, the posterior probability and information gain are combined according to preset weights to form a comprehensive score. ,in , , + =1; Based on overall score The top N failure modes are selected in descending order as the Top-N output, and the corresponding failure causes and their posterior probabilities are output.
[0046] S6: For each Top-N fault hypothesis, calculate a risk score by combining its posterior probability, the residual magnitude of the corresponding channel in step S4, and the frequency of anomalies triggered by that channel within the most recent Wr sliding windows. Map the risk score to different risk levels according to a set threshold, and then send the risk level, main fault causes, and suggested handling solutions to the user terminal; specifically including the following steps: S6.1: For each Top-N fault assumption Obtain their posterior probabilities respectively. The residual amplitude of the corresponding channel in step S4 And the frequency with which the channel triggers an exception within the most recent Wr sliding windows. ; S6.2: Calculate the overall risk score for each fault. The expression is as follows: in, , , , ; This represents the historical maximum residual amplitude; Wr represents the number of sliding windows used to count the frequency of recent anomaly triggers. S6.3: Set grading thresholds and map the comprehensive risk score to different risk levels based on these thresholds. Specifically, set three grading thresholds. , , , ; when When there is no risk, When it is low risk, At the time, it was considered a medium-risk period. It is a high-risk situation.
[0047] Then, the risk level, main causes of the failure, and suggested solutions are sent to the user terminal. In this embodiment, the suggested solutions are extracted from a preset fault repair table, which establishes a mapping relationship between each fault type and maintenance method. The corresponding fault maintenance method can be found by fault type.
[0048] The above steps comprehensively consider multiple dimensions of information, including posterior probability, real-time residual magnitude, and recent anomaly frequency, to generate a quantitative risk score. Through normalization and weight adjustment, indicators with different dimensions can be unified into the same scoring system, facilitating risk ranking and cross-component comparison.
[0049] By mapping risk scores to different risk levels, maintenance personnel can clearly distinguish the urgency and severity of faults, thereby developing differentiated maintenance strategies (such as immediate shutdown for inspection, close monitoring, or planned maintenance). This achieves an upgrade from "preventive maintenance" to "predictive maintenance," significantly improving maintenance efficiency and reducing total lifecycle maintenance costs while ensuring safety.
[0050] Example 2 See attached document Figure 2 As shown, this embodiment of the invention provides a data-driven crane fault diagnosis system, which applies the data-driven crane fault diagnosis method in Embodiment 1 above. The system includes: The data acquisition and preprocessing unit communicates with the crane's PLC control system and the multi-source sensors deployed on the crane. It is used to acquire working condition data and sensor data, and preprocess the data to obtain a fused time-frequency feature sequence. The temporal learning unit, which is communicatively connected to the data acquisition and preprocessing unit, includes a model consisting of a multi-scale causal convolutional network combined with a gated attention unit. It is used to receive the fused time-frequency feature sequence during the training phase, capture long-short-term dependencies through residual connections and dilated convolutions, and optimize channel feature mapping using attention weights to obtain trained model parameters. The online prediction unit is communicatively connected to the time-series learning unit and the data acquisition and preprocessing unit. It is used to acquire working condition and sensor data in real time during the operation phase, generate input features according to the preprocessing process and input them into the trained model, and output a rolling prediction sequence of sensor feature values. An anomaly detection unit, which is communicatively connected to the online prediction unit, is used to calculate the residual vector between the rolling prediction sequence and the corresponding measured sequence. It uses a support vector machine to model the residual and dynamically generates anomaly detection boundaries based on online statistics. When the residual exceeds the boundary, it triggers three levels of anomaly warning and records the anomaly node, time and deviation magnitude. The probability diagnosis unit is communicatively connected to the anomaly determination unit. It constructs a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. The nodes of the network represent failure modes and the edges represent causal dependencies. It is used to take the warning generated by the anomaly determination unit as the input of observation evidence, update the posterior distribution using maximum likelihood, and sort the posterior probabilities of each fault hypothesis according to the node information gain, and output the Top-N fault causes and their probabilities. The risk scoring and alarm unit is communicatively connected to the probability diagnosis unit. It is used to calculate the risk score for each Top-N fault hypothesis by combining its posterior probability, the residual magnitude of the corresponding channel in the anomaly judgment unit, and the frequency of anomalies triggered by the channel in the most recent Wr sliding windows. The risk score is mapped to different risk levels according to a set threshold, and the risk level, main fault causes, and suggested handling solutions are sent to the user terminal through the communication interface.
[0051] Example 3 See attached document Figure 3 As shown, based on the same inventive concept, this embodiment provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the data-driven crane fault diagnosis method as described in Embodiment 1.
[0052] In specific implementation, computer-readable storage media include: Universal Serial Bus flash drive (USB), portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other storage media that can store program code.
[0053] The device embodiments described above are merely illustrative. The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units / modules; that is, they may be located in one place or distributed across multiple network units / modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0054] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0055] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A data-driven crane fault diagnosis method, characterized in that, Includes the following steps: S1: Collect operating data of the crane's PLC control system and data from multiple sensors deployed on the crane, and preprocess the data to obtain a sequence of fused time-frequency features; S2: Input the fused time-frequency feature sequence output from step S1 into a multi-scale causal convolutional network combined with a gated attention unit for training. Capture long-short-term dependencies through residual connections and dilated convolutions, and optimize channel feature mapping with attention weights. S3: Real-time acquisition of operating conditions and sensor data, preprocessed according to step S1, and input into the model trained in step S2 to obtain the rolling prediction sequence of each sensor feature value; S4: Calculate the residual vector between the predicted sequence and the corresponding measured sequence, use a support vector machine to model the residual and dynamically generate anomaly discrimination boundaries. When the residual exceeds the boundary, trigger three levels of anomaly warning respectively, and record the anomaly node, time and deviation magnitude. S5: Construct a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. The network nodes represent each failure mode, and the edges represent causal dependencies. The early warning generated in step S4 is used as observation evidence to input the constructed Bayesian network, and the maximum likelihood is used to update the posterior distribution. The posterior probabilities of each fault hypothesis are sorted according to the node information gain, and the Top-N fault causes and their probabilities are output. S6: For each Top-N fault hypothesis, calculate the risk score by combining its posterior probability, the residual magnitude of the corresponding channel in step S4, and the frequency of the channel triggering anomalies in the most recent Wr sliding windows. Map the risk score to different risk levels according to the set threshold, and then send the risk level, main fault causes, and suggested handling solutions to the user terminal.
2. The data-driven crane fault diagnosis method according to claim 1, characterized in that, The operating data of the crane's PLC control system mentioned in step S1 includes lifting height, running speed, load weight, and braking status; the multi-source sensors include vibration sensors, strain sensors, and temperature sensors. Step S1 involves preprocessing the data to obtain the fused time-frequency feature sequence, including the following steps: Within a sliding window, a Kalman filter is used to simultaneously perform data time alignment and missing value estimation. Then, a short-time Fourier transform is performed on the filtered signal to extract high-frequency features. The high-frequency features are then merged and normalized with the original low-frequency operating condition data within a unified time step to obtain a fused time-frequency feature sequence.
3. The data-driven crane fault diagnosis method according to claim 2, characterized in that, Step S1 specifically includes the following steps: S1.1: Obtain low-frequency operating condition data from the crane PLC control system and multi-source high-frequency sensor data deployed in the crane lifting mechanism, main beam, and other parts. Set the low-frequency sampling period as Δtlow and the sampling period of each high-frequency channel as Δti, and construct a unified time step Δt. The Δt is the common minimum time step of Δtlow and each Δti, so that the data of each channel can be represented as an integer multiple of Δt. S1.2: Segment the data of each channel using a sliding window with window length W and step size S on a unified time axis; S1.3: Establish a discrete state-space model for multi-channel observations within each window. , ,in , The Kalman gain is updated based on prediction. With posterior estimation This is to achieve time alignment of channels with different sampling frequencies on the Δt scale; when a channel has no valid observation at time k, it is used to... The corresponding observations and predictions fill in the missing values; in, Let k be the system state vector at discrete time k; For observation vectors; Here is the state transition matrix. The observation matrix; For process noise, For process noise covariance; To observe the noise, To observe the noise covariance; For prior state estimation; S1.4: Perform a short-time Fourier transform on the high-frequency signal after Kalman filtering within each window, using a Hamming window of length W, to obtain... and The amplitude spectrum of the sampled values forms a time-frequency feature matrix. The expression is as follows: dt in, Amplitude spectrum; This is a high-frequency time-domain signal after a certain path has undergone Kalman filtering; For the window function, a Hamming window with a window length of W is selected; For the j-th time sampling point of STFT, , For time frames; For the first One angular frequency sampling point, L represents the frequency sampling point; S1.5: Distribute the PLC low-frequency operating data within each window according to a unified time base. Interpolation is performed to obtain the aligned working condition sequence. ; S1.6: At each time point At this point, the high-frequency time-frequency feature vector is concatenated with the aligned low-frequency operating condition value in channel order to form a fused feature vector. ; S1.7: Normalize the fused feature vector by channel to obtain the normalized fused time-frequency domain feature sequence. .
4. The data-driven crane fault diagnosis method according to claim 3, characterized in that, Step S2 specifically includes the following steps: S2.1: Denote the fused feature sequence output from step S1 as... After being processed through K layers of one-dimensional causal dilation convolution, the dilation rate of the k-th layer is... ,get ;in, ; It is a non-linear activation function; Residual connections and layer normalization are used to ensure gradient stability and training convergence of deep networks: ,in For 1×1 linear projection used for channel alignment; S2.2: Output of residuals Perform a linear mapping to obtain the query Key, Value: Calculate self-attention weights in the time dimension and obtain attention output ;in, Hiding dimensions for attention; The original residual features and attention-reconstructed features are fused element-wise using a gating mechanism: , ;in, For the Sigmoid function; For channel splicing, Element-wise multiplication; S2.3: Using real sensor features from the training set Features of model prediction output The mean squared error is used as the main loss, and an L2 regularization term is added to suppress overfitting, resulting in the loss function. : in, For the set of all trainable parameters, The L2 regularization coefficient; Iterative updates using stochastic gradient descent with momentum ,until Convergence or satisfaction of a preset threshold; S2.4: The final fused output of the Kth layer. Predicted sequences mapped to sensor features through fully connected layers. , as input for step S3; The above , , , , , , , All of them are trainable parameters.
5. The data-driven crane fault diagnosis method according to claim 1, characterized in that, Step S3 specifically includes the following steps: S3.1: At time t, collect PLC operating condition data and raw signals from multiple sensors in real time, and generate the latest window end time according to the process in step S1. The corresponding normalized fusion feature sequence: ; S3.2: with The input tensors of the model are constructed in chronological order. Its length J is consistent with the training input in step S2; S3.3: Will Input the causal dilated convolution and gated attention model trained in step S2 The rolling prediction sequence of sensor features for each target is obtained: , where H is the prediction step size; S3.4: The latest prediction The data is written to the prediction buffer and used together with newly acquired data from subsequent time steps as the window input for the next time step; simultaneously, the rolling sequence is... The data is then sent to the subsequent step S4 to calculate the residual between the prediction and the actual measurement and to determine any anomalies.
6. The data-driven crane fault diagnosis method according to claim 1, characterized in that, Step S4 specifically includes the following steps: S4.1: Obtain the measured vectors of the sensor features of each target at time t. The prediction vector output by step S3 Calculate the residual ; S4.2: Collect residual sample set from normal operating condition data Where N is the number of samples; the historical residual sample set under normal operating conditions Train a class of support vector machine models; the models use Gaussian radial basis kernel functions and set an upper limit parameter for the anomaly rate to form a decision boundary for distinguishing between normal and abnormal. S4.3: During the online phase, maintain a residual sliding window composed of the most recent sampling points, calculate the distribution of the first-class support vector machine decision values corresponding to each residual within the window, and use the preset percentile of the distribution as a dynamic threshold. When the decision value of the current residual is lower than the dynamic threshold, it is judged as abnormal. S4.4: Calculate the Euclidean norm of the residual amplitude And according to the first threshold Second threshold With the third threshold The classification is carried out, among which... , , , This represents the historical maximum residual value. , , The set weighting coefficients, ; When the anomaly criteria are met and at least the first threshold is reached, an anomaly warning signal of the corresponding level is issued according to the classification result; when At that time, a Level 1 warning is issued; when At that time, a level-two warning was issued; when At that time, a level-three warning will be issued; Record the abnormal node, the time of occurrence, and the deviation range, generate an early warning data packet containing the abnormal level, abnormal node, time, and deviation range, and output it to step S5 for subsequent probability diagnosis.
7. The data-driven crane fault diagnosis method according to claim 6, characterized in that, Step S5 specifically includes the following steps: S5.1: Construct a directed acyclic Bayesian network representing the causal relationships of crane failure modes. Among them, node set Denotes the set of directed edges representing M possible failure modes. To represent causal dependencies, each node The set of parent nodes is ; For each node Define conditional probability distribution , Store each configuration in the form of a table or function. Each probability value corresponds to an initial value based on historical failure statistics or expert experience. S5.2: Map the early warning results output in step S4 to the set of observed variables of a Bayesian network. The possible values of , where each The values can be categorized as normal, level 1, level 2, and level 3; this forms the vector of observed values for this study. When some evidence is missing, this component remains unobserved; when the evidence is uncertain, the likelihood weights of each value are provided in the form of soft evidence. Subsequently, under the established network structure Below, based on the set of conditional probability parameters Construction Likelihood And perform parameter updates, through EM iteration, with the current... Calculate the posterior weights of the latent variables and update the conditional probabilities of each node using weighted counts. The process continues until the likelihood gain falls below a preset threshold or the maximum number of iterations is reached. S5.3: In the updated version The marginal posterior probability of each failure mode is calculated and the candidate sequence is obtained by sorting them in descending order of probability. S5.4: Calculate the amount of uncertainty reduction brought about by each failure mode before and after evidence input as information gain. ,in ;in, Indicates failure mode The prior probability; Represents a node Marginal posterior probability of occurrence under evidence e; Then, the posterior probability and information gain are combined into a comprehensive score according to preset weights. ,in , , + =1; Based on overall score The top N failure modes are selected in descending order as the Top-N output, and the corresponding failure causes and their posterior probabilities are output.
8. The data-driven crane fault diagnosis method according to claim 6, characterized in that, Step S6 specifically includes the following steps: S6.1: For each Top-N fault assumption Obtain their posterior probabilities respectively. The residual amplitude of the corresponding channel in step S4 And the frequency with which the channel triggers an exception within the most recent Wr sliding windows. ; S6.2: Calculate the overall risk score for each fault. The expression is as follows: in, , , , ; This represents the historical maximum residual amplitude; Wr represents the number of sliding windows used to count the frequency of recent anomaly triggers. S6.3: Set a grading threshold, map the comprehensive risk score to different risk levels based on the grading threshold, and then send the risk level, main causes of failure and suggested handling solutions to the user terminal.
9. The data-driven crane fault diagnosis method according to claim 8, characterized in that, Step S6.3 sets a grading threshold and maps the comprehensive risk score to different risk levels based on the grading threshold, specifically as follows: Set three tiered thresholds , , , ; when When there is no risk, When it is low risk, At the time, it was considered a medium-risk period. It is a high-risk situation.
10. A data-driven crane fault diagnosis system, employing the data-driven crane fault diagnosis method as described in any one of claims 1 to 9, the system comprising: The data acquisition and preprocessing unit communicates with the crane's PLC control system and the multi-source sensors deployed on the crane. It is used to acquire working condition data and sensor data, and preprocess the data to obtain a fused time-frequency feature sequence. The temporal learning unit, which is communicatively connected to the data acquisition and preprocessing unit, includes a model consisting of a multi-scale causal convolutional network combined with a gated attention unit. It is used to receive the fused time-frequency feature sequence during the training phase, capture long-short-term dependencies through residual connections and dilated convolutions, and optimize channel feature mapping using attention weights to obtain trained model parameters. The online prediction unit is communicatively connected to the time-series learning unit and the data acquisition and preprocessing unit. It is used to acquire working condition and sensor data in real time during the operation phase, generate input features according to the preprocessing process and input them into the trained model, and output a rolling prediction sequence of sensor feature values. An anomaly detection unit, which is communicatively connected to the online prediction unit, is used to calculate the residual vector between the rolling prediction sequence and the corresponding measured sequence. It uses a support vector machine to model the residual and dynamically generates anomaly detection boundaries based on online statistics. When the residual exceeds the boundary, it triggers three levels of anomaly warning and records the anomaly node, time and deviation magnitude. The probability diagnosis unit is communicatively connected to the anomaly determination unit. It constructs a directed acyclic Bayesian network based on the crane structure topology and historical fault statistics. The nodes of the network represent failure modes and the edges represent causal dependencies. It is used to take the warning generated by the anomaly determination unit as the input of observation evidence, update the posterior distribution using maximum likelihood, and sort the posterior probabilities of each fault hypothesis according to the node information gain, and output the Top-N fault causes and their probabilities. The risk scoring and alarm unit is communicatively connected to the probability diagnosis unit. It is used to calculate the risk score for each Top-N fault hypothesis by combining its posterior probability, the residual magnitude of the corresponding channel in the anomaly judgment unit, and the frequency of anomalies triggered by the channel in the most recent Wr sliding windows. The risk score is mapped to different risk levels according to a set threshold, and the risk level, main fault causes, and suggested handling solutions are sent to the user terminal through the communication interface.
Citation Information
Cited By
Port equipment fault early warning method based on multi-source heterogeneous data and related equipment
CN122046032A
Generator stator winding thermal fault early warning method and device based on KOCMI causal network
CN122131140A