PLC logic control analysis prediction method and system based on digital twinning

Through the PLC logic control analysis and prediction method based on digital twins, the problem of low real-time in the existing technology is solved, and the accuracy and real-time improvement of PLC logic control analysis and prediction is achieved.

CN119439871AInactive Publication Date: 2025-02-14BEIJING TIANHONG TONGXIN TECH CO LTD

Patent Information

Application Number
CN202510018736.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems with poor real-time performance in real-time acquisition and feedback control, which is difficult to meet the needs of PLC logic controllers to improve control accuracy and speed.

Method used

Using PLC logic control analysis and prediction method based on digital twins, the equipment data is set, the sample set is constructed, the data is preprocessed, the equipment state prediction model is established and the model is trained through neural networks, so as to realize the equipment data at the next moment. Predict and control execution.

Benefits of technology

It improves the accuracy and real-time performance of PLC logic control analysis prediction, and enhances the control accuracy and speed of PLC logic controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119439871A_ABST
    Figure CN119439871A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial data processing, and discloses a PLC logic control analysis and prediction method and system based on digital twinning. The method comprises the following steps: setting a monitoring area, collecting equipment data of monitoring equipment in the monitoring area, constructing a sample set based on the collected equipment data, preprocessing the equipment data in the constructed sample set, and establishing an equipment state prediction model based on the obtained preprocessed equipment data; meanwhile, training the obtained equipment state prediction model through a neural network, obtaining a trained equipment state prediction model, and predicting equipment data at the next moment through digital twinning based on the obtained trained equipment state prediction model and equipment data collected in real time; and control data is set and executed according to the predicted equipment data at the next moment, so that the accuracy of PLC logic control analysis and prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial data processing, and specifically to a PLC logic control analysis and prediction method and system based on digital twins. Background Art

[0002] As the degree of automation in industrial production becomes higher and higher, the requirements for the control accuracy and speed of PCL logic controllers are also increasing. The method of real-time data collection and feedback control has great limitations in some specific places.

[0003] The existing publicly applied patent CN117473252A, the method obtains industrial data through an industrial data acquisition unit, and matches based on the acquired industrial data to determine the data analysis protocol; at the same time, the industrial data is analyzed by determining the data analysis protocol, and the subscribed data in the analyzed industrial data is sent to the data analysis unit; the subscribed data is analyzed by the data analysis unit, and the first sub-data in the subscribed data is sent to the policy execution unit according to the analysis result, and at the same time, based on the preset policy execution trigger condition and the first sub-data, the policy execution unit selects the target policy from multiple candidate policies and executes the target policy, but because it is controlled and executed by real-time acquisition and step-by-step analysis, the real-time performance is not strong and has certain limitations. Summary of the invention

[0004] 1. Technical issues to be resolved In view of the shortcomings of the prior art, the present invention provides a PLC logic control analysis and prediction method and system based on digital twins, which has the advantages of real-time, accuracy, and efficiency, and solves the problem that the feedback control method has great limitations in some specific places.

[0005] (II) Technical solution In order to solve the technical problem that the above feedback control method has great limitations in some specific places, the present invention provides the following technical solutions: The present invention discloses a PLC logic control analysis and prediction method based on digital twin, which specifically comprises the following steps: S1. Set a monitoring area, collect device data of monitoring devices in the monitoring area, and build a sample set based on the collected device data; S2, preprocessing the device data in the constructed sample set to obtain preprocessed device data; S3. Establishing a device status prediction model based on the obtained pre-processed device data; S4. Training the obtained device state prediction model through a neural network to obtain a trained device state prediction model; S5. Based on the trained equipment status prediction model and the real-time collected equipment data, the equipment data at the next moment is predicted through the digital twin; S6. Set control data according to the predicted device data at the next moment and execute.

[0006] The present invention sets a monitoring area, collects equipment data of monitoring equipment in the monitoring area, and constructs a sample set based on the collected equipment data. At the same time, the equipment data in the constructed sample set is preprocessed, and an equipment state prediction model is established based on the preprocessed equipment data. At the same time, the obtained equipment state prediction model is trained through a neural network to obtain a trained equipment state prediction model, and based on the obtained trained equipment state prediction model and the equipment data collected in real time, the equipment data at the next moment is predicted through a digital twin, and then the control data is set and executed according to the predicted equipment data at the next moment, thereby improving the accuracy of PLC logic control analysis and prediction.

[0007] Preferably, the step of setting a monitoring area, collecting device data of monitoring devices in the monitoring area, and constructing a sample set based on the collected device data comprises the following steps: S11, dividing the set monitoring area into nodes and sections, and setting a monitoring gateway at each divided node; S12, each monitoring gateway installs an IoT device at the beginning of the current segment, sets a distance interval in the current segment, and sets n monitoring points according to the distance interval threshold; S13, collecting equipment data of monitoring equipment in the monitoring area in real time through the set monitoring points; The equipment data collected from the monitoring equipment in the monitoring area includes: timestamp, industrial equipment temperature and industrial equipment current.

[0008] The present invention divides a set monitoring area and installs Internet of Things devices in the divided monitoring area, and collects and monitors device data in the monitoring area based on the installed Internet of Things devices, thereby improving the reliability of monitoring in the monitoring area.

[0009] Preferably, the preprocessing of the device data in the constructed sample set to obtain the preprocessed device data comprises the following steps: Setting a sampling period, repeatedly collecting industrial equipment temperature data and industrial equipment current data based on the sampling period, and performing standardization processing on the collected industrial equipment temperature data and industrial equipment current data respectively; The data standardization processing formula is as follows: ; in, represents the data before standardization. Indicates the data after standardization; Indicates the maximum value of the collected data; Indicates the minimum value of the collected data, and the collected data is set to include industrial equipment temperature data and industrial equipment current data; The standardized data is set as the pre-processed device data.

[0010] The present invention pre-processes the device data in the constructed sample set, and makes the device data in the sample set stable and accurate through a standardized processing method, thereby improving the rationality of data analysis.

[0011] Preferably, the establishing of the equipment state prediction model based on the obtained pre-processed equipment data comprises the following steps: In the set monitoring area, the relationship between the temperature change and the current change is recorded in real-time monitoring mode. The current change parameter of the industrial equipment is recorded every time the temperature of the industrial equipment changes by 1°C, and the proportional coefficient between the temperature change and the current change is determined. The equipment status prediction model formula is as follows: ; in, Represents industrial equipment temperature data, Represents industrial equipment current data, Indicates the maximum value in the industrial equipment temperature data. Indicates the minimum value in the temperature data of industrial equipment. Indicates the minimum value in the current data of industrial equipment. Indicates the maximum value in the current data of industrial equipment. Represents the proportionality factor.

[0012] The present invention records the relationship between the temperature change and the current change in a real-time monitoring manner, and simultaneously establishes an equipment state prediction model by model construction, thereby improving the accuracy of state prediction.

[0013] Preferably, the device state prediction model obtained by the neural network is trained to obtain the trained device state prediction model: S41, selecting part of the device data from the obtained pre-processed device data to construct a training set; S42, inputting the device data in the training set into the BP neural network, and performing training through the BP neural network; S43. After the training is completed, the trained device status prediction model is output.

[0014] Preferably, the step of inputting the device data in the training set into the BP neural network and training the BP neural network comprises the following steps: The structure of the BP neural network is set to include: input layer, hidden layer and output layer; Set the input layer to ,in Indicates the first industrial equipment temperature data input, Represents the input temperature data of the mth industrial equipment, and the output of the output layer is ,in The first predicted industrial equipment current data representing the output, Represents the output of the sth predicted industrial equipment current data, the hidden layer contains q neurons, v is the weight from the input layer to the hidden layer, and w is the weight from the hidden layer to the output layer; The process of BP neural network includes two stages: forward propagation of signal and back propagation of error; The forward propagation of the signal is that the data is input from the input layer, passes through the hidden layer, and finally reaches the output layer; The back propagation of the error is that the data goes from the output layer to the hidden layer and finally to the input layer, and the weights from the hidden layer to the output layer and the weights from the input layer to the hidden layer are adjusted in turn; The calculation formula for the forward propagation of the signal is: The calculation formula for transmitting industrial equipment temperature data from the input layer to the hidden layer is: ; in, represents the input of the hth hidden layer neuron, represents the weight of the i-th input of the input layer to the h-th hidden layer neuron, and m represents the number of input data of the input layer; Represents the i-th input of the input layer; Represents the bias value of the hth hidden layer neuron; The calculation formula for transferring parameter data from the hidden layer to the output layer is: ; in, represents the input of the jth output layer neuron, represents the weight from the hth hidden layer neuron to the jth output layer neuron, and q represents the number of hidden layer neurons; represents the output of the hth hidden layer neuron; represents the bias value of the jth output layer neuron; After receiving the industrial equipment temperature data transmitted by the hidden layer, the output layer outputs the industrial equipment temperature data received from the hidden layer through the equipment state prediction model; Right now , represents the output of the j-th output layer neuron, representing the j-th predicted industrial equipment current data; Calculate the error between the output layer and the expected value, set the error threshold between the output layer and the expected value, and when the error between the output layer and the expected value is greater than or equal to the set error threshold, adjust the weight from the hidden layer to the output layer and the weight from the input layer to the hidden layer in turn through the back propagation stage of the error; The error calculation formula is as follows: ; Where E is the error, is the expected value of the jth output, and n is the number of output neurons; The calculation formula for weight adjustment is as follows: ; in, represents the weight adjustment value, l represents the learning rate, E represents the error, and y represents the output of the output layer.

[0015] Preferably, outputting the trained device state prediction model after the training is completed comprises the following steps: The trained device status prediction model is as follows: .

[0016] The present invention constructs a training set by selecting part of the equipment data from the obtained preprocessed equipment data, inputs the equipment data in the training set into the BP neural network, and trains through the forward propagation method of the BP neural network and the back propagation method of the error, thereby improving the prediction efficiency of the equipment state prediction model.

[0017] Preferably, the predicting of the device data at the next moment by digital twin based on the obtained trained device state prediction model and the real-time collected device data comprises the following steps: S51, inputting the real-time collected device data into the trained device state prediction model to obtain a set of device data predicted at the next moment; S52, calculating the one-step state transition probability of each set of predicted device data based on the device data set predicted at the next moment; S53. Set the device data with the highest probability as the device data at the next moment.

[0018] Preferably, the step of calculating the one-step state transition probability of each set of predicted device data based on the device data set predicted at the next moment comprises the following steps: The calculation of one-step state transition probability is as follows: One-step state transition probability distribution:

[0019] in, is the probability distribution of one-step state transition, Indicates real-time collection of device data The state is processed by the reward function and reaches the device data The probability of the state, represents the reward function, , Indicates the real-time data collection status of the device Execute control actions The reward value at that time.

[0020] The present invention summarizes the device data set predicted at the next moment and calculates the one-step state transition probability of each set of predicted device data, and selects the device data with the highest probability as the predicted device data, thereby improving the real-time performance of PLC logic control analysis and prediction.

[0021] The present invention also discloses a PLC logic control analysis and prediction system based on digital twins, which is used to implement a PLC logic control analysis and prediction method based on digital twins. The system includes: a data acquisition module, a data processing module, a prediction model construction module, a neural network training module, a digital twin prediction module, and a control execution module; The data acquisition module is used to collect equipment data of monitoring equipment in the monitoring area; The data processing module is used to process the collected device data; The prediction model building module is used to establish a device state prediction model based on the obtained pre-processed device data; The neural network training module is used to train the obtained equipment state prediction model through a neural network; The digital twin prediction module is used to predict the equipment data at the next moment; The control execution module is used to set and execute control data according to the predicted device data at the next moment.

[0022] (III) Beneficial effects Compared with the prior art, the present invention provides a PLC logic control analysis and prediction method and system based on digital twins, which has the following beneficial effects: 1. The invention sets a monitoring area, collects equipment data of the monitoring equipment in the monitoring area, and constructs a sample set based on the collected equipment data. At the same time, the equipment data in the constructed sample set is preprocessed, and an equipment state prediction model is established based on the preprocessed equipment data. At the same time, the obtained equipment state prediction model is trained through a neural network to obtain a trained equipment state prediction model, and based on the obtained trained equipment state prediction model and the equipment data collected in real time, the equipment data at the next moment is predicted through a digital twin, and then the control data is set and executed according to the predicted equipment data at the next moment, thereby improving the accuracy of PLC logic control analysis and prediction.

[0023] 2. The invention divides the set monitoring area and installs Internet of Things devices in the divided monitoring area. At the same time, the device data in the monitoring area is collected and monitored based on the installed Internet of Things devices, thereby improving the reliability of monitoring in the monitoring area.

[0024] 3. The present invention pre-processes the device data in the constructed sample set and makes the device data in the sample set stable and accurate through standardized processing, thereby improving the rationality of data analysis.

[0025] 4. The invention records the relationship between temperature change and current change by real-time monitoring, and at the same time establishes a device state prediction model by model construction, thereby improving the accuracy of state prediction.

[0026] 5. The invention constructs a training set by selecting part of the equipment data from the preprocessed equipment data, inputs the equipment data in the training set into the BP neural network, and trains through the forward propagation method of the BP neural network and the back propagation method of the error, thereby improving the prediction efficiency of the equipment state prediction model.

[0027] 6. The invention summarizes the device data set predicted at the next moment, calculates the one-step state transition probability of each set of predicted device data, selects the device data with the highest probability as the predicted device data, and improves the real-time performance of PLC logic control analysis and prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of the PLC logic control analysis and prediction process structure of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Example 1 See also Figure 1 This embodiment discloses a PLC logic control analysis and prediction method based on digital twin, which specifically includes the following steps: S1. Set a monitoring area, collect device data of monitoring devices in the monitoring area, and build a sample set based on the collected device data; S2, preprocessing the device data in the constructed sample set to obtain preprocessed device data; S3. Establishing a device status prediction model based on the obtained pre-processed device data; S4. Training the obtained device state prediction model through a neural network to obtain a trained device state prediction model; S5. Based on the trained equipment status prediction model and the real-time collected equipment data, the equipment data at the next moment is predicted through the digital twin; S6. Setting control data according to the predicted device data at the next moment and executing; For further information, see Figure 1 , setting a monitoring area, collecting device data of monitoring devices in the monitoring area, and constructing a sample set based on the collected device data includes the following steps: S11, dividing the set monitoring area into nodes and sections, and setting a monitoring gateway at each divided node; S12, each monitoring gateway installs an IoT device at the beginning of the current segment, sets a distance interval in the current segment, and sets n monitoring points according to the distance interval threshold; S13, collecting equipment data of monitoring equipment in the monitoring area in real time through the set monitoring points; The equipment data of the monitoring equipment in the collected monitoring area includes: timestamp, industrial equipment temperature and industrial equipment current; For further information, see Figure 1 , preprocessing the device data in the constructed sample set, and obtaining the preprocessed device data includes the following steps: Setting a sampling period, repeatedly collecting industrial equipment temperature data and industrial equipment current data based on the sampling period, and performing standardization processing on the collected industrial equipment temperature data and industrial equipment current data respectively; The data standardization processing formula is as follows: ; in, represents the data before standardization. Indicates the data after standardization; Indicates the maximum value of the collected data; Indicates the minimum value of the collected data, and the collected data is set to include industrial equipment temperature data and industrial equipment current data; Set the standardized data as the pre-processed device data; For further information, see Figure 1 , based on the obtained pre-processed equipment data, establishing the equipment status prediction model includes the following steps: In the set monitoring area, the relationship between the temperature change and the current change is recorded in real-time monitoring mode. The current change parameter of the industrial equipment is recorded every time the temperature of the industrial equipment changes by 1°C, and the proportional coefficient between the temperature change and the current change is determined. The equipment status prediction model formula is as follows: ; in, Represents industrial equipment temperature data, Represents industrial equipment current data, Indicates the maximum value in the industrial equipment temperature data. Indicates the minimum value in the temperature data of industrial equipment. Indicates the minimum value in the current data of industrial equipment. Indicates the maximum value in the current data of industrial equipment. represents the proportionality coefficient; For further information, see Figure 1 , training the obtained equipment state prediction model through a neural network, and obtaining a trained equipment state prediction model; S41, selecting part of the device data from the obtained pre-processed device data to construct a training set; S42, inputting the device data in the training set into the BP neural network, and performing training through the BP neural network; The structure of the BP neural network is set to include: input layer, hidden layer and output layer; Set the input layer to ,in Indicates the first industrial equipment temperature data input, Represents the input temperature data of the mth industrial equipment, and the output of the output layer is ,in The first predicted industrial equipment current data representing the output, Represents the output of the sth predicted industrial equipment current data, the hidden layer contains q neurons, v is the weight from the input layer to the hidden layer, and w is the weight from the hidden layer to the output layer; Furthermore, the process of BP neural network includes two stages: forward propagation of signal and back propagation of error; The forward propagation of the signal is that the data is input from the input layer, passes through the hidden layer, and finally reaches the output layer; The back propagation of the error is that the data goes from the output layer to the hidden layer and finally to the input layer, and the weights from the hidden layer to the output layer and the weights from the input layer to the hidden layer are adjusted in turn; The calculation formula for the forward propagation of the signal is: The calculation formula for transmitting industrial equipment temperature data from the input layer to the hidden layer is: ; in, represents the input of the hth hidden layer neuron, represents the weight of the i-th input of the input layer to the h-th hidden layer neuron, and m represents the number of input data of the input layer; Represents the i-th input of the input layer; Represents the bias value of the hth hidden layer neuron; The calculation formula for transferring parameter data from the hidden layer to the output layer is: ; in, represents the input of the jth output layer neuron, represents the weight from the hth hidden layer neuron to the jth output layer neuron, and q represents the number of hidden layer neurons; represents the output of the hth hidden layer neuron; represents the bias value of the jth output layer neuron; After receiving the industrial equipment temperature data transmitted by the hidden layer, the output layer outputs the industrial equipment temperature data received from the hidden layer through the equipment state prediction model; Right now , represents the output of the j-th output layer neuron, representing the j-th predicted industrial equipment current data; Calculate the error between the output layer and the expected value, set the error threshold between the output layer and the expected value, and when the error between the output layer and the expected value is greater than or equal to the set error threshold, adjust the weight from the hidden layer to the output layer and the weight from the input layer to the hidden layer in turn through the back propagation stage of the error; The error calculation formula is as follows: ; Where E is the error, is the expected value of the jth output, and n is the number of output neurons; The calculation formula for weight adjustment is as follows: ; in, represents the weight adjustment value, l represents the learning rate, E represents the error, and y represents the output of the output layer; S43, after the training is completed, the trained device state prediction model is output; The trained device status prediction model is as follows: ; For further information, see Figure 1 Based on the trained equipment status prediction model and the real-time collected equipment data, the digital twin is used to predict the equipment data at the next moment, including the following steps: S51, inputting the real-time collected device data into the trained device state prediction model to obtain a set of device data predicted at the next moment; S52, calculating the one-step state transition probability of each set of predicted device data based on the device data set predicted at the next moment; The calculation of one-step state transition probability is as follows: One-step state transition probability distribution:

[0031] in, is the probability distribution of one-step state transition, Indicates real-time collection of device data The state is processed by the reward function and reaches the device data The probability of the state, represents the reward function, , Indicates the real-time data collection status of the device Execute control actions The reward value at time S53, setting the device data with the highest probability as the device data at the next moment; Example 2 See also Figure 1, this embodiment also discloses a PLC logic control analysis and prediction system based on digital twins, which is used to implement a PLC logic control analysis and prediction method based on digital twins. The system includes: a data acquisition module, a data processing module, a prediction model building module, a neural network training module, a digital twin prediction module, and a control execution module; The data acquisition module is used to collect equipment data of monitoring equipment in the monitoring area; The data processing module is used to process the collected device data; The prediction model building module is used to establish a device state prediction model based on the obtained pre-processed device data; The neural network training module is used to train the obtained equipment state prediction model through a neural network; The digital twin prediction module is used to predict the equipment data at the next moment; The control execution module is used to set and execute control data according to the predicted device data at the next moment.

[0032] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A PLC logic control analysis and prediction method based on digital twin, characterized in that: The following steps are involved: S1. Set a monitoring area, collect device data of monitoring devices in the monitoring area, and build a sample set based on the collected device data; S2, preprocessing the device data in the constructed sample set to obtain preprocessed device data; S3. Establishing a device status prediction model based on the obtained pre-processed device data; S4. Training the obtained device state prediction model through a neural network to obtain a trained device state prediction model; S5. Based on the trained equipment status prediction model and the real-time collected equipment data, the equipment data at the next moment is predicted through the digital twin; S6. Set control data according to the predicted device data at the next moment and execute.

2. According to a PLC logic control analysis and prediction method based on digital twinning according to claim 1, it is characterized in that: The step of setting a monitoring area, collecting device data of monitoring devices in the monitoring area, and constructing a sample set based on the collected device data includes the following steps: S11, dividing the set monitoring area into nodes and sections, and setting a monitoring gateway at each divided node; S12, each monitoring gateway installs an IoT device at the beginning of the current segment, sets a distance interval in the current segment, and sets n monitoring points according to the distance interval threshold; S13, collecting equipment data of monitoring equipment in the monitoring area in real time through the set monitoring points; The equipment data collected from the monitoring equipment in the monitoring area includes: timestamp, industrial equipment temperature and industrial equipment current.

3. According to a PLC logic control analysis and prediction method based on digital twinning according to claim 1, it is characterized in that: The preprocessing of the device data in the constructed sample set to obtain the preprocessed device data comprises the following steps: A sampling period is set, and the temperature data and the current data of the industrial equipment are repeatedly collected based on the sampling period, and the collected temperature data and the current data of the industrial equipment are respectively standardized; The data standardization processing formula is as follows: ; in, represents the data before standardization. Indicates the data after standardization; Indicates the maximum value of the collected data; Indicates the minimum value of the collected data, and the collected data is set to include industrial equipment temperature data and industrial equipment current data; The standardized data is set as the pre-processed device data.

4. According to a PLC logic control analysis and prediction method based on digital twinning according to claim 1, it is characterized in that: The establishment of the equipment state prediction model based on the obtained pre-processed equipment data comprises the following steps: In the set monitoring area, the relationship between the temperature change and the current change is recorded in real-time monitoring mode. The current change parameter of the industrial equipment is recorded every time the temperature of the industrial equipment changes by 1°C, and the proportional coefficient between the temperature change and the current change is determined; The equipment status prediction model formula is as follows: ; in, Represents industrial equipment temperature data, Represents industrial equipment current data, Indicates the maximum value in the industrial equipment temperature data. Indicates the minimum value in the temperature data of industrial equipment. Indicates the minimum value in the current data of industrial equipment. Indicates the maximum value in the current data of industrial equipment. Represents the proportionality factor.

5. The PLC logic control analysis and prediction method based on digital twin according to claim 1 is characterized in that: The device state prediction model obtained is trained by the neural network to obtain the trained device state prediction model: S41, selecting part of the device data from the obtained pre-processed device data to construct a training set; S42, inputting the device data in the training set into the BP neural network, and training the BP neural network; S43. After the training is completed, the trained device state prediction model is output.

6. The PLC logic control analysis and prediction method based on digital twin according to claim 5 is characterized in that: The step of inputting the equipment data in the training set into the BP neural network and training the BP neural network comprises the following steps: The structure of the BP neural network is set to include: input layer, hidden layer and output layer; Set the input layer to ,in Indicates the first industrial equipment temperature data input, Represents the input temperature data of the mth industrial equipment, and the output of the output layer is ,in The first predicted industrial equipment current data representing the output, Represents the output of the sth predicted industrial equipment current data, the hidden layer contains q neurons, v is the weight from the input layer to the hidden layer, and w is the weight from the hidden layer to the output layer; The process of BP neural network includes two stages: forward propagation of signal and back propagation of error; The forward propagation of the signal is that the data is input from the input layer, passes through the hidden layer, and finally reaches the output layer; The back propagation of the error is that the data goes from the output layer to the hidden layer and finally to the input layer, and the weights from the hidden layer to the output layer and the weights from the input layer to the hidden layer are adjusted in turn; The calculation formula for the forward propagation of the signal is: The calculation formula for transmitting industrial equipment temperature data from the input layer to the hidden layer is: ; in, represents the input of the hth hidden layer neuron, represents the weight of the i-th input of the input layer to the h-th hidden layer neuron, and m represents the number of input data of the input layer; Represents the i-th input of the input layer; Represents the bias value of the hth hidden layer neuron; The calculation formula for transferring parameter data from the hidden layer to the output layer is: ; in, represents the input of the jth output layer neuron, represents the weight from the hth hidden layer neuron to the jth output layer neuron, and q represents the number of hidden layer neurons; represents the output of the hth hidden layer neuron; represents the bias value of the jth output layer neuron; After receiving the industrial equipment temperature data transmitted by the hidden layer, the output layer outputs the industrial equipment temperature data received from the hidden layer through the equipment state prediction model; Right now , represents the output of the j-th output layer neuron, representing the j-th predicted industrial equipment current data; Calculate the error between the output layer and the expected value, set the error threshold between the output layer and the expected value, and when the error between the output layer and the expected value is greater than or equal to the set error threshold, adjust the weight from the hidden layer to the output layer and the weight from the input layer to the hidden layer in turn through the back propagation stage of the error; The error calculation formula is as follows: ; Where E is the error, is the expected value of the jth output, and n is the number of output neurons; The calculation formula for weight adjustment is as follows: ; in, represents the weight adjustment value, l represents the learning rate, E represents the error, and y represents the output of the output layer.

7. The PLC logic control analysis and prediction method based on digital twin according to claim 5 is characterized in that: After the training is completed, outputting the trained device state prediction model includes the following steps: The trained device status prediction model is as follows: 。 8. The PLC logic control analysis and prediction method based on digital twin according to claim 1 is characterized in that: The method of predicting the device data at the next moment through the digital twin based on the trained device state prediction model and the real-time collected device data includes the following steps: S51, inputting the real-time collected device data into the trained device state prediction model to obtain a set of device data predicted at the next moment; S52, calculating the one-step state transition probability of each set of predicted device data based on the device data set predicted at the next moment; S53. Set the device data with the highest probability as the device data at the next moment.

9. The PLC logic control analysis and prediction method based on digital twin according to claim 8 is characterized in that: The step of calculating the one-step state transition probability of each set of predicted device data based on the device data set predicted at the next moment comprises the following steps: The calculation of one-step state transition probability is as follows: One-step state transition probability distribution: ; in, is the probability distribution of one-step state transition, Indicates real-time collection of device data The state is processed by the reward function and reaches the device data The probability of the state, represents the reward function, , Indicates the real-time data collection status of the device Execute control actions The reward value at that time.

10. A system for implementing the PLC logic control analysis and prediction method based on digital twins according to any one of claims 1 to 9, characterized in that: include: Data acquisition module, data processing module, prediction model building module, neural network training module, digital twin prediction module and control execution module; The data acquisition module is used to collect equipment data of monitoring equipment in the monitoring area; The data processing module is used to process the collected device data; The prediction model building module is used to establish a device state prediction model based on the obtained pre-processed device data; The neural network training module is used to train the obtained equipment state prediction model through a neural network; The digital twin prediction module is used to predict the equipment data at the next moment; The control execution module is used to set and execute control data according to the predicted device data at the next moment.

Citation Information

Patent Citations

  • Temperature monitoring and early warning system and method for substation high voltage switch cabinet

    CN108896193A

  • Method for predicting regional electrical fire risks based on edge calculation and neural network

    CN111275270A

  • Electric vehicle charging demand prediction method, system and device based on neural network

    CN111967696A

  • Method and system for monitoring state of frequency converter of wind turbine generator and electronic equipment

    CN114964370A

  • Switch cabinet operation state intelligent monitoring system and method based on IEC61850 communication

    CN118263984A

Cited By

  • Online and offline linkage platform for heating

    CN120351559A