Safety instrument system fault prediction method and device, electronic equipment and storage medium
By combining the improved GRBT regression tree algorithm with the BP neural network, data processing and fault diagnosis of safety instrumented systems are performed, solving the problem that static models cannot adapt to rapid changes and achieving high-precision fault prediction and analysis.
Patent Information
- Application Number
- CN202510803660.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-11-04
AI Technical Summary
Existing safety instrumented systems suffer from low fault prediction accuracy because the static model cannot adapt to the large volume and rapid changes of data.
An improved GRBT regression tree algorithm is used to construct a fault prediction model, which performs dimensionality reduction and preprocessing on system operation data. Combined with a BP neural network, fault diagnosis is performed, and equipment health probability thresholds are used for comparison to achieve high-precision fault prediction and analysis.
It improves the accuracy of fault prediction in safety instrumented systems, enabling more accurate identification and differentiation of different types of faults, and providing efficient fault analysis results.
Smart Images

Figure CN120892932A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, electronic device, and storage medium for predicting faults in a safety instrumented system. Background Technology
[0002] A safety instrumented system (SAS) is a system used to detect whether process variables exceed safe limits and, when necessary, take measures to prevent hazardous events from occurring or mitigate their consequences. A SIS can respond promptly and protect against potential hazards or deteriorating conditions that could occur in a company's production facilities and equipment. It can bring the production facilities and equipment into a predefined safe shutdown condition, thereby reducing the risk to an acceptable minimum and ensuring the safety of personnel, equipment, and production facilities on site.
[0003] Fault prediction in safety instrumented systems (SAS) is a crucial aspect of ensuring the safe and stable operation of industrial processes. Advanced machine learning algorithms are employed to generate alarms for potential system malfunctions. However, due to the vast amount of data involved in SIS and the ever-changing conditions of field equipment, some static models cannot adapt to these changes in a timely manner, resulting in lower accuracy in SIS fault prediction. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the accuracy of fault prediction in safety instrumented systems.
[0005] To address the aforementioned problems, this invention provides a method, apparatus, electronic device, and storage medium for predicting faults in a safety instrumented system.
[0006] In a first aspect, the present invention provides a method for predicting faults in a safety instrumented system, based on a safety instrumented system, comprising: System operating data is obtained by periodically monitoring the safety instrumented system; The system operation data is input into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The comparison results are obtained by comparing the fault prediction data with the equipment health probability threshold. The fault prediction result is input into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0007] Optionally, before inputting the system operation data into the fault prediction model to obtain fault prediction data, the method further includes: Obtain initial system operation data; The initial system operation data is preprocessed to obtain preprocessed system operation data; Based on principal component analysis, low-dimensional spatial feature data are obtained by dimensionality reduction, sorting, and filtering of the preprocessing system's operating data. Principal component feature data are obtained by filtering the low-dimensional spatial feature data according to a preset principal component analysis threshold. The system operation data is obtained by performing sample mapping on the principal component feature data; The system operation data is as follows: , , in, For the system operation data, This refers to sample data from the system's operational data. For the i-th mapped sample, It is the transpose matrix. These are the principal component feature data.
[0008] Optionally, the step of preprocessing the initial system operating data to obtain preprocessed system operating data includes: The initial system operation data is standardized to obtain standardized sample features; The standardized sample features are as follows: , in, Let X be the standardized sample feature, and let X be the initial system operating data. The mean, For variance; The preprocessing system operation data is obtained based on the standardized sample characteristics.
[0009] Optionally, the fault prediction model construction process includes: Obtain a fault prediction training dataset, which includes historical system operation data and corresponding historical fault prediction data; An initial regression tree model based on the improved GRBT regression tree algorithm is constructed, and the initial regression tree model is trained and optimized based on the fault prediction training dataset. The adjusted initial regression tree model is then used as the fault prediction model.
[0010] Optionally, the comparison result includes health data and fault data, and the comparison result obtained by comparing the fault prediction data with the equipment health probability threshold includes: The fault prediction data is transformed using the sigmoid activation function to obtain the fault estimation probability. The sigmoid activation function is: , in, Estimate the probability of the aforementioned fault. For the fault prediction data, The exponential function of the fault prediction data; When the estimated probability of the fault is less than the device health probability threshold, the corresponding fault prediction data is used as the fault data. When the estimated probability of failure is greater than or equal to the device health probability threshold, the corresponding fault prediction data is used as the health data.
[0011] Optionally, the fault diagnosis model construction process includes: Obtain a fault diagnosis training dataset, which includes historical fault prediction data and corresponding historical fault analysis results; Based on the forward propagation algorithm, an initial BP neural network model is trained using the fault diagnosis training dataset to obtain a trained BP neural network model. Based on the backpropagation algorithm, the error gradient is obtained from the trained BP neural network model, and the trained BP neural network model is updated using the error gradient until the preset training requirements are met, thus obtaining the fault diagnosis model.
[0012] Optionally, the step of training the initial BP neural network model using the fault diagnosis training dataset to obtain the trained BP neural network model includes: The trained BP neural network model is obtained by training the initial BP neural network model using the fault diagnosis training dataset. The weighted sum of the inputs and the output value of the trained BP neural network model are respectively: , , in, This is the weighted sum of the inputs to the j-th neuron. The output value of the j-th neuron. Let i be the output value of the i-th neuron. Let be the weights from the i-th neuron to the j-th neuron. Let i be the bias value of the j-th neuron, i = j - 1.
[0013] Secondly, the present invention provides a safety instrumented system fault prediction device, based on a safety instrumented system, comprising: The system operation data acquisition module is used to acquire system operation data by periodically monitoring the safety instrumented system; The fault prediction data acquisition module is used to input the system operation data into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The threshold comparison module is used to compare the fault prediction data with the equipment health probability threshold to obtain a comparison result; The fault analysis result acquisition module is used to input the fault prediction result into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0014] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the safety instrumented system fault prediction method as described in the first aspect when executing the computer program.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the safety instrumented system fault prediction method as described in the first aspect.
[0016] The beneficial effects of the safety instrumented system fault prediction method, device, electronic device, and storage medium of the present invention are as follows: System operating data is obtained through periodic monitoring of the safety instrumented system. This data is then input into a fault prediction model constructed based on an improved GRBT regression tree algorithm to obtain fault prediction data. This approach can handle complex and nonlinear relationships, thereby more accurately predicting potential system faults. By comparing the fault prediction data with equipment health probability thresholds, the fault prediction results are input into a fault diagnosis model constructed based on a BP neural network to obtain fault analysis results. This approach can efficiently distinguish different types of faults and provide more accurate fault analysis results. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for predicting faults in a safety instrumented system according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a safety instrument system fault prediction device according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0019] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0023] In related technologies, a Safety Instrumented System (SIS) is an automated safety protection system used in industrial process control. It is primarily responsible for detecting potential hazards during production and taking corresponding measures to prevent accidents or mitigate their impact, ensuring the safety of personnel, equipment, and the environment. The SIS includes the TCS-900 system, which consists of a lower-level controller and a higher-level controller. The lower-level controller comprises a controller, communication card, and I / O modules, while the higher-level controller consists of operator stations and engineer stations. Data acquisition software should be deployed in the TCS-900 operator station. It periodically sends data acquisition commands to the communication card to read real-time fault source data stored in the lower-level controller of the TCS-900 system, performs preliminary preprocessing, and then sends the processed data to the status data server.
[0024] Simultaneously, a status data server should be deployed on-site to store, analyze, and manage real-time fault source data, historical status data, and preprocessed feature data of the TCS-900 system transmitted from each operator station, performing data analysis and fault diagnosis. The built-in fault prediction model determines whether the system is in a healthy state. If it is in a sub-healthy state with faults, the data is fed into the built-in fault diagnosis model to locate the fault point. The status data server sends the analysis results to the data visualization software, which is responsible for publishing the aforementioned data trend charts and analysis and diagnosis results, and performing real-time fault event push notifications.
[0025] To address the problems existing in the aforementioned related technologies, this embodiment provides a method, apparatus, electronic device, and storage medium for predicting faults in a safety instrumented system.
[0026] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting faults in a safety instrumented system, based on a safety instrumented system, including: Step 110: Obtain system operation data by periodically monitoring the safety instrumented system.
[0027] Specifically, monitoring software periodically monitors and reads system operating data from the safety instrumented system. The real-time status monitoring component can be divided into three parts: data acquisition software, status data server, and data display software.
[0028] Step 120: Input the system operation data into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm.
[0029] Specifically, the GRBT regression tree algorithm is a machine learning algorithm widely used in tasks such as regression, classification, and ranking. GRBT improves the model's predictive performance by iteratively building multiple weak learners (usually decision trees) and combining them into a strong learner.
[0030] Step 130: Compare the fault prediction data with the equipment health probability threshold to obtain a comparison result.
[0031] Specifically, fault prediction data represents the probability that the regression value calculated by the strong learner is a "healthy" sample in the sample set. When the fault prediction data is lower than a preset equipment health probability threshold, the system is determined to be in a fault state, and the relevant fault prediction data is classified as fault data; while when the fault prediction data is equal to or higher than the threshold, the corresponding data is classified as healthy data.
[0032] Step 140: Input the fault prediction result into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0033] Specifically, a BP neural network is a feedforward neural network algorithm trained using backpropagation. BP neural networks can learn and model complex nonlinear relationships, thus finding wide application in pattern recognition, classification, regression, and time series prediction. The fault prediction data, categorized as fault data, is input into a fault diagnosis model to analyze the causes of the faults and obtain fault analysis results.
[0034] In this embodiment, the safety instrumented system is periodically monitored to obtain system operation data. This data is then input into a fault prediction model built based on an improved GRBT regression tree algorithm to obtain fault prediction data. This model can handle complex and nonlinear relationships, thereby more accurately predicting potential system faults. The fault prediction data is compared with equipment health probability thresholds, and the fault prediction results are then input into a fault diagnosis model built based on a BP neural network to obtain fault analysis results. This model can efficiently distinguish different types of faults and provide more accurate fault analysis results.
[0035] Optionally, before inputting the system operation data into the fault prediction model to obtain fault prediction data, the method further includes: Obtain initial system operation data; The initial system operation data is preprocessed to obtain preprocessed system operation data; Based on principal component analysis, low-dimensional spatial feature data are obtained by dimensionality reduction, sorting, and filtering of the preprocessing system's operating data. Principal component feature data are obtained by filtering the low-dimensional spatial feature data according to a preset principal component analysis threshold. The system operation data is obtained by performing sample mapping on the principal component feature data; The system operation data is as follows: , , in, For the system operation data, This refers to sample data from the system's operational data. For the i-th mapped sample, It is the transpose matrix. These are the principal component feature data.
[0036] Optionally, the step of preprocessing the initial system operating data to obtain preprocessed system operating data includes: The initial system operation data is standardized to obtain standardized sample features; The standardized sample features are as follows: , in, Let X be the standardized sample feature, and let X be the initial system operating data. The mean, For variance; The preprocessing system operation data is obtained based on the standardized sample characteristics.
[0037] Specifically, we set the mean of each feature to 0 and the standard deviation to 1, and then scale the features to the same scale for comparison. Let the sample features be X: {X1, X2, ..., X...} n}, The mean, The variance is used to calculate the standardized sample features; The standardized sample features are as follows: , in, X represents the standardized sample features, and X represents the initial system operating data.
[0038] The covariance matrix Cov(Xs) of the sample features is calculated, and the correlation between features is described by the covariance: , Where n is the number of samples.
[0039] Calculate the eigenvalues of the covariance matrix and eigenvectors The direction used to characterize the maximum variance in the data is .
[0040] Sort the eigenvalues according to their magnitude. Select the eigenvectors corresponding to the first k eigenvalues. As principal components, they form a new low-dimensional space. A threshold can be set to retain features with higher information content as principal components. This step involves data cleaning to augment the main components of the features; the process is as follows: .
[0041] remember For matrix W, for each sample with principal component features, map it to a new sample. The mapped sample is: , in, For the i-th mapped sample, It is the transpose matrix. Using the principal component feature data, the system operation data is obtained by traversing all samples, i.e., the mapped sample set. .
[0042] In this optional embodiment, under a single fault condition, a large number of diagnostic values fluctuate smoothly, and their derivatives approach 0. Existing data processing methods would result in a feature matrix with high dimensionality and sparsity. This invention, by introducing Principal Component Analysis (PCA) in the data preprocessing stage, performs dimensionality reduction analysis on the data, effectively reducing the data dimensionality and providing important support in the data preprocessing stage, thereby improving the effectiveness of subsequent analysis.
[0043] Optionally, the fault prediction model construction process includes: Obtain a fault prediction training dataset, which includes historical system operation data and corresponding historical fault prediction data; An initial regression tree model based on the improved GRBT regression tree algorithm is constructed, and the initial regression tree model is trained and optimized based on the fault prediction training dataset. The adjusted initial regression tree model is then used as the fault prediction model.
[0044] Specifically, the fault prediction model can be approximated as a binary classification model. Data collected through fault insertion can be considered fault data, while data from the power-on operation of the health card can be considered health data. Therefore, the goal of training the fault prediction model is to classify real-time monitoring data during system operation and determine whether the system is currently in a faulty or healthy state. GRBT is a model with good generalization ability. Although it is often used for regression tasks, by setting a threshold, the regression model can be transformed into a binary classification model, satisfying both generalization requirements and binary classification tasks. First, the first weak learner F0(x) is initialized, and the loss function that minimizes the sum of squared errors is estimated. The minimum constant value is a tree with only one root node, and the weak learner is: , Where c is the predicted value, For the true value, The goal is to find an optimal value of c among all possible constant values that minimizes the objective function.
[0045] For i = 1, 2, ..., N, the response value corresponding to the m-th tree, which is the negative gradient of the loss function, is calculated as follows: , in, Let be the negative gradient value for the i-th sample at the m-th iteration. Current predicted value The loss function between the true value and the actual value, for i=1,2,...,N, uses a CART regression tree to fit the data, obtaining the m-th regression tree, whose corresponding leaf node region is... ,in ,and Let be the number of tree nodes in the m-th regression tree.
[0046] for Leaf node region The best-fit value is calculated using linear search. Minimize the loss function: , in, This is the predicted value at the (m-1)th iteration. This refers to the region corresponding to the j-th leaf node of the m-th tree.
[0047] The initial regression tree model based on the improved GRBT regression tree algorithm, i.e., the expression for the strong learner, is obtained as follows: , in, This is the initial regression tree model.
[0048] Specifically, CART (Classification and Regression Trees) is a decision tree algorithm used to solve classification and regression problems. CART regression trees are an application of the CART algorithm to regression tasks, constructing a regression tree by recursively partitioning the dataset into subsets to minimize the variance of the target variable.
[0049] In some more specific embodiments, the fault prediction training dataset is primarily acquired based on the TCS-900 system. The TCS-900 system's high-coverage self-diagnostic capabilities allow for the capture of raw data at the device-level granularity using data acquisition tools. The system's high-coverage self-diagnostic items ensure the comprehensiveness and reliability of data acquisition, enabling the detection of almost all potential fault points. A laboratory simulation injection method is used to simulate common field faults and collect corresponding fault source data. First, the range of fault source data to be collected is determined by analyzing the fault characterization of the engineering field. For example, for safety analog input cards, the currently collected faults include sampling circuit faults, power supply circuit faults, and output circuit faults. Then, an experimental platform is built to simulate the field process loop. The simulation should realistically reproduce various conditions and parameters in the actual working environment to ensure the data accurately reflects the actual field conditions. Faults are injected into the experimental platform, and the aforementioned data acquisition tools are used to collect fault data. The injected data mainly includes one-time fault data collection: simulating random device failures through open circuits, short circuits, etc.; gradual fault data collection: simulating resistance parameter drift and power supply voltage output errors through sliding rheostats and adjustable power supplies; and intermittent fault data collection: collecting data such as communication faults and output jitter by repeatedly touching wires to create poor contact changes.
[0050] In some more specific embodiments, one-time faults are used to represent faults caused by component failures or software defects. These faults are typically detected directly through diagnostics, indicator lights, or event logging. Due to the randomness of electronic component failures, early detection is impossible, and these faults may be difficult to predict. The best approach is to consider preventing the fault from spreading and causing more serious consequences after it occurs. Examples include open circuits, short circuits, and no output fault modes. Intermittent faults are used to represent faults that occur in cards that have been used in the field for a long time due to external environmental interference (high temperature, low temperature, corrosion, vibration, etc.). These faults may not occur consistently and may be triggered occasionally under specific conditions, becoming increasingly severe over time. For these types of faults, the goal is to capture the early sub-health state of the equipment and establish a fault prediction model based on the changing trends of internal system characteristics. This allows for early warning of faults to field personnel, avoiding downtime for maintenance and ensuring economic efficiency. Examples include poor contact, soft failures, signal abrupt changes, insufficient design tolerance, and critical diagnostic thresholds. Gradual failures are used to indicate that the performance of a component with a quantifiable degradation trend gradually changes due to its own performance degradation or external environmental interference. Because there is a gradual change process, such as: resistance parameter drift, output voltage change.
[0051] In this optional embodiment, an initial regression tree model is constructed based on the improved GRBT regression tree algorithm, which intuitively demonstrates the decision-making process, predicts fault conditions, and improves the accuracy of prediction results.
[0052] Optionally, the comparison result includes health data and fault data, and the comparison result obtained by comparing the fault prediction data with the equipment health probability threshold includes: The fault prediction data is transformed using the sigmoid activation function to obtain the fault estimation probability. The sigmoid activation function is: , Among them, F p Estimate the probability of the aforementioned fault. For the fault prediction data, The exponential function of the fault prediction data; When the estimated probability of the fault is less than the device health probability threshold, the corresponding fault prediction data is used as the fault data. When the estimated probability of failure is greater than or equal to the device health probability threshold, the corresponding fault prediction data is used as the health data.
[0053] Specifically, activation functions are a crucial component of neural networks, used to introduce nonlinear characteristics, enabling the network to learn and model complex nonlinear relationships. Activation functions are typically applied to the output of each neuron, transforming the input signal into the output signal. The sigmoid activation function is a commonly used nonlinear activation function, widely applied in neural networks and machine learning models. The regression values learned by the strong learner are transformed using the sigmoid activation function to complete the binary classification task. This represents the probability that the regression value calculated by the strong learner is a "healthy" sample in the sample set. When the probability falls below a certain threshold, the system is considered to have entered a fault state, and the corresponding sample features are then fed into the fault diagnosis model.
[0054] Optionally, the fault diagnosis model construction process includes: Obtain a fault diagnosis training dataset, which includes historical fault prediction data and corresponding historical fault analysis results; Based on the forward propagation algorithm, an initial BP neural network model is trained using the fault diagnosis training dataset to obtain a trained BP neural network model. Based on the backpropagation algorithm, the error gradient is obtained from the trained BP neural network model, and the trained BP neural network model is updated using the error gradient until the preset training requirements are met, thus obtaining the fault diagnosis model.
[0055] Optionally, the step of training the initial BP neural network model using the fault diagnosis training dataset to obtain the trained BP neural network model includes: The trained BP neural network model is obtained by training the initial BP neural network model using the fault diagnosis training dataset. The weighted sum of the inputs and the output value of the trained BP neural network model are respectively: , , Among them, I j The weighted sum of the inputs to the j-th neuron, O j For the output value of the j-th neuron, O i Let i be the output value of the i-th neuron. Let be the weights from the i-th neuron to the j-th neuron. Let i be the parameter of the j-th neuron, i = j - 1.
[0056] Specifically, after identifying a potential system failure, directional fault localization is required to provide corresponding pre-maintenance recommendations for the modules. The fault diagnosis model can be approximated as a multi-classification model, aiming to establish a mapping relationship between fault data sources and multiple fault representations. Therefore, a BP neural network model is used to solve this classification problem. Initialized weights and biases are used as basic network parameters, which will be used in the calculation of each node. Let the weight values be... The bias value is ,make The initial fault diagnosis model is used to represent the construction of a backpropagation neural network (BP neural network) model with error backpropagation capability, and sets the number of neurons in its input, output, and hidden layers, the transfer function of each layer, and the network training parameters, etc.
[0057] Forward propagation refers to calculating the output value of each neuron layer by layer from the input layer to the output layer. Samples are input into the network, and forward propagation is achieved by calculating the output of each node. The input of each node is the output of the node in the previous layer; the output of the node is obtained by weighted summation and applying an activation function. The number of nodes in the forward propagation is generally adapted to the number of input features. Activation function types include the Sigmoid function, Tanh function, and ReLU function. Because the network in this invention is relatively deep, the ReLU function is used as the activation function for the input layer and hidden layers to accelerate propagation. The calculation process of forward propagation is as follows: Let the weighted sum of the neuron inputs be... The output value is .
[0058] , , in, This is the weighted sum of the inputs to the j-th neuron. The output value of the j-th neuron. Let i be the output value of the i-th neuron. Let be the weights from the i-th neuron to the j-th neuron. Let i be the bias value of the j-th neuron, i = j - 1.
[0059] The activation function for the output layer is slightly different; the sigmoid function is used as the final output layer activation function to achieve the final multi-object classification task. , in, Let be the probability value of the i-th category.
[0060] Backpropagation is a core algorithm in neural network training. It uses the chain rule to calculate gradients layer by layer from the output layer to the input layer, adjusting the network weights and thresholds according to the error magnitude. The process begins with calculating the error gradient from the output layer, adjusting the weights and thresholds of the output layer using the gradient descent algorithm. Then, the error gradient is calculated layer by layer forward, adjusting the weights and thresholds of the hidden layers until the input layer is reached. This invention uses cross-entropy loss as the loss function. , Where L is the total loss, For real labels, For the probability predicted by the model, use This represents the error value of the j-th node. The calculation method for expanding the intermediate hidden layer nodes is as follows: .
[0061] The network parameters are updated based on the gradients calculated through backpropagation. Gradient descent is typically used to update the weights and biases. Gradient descent updates the parameters based on their gradients, minimizing the error. First, the error value is updated: , in, For learning rate, This represents the amount of weight update; After updating the weight values, the bias values also need to be updated: , in, To update the bias value.
[0062] By repeatedly performing these steps and continuously adjusting the network parameters, the network can gradually learn and approximate the objective function. Each iteration calculates new errors and gradients, and updates the parameters using gradient descent. The iteration process should have a termination condition, typically reaching a maximum number of iterations or terminating when the error change becomes small enough. This invention uses a method that specifies the number of iterations.
[0063] In this optional embodiment, the BP neural network algorithm, through continuous backpropagation and parameter updates, enables the network to approximate the nonlinear function between fault data and features, ultimately achieving a fit between fault data and fault category labels. When fault data is input, it can be identified as one of the known faults.
[0064] like Figure 2 As shown, an embodiment of the present invention provides a safety instrumented system fault prediction device, based on a safety instrumented system, comprising: The system operation data acquisition module 10 is used to acquire system operation data by periodically monitoring the safety instrumented system; The fault prediction data acquisition module 20 is used to input the system operation data into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm. The threshold comparison module 30 is used to compare the fault prediction data with the equipment health probability threshold to obtain a comparison result; The fault analysis result acquisition module 40 is used to input the fault prediction result into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0065] The safety instrumented system fault prediction device of this embodiment is used to implement the safety instrumented system fault prediction method as described above. Its advantages over the prior art are the same as the advantages of the safety instrumented system fault prediction method over the prior art, and will not be repeated here.
[0066] like Figure 3 As shown, an electronic device 300 provided in this embodiment of the invention includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the safety instrumented system fault prediction method as described above when the computer program is executed.
[0067] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed: System operating data is obtained by periodically monitoring the safety instrumented system; The system operation data is input into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The comparison results are obtained by comparing the fault prediction data with the equipment health probability threshold. The fault prediction result is input into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0068] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the safety instrumented system fault prediction method described above.
[0069] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: System operating data is obtained by periodically monitoring the safety instrumented system; The system operation data is input into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The comparison results are obtained by comparing the fault prediction data with the equipment health probability threshold. The fault prediction result is input into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
[0070] The present invention will now be described an electronic device 300 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0071] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0072] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0073] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A method for predicting faults in a safety instrumented system, characterized in that, Based on safety instrumented systems, including: System operating data is obtained by periodically monitoring the safety instrumented system; The system operation data is input into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The comparison results are obtained by comparing the fault prediction data with the equipment health probability threshold. The fault prediction result is input into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
2. The method for predicting faults in a safety instrumented system according to claim 1, characterized in that, Before inputting the system operation data into the fault prediction model to obtain fault prediction data, the method further includes: Obtain initial system operation data; The initial system operation data is preprocessed to obtain preprocessed system operation data; Based on principal component analysis, low-dimensional spatial feature data are obtained by dimensionality reduction, sorting, and filtering of the preprocessing system's operating data. Principal component feature data are obtained by filtering the low-dimensional spatial feature data according to a preset principal component analysis threshold. The system operation data is obtained by performing sample mapping on the principal component feature data; The system operation data is as follows: , , in, For the system operation data, This refers to sample data from the system's operational data. For the i-th mapped sample, It is the transpose matrix. These are the principal component feature data.
3. The method for predicting faults in a safety instrumented system according to claim 2, characterized in that, The process of preprocessing the initial system operating data to obtain preprocessed system operating data includes: The initial system operation data is standardized to obtain standardized sample features; The standardized sample features are as follows: , in, Let X be the standardized sample feature, and let X be the initial system operating data. The mean, For variance; The preprocessing system operation data is obtained based on the standardized sample characteristics.
4. The method for predicting faults in a safety instrumented system according to claim 1, characterized in that, The fault prediction model construction process includes: Obtain a fault prediction training dataset, which includes historical system operation data and corresponding historical fault prediction data; An initial regression tree model based on the improved GRBT regression tree algorithm is constructed, and the initial regression tree model is trained and optimized based on the fault prediction training dataset. The adjusted initial regression tree model is then used as the fault prediction model.
5. The method for predicting faults in a safety instrumented system according to claim 1, characterized in that, The comparison results include health data and fault data. The comparison results obtained by comparing the fault prediction data with a device health probability threshold include: The fault prediction data is transformed using the sigmoid activation function to obtain the fault estimation probability. The sigmoid activation function is: , in, Estimate the probability of the aforementioned fault. For the fault prediction data, The exponential function of the fault prediction data; When the estimated probability of the fault is less than the device health probability threshold, the corresponding fault prediction data is used as the fault data. When the estimated fault probability is greater than or equal to the device health probability threshold, the corresponding fault prediction data is used as the health data.
6. The method for predicting faults in a safety instrumented system according to claim 1, characterized in that, The fault diagnosis model construction process includes: Obtain a fault diagnosis training dataset, which includes historical fault prediction data and corresponding historical fault analysis results. Based on the forward propagation algorithm, an initial BP neural network model is trained using the fault diagnosis training dataset to obtain a trained BP neural network model. Based on the backpropagation algorithm, the error gradient is obtained from the trained BP neural network model, and the trained BP neural network model is updated using the error gradient until the preset training requirements are met, thus obtaining the fault diagnosis model.
7. The method for predicting faults in a safety instrumented system according to claim 6, characterized in that, The step of training an initial BP neural network model using the fault diagnosis training dataset to obtain a trained BP neural network model includes: The trained BP neural network model is obtained by training the initial BP neural network model using the fault diagnosis training dataset. The weighted sum of the inputs and the output value of the trained BP neural network model are respectively: , , in, This is the weighted sum of the inputs to the j-th neuron. The output value of the j-th neuron. Let i be the output value of the i-th neuron. Let be the weights from the i-th neuron to the j-th neuron. Let i be the bias value of the j-th neuron, i = j - 1.
8. A fault prediction device for a safety instrumented system, characterized in that, Based on safety instrumented systems, including: The system operation data acquisition module is used to acquire system operation data by periodically monitoring the safety instrumented system; The fault prediction data acquisition module is used to input the system operation data into the fault prediction model to obtain fault prediction data, wherein the fault prediction model is constructed based on the improved GRBT regression tree algorithm; The threshold comparison module is used to compare the fault prediction data with the equipment health probability threshold to obtain a comparison result; The fault analysis result acquisition module is used to input the fault prediction result into the fault diagnosis model based on the comparison result to obtain the fault analysis result, wherein the fault diagnosis model is constructed based on a BP neural network.
9. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the safety instrumented system fault prediction method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the safety instrumented system fault prediction method as described in any one of claims 1 to 7.
