A Fieldbus Fault Diagnosis Method Based on Transfer Learning

By combining transfer learning and adaptive activation functions, the problems of insufficient generalization ability and real-time performance in fieldbus fault diagnosis are solved, achieving high-precision and low-complexity fault diagnosis, which is suitable for industrial communication networks.

CN123074864APending Publication Date: 2026-11-10HUANENG LUOYANG THERMAL POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610951478.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies for fieldbus fault diagnosis suffer from problems such as insufficient generalization ability, low model accuracy due to scarce samples, and high computational complexity that makes real-time deployment difficult, forming a technical closed loop that is hard to break through.

Method used

By employing transfer learning, combining physical layer signal distortion data and data link layer communication behavior data, a deep neural network model is constructed through multi-domain feature extraction and adaptive activation functions. After pre-training and fine-tuning, the model is quantized, compressed, and deployed on edge computing nodes to achieve online fault diagnosis.

Benefits of technology

With a limited number of field fault samples, the diagnostic performance was improved, achieving high accuracy and strong generalization ability, meeting the real-time diagnostic requirements of industrial sites, and reducing storage space requirements and inference speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074864A_ABST
    Figure CN123074864A_ABST
Patent Text Reader

Abstract

This invention provides a fieldbus fault diagnosis method based on transfer learning, belonging to the field of industrial communication fault diagnosis technology. It can at least partially solve the problems of overfitting of deep learning models, insufficient diagnostic generalization ability, and difficulty in edge deployment caused by the scarcity of fieldbus fault samples in existing technologies. The invention includes: synchronously collecting physical layer signal distortion data and data link layer communication behavior data of the fieldbus, forming cross-layer correlated sample pairs through timestamp alignment; performing multi-domain feature extraction on the original data to construct coupled feature vectors; using a transfer learning strategy to train a deep neural network model containing an adaptive activation function in stages; deploying the trained model to edge computing nodes after mixed-precision quantization compression to perform online fault diagnosis, outputting the fault type and confidence assessment value; and triggering incremental learning to achieve continuous model evolution when the confidence level is lower than a preset threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial communication network fault diagnosis technology, specifically relating to a fieldbus fault diagnosis method based on transfer learning. Background Technology

[0002] With the continuous improvement of industrial automation, fieldbus technology has become an indispensable component of industrial control systems, widely used in process industries such as power, petrochemicals, and metallurgy. As a digital communication network connecting field instruments, actuators, and control systems, the reliability and stability of the fieldbus directly affect the safe operation of the entire production unit. With the development of intelligent manufacturing and the Industrial Internet of Things (IIoT), the topology of fieldbus systems is becoming increasingly complex, the number of nodes is continuously increasing, and the amount of communication data is experiencing explosive growth, which places higher demands on bus fault diagnosis technology.

[0003] However, traditional fieldbus fault diagnosis methods have the following technical defects, and these defects are coupled with each other to form a technical bottleneck.

[0004] In terms of generalization ability, existing rule-based or expert system-based diagnostic methods rely heavily on manually summarized fault feature rules and expert experience knowledge bases. When faced with the endless new, compound, and unknown faults in industrial sites, their generalization ability is seriously insufficient, and they cannot effectively identify previously unseen fault types. The diagnostic accuracy drops sharply, and the maintenance and updating of the knowledge base requires a large investment of human resources.

[0005] In terms of training data, deep neural network technology has shown great potential in the field of fault diagnosis. However, actual fault samples in industrial settings are extremely scarce. Directly training deep neural network models using limited field fault samples is prone to severe overfitting. The model may perform well on the training set, but its diagnostic performance will significantly decrease when faced with real fault data, making it difficult to meet the stringent requirements of industrial settings.

[0006] In terms of deployment, industrial sites have stringent requirements for real-time diagnostics, but high-precision deep learning models have high computational complexity and are difficult to deploy at resource-constrained edge devices, creating a contradiction between accuracy and speed.

[0007] The three aforementioned shortcomings are mutually restrictive: scarce samples lead to low model accuracy; increasing model complexity is necessary to improve accuracy; however, increased complexity reduces the feasibility of edge deployment, forming a technical loop that is difficult to overcome. Therefore, how to train a deep learning model with both high accuracy and strong generalization ability under the condition of scarce fault samples, and deploy it at the industrial edge for real-time diagnosis, is a technical problem that urgently needs to be solved in the field of industrial communication network fault diagnosis. Summary of the Invention

[0008] The present invention aims to solve at least one of the technical problems existing in the prior art, and to provide a fieldbus fault diagnosis method based on transfer learning.

[0009] To achieve the above objectives, this invention provides a fieldbus fault diagnosis method based on transfer learning, comprising: The physical layer signal distortion data and data link layer communication behavior data of the fieldbus network are collected synchronously. The physical layer signal distortion data and the data link layer communication behavior data are aligned with timestamps to form cross-layer associated sample pairs. Multi-domain feature extraction is performed on the cross-layer associated sample pairs, extracting feature parameters from the time domain, frequency domain and statistical domain respectively, and concatenating the feature parameters to construct a coupled feature vector; The coupled feature vector is input into a deep neural network model containing an adaptive activation function, and a transfer learning strategy is used to perform two stages of training on the deep neural network model: pre-training and fine-tuning. The trained deep neural network model is quantized and compressed and then deployed on an edge computing node to perform online fault diagnosis on real-time fieldbus data, outputting fault type determination results and fault confidence assessment values. Incremental learning is triggered when the fault confidence assessment value is lower than a preset threshold.

[0010] Furthermore, the physical layer signal distortion data includes differential voltage overshoot amplitude, ringing duration, rise time, fall time, and bit timing deviation; The data link layer communication behavior data includes slave node address, node activity vector, data field information entropy, message interval time standard deviation, and cyclic redundancy check code. The sampling frequency of the synchronous acquisition is dynamically adjusted according to the real-time load rate of the bus. When the load rate is greater than a preset high load threshold, the sampling frequency is increased to a first preset multiple of the bus baud rate. When the load rate is lower than a preset low load threshold, the sampling frequency is reduced to a second preset multiple of the bus baud rate.

[0011] Furthermore, the pre-training phase utilizes a simulated fault dataset and a historical fault dataset of similar equipment to perform initial training on the deep neural network model; The simulation fault dataset is generated by establishing a fieldbus physical layer distributed parameter transmission line model based on telegraph equations and injecting at least twelve typical fault modes. The similar device historical fault dataset identifies source devices with similar bus topologies and communication protocols through device type encoding. The dynamic time warping algorithm is used to perform alignment processing on the fault time series data of the source device and the target device, and the feature distribution is adapted by the maximum mean difference minimization method. The fine-tuning stage uses no more than a preset number of real fault samples collected on-site from the target equipment to fine-tune the parameters of the pre-trained model.

[0012] Furthermore, the fine-tuning stage employs a hierarchical learning rate strategy, using a first learning rate for the last two hidden layers of the deep neural network model and a second learning rate for the remaining layers, wherein the first learning rate is greater than the second learning rate. The learning rate adjustment uses a cosine annealing algorithm, and the period parameter of the cosine annealing algorithm is set to a preset multiple of the number of fine-tuning samples; Furthermore, a gradient accumulation strategy is adopted, updating the model parameters once every preset number of accumulated samples.

[0013] Furthermore, the time-domain features in the multi-domain feature extraction are obtained by calculating through dual-threshold edge detection. The dual thresholds are set as a first preset percentage and a second preset percentage of the signal amplitude. The time-domain features include rise time, fall time, differential voltage overshoot amplitude, and master-slave message response delay time. The frequency domain features are obtained by performing a fast Fourier transform on the physical layer signal distortion data after applying an adaptive Hanning window. The frequency domain features include the main frequency component, total harmonic distortion, and spectral energy distribution entropy. The window function width of the Hanning window is dynamically adjusted according to the bus baud rate. The statistical features are calculated within a preset time sliding window, and include message error rate, activity vector of each slave node, data field information entropy, and standard deviation of message interval time.

[0014] Furthermore, the calculation method for the spectral energy distribution entropy is as follows: ; in, This represents the entropy of the spectral energy distribution. Indicates the first The normalized energy percentage of each spectral component Indicates the number of spectral analysis points; The dynamic adjustment method for the window function width of the Hanning window is as follows: When the bus baud rate is greater than the preset baud rate threshold, a first preset point window is used; when the bus baud rate is not greater than the preset baud rate threshold, a second preset point window is used.

[0015] Furthermore, the mathematical expression of the adaptive activation function is: When input hour, ; When input hour, ; in, The dynamic slope parameter is calculated as follows: ; in, This represents the Sigmoid function. and For trainable parameters, and These are the batch mean and standard deviation of the input features, respectively. and These are the upper and lower limits of the dynamic slope parameter, respectively.

[0016] Furthermore, the quantization compression adopts a mixed precision quantization method based on KL divergence minimization, wherein the weight quantization is 8-bit integer and the activation value quantization is 16-bit integer; The quantization compression is performed through the following steps: The calibration dataset is constructed using unlabeled field normal operation data. The dynamic range of weights and activation values ​​of each layer is statistically analyzed. The KL divergence before and after quantization is calculated for each candidate quantization interval. The quantization mapping formula is determined by selecting the quantization threshold that minimizes the KL divergence.

[0017] Furthermore, the fault confidence assessment value is calculated as follows: ; in, This represents the fault confidence assessment value. This represents the maximum probability value in the Softmax result of the neural network output layer. Represents normalized negative entropy. and The weighting coefficients are and satisfy the following conditions: The normalized negative entropy is calculated as follows: ; in, The negative entropy represents the output probability distribution. Total number of fault categories; The weighting coefficients are dynamically adjusted based on the preset safety level of the fault type.

[0018] Furthermore, the incremental learning is performed as follows: When the fault confidence assessment value is lower than the preset threshold, the intermediate layer activation value distribution is uploaded to the remote platform. After the remote platform returns the feedback result, the knowledge distillation technique is used to fix the pre-trained network parameters of the deep neural network model, and only the weight parameters of the last two hidden layers are updated. When the incremental data accumulates to a preset number of samples, online incremental learning is triggered. The learning rate of the online incremental learning is set to a preset ratio of the learning rate in the fine-tuning stage.

[0019] The beneficial effects of this invention are as follows: This invention achieves end-to-end joint optimization of feature extraction and model training by cross-layer coupling of physical layer signal distortion features and data link layer communication behavior features, combined with a batch normalization layer with shared scale parameters and an adaptive Hanning window width adjustment mechanism, resulting in synergistic diagnostic gains that cannot be obtained by single-dimensional feature superposition.

[0020] This invention applies the transfer learning strategy to the field of fieldbus fault diagnosis. By expanding the training samples through simulation data and data from similar devices, it fundamentally solves the bottleneck problem of scarce fault samples in industrial fields. With only a small number of real-world fault samples for fine-tuning, the model's diagnostic performance can reach the level that traditional methods require a large number of samples to achieve.

[0021] The adaptive activation function designed in this invention enables the neural network to automatically adjust its nonlinear expression capability in different hidden layers and different training batches, and has a stronger feature extraction capability for common nonlinear separable problems in fault diagnosis tasks.

[0022] This invention employs a hybrid precision quantization compression technique based on KL divergence minimization, which significantly improves inference speed and reduces storage space requirements while maintaining basic diagnostic accuracy, thus meeting the real-time diagnostic requirements of industrial edge devices. Attached Figure Description

[0023] Figure 1 This is a flowchart of a fieldbus fault diagnosis method based on transfer learning according to an embodiment of the present invention; Figure 2 This is a diagram illustrating the architecture of a fieldbus fault diagnosis system according to an embodiment of the present invention. Figure 3 This is a flowchart of the multi-domain feature extraction process according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the deep neural network model structure according to an embodiment of the present invention; Figure 5 This is a mathematical diagram illustrating the adaptive activation function according to an embodiment of the present invention. Figure 6 This is a flowchart illustrating the two-stage training process of transfer learning according to an embodiment of the present invention. Figure 7 This is a timing diagram of edge deployment and online diagnosis according to an embodiment of the present invention; Figure 8 This is a topology diagram of a thermal power plant implementation example according to an embodiment of the present invention; Figure 9This is a schematic diagram illustrating the cross-layer feature coupling principle of an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates this application. It should be understood that the specific embodiments described in this specification are merely for explaining this application and are not intended to limit it.

[0025] Example 1 This embodiment takes the Profibus-DP fieldbus control system of a 300MW subcritical coal-fired power plant as a typical application scenario, and elaborates on the specific implementation process of the fieldbus fault diagnosis method based on transfer learning described in this invention.

[0026] See Figure 2 and Figure 8 The Profibus-DP bus system connects 23 slave devices, including temperature transmitters, pressure transmitters, and valve positioners, with a bus baud rate of 1.5 Mbps and a bus length of approximately 1200 meters.

[0027] See Figure 1 The overall process of the method of the present invention includes four core steps from step S1 to step S4, which are connected sequentially. The incremental learning result in step S4 is fed back to the model parameters in step S3 to form a closed-loop optimization.

[0028] Step S1: Synchronously acquire physical layer signal distortion data and data link layer communication behavior data of the fieldbus network.

[0029] See Figure 9 Edge computing nodes connect to the Profibus-DP network through an embedded electrically isolated communication protocol parsing module with a direct physical layer signal sampling interface. Electrical isolation between the physical layer and the bus is achieved through a magnetically coupled isolation chip, with an isolation voltage of no less than 2500Vrms. The protocol parsing module integrates a bus signal acquisition unit and a data packet capture unit.

[0030] The signal acquisition unit performs analog-to-digital conversion on the bus level signal at a dynamic sampling frequency of ten to fifteen times the bus baud rate. The sampling frequency is dynamically adjusted according to the real-time bus load rate: when the load rate is greater than 70%, the sampling frequency is increased to fifteen times the bus baud rate, i.e., 22.5MHz; when the load rate is less than 30%, the sampling frequency is reduced to ten times the bus baud rate, i.e., 15MHz. In this embodiment, the bus load rate is approximately 45% under normal operating conditions, and the sampling frequency is set to 15MHz.

[0031] Physical layer signal distortion data is acquired through a dedicated hardware circuit for microsecond-level edge detection integrated within the protocol parsing module. This includes differential voltage overshoot amplitude, ringing duration, rise time, fall time, and bit timing deviation. Data link layer communication behavior data is obtained by parsing data frames according to the PROFIBUS-DP communication protocol specification through the message capture unit. This includes slave node addresses, a 23-dimensional activity vector consisting of the number of messages sent by each slave per unit time, data field information entropy, message interval standard deviation, and cyclic redundancy check (CRC) code.

[0032] Physical layer signal distortion data and data link layer communication behavior data are forcibly aligned in time using microsecond-level timestamps to form cross-layer correlated sample pairs. The timestamp accuracy reaches the microsecond level, ensuring that physical layer signal events and corresponding data link layer message events strictly correspond in time.

[0033] Step S2: Perform multi-domain feature extraction on cross-layer associated sample pairs and construct coupled feature vectors.

[0034] See Figure 3 Multi-domain feature extraction delves deeply into the original data from three dimensions: time domain, frequency domain, and statistical domain.

[0035] For temporal feature extraction, a dual-threshold edge detection algorithm is employed, with thresholds set at 30% and 70% of the signal amplitude. Rise time... The falling edge time is defined as the time interval during which the signal rises from the 30% threshold point to the 70% threshold point. This is the time interval from the 70% threshold point to the 30% threshold point. Differential voltage overshoot amplitude. The percentage by which the signal peak exceeds the steady-state amplitude is calculated using the following formula: ; in, The peak value of the signal. This is the average amplitude after the signal is established. Message response delay time. This is obtained by measuring the timestamp difference between the end time of the master station's request message and the start time of the corresponding slave station's response message. The time-domain feature vectors form a four-dimensional vector. .

[0036] For frequency domain feature extraction, an adaptive Hanning window is applied to the physical layer signal before performing a Fast Fourier Transform. The expression for the Hanning window function is: ; in, The total number of samples in the signal window. The window width of the Hanning window is dynamically adjusted according to the bus baud rate: a 128-point window is used when the baud rate is greater than 500kbps, and a 256-point window is used when the baud rate is not greater than 500kbps. In this embodiment, the Profibus-DP bus baud rate is 1.5Mbps, and a 128-point window is used. The windowed signal sequence undergoes a Fast Fourier Transform to calculate the complex spectrum. And obtain the amplitude spectrum Main frequency component Defined as the frequency corresponding to the maximum value of the amplitude spectrum. Total harmonic distortion (THD) is calculated as the ratio of the effective value of each harmonic component to the effective value of the fundamental component, using the following formula: ; in, The fundamental amplitude, For the first The amplitude of the first harmonic is calculated up to the 10th harmonic. Spectral energy distribution entropy. The calculation formula is: ; in, For the first The normalized energy percentage of each spectral component The entropy value represents the number of spectral analysis points; a higher entropy value indicates a more complex signal spectrum and more severe distortion. Frequency domain feature vectors constitute a three-dimensional vector. .

[0037] In terms of statistical feature extraction, multi-dimensional statistical parameters are calculated within a 10-second sliding time window. Message error rate. Defined as the ratio of the number of erroneous packets to the total number of packets. Erroneous packets are identified through four categories: failed cyclic redundancy check, abnormal frame length, timeout failure, and format error. Node activity level. A 23-dimensional activity vector is formed by calculating the number of messages sent by each slave station per unit time. Data field information entropy The calculation formula is: ; in, For the byte value in the data field equal to The probability of occurrence; information entropy can detect whether there are abnormal padding or fixed pattern errors in the data field. Message interval time standard deviation. This is obtained by measuring the sequence of timestamp differences between the start times of adjacent messages and calculating their standard deviation. The statistical eigenvectors form a 26-dimensional vector. .

[0038] The above three types of feature vectors are concatenated to form a 33-dimensional coupled feature vector. This serves as the input to the deep neural network model. The mechanism of dynamically adjusting the window function width based on the baud rate shares the same scale and offset parameters with the batch normalization layer of the feature vectors, achieving end-to-end joint optimization of feature extraction and model training.

[0039] Step S3: Input the coupled feature vector into the deep neural network model containing the adaptive activation function, and train it in two stages: pre-training and fine-tuning, using a transfer learning strategy.

[0040] See Figure 4 The deep neural network model employs a fully connected network structure, consisting of an input layer, a first hidden layer, a second hidden layer, a third hidden layer, a fourth hidden layer, and an output layer. The input layer has 33 nodes, matching the dimension of the coupled feature vector. The four hidden layers have 128, 64, 32, and 16 nodes respectively, forming a progressively decreasing bottleneck structure. This structure helps the network extract hierarchical features from concrete to abstract layers while reducing model complexity to mitigate the risk of overfitting. Each hidden layer is followed by a batch normalization layer and an adaptive activation function layer. The batch normalization layer normalizes the output of the hidden layer using the following formula: ; in, and The mean and variance of the current batch. is the numerical stability constant.

[0041] See Figure 5 The mathematical expression of the adaptive activation function is a piecewise function: when the input... hour, When input hour, Dynamic slope parameter The calculation process is as follows: First, calculate the mean of the input feature in the current batch. and standard deviation Then input Standardized Intermediate variables are then computed through trainable fully connected layers. ,in and These are trainable parameters with the same dimension as the hidden layer output dimension. The Sigmoid function maps the values ​​to the (0,1) interval, and finally a linear transformation is performed to find the range of the slope parameter. ,Right now: ; In this embodiment, Set to 0.05, Setting it to 0.5 ensures that the activation function has a moderate ability to respond to the negative half-axis while avoiding gradient vanishing in deep networks.

[0042] The output layer employs a multi-label structure, including a fault type classification branch and a fault severity classification branch. The fault type branch maps the 16-dimensional output of the fourth hidden layer to 24 dimensions, corresponding to 24 specific fault types. The output is then normalized using the Softmax function to obtain a probability distribution. The severity branch is independently mapped to 4 dimensions, corresponding to four levels: mild, moderate, severe, and critical. The output is... The model's total loss function is the sum of the weighted cross-entropy losses for the two prediction tasks: ; in, and One-hot encoding for the real labels, with weight coefficients set to... , This emphasizes the paramount importance of fault type identification.

[0043] See Figure 6 The pre-training phase of transfer learning includes the following: The simulation fault dataset is generated by establishing a fieldbus physical layer distributed parameter transmission line model based on telegraph equations. The telegraph equations are expressed as: ; ; in, and Distance from the sending end At the moment voltage and current, , , , The parameters are for a transmission line of unit length. The telegraph equations are solved using the finite difference method with time-domain discretization, and the spatial step size is... meters, time step nanoseconds satisfy the Courant stability condition ,in The signal propagation speed is considered. Twelve typical fault modes are incorporated into the transmission line model: bus short circuit, open circuit, missing terminating resistor, signal reflection, electromagnetic interference coupling, node disconnection, message collision, cyclic redundancy check error, bit stuffing error, acknowledgment delay, baud rate deviation, and node address conflict. The bus short circuit fault is modeled using a variable resistor model, with the short-circuit resistance value uniformly sampled on a logarithmic scale for at least ten discrete values ​​within the range of 0.1 ohms to 100 ohms. The electromagnetic interference coupling fault is modeled using a sine wave superimposed with Gaussian white noise, with the interference source term being: ; Among them, interference frequency Linear sampling of at least fifteen frequency points within the range of 1MHz to 100MHz, interference amplitude Five severity levels are set based on the bus drive voltage. Five different severity parameters are set for each fault mode, and massive amounts of fault waveforms and message data are obtained through numerical simulation.

[0044] The method for obtaining the historical fault dataset of similar equipment is as follows: source equipment with similar bus topology and communication protocol is identified through equipment type encoding. In this embodiment, bus fault data from three other units in the same power plant and similar units in two other power plants are collected. A dynamic time warping algorithm is used to align the fault timing features of different equipment. After alignment, the maximum mean difference minimization method is used to perform feature distribution adaptation, with the maximum mean difference loss being: ; in, This involves a Gaussian kernel mapping. An attention mechanism is introduced to assign different weights to data from different source devices. Topological similarity weight Protocol proximity weight The constructed similar device dataset contains approximately 50,000 labeled samples. After mixing the two datasets, a hierarchical sampling strategy was adopted to ensure a balance of fault types in each batch. The model was pre-trained for 200 epochs with a batch size of 128, and all layer weights participated in the update.

[0045] The fine-tuning phase of transfer learning uses real fault samples collected from the target equipment in the field to perform fine adjustments on the pre-trained model. In this embodiment, 87 sets of real fault samples, covering five fault types, were collected from the Profibus-DP bus system of a 300MW thermal power plant after six months of operation. A hierarchical learning rate strategy is adopted: the first learning rate is used for the last two hidden layers. The second learning rate is used for the first two layers and the input layer. It preserves general features. The learning rate is adjusted using a cosine annealing algorithm, and the learning rate increases with the number of training steps. The pattern of change is as follows: ; in, Set to 870 steps, which is ten times the number of fine-tuning samples. A gradient accumulation strategy is employed, with an accumulation step count of 8 and an equivalent batch size of 8, to overcome gradient noise from small samples. An early stopping mechanism is introduced to monitor the validation set loss, terminating training if there is no improvement after 20 consecutive epochs. The fine-tuning phase is typically completed within 30 to 50 epochs, resulting in a significant improvement in the model's diagnostic performance in the target domain.

[0046] Step S4: Deploy the trained deep neural network model to edge computing nodes after quantization and compression to perform online fault diagnosis.

[0047] See Figure 7 The model quantization and compression employs a mixed-precision quantization method based on minimizing KL divergence. A calibration dataset of 1000 sets of unlabeled, normally operating field data is used as input to the original 32-bit floating-point model, recording the dynamic range of weights and activation values ​​for each layer. The minimum value of each layer's weights is calculated. and maximum value Determine the dynamic range of the weights. The weight distribution is divided into multiple candidate quantization intervals, and the KL divergence before and after quantization is calculated for each candidate interval: ; in, For the original distribution, The distribution is quantized. A quantization threshold that minimizes the KL divergence is selected. Determine the 8-bit integer weight mapping formula: ; The activation values ​​are quantized using 16-bit integers. The dynamic range of the activation values ​​for each layer is calculated, and the scaling factor that minimizes the change in the output feature distribution is selected. : ; The sensitivity of each layer to quantization error was analyzed, and layers with significant impact on accuracy were retained with 16-bit precision. Quantization parameters were integrated into the model structure, the inference computation graph was reconstructed, and floating-point operations were replaced with integer operations. The diagnostic accuracy of the quantized model was tested on a validation set. If the accuracy decreased by more than 2 percentage points, the quantization strategy was adjusted and re-optimized. The quantized model's storage space was compressed from 45MB to 11MB, inference speed was improved by 3.2 times, and single-sample inference time on an industrial-grade multi-core processor decreased from 85 milliseconds to 26 milliseconds, with only a 1.1 percentage point decrease in diagnostic accuracy.

[0048] The edge computing node employs an industrial-grade multi-core ARM Cortex-A53 processor with a clock speed of 1.8GHz, equipped with 4GB of LPDDR4 memory and 64GB of industrial-grade eMMC storage, and expandable with a 128GB memory card for persistent storage of massive amounts of fault data. The operating temperature range is -25°C to 70°C. The hardware features fanless cooling and an IP54-rated metal casing. The power input is equipped with transient voltage suppression diodes and a common-mode choke. The node connects to the fieldbus network via electrically isolated coupling, achieved using a magnetically coupled isolation chip with an isolation voltage of no less than 2500Vrms.

[0049] During online diagnosis, for each complete signal window and message sequence acquired, the system immediately invokes the multi-domain feature extraction module to calculate a 33-dimensional coupled feature vector. After standardization, this vector is input into the inference engine. The engine performs forward propagation, and the output layer generates a probability distribution for fault type and a probability distribution for severity. The category corresponding to the highest probability is taken as the diagnostic result. Fault confidence assessment value. The calculation method is as follows: ; in, This represents the maximum probability value in the Softmax result. For the first The predicted probability of a type of failure. The total number of fault categories. Normalized negative entropy. The calculation method is as follows: ; in, This represents the negative entropy of the output probability distribution. Weighting coefficients. and satisfy The security level is dynamically adjusted based on the type of fault: for fault types that threaten system security, , For general faults, , This dynamic weight allocation mechanism is implemented using a lookup table method, with the lookup based on the preset safety level of the fault type.

[0050] When the fault confidence assessment value At that time, the system automatically confirms the diagnostic results and reports them to the plant-level monitoring information system. When the fault confidence assessment value... At that time, the system uploads the feature vector of the current fault sample, the distribution of activation values ​​in the intermediate layers, and the top three prediction results of the model's output layer to the remote expert diagnosis platform. The expert diagnosis platform performs manual judgment on the fault characteristics based on visualization analysis tools and feeds the judgment results back to the deep neural network model through incremental learning. When the incremental data accumulates to 20 samples, online incremental learning is triggered. Knowledge distillation technology is used to fix the pre-trained network parameters, fine-tuning only the last two hidden layers, with the learning rate set to [value missing]. The model is trained for 5 epochs, incorporating expert knowledge to achieve continuous evolution.

[0051] In this embodiment, after the diagnostic steps described above, the system achieves a 98.5% accuracy rate in identifying short-circuit faults, compared to only 76.3% for rule-based expert systems, representing an improvement of 22.2 percentage points. The accuracy rate for identifying electromagnetic interference coupling faults reaches 95.7%, compared to 81.4% for traditional spectrum analysis methods, an improvement of 14.3 percentage points. The average response time is 28 milliseconds, compared to 156 milliseconds for support vector machine-based methods, representing a 5.6-fold improvement in response speed. Using only 50 field samples, the combination of cross-layer coupling and adaptive activation functions improves the diagnostic accuracy to 96.8%, which is 9.4 percentage points higher than the linear superposition of the expected value of approximately 87.4% for using physical layer features alone (82.3%) or link layer features alone (85.1%).

[0052] Example 2 This embodiment uses the CANopen fieldbus system of a petrochemical plant as an application scenario to illustrate the implementation process of the method of the present invention under different bus protocols. The CANopen bus system connects 16 slave devices, including flow transmitters, level transmitters, and control valves, with a bus baud rate of 500kbps and a bus length of approximately 600 meters.

[0053] Step S1: Synchronously acquire physical layer signal distortion data and data link layer communication behavior data of the fieldbus network.

[0054] Edge computing nodes connect to the CANopen network via an electrically isolated communication protocol parsing module. The isolation voltage is no less than 2500Vrms. The signal acquisition unit performs analog-to-digital conversion on the bus level signals at a dynamic sampling frequency of ten to fifteen times the bus baud rate. In this embodiment, the bus load rate is approximately 35% under normal operating conditions, ranging from 30% to 70%, and the sampling frequency is set to ten times 500kbps, i.e., 5MHz.

[0055] Physical layer signal distortion data includes differential voltage overshoot amplitude, ringing duration, rise time, fall time, and bit timing deviation. Data link layer communication behavior data is parsed according to the CANopen protocol specification, including slave node addresses, a 16-dimensional activity vector consisting of the number of messages sent by each slave per unit time, data field information entropy, message interval standard deviation, and cyclic redundancy check code. Physical layer signal distortion data and data link layer communication behavior data are forcibly aligned using microsecond-level timestamps to form cross-layer correlated sample pairs.

[0056] Step S2: Perform multi-domain feature extraction on cross-layer associated sample pairs and construct coupled feature vectors.

[0057] Time-domain feature extraction employs a dual-threshold edge detection algorithm, with thresholds set at 30% and 70% of the signal amplitude. Rise time, fall time, differential voltage overshoot amplitude, and master-slave message response delay are extracted to construct a four-dimensional time-domain feature vector. .

[0058] In frequency domain feature extraction, since the CANopen bus baud rate is 500kbps, which is no greater than the 500kbps threshold, a 256-point Hanning window is used. After applying a 256-point Hanning window to the physical layer signal, a Fast Fourier Transform is performed to calculate the dominant frequency components. Total Harmonic Distortion (THD) and Spectral Energy Distribution Entropy , forming a three-dimensional frequency domain feature vector The formula for calculating the spectral energy distribution entropy is: ; Statistical feature extraction calculates the message error rate, the 16-dimensional activity vector of each slave station, the data field information entropy, and the standard deviation of the message interval within a 10-second sliding time window, forming a 19-dimensional statistical feature vector. .

[0059] The three types of feature vectors are concatenated to form a 26-dimensional coupled feature vector. , as input to the deep neural network model.

[0060] Step S3: Input the coupled feature vector into the deep neural network model containing the adaptive activation function, and train it in two stages: pre-training and fine-tuning, using a transfer learning strategy.

[0061] The deep neural network model employs a fully connected network structure. The input layer has 26 nodes, and the four hidden layers have 96, 48, 24, and 12 nodes respectively, forming a bottleneck structure with progressively decreasing nodes. Each hidden layer is followed by a batch normalization layer and an adaptive activation function layer. The structure and parameter settings of the adaptive activation function are the same as in Example 1. The fault type branch of the output layer is mapped to 20 dimensions, corresponding to 20 CANopen bus fault types. The severity branch is independently mapped to 4 dimensions. The structure of the model's total loss function is the same as in Example 1.

[0062] The generation method of the simulation fault dataset in the pre-training phase is consistent with that in Example 1. A CANopen bus physical layer distributed parameter transmission line model is established based on the telegraph equations. The telegraph equations are solved using the finite difference method in the time domain, with a spatial step size of [missing information]. meters, time step Nanoseconds were used to inject twelve typical fault modes. A historical fault dataset of similar equipment was collected from CANopen bus fault data of other devices in the same chemical industrial park. Alignment was performed using a dynamic time warping algorithm, and feature distribution adaptation was performed using the maximum mean difference minimization method. The maximum mean difference loss formula is the same as in Example 1. Pre-training was performed for 200 epochs, with a batch size of 128.

[0063] During the fine-tuning phase, 65 sets of real fault samples collected from the field of petrochemical plants were used, covering four fault types. The hierarchical learning rate strategy was the same as in Example 1, using a learning rate for the last two hidden layers. Use the learning rate for the remaining layers The periodicity parameter of the cosine annealing algorithm The training time is set to 650 steps, which is ten times the number of fine-tuning samples. The gradient accumulation step count is 8. An early stopping mechanism is introduced, terminating training if there is no improvement after 20 consecutive epochs.

[0064] Step S4: Deploy the trained deep neural network model to edge computing nodes after quantization and compression to perform online fault diagnosis.

[0065] The quantization compression method is the same as in Example 1, employing mixed-precision quantization based on KL divergence minimization. Weight quantization is performed as 8-bit integers, and activation value quantization as 16-bit integers. The calibration dataset consists of 1000 sets of unlabeled, normally operating field data. The hardware configuration of the edge computing nodes is the same as in Example 1, using an industrial-grade multi-core ARM Cortex-A53 processor with an operating temperature range of -25°C to 70°C.

[0066] During online diagnosis, the calculation method for the fault confidence assessment value is the same as in Example 1, using a weighted fusion calculation of the maximum probability value and normalized negative entropy. A preset threshold is used. When the fault confidence assessment value is below 0.75, the distribution of intermediate layer activation values ​​is uploaded to the remote expert diagnosis platform. The triggering conditions and execution method of incremental learning are the same as in Example 1. Online incremental learning is triggered when the incremental data accumulates to 20 samples. Knowledge distillation technology is used to fix the parameters of the pre-trained network, and only the last two hidden layers are fine-tuned. The learning rate is... Train for 5 epochs.

[0067] In this embodiment, the system achieves a 97.8% accuracy rate in identifying short-circuit faults on the CANopen bus, a 96.2% accuracy rate in identifying node disconnection faults, and a 94.5% accuracy rate in identifying message collision faults. The average response time is 32 milliseconds. With only 65 field samples used for fine-tuning, the overall diagnostic accuracy reaches 96.1%.

[0068] Example 3 This embodiment uses the DeviceNet fieldbus of a continuous casting machine control system in the metallurgical industry as an application scenario to illustrate the implementation process of the method of the present invention under the DeviceNet protocol. The DeviceNet bus system connects 18 slave devices, including position sensors, temperature sensors, and solenoid valves. The bus baud rate is 125kbps, and the bus length is approximately 400 meters.

[0069] Step S1: Synchronously acquire physical layer signal distortion data and data link layer communication behavior data of the fieldbus network.

[0070] Edge computing nodes access the DeviceNet network via an electrically isolated communication protocol parsing module. The isolation voltage is no less than 2500Vrms. In this embodiment, the bus load rate is approximately 25% under normal operating conditions, below the 30% threshold, and the sampling frequency is set to ten times 125kbps, i.e., 1.25MHz. Physical layer signal distortion data includes differential voltage overshoot amplitude, ringing duration, rise time, fall time, and bit timing deviation. Data link layer communication behavior data is collected and parsed according to the DeviceNet protocol specification, including slave node addresses, an 18-dimensional activity vector consisting of the number of messages sent by each slave per unit time, data field information entropy, message interval standard deviation, and cyclic redundancy check code. Physical layer signal distortion data and data link layer communication behavior data are forcibly aligned using microsecond-level timestamps to form cross-layer correlated sample pairs.

[0071] Step S2: Perform multi-domain feature extraction on cross-layer associated sample pairs and construct coupled feature vectors.

[0072] Time-domain feature extraction employs a dual-threshold edge detection algorithm, with thresholds set at 30% and 70% of the signal amplitude. Rise time, fall time, differential voltage overshoot amplitude, and master-slave message response delay are extracted to construct a four-dimensional time-domain feature vector. .

[0073] In frequency domain feature extraction, since the DeviceNet bus baud rate is 125kbps, which is no greater than the 500kbps threshold, a 256-point Hanning window is used. After applying a 256-point Hanning window to the physical layer signal, a Fast Fourier Transform is performed to calculate the dominant frequency components. Total Harmonic Distortion (THD) and Spectral Energy Distribution Entropy , forming a three-dimensional frequency domain feature vector The formula for calculating the spectral energy distribution entropy is the same as that used in Examples 1 and 2.

[0074] Statistical feature extraction calculates the message error rate, the 18-dimensional activity vector of each slave station, the data field information entropy, and the standard deviation of the message interval within a 10-second sliding time window, forming a 21-dimensional statistical feature vector. .

[0075] The three types of feature vectors are concatenated to form a 28-dimensional coupled feature vector. .

[0076] Step S3: Input the coupled feature vector into the deep neural network model containing the adaptive activation function, and train it in two stages: pre-training and fine-tuning, using a transfer learning strategy.

[0077] The deep neural network model has 28 nodes in the input layer, and the number of nodes in the four hidden layers are 112, 56, 28, and 14 respectively, forming a bottleneck structure with progressively decreasing nodes. Each hidden layer is followed by a batch normalization layer and an adaptive activation function layer. The structure and parameter settings of the adaptive activation function are the same as in Example 1. The fault type branch of the output layer is mapped to 18 dimensions, corresponding to 18 types of DeviceNet bus faults. The severity branch is independently mapped to 4 dimensions.

[0078] During the pre-training phase, a DeviceNet bus physical layer distributed parameter transmission line model is established. Based on the telegraph equations, the finite difference method is used to perform time-domain discretization and solution, with a spatial step size of [missing information]. meters, time step Nanosecond intervals were used to inject twelve typical fault modes. A similar equipment historical fault dataset was collected from DeviceNet bus fault data of other continuous casting machines in the same industry. Alignment was performed using a dynamic time warping algorithm, and feature distribution adaptation was performed using a maximum mean difference minimization method. Pre-training was performed for 200 epochs, with a batch size of 128.

[0079] During the fine-tuning phase, 52 sets of real fault samples collected from the field of a metallurgical continuous casting machine were used, covering three fault types. The hierarchical learning rate strategy was the same as in Example 1, applying a learning rate to the last two hidden layers. Use the learning rate for the remaining layers The periodicity parameter of the cosine annealing algorithm The training time is set to 520 steps, which is ten times the number of fine-tuning samples. The gradient accumulation step count is 8. An early stopping mechanism is introduced, terminating training if there is no improvement after 20 consecutive epochs.

[0080] Step S4: Deploy the trained deep neural network model to edge computing nodes after quantization and compression to perform online fault diagnosis.

[0081] The quantization compression method is the same as in Example 1, employing mixed-precision quantization based on minimizing KL divergence. Weight quantization is performed as 8-bit integers, and activation value quantization as 16-bit integers. The calibration dataset consists of 1000 sets of unlabeled, normally operating field data. The hardware configuration of the edge computing nodes is the same as in Example 1, with an operating temperature range of -25°C to 70°C.

[0082] During online diagnostics, the calculation method for the fault confidence assessment value is the same as in Example 1. Preset threshold. When the fault confidence assessment value is below 0.75, the distribution of intermediate layer activation values ​​is uploaded to a remote platform, and the feedback results are incorporated into the model through incremental learning. The triggering conditions and execution method of incremental learning are the same as in Example 1.

[0083] In this embodiment, the system achieves a 95.3% accuracy rate in identifying message collision faults on the DeviceNet bus, a 93.8% accuracy rate in identifying baud rate deviation faults, and a 94.1% accuracy rate in identifying node address conflict faults. The average response time is 35 milliseconds. Using only 52 field samples, the overall diagnostic accuracy reaches 95.1%, a reduction of 87% compared to traditional deep learning methods that require at least 400 samples.

[0084] Those skilled in the art will understand that the order of the above steps can be adjusted according to actual application requirements. The scope of protection of this invention is not limited to the Profibus-DP bus, but also applies to industrial fieldbuses such as CANopen, DeviceNet, Modbus-RTU, and FF, as well as industrial Ethernet such as Profinet, EtherNet / IP, and EtherCAT. Only the communication protocol parsing module and feature extraction module need to be adapted to the corresponding protocols. The adaptive activation function parameters, the number of layers and nodes in the deep neural network, and the transfer learning rate strategy can all be optimized and adjusted according to specific application scenarios and hardware platform performance; these adjustments are all equivalent technical solutions of this invention.

[0085] In summary, the embodiments of the present invention have at least the following technical effects: This invention achieves end-to-end joint optimization of feature extraction and model training by cross-layer coupling of physical layer signal distortion features and data link layer communication behavior features, combined with a batch normalization layer with shared scale parameters and an adaptive Hanning window width adjustment mechanism, resulting in synergistic diagnostic gains that cannot be obtained by single-dimensional feature superposition.

[0086] This invention applies the transfer learning strategy to the field of fieldbus fault diagnosis. By expanding the training samples through simulation data and data from similar devices, it fundamentally solves the bottleneck problem of scarce fault samples in industrial fields. With only a small number of real-world fault samples for fine-tuning, the model's diagnostic performance can reach the level that traditional methods require a large number of samples to achieve.

[0087] The adaptive activation function designed in this invention enables the neural network to automatically adjust its nonlinear expression capability in different hidden layers and different training batches, and has a stronger feature extraction capability for common nonlinear separable problems in fault diagnosis tasks.

[0088] This invention employs a hybrid precision quantization compression technique based on KL divergence minimization, which significantly improves inference speed and reduces storage space requirements while maintaining basic diagnostic accuracy, thus meeting the real-time diagnostic requirements of industrial edge devices.

[0089] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A fieldbus fault diagnosis method based on transfer learning, characterized in that, include: The physical layer signal distortion data and data link layer communication behavior data of the fieldbus network are collected synchronously. The physical layer signal distortion data and the data link layer communication behavior data are aligned with timestamps to form cross-layer associated sample pairs. Multi-domain feature extraction is performed on the cross-layer associated sample pairs, and feature parameters are extracted from the time domain, frequency domain and statistical domain respectively. The feature parameters include time domain features, frequency domain features and statistical features. The feature parameters are concatenated to construct a coupled feature vector. The coupled feature vector is input into the deep neural network model, and the deep neural network model is trained sequentially by a transfer learning strategy, including a pre-training phase and a fine-tuning phase. The trained deep neural network model is quantized and compressed and then deployed on an edge computing node to perform online fault diagnosis on real-time fieldbus data, outputting fault type determination results and fault confidence assessment values. Incremental learning is triggered when the fault confidence assessment value is lower than a preset threshold.

2. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The physical layer signal distortion data includes differential voltage overshoot amplitude, ringing duration, rise time, fall time, and bit timing deviation; The data link layer communication behavior data includes slave node address, node activity vector, data field information entropy, message interval time standard deviation, and cyclic redundancy check code; The sampling frequency of the synchronous acquisition is dynamically adjusted according to the real-time load rate of the bus. When the load rate is greater than a preset high load threshold, the sampling frequency is increased to a first preset multiple of the bus baud rate. When the load rate is lower than a preset low load threshold, the sampling frequency is reduced to a second preset multiple of the bus baud rate.

3. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The pre-training phase utilizes a simulated fault dataset and a historical fault dataset of similar equipment to perform initial training on the deep neural network model. The simulation fault dataset is generated by establishing a fieldbus physical layer distributed parameter transmission line model based on telegraph equations and injecting multiple typical fault modes. The similar device historical fault dataset identifies source devices with similar bus topologies and communication protocols through device type encoding. The dynamic time warping algorithm is used to perform alignment processing on the fault time series data of the source device and the target device, and the feature distribution is adapted by the maximum mean difference minimization method. The fine-tuning stage uses no more than a preset number of real fault samples collected on-site from the target equipment to fine-tune the parameters of the pre-trained model.

4. The fieldbus fault diagnosis method based on transfer learning according to claim 3, characterized in that, The fine-tuning stage employs a hierarchical learning rate strategy, using a first learning rate for the last two hidden layers of the deep neural network model and a second learning rate for the remaining layers, wherein the first learning rate is greater than the second learning rate. The learning rate adjustment uses a cosine annealing algorithm, and the period parameter of the cosine annealing algorithm is set to a preset multiple of the number of fine-tuning samples; Furthermore, a gradient accumulation strategy is adopted, updating the model parameters once every preset number of accumulated samples.

5. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The time-domain features in the multi-domain feature extraction are obtained by calculating the dual-threshold edge detection. The dual thresholds are set as a first preset percentage and a second preset percentage of the signal amplitude. The time-domain features include rise time, fall time, differential voltage overshoot amplitude, and master-slave message response delay time. The frequency domain features are obtained by performing a fast Fourier transform on the physical layer signal distortion data after applying an adaptive Hanning window. The frequency domain features include the main frequency component, total harmonic distortion, and spectral energy distribution entropy. The window function width of the Hanning window is dynamically adjusted according to the bus baud rate. The statistical features are calculated within a preset time sliding window, and include message error rate, activity vector of each slave node, data field information entropy, and standard deviation of message interval time.

6. The fieldbus fault diagnosis method based on transfer learning according to claim 5, characterized in that, The calculation method for the spectral energy distribution entropy is as follows: ; in, This represents the entropy of the spectral energy distribution. Indicates the first The normalized energy percentage of each spectral component Indicates the number of spectral analysis points; The dynamic adjustment method for the window function width of the Hanning window is as follows: When the bus baud rate is greater than the preset baud rate threshold, a first preset point window is used; when the bus baud rate is not greater than the preset baud rate threshold, a second preset point window is used.

7. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The deep neural network model includes an adaptive activation function, the mathematical expression of which is: When input hour, ; When input hour, ; in, The dynamic slope parameter is calculated as follows: ; in, This represents the Sigmoid function. and For trainable parameters, and These are the batch mean and standard deviation of the input features, respectively. and These are the upper and lower limits of the dynamic slope parameter, respectively.

8. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The quantization compression adopts a mixed precision quantization method based on KL divergence minimization, in which the weight quantization is an 8-bit integer and the activation value quantization is a 16-bit integer. The quantization compression is performed through the following steps: The calibration dataset is constructed using unlabeled field normal operation data. The dynamic range of weights and activation values ​​of each layer is statistically analyzed. The KL divergence before and after quantization is calculated for each candidate quantization interval. The quantization mapping formula is determined by selecting the quantization threshold that minimizes the KL divergence.

9. The fieldbus fault diagnosis method based on transfer learning according to claim 1, characterized in that, The calculation method for the fault confidence assessment value is as follows: ; in, This represents the fault confidence assessment value. This represents the maximum probability value in the Softmax result of the neural network output layer. Represents normalized negative entropy. and The weighting coefficients are satisfied. The normalized negative entropy is calculated as follows: ; in, The negative entropy represents the output probability distribution. Total number of fault categories; The weighting coefficients are dynamically adjusted based on the preset safety level of the fault type.

10. The fieldbus fault diagnosis method based on transfer learning according to any one of claims 1 to 9, characterized in that, The incremental learning is performed as follows: When the fault confidence assessment value is lower than the preset threshold, the intermediate layer activation value distribution is uploaded to the remote platform. After the remote platform returns the feedback result, the knowledge distillation technique is used to fix the pre-trained network parameters of the deep neural network model, and only the weight parameters of the last two hidden layers are updated. When the incremental data accumulates to a preset number of samples, online incremental learning is triggered. The learning rate of the online incremental learning is set to a preset ratio of the learning rate in the fine-tuning stage.