PLC real-time data acquisition optimization method based on edge gateway and edge computing

By deploying marginal gateways and edge calculation in industrial automation production, we can build edge data collection networks and optimize the data sampling frequency of PLC, solve the problems of low real -time data collection efficiency and large resource consumption in existing technology, and achieve efficient, energy saving, energy saving, energy saving. Data collection and processing.

CN119376330AActive Publication Date: 2025-01-28NANJING GUANGJIN TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411407446.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-28
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The prior art is difficult to effectively optimize the real-time data acquisition of PLC in industrial automation production, resulting in data delays and inaccurate acquisition, and high-frequency acquisition consumes a lot of resources and bandwidth.

Method used

By deploying marginal gateways and edge calculations in industrial automation production, the edge data collection network is constructed, data pre -processing, filtering and aggregation, optimizing the data sampling frequency of PLC, and using edge warning thresholds and depth judgment thresholds for important events to detect and process.

Benefits of technology

Realize data pre -processing locally, reduce unnecessary data transmission, reduce bandwidth demand and cloud processing pressure, optimize data collection efficiency, save computing resources and network resources, and improve system resources and response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376330A_ABST
    Figure CN119376330A_ABST
Patent Text Reader

Abstract

The invention discloses a PLC real-time data acquisition optimization method based on an edge gateway and edge computing, and relates to the technical field of data acquisition, and the method comprises the steps: deploying a data collector at each PLC position, calculating the transmission distance between each PLC position and a central cloud processor, and constructing an edge data acquisition network; calculating the relationship between the change rate and the sampling frequency of each type of data, and constructing a data sampling frequency optimization model of the PLC; abnormal types of the PLC are screened by using the important data, and important events of the PLC are searched; after the real-time data change rate is judged through the optimization threshold value, the real-time sampling frequency is optimized; and the cloud processor analyzes and calculates a depth judgment threshold value when the PLC is abnormal by using the equipment data when the PLC is abnormal in the industrial production range, and performs dual abnormality judgment on the PLC by using the edge data collector and the cloud processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data acquisition, and in particular to a PLC real-time data acquisition optimization method based on edge gateway and edge computing. Background Art

[0002] As the complexity of production systems increases, the functions of PLCs are gradually expanding, from the initial switch logic control to gradually covering complex control tasks such as process control and motion control. The data collection capabilities of PLCs have also expanded from simple sensor signal collection to processing large amounts of industrial data. In industrial control scenarios, the purpose of real-time data collection is to monitor the production process, improve production efficiency, ensure equipment operation safety, and optimize the overall production process. With the deepening of industrial automation, especially the introduction of the concept of Industry 4.0, the demand for data collection in factories has gradually expanded from simple periodic collection to the collection of high-frequency, dynamically changing real-time data. Real-time data collection requires processing a large amount of sensor data to ensure its reliability and real-time performance, while also facing the challenge of how to optimize collection efficiency, reduce latency, and reduce resource consumption. With the development of the Industrial Internet of Things, data collection is not limited to local control systems. More and more industrial systems need to transmit data to the cloud for big data analysis, artificial intelligence prediction, and equipment maintenance. However, directly transmitting large amounts of raw data to the cloud will increase the pressure on network bandwidth and cloud computing. In addition, a fixed sampling frequency is often used for data collection today, but the data change rate of the PLC is not constant, which often leads to delayed and inaccurate data, or the collection of a lot of identical data, which greatly consumes cloud computing space. Summary of the invention

[0003] The purpose of the present invention is to provide a PLC real-time data acquisition optimization method based on edge gateway and edge computing to solve the problems raised in the prior art.

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A PLC real-time data acquisition optimization method based on edge gateway and edge computing, the method comprising the following steps:

[0006] S100, collect the location of each PLC in industrial automation production, deploy a data collector at each PLC location, calculate the transmission distance between each PLC location and the central cloud processor, and build an edge data collection network;

[0007] Furthermore, the specific steps for building an edge data collection network are:

[0008] S101. Establish a plane rectangular coordinate system in the industrial automation production area, take the cloud processor as the origin, and collect the position coordinates of each PLC in the industrial automation production in the coordinate system as {(x 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 ),...,(x n ,y n )},(x 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 ),...,(x n ,y n ) represents the position coordinates of the 1st, 2nd, 3rd, ..., nth PLC in the industrial automation production in the coordinate system, and n is a positive integer; a data collector is deployed at the coordinate position of each PLC, and an edge data collection network is constructed by combining the cloud processor and n data collectors;

[0009] S102. After building the edge data collection network, calculate the data transmission distance between each edge data collector and the cloud processor. The formula is: In the formula, L represents the data transmission distance between each edge data collector and the cloud processor in industrial automation production, x and y represent the coordinate position of the PLC in each edge data collector, and the data transmission distance between all PLC edge data collectors and the cloud processor is calculated by the formula {L 1 , L 2 , L 3 ,...,L n}, L 1 , L 2 , L 3 ,...,L n Represents the data transmission distance between the 1st, 2nd, 3rd, ..., nth PLC edge data collector and the cloud processor in the calculated industrial automation production.

[0010] Building an edge data acquisition network in industrial automation production can not only collect and transmit data, but also pre-process, filter and aggregate data locally, reducing unnecessary data transmission, thereby reducing bandwidth requirements and cloud processing pressure; calculating the data transmission distance between each PLC and cloud processor can more clearly calculate the data transmission time and more accurately optimize data latency.

[0011] S200, collecting the sampling frequency of all data of each PLC and the change data of all data by the cloud processor in history, calculating the relationship between the change rate of each data and the sampling frequency, and building a data sampling frequency optimization model for the PLC;

[0012] Furthermore, the specific steps of constructing the PLC data sampling frequency optimization model are as follows:

[0013] S201, when the cloud processor collects all the data of each PLC in the collection history, the change value of each data is {P 1 , P 2 , P 3 , ..., P m}, P 1 , P 2 , P 3 , ..., P m represents the change value of the 1st, 2nd, 3rd, ..., mth type of data collected in each PLC, where m is a positive integer; and the time data when each type of data changes is extracted as {t 1 ,t 2 ,t 3 ,...,t m}, t 1 ,t 2 ,t 3 ,...,t m Indicates the time data when the 1st, 2nd, 3rd, ..., mth data in the PLC changes; uses the linear regression algorithm to analyze the change value and time data of each data, and constructs the correlation function of the change value and time of each data in the PLC as P(t); calculates the correlation function of all data and obtains all correlation functions as {P(t) 1 、P(t) 2 、P(t) 3 , ..., P(t) m}, P(t) 1 、P(t) 2 、P(t) 3 , ..., P(t) m represents the correlation function of the 1st, 2nd, 3rd, ..., mth data in the calculated PLC;

[0014] S202, after calculating the correlation function of each data in the PLC, the correlation function is derived to calculate the change rate of each data, the formula is: In the formula, V represents the rate of change of the calculated data. It means to find the derivative of the correlation function P(t) at t; after m times of calculation, the change rate of each data is {V 1 、V 2 、V3 , ..., V m},V 1 、V 2 、V 3 , ..., V m Indicates the change rate of the 1st, 2nd, 3rd, ..., mth type of data in the calculated PLC;

[0015] S203, extract the lowest sampling frequency reached by the cloud processor when collecting PLC data in the history as f min According to the change rate of each PLC data in history, the optimal relationship between the change rate of each data and the sampling frequency is designed and constructed. The formula is:

[0016] f(t)=f min +k×V;

[0017] In the formula, f(t) represents the optimized sampling frequency, V represents the change rate of each data, and k represents the influence coefficient of the data change rate on the sampling frequency; extract the maximum sampling frequency f of PLC data in the cloud processor in the history max and the maximum change rate v of the data in history max , calculate the coefficient of influence of data change rate on sampling frequency

[0018] After calculating the optimal relationship between each data change rate and sampling frequency, set the optimal limit of each data sampling frequency to f min and f max , using optimization restrictions and optimization relations to build the sampling frequency optimization model for each type of data:

[0019] f(t)=max(f min ,min(f max , f min + k × V));

[0020] In the formula, f(t) represents the optimized sampling frequency, max represents the maximum value of the data in the brackets, min represents the minimum value of the data in the brackets, and |V| represents the absolute value of the change rate of each data; a sampling frequency optimization model for each data in the PLC is constructed.

[0021] By using historical data to analyze the relationship between the PLC data change rate and the sampling frequency, a sampling frequency optimization model is constructed to optimize the PLC data sampling frequency according to demand and real-time conditions, avoiding unnecessary high-frequency acquisition, thereby greatly reducing the amount of data. It not only reduces the pressure on data storage, but also reduces the burden of data transmission. When the system data changes slowly or stably, reducing the sampling frequency can reduce the use of processors, memory, and bandwidth, save computing resources, and reduce system load; when the data changes quickly or key events occur, dynamic sampling rate adjustment can quickly increase the sampling frequency, capture more detailed changes, and ensure that the system can respond in time. This is especially important for scenarios with high real-time requirements such as industrial control and fault detection.

[0022] S300, the cloud processor collects data from the PLC in the collection history, and determines the data values ​​when different types of abnormalities occur in the PLC, analyzes the data collected for each type of abnormality, finds the data that affects the abnormality of the PLC as important data, uses the important data to filter the types of abnormalities that occur in the PLC, and finds important events of the PLC;

[0023] Furthermore, the specific steps for finding important events of PLC are:

[0024] S301. In the collection history, the cloud processor collects data from the PLC and determines the data value when different types of abnormalities occur in the PLC. Suppose the change amount of all PLC data collected when each abnormality occurs is {B 1 , B 2 , B 3 , ..., B u}, B 1 , B 2 , B 3 , ..., B u Indicates the changes in the 1st, 2nd, 3rd, ..., uth types of PLC data when each abnormality is collected, where u is a positive integer; judge the changes in all collected data, and extract the data type with the largest change as the characteristic data of the abnormality; similarly, extract the characteristic data of each abnormality in the history;

[0025] S302, after extracting all abnormal feature data of each PLC, collect the abnormal data of changes when equipment failure occurs in the industrial automation generation in history as {D 1 , D 2 , D 3 ,...,D h},

[0026] D 1 , D 2 , D 3 ,...,D hIndicates the 1st, 2nd, 3rd, ..., hth abnormal data that have changed when equipment failure and shutdown occurred in the industrial automation generation in the collected history, where h is a positive integer; the characteristic data of each abnormality of PLC is searched in the collected abnormal data of equipment failure and shutdown, and the characteristic data existing in the abnormal data of equipment failure and shutdown is judged as important data of PLC;

[0027] S303. According to the searched important data of the PLC, select the PLC abnormality type corresponding to the important data as the important event of the PLC to form an important event database.

[0028] Important event detection can identify anomalies or important changes in the system in real time, enabling the system to respond quickly when an event occurs, issue warnings, make adjustments, or take corrective measures. It also enables the system to focus on processing data at critical moments rather than continuously processing all data. The system only allocates more resources for processing when important events are detected, effectively reducing the processing overhead of invalid data and saving computing, storage, and network resources. When the system detects an important event, it can dynamically increase the sampling frequency of data collection to capture more detailed data; at irrelevant times, it can reduce the sampling frequency to save resources. This on-demand sampling mechanism greatly improves the resource utilization of the system.

[0029] S400, calculating the optimized threshold of the PLC sampling frequency according to the transmission distance between each PLC and the cloud processor; using the edge data collection network to collect data from the PLC at each location, calculating the real-time data change rate, and optimizing the real-time sampling frequency after judging the real-time data change rate using the optimized threshold;

[0030] Furthermore, the specific steps for optimizing the real-time sampling frequency are as follows:

[0031] S401, collect the data sampling frequency and data change cycle when the cloud processor collects each PLC data with delay in history, and calculate the optimization threshold value in combination with the data transmission distance between each PLC and the cloud processor. The formula is: In the formula, In represents the optimization threshold of each PLC, P y Indicates the data sampling frequency when the cloud processor collects each PLC data with delay in the collected history, T y represents the data change cycle when the cloud processor collects each PLC data with a delay in the collected history, L represents the data transmission distance between each PLC and the cloud processor, V c Indicates the data transmission speed; the optimization threshold of each PLC is calculated by formula;

[0032] S402, using the edge data collector of each PLC to collect the real-time data of the PLC, extracting the real-time change period of the data as Ts and the real-time sampling frequency as Ps, calculating the real-time difference between the change period and the sampling frequency as Cc, and when Cc≥In, judging that the real-time sampling frequency of the PLC needs to be optimized, and when Cc<In, judging that the real-time sampling frequency of the PLC does not need to be optimized;

[0033] S403. Calculate the real-time PLC data change rate Vs based on the collected PLC data change value and the derivative of the change period, optimize the sampling frequency of the PLC that needs to be optimized, input the calculated real-time data change rate into the sampling frequency optimization model, and obtain the optimized sampling frequency f(t); use the optimized sampling frequency f(t) to sample and collect the PLC data.

[0034] S500, in the edge data collection network, the data change rate of each PLC when an abnormality occurs in history is used to calculate the abnormal sampling frequency using the abnormal change rate, and the abnormal sampling frequency is used as the edge warning threshold; the cloud processor uses the device data of all PLCs in the industrial production range when an abnormality occurs to analyze and calculate the depth judgment threshold of the PLC abnormality;

[0035] Furthermore, the specific steps for calculating the edge warning threshold and depth judgment threshold of PLC are as follows:

[0036] S501. Collect the characteristic data of PLC anomalies in history, extract the data change amount and change cycle of each abnormal characteristic data when the abnormality occurs in history, and calculate the change rate of the characteristic data as Ve. In the edge data acquisition network, use the change rate of the data when each PLC abnormality occurs in history to calculate the abnormal sampling frequency. The formula is: Py = f min +k×Ve, where Py represents the calculated abnormal sampling frequency, and the edge warning threshold is calculated using the abnormal sampling frequency. The formula is: In_p=Py_p-Py_st, where In_p represents the calculated edge warning threshold, Py_p represents the average value of all calculated data abnormal sampling frequencies, and Py_st represents the standard deviation of all calculated data sampling frequencies;

[0037] S502. Collect the data value Z of the important data found in S302 when equipment failure occurs in the industrial automation generation in the history, and calculate the depth judgment threshold of the PLC. The formula is: Ins=Zp-Zst, where Ins represents the calculated depth judgment threshold of the PLC, Zp represents the average value of all the important data collected in the history, and Zst represents the standard deviation of all the important data collected in the history.

[0038] S600, using the edge data collection network to collect data from each PLC, and determine whether the PLC has an abnormality and issue a preliminary warning; determine the abnormality that has occurred, and when it is an important event, use the edge gateway to transmit the collected important data to the cloud processor;

[0039] Furthermore, the specific steps for determining whether an abnormality occurs in the PLC and providing a preliminary warning are as follows:

[0040] S601, using the edge data acquisition network to collect all feature data of each PLC according to the optimized sampling frequency, the real-time feature data is {Te 1 、Te 2 、Te 3 、...、Te g},Te 1 、Te 2 、Te 3 、...、Te g Indicates the first, second, third, ..., g types of real-time feature data collected. The real-time feature data is judged using the edge warning threshold. When Te<In_p, the PLC is judged to be working normally; when Te≥In_p, the PLC is judged to have an abnormal risk and a preliminary warning is issued;

[0041] S602. After determining that the PLC has an abnormal risk and issuing a preliminary warning, search in the important event database according to the type of abnormality in the warning. When the abnormality type of the preliminary warning is an important event, the collected real-time feature data is transmitted to the cloud processor as important data.

[0042] After S700 and the cloud processor receive the important data transmitted by the edge data collector, they conduct in-depth analysis on the important data transmitted by all PLCs, and use the deep judgment threshold to make a secondary deep abnormal judgment on the PLC that has been initially warned.

[0043] The edge data collection network is used to collect PLC data at the edge, and cloud processors are used to collect and analyze important data. In the close collaboration between edge computing and cloud computing, edge computing handles high-real-time tasks such as fast data analysis and response, while the cloud is responsible for complex historical data analysis and model training. The innovation of this architecture lies in the reasonable allocation of computing resources, achieving a balance between real-time processing and in-depth analysis, while ensuring the flexibility and scalability of the system.

[0044] Furthermore, the specific steps of using the depth judgment threshold to perform secondary depth abnormality judgment on the PLC of the initial warning are as follows:

[0045] S701. After receiving the transmitted real-time important data, the cloud processor uses the depth judgment threshold to judge the real-time important data. When Te≥Ins, the cloud processor determines that there is a risk of failure and shutdown in industrial automation production, and issues an early warning to all PLCs; when Te<Ins, the cloud processor determines that the industrial automation production is normal, and initially warns that the PLC is a separate abnormality, and issues an initial warning of PLC maintenance quality.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] 1. The present invention constructs an edge data acquisition network in industrial automation production, which can not only collect and transmit data, but also pre-process, filter and aggregate data locally, reducing unnecessary data transmission, thereby reducing bandwidth requirements and cloud processing pressure; calculating the data transmission distance between each PLC and cloud processor can more clearly calculate the data transmission time and more accurately optimize data delay.

[0048] 2. The present invention constructs a sampling frequency optimization model to optimize the data sampling frequency of the PLC according to demand and real-time conditions, avoiding unnecessary high-frequency acquisition, thereby greatly reducing the amount of data. It not only reduces the pressure of data storage, but also reduces the burden of data transmission. When the system data changes slowly or stably, reducing the sampling frequency can reduce the use of processors, memory and bandwidth, save computing resources, and reduce system load; when the data changes quickly or key events occur, dynamic sampling rate adjustment can quickly increase the sampling frequency, capture more detailed changes, and ensure that the system can respond in time.

[0049] 3. In the close collaboration between edge computing and cloud computing, edge computing handles real-time tasks such as fast data analysis and response, while the cloud is responsible for complex historical data analysis and model training. The innovation of this architecture lies in the reasonable allocation of computing resources, achieving a balance between real-time processing and in-depth analysis, while ensuring the flexibility and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 The figure is a schematic diagram of the steps of the PLC real-time data acquisition optimization method based on edge gateway and edge computing of the present invention. DETAILED DESCRIPTION

[0051] 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.

[0052] Example: Figure 1 As shown, the present invention provides a technical solution.

[0053] A PLC real-time data acquisition optimization method based on edge gateway and edge computing, the method comprising the following steps:

[0054] S100, collect the location of each PLC in industrial automation production, deploy a data collector at each PLC location, calculate the transmission distance between each PLC location and the central cloud processor, and build an edge data collection network;

[0055] The specific steps to build an edge data collection network are:

[0056] S101. Establish a plane rectangular coordinate system in the industrial automation production area, take the cloud processor as the origin, and collect the position coordinates of each PLC in the industrial automation production in the coordinate system as {(x 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 ),...,(x n ,y n )},(x 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 ),...,(x n ,y n ) represents the position coordinates of the 1st, 2nd, 3rd, ..., nth PLC in the industrial automation production in the coordinate system, and n is a positive integer; a data collector is deployed at the coordinate position of each PLC, and an edge data collection network is constructed by combining the cloud processor and n data collectors;

[0057] S102. After building the edge data collection network, calculate the data transmission distance between each edge data collector and the cloud processor. The formula is: In the formula, L represents the data transmission distance between each edge data collector and the cloud processor in industrial automation production, x and y represent the coordinate position of the PLC in each edge data collector, and the data transmission distance between all PLC edge data collectors and the cloud processor is calculated by the formula {L 1 , L 2 , L 3 ,...,L n}, L 1 , L 2 , L 3 ,...,L nRepresents the data transmission distance between the 1st, 2nd, 3rd, ..., nth PLC edge data collector and the cloud processor in the calculated industrial automation production.

[0058] Building an edge data acquisition network in industrial automation production can not only collect and transmit data, but also pre-process, filter and aggregate data locally, reducing unnecessary data transmission, thereby reducing bandwidth requirements and cloud processing pressure; calculating the data transmission distance between each PLC and cloud processor can more clearly calculate the data transmission time and more accurately optimize data latency.

[0059] S200, collecting the sampling frequency of all data of each PLC and the change data of all data by the cloud processor in history, calculating the relationship between the change rate of each data and the sampling frequency, and building a data sampling frequency optimization model for the PLC;

[0060] The specific steps to build the PLC data sampling frequency optimization model are:

[0061] S201, when the cloud processor collects all the data of each PLC in the collection history, the change value of each data is {P 1 , P 2 , P 3 , ..., P m}, P 1 , P 2 , P 3 , ..., P m represents the change value of the 1st, 2nd, 3rd, ..., mth type of data collected in each PLC, where m is a positive integer; and the time data when each type of data changes is extracted as {t 1 ,t 2 ,t 3 ,...,t m}, t 1 ,t 2 ,t 3 ,...,t m Indicates the time data when the 1st, 2nd, 3rd, ..., mth data in the PLC changes; uses the linear regression algorithm to analyze the change value and time data of each data, and constructs the correlation function of the change value and time of each data in the PLC as P(t); calculates the correlation function of all data and obtains all correlation functions as {P(t) 1 、P(t) 2 、P(t) 3 , ..., P(t) m}, P(t) 1 、P(t) 2 、P(t) 3 , ..., P(t) mrepresents the correlation function of the 1st, 2nd, 3rd, ..., mth data in the calculated PLC;

[0062] S202, after calculating the correlation function of each data in the PLC, the correlation function is derived to calculate the change rate of each data, the formula is: In the formula, V represents the rate of change of the calculated data. It means to find the derivative of the correlation function P(t) at t; after m times of calculation, the change rate of each data is {V 1 、V 2 、V 3 , ..., V m},V 1 、V 2 、V 3 , ..., V m Indicates the change rate of the 1st, 2nd, 3rd, ..., mth type of data in the calculated PLC;

[0063] S203, extract the lowest sampling frequency reached by the cloud processor when collecting PLC data in the history as f min According to the change rate of each PLC data in history, the optimal relationship between the change rate of each data and the sampling frequency is designed and constructed. The formula is:

[0064] f(t)=f min +k×V;

[0065] In the formula, f(t) represents the optimized sampling frequency, V represents the change rate of each data, and k represents the influence coefficient of the data change rate on the sampling frequency; extract the maximum sampling frequency f of PLC data in the cloud processor in the history max and the maximum change rate v of the data in history max , calculate the coefficient of influence of data change rate on sampling frequency

[0066] After calculating the optimal relationship between each data change rate and sampling frequency, set the optimal limit of each data sampling frequency to f min and f max , using optimization restrictions and optimization relations to build the sampling frequency optimization model for each type of data:

[0067] f(t)=max(f min ,min(f max , f min +k×|V|));

[0068] In the formula, f(t) represents the optimized sampling frequency, max represents the maximum value of the data in the brackets, min represents the minimum value of the data in the brackets, and |V| represents the absolute value of the change rate of each data; a sampling frequency optimization model for each data in the PLC is constructed.

[0069] By using historical data to analyze the relationship between the PLC data change rate and the sampling frequency, a sampling frequency optimization model is constructed to optimize the PLC data sampling frequency according to demand and real-time conditions, avoiding unnecessary high-frequency acquisition, thereby greatly reducing the amount of data. It not only reduces the pressure on data storage, but also reduces the burden of data transmission. When the system data changes slowly or stably, reducing the sampling frequency can reduce the use of processors, memory, and bandwidth, save computing resources, and reduce system load; when the data changes quickly or key events occur, dynamic sampling rate adjustment can quickly increase the sampling frequency, capture more detailed changes, and ensure that the system can respond in time. This is especially important for scenarios with high real-time requirements such as industrial control and fault detection.

[0070] S300, the cloud processor collects data from the PLC in the collection history, and determines the data values ​​when different types of abnormalities occur in the PLC, analyzes the data collected for each type of abnormality, finds the data that affects the abnormality of the PLC as important data, uses the important data to filter the types of abnormalities that occur in the PLC, and finds important events of the PLC;

[0071] The specific steps to find important events of PLC are:

[0072] S301. In the collection history, the cloud processor collects data from the PLC and determines the data value when different types of abnormalities occur in the PLC. Suppose the change amount of all PLC data collected when each abnormality occurs is {B 1 , B 2 , B 3 , ..., B u}, B 1 , B 2 , B 3 , ..., B u Indicates the changes in the 1st, 2nd, 3rd, ..., uth types of PLC data when each abnormality is collected, where u is a positive integer; judge the changes in all collected data, and extract the data type with the largest change as the characteristic data of the abnormality; similarly, extract the characteristic data of each abnormality in the history;

[0073] S302, after extracting all abnormal feature data of each PLC, collect the abnormal data of changes when equipment failure occurs in the industrial automation generation in history as {D 1 , D 2 , D 3,...,D h},

[0074] D 1 , D 2 , D 3 ,...,D h Indicates the 1st, 2nd, 3rd, ..., hth abnormal data that have changed when equipment failure and shutdown occurred in the industrial automation generation in the collected history, where h is a positive integer; the characteristic data of each abnormality of PLC is searched in the collected abnormal data of equipment failure and shutdown, and the characteristic data existing in the abnormal data of equipment failure and shutdown is judged as important data of PLC;

[0075] S303. According to the searched important data of the PLC, select the PLC abnormality type corresponding to the important data as the important event of the PLC to form an important event database.

[0076] Important event detection can identify anomalies or important changes in the system in real time, enabling the system to respond quickly when an event occurs, issue warnings, make adjustments, or take corrective measures. It also enables the system to focus on processing data at critical moments rather than continuously processing all data. The system only allocates more resources for processing when important events are detected, effectively reducing the processing overhead of invalid data and saving computing, storage, and network resources. When the system detects an important event, it can dynamically increase the sampling frequency of data collection to capture more detailed data; at irrelevant times, it can reduce the sampling frequency to save resources. This on-demand sampling mechanism greatly improves the resource utilization of the system.

[0077] S400, calculating the optimized threshold of the PLC sampling frequency according to the transmission distance between each PLC and the cloud processor; using the edge data collection network to collect data from the PLC at each location, calculating the real-time data change rate, and optimizing the real-time sampling frequency after judging the real-time data change rate using the optimized threshold;

[0078] The specific steps to optimize the real-time sampling frequency are:

[0079] S401, collect the data sampling frequency and data change cycle when the cloud processor collects each PLC data with delay in history, and calculate the optimization threshold value in combination with the data transmission distance between each PLC and the cloud processor. The formula is: In the formula, In represents the optimization threshold of each PLC, P y Indicates the data sampling frequency when the cloud processor collects each PLC data with delay in the collected history, T yrepresents the data change cycle when the cloud processor collects each PLC data with a delay in the collected history, L represents the data transmission distance between each PLC and the cloud processor, V c Indicates the data transmission speed; the optimization threshold of each PLC is calculated by formula;

[0080] S402, using the edge data collector of each PLC to collect the real-time data of the PLC, extracting the real-time change period of the data as Ts and the real-time sampling frequency as Ps, calculating the real-time difference between the change period and the sampling frequency as Cc, and when Cc≥In, judging that the real-time sampling frequency of the PLC needs to be optimized, and when Cc<In, judging that the real-time sampling frequency of the PLC does not need to be optimized;

[0081] S403. Calculate the real-time PLC data change rate Vs based on the collected PLC data change value and the derivative of the change period, optimize the sampling frequency of the PLC that needs to be optimized, input the calculated real-time data change rate into the sampling frequency optimization model, and obtain the optimized sampling frequency f(t); use the optimized sampling frequency f(t) to sample and collect the PLC data.

[0082] S500, in the edge data collection network, the data change rate of each PLC when an abnormality occurs in history is used to calculate the abnormal sampling frequency using the abnormal change rate, and the abnormal sampling frequency is used as the edge warning threshold; the cloud processor uses the device data of all PLCs in the industrial production range when an abnormality occurs to analyze and calculate the depth judgment threshold of the PLC abnormality;

[0083] The specific steps for calculating the edge warning threshold and depth judgment threshold of PLC are:

[0084] S501. Collect the characteristic data of PLC anomalies in history, extract the data change amount and change cycle of each abnormal characteristic data when the abnormality occurs in history, and calculate the change rate of the characteristic data as Ve. In the edge data acquisition network, use the change rate of the data when each PLC abnormality occurs in history to calculate the abnormal sampling frequency. The formula is: Py = f min +k×Ve, where Py represents the calculated abnormal sampling frequency, and the edge warning threshold is calculated using the abnormal sampling frequency. The formula is: In_p=Py_p-Py_st, where In_p represents the calculated edge warning threshold, Py_p represents the average value of all calculated data abnormal sampling frequencies, and Py_st represents the standard deviation of all calculated data sampling frequencies;

[0085] S502. Collect the data value Z of the important data found in S302 when equipment failure occurs in the industrial automation generation in the history, and calculate the depth judgment threshold of the PLC. The formula is: Ins=Zp-Zst, where Ins represents the calculated depth judgment threshold of the PLC, Zp represents the average value of all the important data collected in the history, and Zst represents the standard deviation of all the important data collected in the history.

[0086] S600, using the edge data collection network to collect data from each PLC, and determine whether the PLC has an abnormality and issue a preliminary warning; determine the abnormality that has occurred, and when it is an important event, use the edge gateway to transmit the collected important data to the cloud processor;

[0087] The specific steps to determine whether the PLC has an abnormality and issue a preliminary warning are:

[0088] S601, using the edge data acquisition network to collect all feature data of each PLC according to the optimized sampling frequency, the real-time feature data is {Te 1 、Te 2 、Te 3 、...、Te g},Te 1 、Te 2 、Te 3 、...、Te g Indicates the first, second, third, ..., g types of real-time feature data collected. The real-time feature data is judged using the edge warning threshold. When Te<In_p, the PLC is judged to be working normally; when Te≥In_p, the PLC is judged to have an abnormal risk and a preliminary warning is issued;

[0089] S602. After determining that the PLC has an abnormal risk and issuing a preliminary warning, search in the important event database according to the type of abnormality in the warning. When the abnormality type of the preliminary warning is an important event, the collected real-time feature data is transmitted to the cloud processor as important data.

[0090] After S700 and the cloud processor receive the important data transmitted by the edge data collector, they conduct in-depth analysis on the important data transmitted by all PLCs, and use the deep judgment threshold to make a secondary deep abnormal judgment on the PLC that has been initially warned.

[0091] The edge data collection network is used to collect PLC data at the edge, and cloud processors are used to collect and analyze important data. In the close collaboration between edge computing and cloud computing, edge computing handles high-real-time tasks such as fast data analysis and response, while the cloud is responsible for complex historical data analysis and model training. The innovation of this architecture lies in the reasonable allocation of computing resources, achieving a balance between real-time processing and in-depth analysis, while ensuring the flexibility and scalability of the system.

[0092] The specific steps of using the depth judgment threshold to conduct secondary depth abnormality judgment on the PLC of the initial warning are as follows:

[0093] S701. After receiving the transmitted real-time important data, the cloud processor uses the depth judgment threshold to judge the real-time important data. When Te≥Ins, the cloud processor determines that there is a risk of failure and shutdown in industrial automation production, and issues an early warning to all PLCs; when Te<Ins, the cloud processor determines that the industrial automation production is normal, and initially warns that the PLC is a separate abnormality, and issues an initial warning of PLC maintenance quality.

[0094] Embodiment: An edge data acquisition network is constructed in a certain industrial automation production area, and a sampling frequency optimization model is constructed based on historical data calculations: F(t)=max(2, min(10, 2+0.3×|V|));

[0095] Assume that the optimization threshold calculated based on historical data is 1.2s, and the real-time difference between the change period and the sampling frequency in the real-time PLC is 2s, and it is judged that the sampling frequency needs to be optimized; use the edge data acquisition network to collect PLC data, and calculate that the real-time data change rate is 30; input the real-time data change rate into the optimization model, and output the optimized sampling frequency as 10.

[0096] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A PLC real-time data acquisition optimization method based on edge gateway and edge computing, characterized by: The method comprises the following steps: S100, collect the location of each PLC in industrial automation production, deploy a data collector at each PLC location, calculate the transmission distance between each PLC location and the central cloud processor, and build an edge data collection network; S200, collecting the sampling frequency of all data of each PLC and the change data of all data by the cloud processor in history, calculating the relationship between the change rate of each data and the sampling frequency, and building a data sampling frequency optimization model for the PLC; S300, the cloud processor collects data from the PLC in the collection history, and determines the data values ​​when different types of abnormalities occur in the PLC, analyzes the data collected for each type of abnormality, finds the data that affects the abnormality of the PLC as important data, uses the important data to filter the types of abnormalities that occur in the PLC, and finds important events of the PLC; S400, calculating the optimized threshold of the PLC sampling frequency according to the transmission distance between each PLC and the cloud processor; using the edge data collection network to collect data from the PLC at each location, calculating the real-time data change rate, and optimizing the real-time sampling frequency after judging the real-time data change rate using the optimized threshold; S500, in the edge data collection network, the data change rate of each PLC when an abnormality occurs in history is used to calculate the abnormal sampling frequency using the abnormal change rate, and the abnormal sampling frequency is used as the edge warning threshold; the cloud processor uses the device data of all PLCs in the industrial production range when an abnormality occurs to analyze and calculate the depth judgment threshold of the PLC abnormality; S600, using the edge data collection network to collect data from each PLC, and determine whether the PLC has an abnormality and issue a preliminary warning; determine the abnormality that has occurred, and when it is an important event, use the edge gateway to transmit the collected important data to the cloud processor; After S700 and the cloud processor receive the important data transmitted by the edge data collector, they conduct in-depth analysis on the important data transmitted by all PLCs, and use the deep judgment threshold to make a secondary deep abnormal judgment on the PLC that has been initially warned.

2. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 1 is characterized in that: The specific steps of constructing the edge data collection network in S100 are: S101, establish a plane rectangular coordinate system in the industrial automation production area, take the cloud processor as the origin, and collect the position coordinates of each PLC in the industrial automation production in the coordinate system as {(x1, y1), (x2, y2), (x3, y3), ..., (x n ,y n )}, (x1, y1), (x2, y2), (x3, y3),..., (x n ,y n ) represents the position coordinates of the 1st, 2nd, 3rd, ..., nth PLC in the industrial automation production in the coordinate system, and n is a positive integer; a data collector is deployed at the coordinate position of each PLC, and an edge data collection network is constructed by combining the cloud processor and n data collectors; S102. After building the edge data collection network, calculate the data transmission distance between each edge data collector and the cloud processor. The formula is: In the formula, L represents the data transmission distance between each edge data collector and the cloud processor in industrial automation production, x and y represent the coordinate position of the PLC in each edge data collector, and the data transmission distance between all PLC edge data collectors and the cloud processor is calculated by the formula as {L1, L2, L3, ..., L n }, L1, L2, L3, ..., L n Represents the data transmission distance between the 1st, 2nd, 3rd, ..., nth PLC edge data collector and the cloud processor in the calculated industrial automation production.

3. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 1 is characterized in that: The specific steps of constructing the PLC data sampling frequency optimization model in S200 are: S201, when the cloud processor collects all the data of each PLC in the collection history, the change value of each data is {P1, P2, P3, ..., P m }, P1, P2, P3, ..., P m represents the change value of the 1st, 2nd, 3rd, ..., mth type of data collected in each PLC, where m is a positive integer; and the time data when each type of data changes is extracted as {t1, t2, t3, ..., t m }, t1, t2, t3, ..., t m Indicates the time data when the 1st, 2nd, 3rd, ..., mth data in the PLC changes; uses a linear regression algorithm to analyze the change value and time data of each data, and constructs a correlation function between the change value and time of each data in the PLC as P(t); calculates the correlation functions of all data and obtains all correlation functions as {P(t)1, P(t)2, P(t)3, ..., P(t) m }, P(t)1, P(t)2, P(t)3,..., P(t) m represents the correlation function of the 1st, 2nd, 3rd, ..., mth data in the calculated PLC; S202, after calculating the correlation function of each data in the PLC, the correlation function is derived to calculate the change rate of each data, the formula is: In the formula, V represents the rate of change of the calculated data. It means to find the derivative of the correlation function P(t) at t; after m times of calculation, the change rate of each data is {V1, V2, V3, ..., V m }, V1, V2, V3, ..., V m Indicates the change rate of the 1st, 2nd, 3rd, ..., mth type of data in the calculated PLC; S203, extract the lowest sampling frequency reached by the cloud processor when collecting PLC data in the history as f min According to the change rate of each PLC data in history, the optimal relationship between the change rate of each data and the sampling frequency is designed and constructed. The formula is: f(t)=f min +k×V; In the formula, f(t) represents the optimized sampling frequency, V represents the change rate of each data, and k represents the influence coefficient of the data change rate on the sampling frequency; extract the maximum sampling frequency f of PLC data in the cloud processor in the history max and the maximum change rate v of the data in history max , calculate the coefficient of influence of data change rate on sampling frequency After calculating the optimal relationship between each data change rate and sampling frequency, set the optimal limit of each data sampling frequency to f min and f max , using optimization restrictions and optimization relations to build the sampling frequency optimization model for each type of data: f(t)=max(f min ,min(f max ,f min +k×V)); In the formula, f(t) represents the optimized sampling frequency, max represents the maximum value of the data in the brackets, min represents the minimum value of the data in the brackets, and |V| represents the absolute value of the change rate of each data; a sampling frequency optimization model for each data in the PLC is constructed.

4. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 1 is characterized in that: The specific steps of searching for important events of the PLC in S300 are: S301, the cloud processor collects data from the PLC in the collection history, and determines the data value when different types of abnormalities occur in the PLC. Suppose the change amount of all PLC data collected when each abnormality occurs is {B1, B2, B3, ..., B u }, B1, B2, B3, ..., B u Indicates the changes in the 1st, 2nd, 3rd, ..., uth types of PLC data when each abnormality is collected, where u is a positive integer; judge the changes in all collected data, and extract the data type with the largest change as the characteristic data of the abnormality; similarly, extract the characteristic data of each abnormality in the history; S302, after extracting all abnormal feature data of each PLC, collect the abnormal data of changes when equipment failure occurs in the industrial automation generation in history as {D1, D2, D3, ..., D h }, D1, D2, D3, ..., D h Indicates the 1st, 2nd, 3rd, ..., hth abnormal data that have changed when equipment failure and shutdown occurred in the industrial automation generation in the collected history, where h is a positive integer; the characteristic data of each abnormality of PLC is searched in the collected abnormal data of equipment failure and shutdown, and the characteristic data existing in the abnormal data of equipment failure and shutdown is judged as important data of PLC; S303. According to the searched important data of the PLC, select the PLC abnormality type corresponding to the important data as the important event of the PLC to form an important event database.

5. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 3 is characterized in that: The specific steps of optimizing the real-time sampling frequency in S400 are: S401, collect the data sampling frequency and data change cycle when the cloud processor collects each PLC data with delay in history, and calculate the optimization threshold value in combination with the data transmission distance between each PLC and the cloud processor. The formula is: In the formula, In represents the optimization threshold of each PLC, P y Indicates the data sampling frequency when the cloud processor collects each PLC data with delay in the collected history, T y represents the data change cycle when the cloud processor collects each PLC data with a delay in the collected history, L represents the data transmission distance between each PLC and the cloud processor, V c Indicates the data transmission speed; the optimization threshold of each PLC is calculated by formula; S402, using the edge data collector of each PLC to collect the real-time data of the PLC, extracting the real-time change period of the data as Ts and the real-time sampling frequency as Ps, calculating the real-time difference between the change period and the sampling frequency as Cc, and when Cc≥In, judging that the real-time sampling frequency of the PLC needs to be optimized, and when Cc<In, judging that the real-time sampling frequency of the PLC does not need to be optimized; S403. Calculate the real-time PLC data change rate Vs based on the collected PLC data change value and the derivative of the change period, optimize the sampling frequency of the PLC that needs to be optimized, input the calculated real-time data change rate into the sampling frequency optimization model, and obtain the optimized sampling frequency f(t); use the optimized sampling frequency f(t) to sample and collect the PLC data.

6. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 1 is characterized in that: The specific steps of calculating the edge warning threshold and depth judgment threshold of the PLC in S500 are: S501. Collect the characteristic data of PLC anomalies in history, extract the data change amount and change cycle of each abnormal characteristic data when the abnormality occurs in history, and calculate the change rate of the characteristic data as Ve. In the edge data acquisition network, use the change rate of the data when each PLC abnormality occurs in history to calculate the abnormal sampling frequency. The formula is: Py = f min +k×Ve, where Py represents the calculated abnormal sampling frequency, and the edge warning threshold is calculated using the abnormal sampling frequency. The formula is: In_p=Py_p-Py_st, where In_p represents the calculated edge warning threshold, Py_p represents the average value of all calculated data abnormal sampling frequencies, and Py_st represents the standard deviation of all calculated data sampling frequencies; S502. Collect the data value Z of the important data found in S302 when equipment failure occurs in the industrial automation generation in the history, and calculate the depth judgment threshold of the PLC. The formula is: Ins=Zp-Zst, where Ins represents the calculated depth judgment threshold of the PLC, Zp represents the average value of all the important data collected in the history, and Zst represents the standard deviation of all the important data collected in the history.

7. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 6 is characterized in that: The specific steps of determining whether an abnormality occurs in the PLC and providing a preliminary warning in S600 are: S601, using the edge data acquisition network to collect all feature data of each PLC according to the optimized sampling frequency, the real-time feature data is {Te1, Te2, Te3, ..., Te g }, Te1, Te2, Te3,..., Te g Indicates the first, second, third, ..., g types of real-time feature data collected. The real-time feature data is judged using the edge warning threshold. When Te<In_p, the PLC is judged to be working normally; when Te≥In_p, the PLC is judged to have an abnormal risk and a preliminary warning is issued; S602. After determining that the PLC has an abnormal risk and issuing a preliminary warning, search in the important event database according to the type of abnormality in the warning. When the abnormality type of the preliminary warning is an important event, the collected real-time feature data is transmitted to the cloud processor as important data.

8. The PLC real-time data acquisition optimization method based on edge gateway and edge computing according to claim 7 is characterized in that: The specific steps of performing a secondary depth abnormality judgment on the PLC of the preliminary warning using the depth judgment threshold in S700 are: S701, after receiving the transmitted real-time important data, the cloud processor uses the depth judgment threshold to judge the real-time important data. When Te≥Ins, the cloud processor determines that there is a risk of failure and shutdown in industrial automation production, and issues an early warning to all PLCs; When Te<Ins, the cloud processor determines that the industrial automation production is normal, and initially warns that the PLC is a separate abnormality, and sends a preliminary warning to the PLC for maintenance quality.

Citation Information

Patent Citations

  • Data acquisition system and method based on distributed clusters

    CN107222360A

  • Data acquisition method capable of self-adjusting sampling frequency

    CN111130504A

  • Pump health monitoring method, system and equipment based on edge calculation and medium

    CN114165430A

  • Data acquisition system based on edge calculation

    CN116055525A

  • Data acquisition method and system of industrial Internet of Things gateway

    CN116527718A

Cited By

  • Monitoring implementation and data acquisition system and method based on Internet of Things

    CN120508060A

  • Data analysis system and method based on HPLC (High Performance Liquid Chromatography) dual-mode communication

    CN120692298A