A PLC-based regulation and management system
By using PLC-based data acquisition and deep learning optimization algorithms, the problem of poor robustness of PID controllers in dynamic environments has been solved, enabling intelligent adjustment and safety monitoring of industrial production processes, and improving production efficiency and equipment operation stability.
Patent Information
- Application Number
- CN202510078522.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-01-17
AI Technical Summary
In existing PLC control systems, PID controllers are prone to overshoot and instability when facing dynamic changes and highly nonlinear environments, resulting in poor robustness, reduced production efficiency, and increased safety hazards.
It employs a data acquisition module, a data detection module, a status assessment module, and a control and adjustment module. Through real-time data acquisition, anomaly detection, outlier detection, and deep learning optimization algorithms, it dynamically optimizes actuator parameters to achieve intelligent adjustment of industrial conditions.
It improves the accuracy and robustness of parameter adjustment, enhances the ability to respond to potential faults and abnormal situations, ensures production safety and product quality, and improves the level of automation and intelligence in industrial production processes.
Smart Images

Figure CN119916761B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation control technology, and more specifically, to a regulation and management system based on PLC control. Background Technology
[0002] In modern industrial production, the rapid development of automation technology has driven improvements in production efficiency and product quality. In particular, the widespread application of programmable logic controllers (PLCs) has made the monitoring and regulation of various production processes more flexible and precise. PLC control systems can respond to changes in complex and dynamic environments in real time, becoming a core component in the field of industrial automation. Against this backdrop, PLC-based regulation and management systems have emerged, enabling comprehensive monitoring, data acquisition, and intelligent regulation of the production process, ensuring that industrial production processes operate at their optimal state. This not only improves production efficiency and quality but also promotes the development of industrial automation towards greater intelligence.
[0003] Patent application CN118092302A discloses an automatic metering device and control method for acid loading in acid trucks. It includes: a metering valve system comprising a flow meter, a disc valve, an electric switching valve, and a regulating valve connected in series; and a PLC control system, which includes at least an acid discharge accumulation unit and a regulating valve opening adjustment unit. The acid discharge accumulation unit receives a flow meter sensor signal to determine the cumulative acid discharge amount, and the regulating valve opening adjustment unit outputs a regulating valve opening adjustment signal to the regulating valve based on the difference between the cumulative acid discharge amount and a given acid discharge amount. This invention combines the comparison between the acid loading amount and the given loading amount with the flow rate to control the opening of the regulating valve, effectively ensuring safe production, scheduling, management, and optimization during the acid loading process in acid trucks, ensuring accuracy during acid loading, preventing overloading of the acid loading amount, and reducing the risks and safety hazards associated with acid discharge valve malfunctions.
[0004] However, although the above-mentioned technology realizes the regulation and management of the control valve based on the PLC control system, the opening degree of the control valve is controlled by the PID controller. The parameters in the PID controller (such as proportional, integral, derivative gain, etc.) usually need to be manually adjusted, which is difficult to adapt to the dynamically changing system characteristics. In highly nonlinear environments, the PID controller is prone to overshoot or instability. In addition, the PID controller has poor robustness to changes in system parameters and external disturbances, and is prone to generating large control errors. Therefore, if the above-mentioned technology is applied to industrial production, it will lead to reduced production efficiency, unstable production quality, and increased safety hazards.
[0005] In view of this, the present invention proposes a PLC-based regulation and management system to solve the above problems. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a PLC-based regulation and management system, comprising:
[0007] The data acquisition module is used to collect industrial status data in real time.
[0008] The data detection module is used to detect anomalies in industrial status data and re-collect abnormal data.
[0009] The status assessment module is used to assess industrial status data and determine whether to generate adjustment instructions.
[0010] The data optimization module is used to mark the industrial status data corresponding to the adjustment command as outlier data and to dynamically optimize the outlier data.
[0011] The control and adjustment module is used to adjust the parameters of the actuators corresponding to outlier data.
[0012] Furthermore, the industrial status data includes equipment operation data, process data, and production environment data;
[0013] The steps for anomaly detection in industrial status data include:
[0014] Step S101: For each data point in the industrial status data, assign a numerical label to it sequentially and mark it as a data label. The range of the data label is [1, θ], where θ is the number of data points in the industrial status data.
[0015] Step S102: Select the data labeled υ for anomaly detection, where υ∈[1,θ];
[0016] Step S103: Let υ = υ + 1;
[0017] Step S104: Repeat steps S102 to S103 until all data in the industrial status data has completed anomaly detection, and the loop ends;
[0018] In step S102, the anomaly detection method includes:
[0019] The data for anomaly detection is marked as elements; 'a' historical elements are elements collected at historical moments, where 'a' is an integer greater than 1; a preset analysis quantity 'b' is used; real-time collected elements are marked as real-time elements, and real-time elements and historical elements are used as analysis data; for each element in the analysis data, its corresponding neighbor elements are subtracted to obtain the element difference for each element; where the neighbor elements of an element are the remaining 'a' elements in the analysis data; based on the analysis quantity and element differences, the baseline distance and normed element corresponding to each element are determined; based on the baseline distance and element difference for each element, the adjacent distance between each element and its corresponding normed element is determined; based on the adjacent distance between each element and its corresponding normed element, the local density of each element is calculated; based on the adjacent distance between each element and its corresponding normed element, the anomaly coefficient corresponding to the real-time element is calculated.
[0020] The preset quantity range is [b, b+c]. The analysis quantity is set to each value in the quantity range in turn, and the anomaly coefficient corresponding to each value in the quantity range is calculated. All anomaly coefficients are added together in turn and then divided by c+1 to obtain the anomaly mean. The preset judgment coefficient d is set, 0 < d < 1. If |yz-1| ≥ d, the data corresponding to the real-time element is marked as anomaly data, and yz is the anomaly mean. If |yz-1| < d, the data corresponding to the real-time element is not marked.
[0021] Furthermore, the method for determining the reference distance and canonical element corresponding to each element includes:
[0022] For each element, all the differences between elements are treated as a set of elements, with each set corresponding to an element. The differences between elements in each set are sorted in ascending order to generate an element sorting table for each set. The difference at position b in each element sorting table is taken as the baseline distance to the element in the corresponding set. The neighboring elements corresponding to the first b differences in each element sorting table are taken as the normalized elements to the element in the corresponding set.
[0023] The expression for the adjacent distance is: xl(p,q)=max(jl(p),yc(p,q)); where xl(p,q) is the adjacent distance between the p-th element and the corresponding q-th normalized element in the analysis data, max is the maximum value function, jl(p) is the baseline distance of the p-th element in the analysis data, yc(p,q) is the element difference between the p-th element and the corresponding q-th normalized element in the analysis data, p∈[1,a+1], q∈[1,b], a>b;
[0024] The expression for local density is: In the formula, md(p) is the local density of the p-th element in the analysis data;
[0025] The expression for the anomaly coefficient is: In the formula, yx is the anomaly coefficient corresponding to the real-time element, md′ is the local density corresponding to the real-time element, and md(q) is the local density of the q-th normalized element corresponding to the real-time element.
[0026] Furthermore, the step of determining whether to generate an adjustment command includes:
[0027] Step S201: Select data with label υ for outlier detection;
[0028] Step S202: Let υ = υ + 1;
[0029] Step S203: Repeat steps S201 to S202 until all data in the industrial status data have completed outlier detection, then the loop ends and proceeds to step S204.
[0030] Step S204: Determine whether there is any data in the industrial status data that has been marked as outlier. If so, generate an adjustment instruction; otherwise, do not generate an adjustment instruction.
[0031] In step S201, the outlier detection method includes:
[0032] The data for outlier detection are labeled as nodes, and the nodes collected in real time are labeled as real-time nodes; g historical nodes are normal nodes collected at historical times, and normal nodes are nodes within the normal range, where g is an integer greater than 1; the g historical nodes are summed sequentially and then divided by g to obtain the mean vector; based on the mean vector, the covariance matrix corresponding to the historical nodes is calculated; based on the covariance matrix, the covariance distance corresponding to the real-time nodes is calculated.
[0033] Set a significance level; obtain the data dimension corresponding to the node, where the data dimension is the number of data types in the node; obtain a distance threshold based on the significance level and data dimension; square the covariance distance to obtain the squared distance, and compare the squared distance with the distance threshold; if the squared distance is greater than the distance threshold, mark the data corresponding to the corresponding node as outlier data; if the squared distance is less than or equal to the distance threshold, do not mark the data corresponding to the corresponding node.
[0034] Furthermore, the expression for the covariance matrix is: In the formula, Σ is the covariance matrix, and C h For the h-th node, (C h -μ) T For (C) h The transpose of -μ), h∈[1,g];
[0035] The expression for covariance distance is: In the formula, D is the covariance distance. For real-time nodes.
[0036] Furthermore, the step of dynamically optimizing outlier data includes:
[0037] Step S301: Obtain the normal range corresponding to each outlier data point;
[0038] Step S302: Randomly select a value from the normal range corresponding to each outlier data point to construct a dataset, and construct a total of M datasets, all of which are different; assign a different numerical label to each dataset and mark it as the set label;
[0039] Step S303: Construct wave group S, which includes m water waves. The position of each water wave corresponds one-to-one with the set label, and set the iteration number t to 0.
[0040] Step S304: Define the performance index function and the iteration threshold T;
[0041] Step S305: Divide wavegroup S into u subgroups;
[0042] Step S306: Propagate each water wave and update the position of each water wave;
[0043] Step S307: Calculate the reflection probability of each water wave and update the position of the water wave that is reflecting;
[0044] Step S308: Interfere with each water wave and update the position of each water wave;
[0045] Step S309: Compare the iteration number t with the iteration threshold T; if t≥T, proceed to step S310; if t<T, let t=t+1 and return to step S306.
[0046] Step S310: Calculate the performance index of each water wave, obtain the water wave with the highest performance index, and mark it as the best water wave; dynamically optimize the outlier data according to the data set corresponding to the set label of the best water wave.
[0047] Furthermore, in step S301, the method for obtaining the normal range corresponding to each outlier data point includes:
[0048] Each outlier data point is treated as a set of historical nodes, with each set corresponding to an outlier data point. The historical node with the largest value in each set is taken as the maximum value of the corresponding outlier data point. The historical node with the smallest value in each set is taken as the minimum value of the corresponding outlier data point. Based on the maximum and minimum values of each outlier data point, a normal range is constructed for each outlier data point.
[0049] In step S303, the position of each water wave in wave group S is defined in a one-dimensional search space, the range of which is the set label corresponding to the M sets of data; the expression for the position of each water wave in wave group S is: In the formula, Let P be the position of the i-th water wave. i Let P be the random coefficient of the i-th water wave. i ∈[0, 1], i∈[1, m];
[0050] In step S304, the expression for the performance index function is: f = ω1 × sx + ω2 × sz; where f is the performance index, sx is the production efficiency, sz is the production quality, and ω1 and ω2 are preset weight coefficients. The production efficiency and production quality are obtained as follows: the data set corresponding to the set label of the water wave position is obtained and marked as the replacement set; outliers in the industrial state data are replaced with the corresponding values in the replacement set, and the replaced industrial state data is marked as the prediction data; the prediction data is input into the trained efficiency prediction model to predict the corresponding production efficiency; the prediction data is input into the trained quality prediction model to predict the corresponding production quality; the training process of the efficiency prediction model and the quality prediction model is the same, and both are deep neural network models.
[0051] Furthermore, in step S305, the method for dividing wavegroup S into u sub-wavegroups includes:
[0052] Calculate the performance index corresponding to each water wave in wave group S and sort them from largest to smallest; assign an incremental sequence number to each water wave according to the ascending order of sorting, with the sequence number ranging from [1, m]; perform a modulo operation on the sequence number of each water wave according to u sub-wave groups to obtain the corresponding sub-sequence number; the expression for the sub-sequence number is: zx = xl%u; where zx is the sub-sequence number, xl is the sequence number, and % is the modulo function; if the sub-sequence number is not 0, the corresponding water wave is assigned to the zx-th sub-wave group; if the sub-sequence number is 0, the corresponding water wave is assigned to the u-th sub-wave group; where each sub-wave group includes k water waves, m = uk;
[0053] In step S306, the method for updating each water wave position includes:
[0054]
[0055] In the formula, To determine the position of the i-th water wave after propagation, To determine the position of the i-th water wave before propagation, X represents the location of the local optimal water wave. b The position of the globally optimal water wave. E1 and E2 are the positions of the waves with the largest performance index in the wavelet group corresponding to the i-th wave. E1 and E2 are random numbers between [0,1]. The local optimal wave is the wave with the largest performance index in this iteration, and the global optimal wave is the wave with the largest performance index in all iterations.
[0056] Further, in step S307, the expression for the reflection probability is: In the formula, Let f be the reflection probability of the i-th water wave, e be the natural constant, and f be the reflection probability of the i-th water wave. i t Let f be the performance index corresponding to the i-th water wave. b The performance index corresponding to the globally optimal water wave;
[0057] For each water wave, generate a random number L between [0,1]. i ,like Then the corresponding water wave will be marked as a reflected water wave. The corresponding water wave is not marked, but the water wave marked as a reflecting water wave is reflected; the methods for updating the position of the reflecting water wave include:
[0058]
[0059] In the formula, To determine the position of the nth water wave after reflection, Let y be the position of the nth water wave before reflection, and l be the reflection factor and l be the propagation factor. The performance index is the nth water wave that is reflected, where n∈[1,N], N is the number of reflected water waves, and r is the gradient factor;
[0060] In step S308, the method for updating the position of each water wave includes:
[0061] The locations of the reflected water waves and the locations of the unreflected water waves were both marked as follows: z∈[1,m];
[0062]
[0063] In the formula, To determine the position of the i-th water wave after interference, Let z be the performance index corresponding to the z-th water wave. Let z′ be the performance index corresponding to the z′th water wave, where z′∈[1,m].
[0064] Furthermore, the method for adjusting the parameters of the actuator corresponding to outlier data includes:
[0065] All executors are assigned different numerical labels and marked as execution labels; executors corresponding to outlier data are marked as outliers, and the execution labels corresponding to the outliers are obtained and marked as outlier labels; each outlier label and its corresponding executor parameters are used as an execution set, with a one-to-one correspondence between the execution set and the outlier label; each outlier data and its corresponding data in the obtained dataset are used as an outlier set, with a one-to-one correspondence between the outlier set and the outlier data; each execution set and its corresponding outlier set are merged to obtain the corresponding merged set; each merged set is input into a trained parameter tuning model to predict the corresponding parameter tuning amount; based on the predicted parameter tuning amount, the parameters of the executors corresponding to the outliers are tuned; the training process of the parameter tuning model is consistent with the training process of the efficiency prediction model, and both are deep neural network models.
[0066] The technical effects and advantages of the PLC-based regulation and management system of the present invention are as follows:
[0067] By collecting industrial status data in real time and employing anomaly detection and outlier detection methods, abnormal situations in the industrial production process can be detected in a timely manner, laying the foundation for subsequent adjustment and optimization. Compared with traditional PID control methods, the deep learning-based dynamic optimization algorithm can adaptively optimize actuator parameters, improving the accuracy and robustness of parameter adjustment. At the same time, by predicting production efficiency and quality, it can achieve intelligent evaluation of the adjustment process, ensuring production safety and product quality. It can effectively improve the monitoring and adjustment capabilities in the industrial production process, ensuring that industrial equipment is in optimal operating condition. It also enhances the response capability to potential faults and abnormal situations, thereby reducing safety hazards. It promotes the development of industrial production processes towards greater automation and intelligence, bringing significant benefits in improving production efficiency, reducing operating costs, and ensuring safe production. Attached Figure Description
[0068] Figure 1 This is a schematic diagram of a PLC-based regulation and management system according to Embodiment 1 of the present invention;
[0069] Figure 2 This is a flowchart of the outlier data dynamic optimization method of Embodiment 1 of the present invention. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] Example 1
[0072] Please see Figure 1 As shown in the figure, the PLC-based regulation and management system described in this embodiment includes a data acquisition module, a data detection module, a status evaluation module, a data optimization module, and a control and regulation module; the modules are connected by wired and / or wireless means to realize data transmission between the modules.
[0073] The data acquisition module is used to collect industrial status data in real time.
[0074] Industrial status data includes equipment operation data, process data, and production environment data. Equipment operation data includes equipment temperature, equipment pressure, and equipment current. Process data includes process temperature, flow rate, and liquid level. Production environment data includes ambient temperature and gas concentration. It should be understood that the purpose of collecting industrial status data is to reflect the actual operating status of the industrial production process. In order to ensure the safety and stability of the industrial production process and improve production efficiency and product quality, it is necessary to monitor and control industrial status data in real time to detect potential equipment failures, process anomalies, and environmental risks in a timely manner, and avoid production interruptions or safety accidents.
[0075] The data detection module is used to detect anomalies in industrial status data and re-collect abnormal data.
[0076] The steps for anomaly detection in industrial status data include:
[0077] Step S101: For each data point in the industrial status data, set a numerical label sequentially and mark it as a data label. The range of the data label is [1, θ], where θ is the number of data points in the industrial status data.
[0078] Step S102: Select the data labeled υ for anomaly detection, where υ∈[1,θ];
[0079] Step S103: Let υ = υ + 1;
[0080] Step S104: Repeat steps S102 to S103 until all data in the industrial status data has completed anomaly detection, and the loop ends.
[0081] In step S102 above, the anomaly detection method includes:
[0082] The data for anomaly detection is marked as elements; 'a' historical elements are obtained, where each historical element is an element collected at a historical moment, and 'a' is an integer greater than 1. These historical elements are obtained by adjusting the database integrated within the management system; a preset analysis quantity 'b' is set by those skilled in the art based on actual conditions; real-time collected elements are marked as real-time elements, and real-time elements and historical elements are used as analysis data; for each element in the analysis data, the corresponding neighbor elements are subtracted to obtain the element difference for each element; where the neighbor elements corresponding to an element are the remaining 'a' elements in the analysis data; all element differences corresponding to each element are used as an element set, with each element set corresponding to an element; the element differences in each element set are sorted from smallest to largest to generate an element sorting table for each element set; the element difference at position b in each element sorting table is used as the baseline distance to the element corresponding to the element set, and the neighbor elements corresponding to the first b element differences in each element sorting table are used as the normalized elements to the element corresponding to the element set.
[0083] Based on the baseline distance and element difference of each element, determine the adjacent distance between each element and each corresponding standard element; the expression for the adjacent distance is: xl(p,q)=max(jl(p),yc(p,q)); where xl(p,q) is the adjacent distance between the p-th element and the corresponding q-th standard element in the analysis data, max is the maximum value function, jl(p) is the baseline distance of the p-th element in the analysis data, yc(p,q) is the element difference between the p-th element and the corresponding q-th standard element in the analysis data, p∈[1,a+1], q∈[1,b], a>b;
[0084] The local density of each element is calculated based on its adjacent distance to each corresponding canonical element. The expression for the local density is as follows: In the formula, md(p) is the local density of the p-th element in the analysis data;
[0085] The anomaly coefficient for each real-time element is calculated based on its adjacent distance to each corresponding normed element; the expression for the anomaly coefficient is: In the formula, yx is the anomaly coefficient corresponding to the real-time element, md′ is the local density corresponding to the real-time element, and md(q) is the local density of the q-th normalized element corresponding to the real-time element.
[0086] The preset quantity range is [b, b+c], which can be preset by those skilled in the art according to the actual situation; the analysis quantity is set to each value in the quantity range in turn, and the abnormality coefficient corresponding to each value in the quantity range is calculated; all abnormality coefficients are added in turn and then divided by c+1 to obtain the abnormal mean; the preset judgment coefficient d, 0 < d < 1, can be preset by those skilled in the art according to the actual situation; if |yz-1| ≥ d, the data corresponding to the real-time element is marked as abnormal data, and yz is the abnormal mean; if |yz-1| < d, the data corresponding to the real-time element is not marked.
[0087] It should be noted that when step S102 is executed for the first time, υ = 1.
[0088] The status assessment module is used to evaluate industrial status data and determine whether to generate adjustment instructions.
[0089] The steps to determine whether to generate an adjustment command include:
[0090] Step S201: Select data with label υ for outlier detection;
[0091] Step S202: Let υ = υ + 1;
[0092] Step S203: Repeat steps S201 to S202 until all data in the industrial status data have completed outlier detection, then the loop ends and proceeds to step S204.
[0093] Step S204: Determine whether there is any data in the industrial status data that has been marked as outlier. If so, generate an adjustment command; otherwise, do not generate an adjustment command.
[0094] In step S201 above, the outlier detection method includes:
[0095] Outlier detection data is labeled as nodes, and real-time collected nodes are labeled as real-time nodes. G historical nodes are obtained; historical nodes are normal nodes collected at historical times, and normal nodes are nodes within the normal range. g is an integer greater than 1. Historical nodes are obtained through a database integrated within the management system. The g historical nodes are summed sequentially and then divided by g to obtain the mean vector. Based on the mean vector, the covariance matrix corresponding to each historical node is calculated. The expression for the covariance matrix is: In the formula, Σ is the covariance matrix, and C h For the h-th node, (C h -μ) T For (C) h The transpose of -μ), h∈[1,g]; based on the covariance matrix, calculate the covariance distance corresponding to the real-time node; the expression for the covariance distance is: In the formula, D is the covariance distance. For real-time nodes;
[0096] Set a significance level, which is preset by those skilled in the art based on the actual situation, typically 0.01 (representing a 1% confidence level) or 0.05 (representing a 5% confidence level); obtain the data dimension corresponding to the node, which is the number of data types in the node; based on the significance level and data dimension, obtain the distance threshold by consulting the chi-square distribution table; square the covariance distance to obtain the squared distance, and compare the squared distance with the distance threshold; if the squared distance is greater than the distance threshold, the data corresponding to the corresponding node is marked as outlier data; if the squared distance is less than or equal to the distance threshold, the data corresponding to the corresponding node is not marked.
[0097] The data optimization module is used to mark the industrial status data corresponding to the adjustment command as outlier data and to dynamically optimize the outlier data.
[0098] like Figure 2 As shown, the steps for dynamically optimizing outlier data include:
[0099] Step S301: Obtain the normal range corresponding to each outlier data point;
[0100] Step S302: Randomly select a value from the normal range corresponding to each outlier data point to construct a dataset, and construct a total of M datasets, all of which are different; assign a different numerical label to each dataset and mark it as the set label;
[0101] Step S303: Construct wave group S, which includes m water waves. The position of each water wave corresponds one-to-one with the set label, and set the iteration number t to 0.
[0102] Step S304: Define the performance index function and the iteration threshold T;
[0103] Step S305: Divide wavegroup S into u subgroups;
[0104] Step S306: Propagate each water wave and update the position of each water wave;
[0105] Step S307: Calculate the reflection probability of each water wave and update the position of the water wave that is reflecting;
[0106] Step S308: Interfere with each water wave and update the position of each water wave;
[0107] Step S309: Compare the iteration number t with the iteration threshold T; if t≥T, proceed to step S310; if t<T, let t=t+1 and return to step S306.
[0108] Step S310: Calculate the performance index of each water wave, obtain the water wave with the highest performance index, and mark it as the best water wave; dynamically optimize the outlier data according to the data set corresponding to the set label of the best water wave.
[0109] In step S301 above, the method for obtaining the normal range corresponding to each outlier data point includes:
[0110] Each outlier data point is treated as a set of historical nodes, with each set corresponding to an outlier data point. The historical node with the largest value in each set is taken as the maximum value of the corresponding outlier data point. The historical node with the smallest value in each set is taken as the minimum value of the corresponding outlier data point. Based on the maximum and minimum values of each outlier data point, a normal range is constructed for each outlier data point.
[0111] In step S303 above, the position of each water wave in wave group S is defined in a one-dimensional search space, the range of which is the set label corresponding to the M sets of data; the expression for the position of each water wave in wave group S is: In the formula, Let P be the position of the i-th water wave. i Let P be the random coefficient of the i-th water wave. i ∈[0,1],i∈[1,m].
[0112] In step S304 above, the expression for the performance index function is: f = ω1 × sx + ω2 × sz; where f is the performance index, sx is the production efficiency, sz is the production quality, and ω1 and ω2 are preset weighting coefficients; the specific values of the weighting coefficients can be set according to the actual situation. The weighting coefficients reflect the degree of influence of production efficiency and production quality on the performance index. Those skilled in the art can preset the corresponding weighting coefficients according to the actual degree of influence of production efficiency and production quality on the performance index in order to accurately evaluate the comprehensive performance of industrial production; since the performance index is only used to evaluate the comprehensive performance of industrial production, it does not have dimensions, that is, the performance index calculation process is a dimensionless calculation.
[0113] The methods for obtaining production efficiency and production quality are as follows: obtain the data set corresponding to the set label of the water wave position and mark it as the replacement set; replace all outliers in the industrial state data with the corresponding values in the replacement set, and mark the replaced industrial state data as the prediction data; input the prediction data into the trained efficiency prediction model to predict the corresponding production efficiency; input the prediction data into the trained quality prediction model to predict the corresponding production quality; the training process of the efficiency prediction model and the quality prediction model is the same, and both are deep neural network models.
[0114] The training process for the efficiency prediction model includes:
[0115] j sets of prediction data are collected in advance, and corresponding production efficiencies are set for each set of j prediction data, where j is an integer greater than 1. The prediction data and corresponding production efficiencies are converted into a set of corresponding feature vectors. The production efficiencies corresponding to the prediction data are collected by those skilled in the art in the historical process. J sets of prediction data are collected, industrial production is carried out under the conditions of each set of prediction data, and the production efficiency in each industrial production process is evaluated in turn and used as the production efficiency of the corresponding prediction data. The corresponding production efficiencies are set for the j sets of prediction data in turn.
[0116] Each set of feature vectors is used as input to the efficiency prediction model, which outputs a set of predicted production efficiencies corresponding to each set of predicted data and uses the actual production efficiency corresponding to each set of predicted data as the prediction target. The actual production efficiency is the pre-set production efficiency corresponding to the predicted data. The training objective is to minimize the sum of prediction errors for all predicted data. The prediction error is calculated using the formula η. w =(β) w -ε w ) 2 , where η w Let w be the prediction error, w be the group number of the feature vector corresponding to the predicted data, and β be the prediction error. w Let ε be the predicted production efficiency corresponding to the w-th set of predicted data. w Let w be the actual production efficiency corresponding to the predicted data of the wth group; train the efficiency prediction model until the sum of the prediction errors converges and then stop training.
[0117] The efficiency prediction model described above is specifically a deep neural network model, which includes an input layer, hidden layers, and an output layer. Each hidden layer contains multiple neurons, and each neuron is connected to the neurons in the next layer. The connections contain weights that determine the importance and impact of data transmission in the neural network. An activation function is applied to each neuron between the hidden layer and the output layer. The activation function introduces non-linearity, allowing the network to learn more complex patterns and features.
[0118] The iteration threshold T is preset by those skilled in the art based on the actual situation.
[0119] In step S305 above, the method for dividing wavegroup S into u sub-wavegroups includes:
[0120] Calculate the performance index corresponding to each water wave in wave group S and sort them from largest to smallest; assign an incremental sequence number to each water wave according to the ascending order of sorting, with the sequence number ranging from [1, m]; perform a modulo operation on the sequence number of each water wave according to u sub-wave groups to obtain the corresponding sub-sequence number; the expression for the sub-sequence number is: zx = xl%u; where zx is the sub-sequence number, xl is the sequence number, and % is the modulo function; if the sub-sequence number is not 0, the corresponding water wave is assigned to the zx-th sub-wave group; if the sub-sequence number is 0, the corresponding water wave is assigned to the u-th sub-wave group; where each sub-wave group includes k water waves, m = uk.
[0121] In step S306 above, the method for updating the position of each water wave includes:
[0122]
[0123] In the formula, To determine the position of the i-th water wave after propagation, To determine the position of the i-th water wave before propagation, X represents the location of the local optimal water wave. b The position of the globally optimal water wave. E1 and E2 are the positions of the waves with the largest performance index in the subgroup corresponding to the i-th wave. E1 and E2 are random numbers between [0,1]. The local optimal wave is the wave with the largest performance index in this iteration, and the global optimal wave is the wave with the largest performance index in all iterations.
[0124] In step S307 above, the expression for the reflection probability is: In the formula, Let f be the reflection probability of the i-th water wave, e be the natural constant, and f be the reflection probability of the i-th water wave. i t Let f be the performance index corresponding to the i-th water wave. b This represents the performance index corresponding to the globally optimal water wave.
[0125] For each water wave, generate a random number L between [0,1]. i ,like Then the corresponding water wave will be marked as a reflected water wave. Then, the corresponding water wave is not marked, and the water wave marked as a reflecting water wave is reflected.
[0126] Methods for updating the position of the reflected water waves include:
[0127]
[0128] In the formula, To determine the position of the nth water wave after reflection, Let y be the position of the nth water wave before reflection, and l be the reflection factor and l be the propagation factor. The performance index is the nth water wave that is reflected, where n∈[1,N], N is the number of reflected water waves, and r is the gradient factor; the propagation factor and gradient factor are both preset by those skilled in the art according to the actual situation.
[0129] In step S308 above, the method for updating the position of each water wave includes:
[0130] The locations of the reflected water waves and the locations of the unreflected water waves were both marked as follows: z∈[1,m];
[0131]
[0132] In the formula, To determine the position of the i-th water wave after interference, Let z be the performance index corresponding to the z-th water wave. Let z′ be the performance index corresponding to the z′th water wave, where z′∈[1,m].
[0133] The control and adjustment module is used to adjust the parameters of the actuators corresponding to outlier data.
[0134] Actuators include valves (used to control flow rate, liquid level, etc.), heaters (used to control process temperature, ambient temperature, etc.), and motors (used to control equipment current, equipment power, etc.); actuator parameters include valve opening degree, heater power, and motor speed.
[0135] Methods for adjusting the parameters of actuators corresponding to outlier data include:
[0136] All executors are assigned different numerical labels and marked as execution labels; executors corresponding to outlier data are marked as outliers, and the execution labels corresponding to the outliers are obtained and marked as outlier labels; each outlier label and its corresponding executor parameters are used as an execution set, with a one-to-one correspondence between the execution set and the outlier label; each outlier data and its corresponding data in the obtained dataset are used as an outlier set, with a one-to-one correspondence between the outlier set and the outlier data; each execution set and its corresponding outlier set are merged to obtain the corresponding merged set; each merged set is input into a trained parameter tuning model to predict the corresponding parameter tuning amount; based on the predicted parameter tuning amount, the parameters of the executors corresponding to the outliers are tuned; the training process of the parameter tuning model is consistent with the training process of the efficiency prediction model, and both are deep neural network models.
[0137] This embodiment collects industrial status data in real time and employs anomaly detection and outlier detection methods to promptly identify abnormal situations in the industrial production process, laying the foundation for subsequent adjustment and optimization. Compared to traditional PID control methods, the deep learning-based dynamic optimization algorithm can adaptively optimize actuator parameters, improving the accuracy and robustness of parameter adjustment. Simultaneously, by predicting production efficiency and quality, it achieves intelligent evaluation of the adjustment process, ensuring production safety and product quality. It effectively enhances the monitoring and adjustment capabilities in the industrial production process, ensuring industrial equipment is in optimal operating condition. Furthermore, it strengthens the response capability to potential faults and abnormal situations, thereby reducing safety hazards. It promotes the development of industrial production processes towards greater automation and intelligence, bringing significant benefits in improving production efficiency, reducing operating costs, and ensuring safe production.
[0138] Example 2
[0139] This application also provides an electronic device. The electronic device may include one or more processors and one or more memories. The memories store computer-readable code, which, when executed by the one or more processors, can perform a PLC-based regulation and management system as described above.
[0140] The methods or systems according to embodiments of this application can also be implemented using the architecture of the electronic device shown in this application. The electronic device may include a bus, one or more CPUs, ROM, RAM, a communication port connected to a network, input / output, a hard disk, etc. The storage device in the electronic device, such as a ROM or hard disk, may store a PLC-based regulation and management system provided in this application. Furthermore, the electronic device may also include a user interface. Of course, the architecture shown in this application is merely exemplary; when implementing different devices, one or more components in the electronic device shown in this application may be omitted according to actual needs.
[0141] Example 3
[0142] One embodiment of this application discloses a computer-readable storage medium. The computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by a processor, a PLC-based regulation and management system according to an embodiment of this application, as described with reference to the above figures, can be executed. The storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0143] Furthermore, according to embodiments of this application, the processes described above with reference to the flowchart can be implemented as computer software programs. For example, this application provides a non-transitory machine-readable storage medium storing machine-readable instructions that can be executed by a processor to perform instructions corresponding to the method steps provided in this application, such as a PLC-based regulation and management system. When this computer program is executed by a central processing unit (CPU), it performs the functions defined in the method of this application.
[0144] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0145] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A PLC-based regulation and management system, characterized in that, include: The data acquisition module is used to collect industrial status data in real time. The industrial status data includes equipment operation data, process data, and production environment data; The data detection module is used to detect anomalies in industrial status data and to re-collect data that is found to be abnormal in the industrial status data. The steps for anomaly detection in industrial status data include: Step S101: For each data point in the industrial status data, sequentially increment a numerical label and mark it as a data label. The range of the data labels is... , The number of data types in the industrial status data; Step S102: Select data labels as The data is used for anomaly detection. ; Step S103: Let ; Step S104: Repeat steps S102 to S103 until all data in the industrial status data has completed anomaly detection, and the loop ends; In step S102, the anomaly detection method includes: Mark the data for anomaly detection as elements; retrieve Each historical element is a collection of elements from historical moments. The integer is greater than 1; the preset number of analyses. The elements collected in real time are marked as real-time elements, and real-time elements and historical elements are used as analysis data. For each element in the analysis data, its corresponding neighbor elements are subtracted to obtain the element difference for each element. The neighbor elements of an element are the remaining elements in the analysis data. Each element is analyzed; based on the number of elements and the element differences, the baseline distance and standard element corresponding to each element are determined; based on the baseline distance and element differences of each element, the adjacent distance between each element and each corresponding standard element is determined; based on the adjacent distance between each element and each corresponding standard element, the local density of each element is calculated; based on the adjacent distance between each element and each corresponding standard element, the anomaly coefficient corresponding to the real-time element is calculated. Preset quantity range , The range of quantities is defined; the analysis quantities are sequentially set to each value within the range, and the outlier coefficient corresponding to each value within the range is calculated; all outlier coefficients are summed sequentially, and then divided by . Obtain the average of outliers; preset judgment coefficients. , ;like Then the data corresponding to the real-time element will be marked as abnormal data. This is an outlier mean; if If so, the data corresponding to the real-time element will not be marked; The status assessment module is used to assess industrial status data and determine whether to generate an adjustment command; the steps for determining whether to generate an adjustment command include: Step S201: Select data labels as Outlier detection is performed on the data; Step S202: Let ; Step S203: Repeat steps S201 to S202 until all data in the industrial status data have completed outlier detection, then the loop ends and proceeds to step S204. Step S204: Determine whether there is any data in the industrial status data that has been marked as outlier. If so, generate an adjustment instruction; otherwise, do not generate an adjustment instruction. In step S201, the outlier detection method includes: Data points used for outlier detection are labeled as nodes, and nodes collected in real-time are labeled as real-time nodes; [The text abruptly ends here, likely due to an incomplete sentence or missing information.] There are 10 historical nodes, which are normal nodes collected at historical moments. Normal nodes are nodes that are within the normal range. It is an integer greater than 1; Add up each historical node in turn, then divide by . Obtain the mean vector; calculate the covariance matrix corresponding to the historical nodes based on the mean vector; calculate the covariance distance corresponding to the real-time nodes based on the covariance matrix. Set a significance level; obtain the data dimension corresponding to the node, where the data dimension is the number of data types in the node; obtain a distance threshold based on the significance level and data dimension; square the covariance distance to obtain the squared distance, and compare the squared distance with the distance threshold; if the squared distance is greater than the distance threshold, mark the data corresponding to the corresponding node as outlier data; if the squared distance is less than or equal to the distance threshold, do not mark the data corresponding to the corresponding node. The data optimization module is used to mark the industrial state data corresponding to the adjustment command as outlier data and to dynamically optimize the outlier data; the steps of dynamically optimizing the outlier data include: Step S301: Obtain the normal range corresponding to each outlier data point; Step S302: Randomly select a value from the normal range corresponding to each outlier data point to construct a dataset, and construct a total of M datasets, all of which are different; assign a different numerical label to each dataset and mark it as the set label; Step S303: Constructing a wavegroup wave groups It includes m water waves, each with a position corresponding to a set label, and sets the number of iterations. =0; Step S304: Define the performance index function and the iteration threshold T; Step S305: [The sentence is incomplete and requires more context to translate accurately.] Divided into Subgroup; Step S306: Propagate each water wave and update the position of each water wave; Step S307: Calculate the reflection probability of each water wave and update the position of the water wave that is reflecting; Step S308: Interfere with each water wave and update the position of each water wave; Step S309: Calculate the number of iterations. Compare with the iteration threshold T; if If so, proceed to step S310; if Then let And return to step S306; Step S310: Calculate the performance index of each water wave, obtain the water wave with the highest performance index, and mark it as the best water wave; dynamically optimize the outlier data according to the data set corresponding to the set label of the best water wave. In step S301, the method for obtaining the normal range corresponding to each outlier data point includes: Each outlier data point is treated as a set of historical nodes, with each set corresponding to an outlier data point. The historical node with the largest value in each set is taken as the maximum value of the corresponding outlier data point. The historical node with the smallest value in each set is taken as the minimum value of the corresponding outlier data point. Based on the maximum and minimum values of each outlier data point, a normal range is constructed for each outlier data point. In step S303, wave group The position of each water wave is defined in a one-dimensional search space, the range of which is the set label corresponding to the M data sets; wave group The expression for each water wave position is: In the formula, Let i be the position of the i-th water wave. Let be the random coefficient of the i-th water wave. , ; In step S304, the expression for the performance index function is: In the formula, For performance indicators, For production efficiency, For production quality, , Preset weighting coefficients; The control and adjustment module is used to adjust the parameters of the actuator corresponding to the outlier data; the method for adjusting the parameters of the actuator corresponding to the outlier data includes: All executors are assigned different numerical labels and marked as execution labels. Executors corresponding to outlier data are marked as outliers, and their corresponding execution labels are obtained and marked as outlier labels. Each outlier label and its corresponding executor parameter form an execution set, with a one-to-one correspondence between execution sets and outlier labels. Each outlier data point and its corresponding data in the obtained dataset form an outlier set, with a one-to-one correspondence between outlier sets and outlier data. Each execution set and its corresponding outlier set are merged to obtain a merged set. Each merged set is input into a trained parameter tuning model to predict the corresponding parameter tuning amount. Based on the predicted parameter tuning amount, the parameters of the executors corresponding to the outliers are tuned. The parameter tuning model is a deep neural network model.
2. The adjustment and management system based on PLC control according to claim 1, characterized in that, The method for determining the reference distance and canonical element corresponding to each element includes: For each element, all the differences between its elements are grouped into a set, with each set corresponding to a single element. The differences in each set are then sorted in ascending order to generate a sorted table for each set. Each element in the sorted table is then ranked... The element difference of the position is used as the baseline distance to the corresponding elements in the corresponding element set, and the first element in each element sorting table is used as the baseline distance. The neighboring elements corresponding to the bit difference are used as the canonical elements of the corresponding element set; The expression for adjacent distance is: In the formula, To analyze the data of the first The element and its corresponding number Adjacent distances between standard elements It is a function with maximum value. To analyze the data of the first The baseline distance of each element To analyze the data of the first The element and its corresponding number The element difference between each standard element , , ; The expression for local density is: In the formula, To analyze the data of the first Local density of each element; The expression for the anomaly coefficient is: In the formula, This represents the anomaly coefficient corresponding to the real-time element. This represents the local density corresponding to the real-time element. For the real-time element corresponding to the first Local density of a standard element.
3. The adjustment and management system based on PLC control according to claim 2, characterized in that, The expression for the covariance matrix is: In the formula, Let covariance matrix be the variance matrix. For the first 1 node for transpose, It is the mean vector. ; The expression for covariance distance is: In the formula, For covariance distance, For real-time nodes.
4. The adjustment and management system based on PLC control according to claim 3, characterized in that, The methods for obtaining production efficiency and production quality are as follows: obtain the data set corresponding to the set label of the water wave position and mark it as the replacement set; replace all outliers in the industrial state data with the corresponding values in the replacement set, and mark the replaced industrial state data as the prediction data; input the prediction data into the trained efficiency prediction model to predict the corresponding production efficiency; input the prediction data into the trained quality prediction model to predict the corresponding production quality; the training process of the efficiency prediction model and the quality prediction model is the same, and both are deep neural network models.
5. The adjustment and management system based on PLC control according to claim 4, characterized in that, In step S305, the wave group Divided into The methods for sub-wavegroups include: Calculating wave groups The performance indicators corresponding to each water wave are sorted from largest to smallest; according to the ascending order of the sorting, each water wave is assigned an incrementing sequence number, with the sequence number ranging from [value missing]. ;according to For each sub-wave group, a modulo operation is performed on the sequence number of each water wave to obtain the corresponding sub-sequence number; the expression for the sub-sequence number is: In the formula, For sub-sequence number, For serial number, This is the modulus function; if the sub-index is not 0, then the corresponding water wave is assigned to the [number]th [order]. The number of subgroups; if the subgroup number is 0, then the corresponding water wave is assigned to the _th subgroup_. Each subgroup comprises: A ripple, ; In step S306, the method for updating each water wave position includes: ; In the formula, To determine the position of the i-th water wave after propagation, To determine the position of the i-th water wave before propagation, The location of the local optimum water wave. The position of the globally optimal water wave. This represents the position of the wavelet with the highest performance index in the wavelet group corresponding to the i-th wavelet. , All Random numbers between iterations; the local optimal wave is the wave with the highest performance index in this iteration, and the global optimal wave is the wave with the highest performance index in all iterations.
6. The adjustment and management system based on PLC control according to claim 5, characterized in that, In step S307, the expression for the reflection probability is: In the formula, Let be the reflection probability of the i-th water wave. It is a natural constant. Let i be the performance index corresponding to the i-th water wave. The performance index corresponding to the globally optimal water wave; Generate a for each water wave Random numbers between ,like If so, the corresponding water wave will be marked as a reflected water wave. If the corresponding water wave is not marked, the water wave marked as a reflected water wave will be reflected. Methods for updating the position of the reflected water waves include: ; ; In the formula, To determine the position of the nth water wave after reflection, To determine the position of the nth water wave before reflection, As a reflective factor, As a propagation factor, The performance index corresponding to the nth water wave that is reflected. , The number of reflected water waves, It is the gradient factor; In step S308, the method for updating the position of each water wave includes: The locations of the reflected water waves and the locations of the unreflected water waves were both marked as follows: , ; ; In the formula, To determine the position of the i-th water wave after interference, Let z be the performance index corresponding to the z-th water wave. For the first The performance indicators corresponding to each water wave .
Citation Information
Patent Citations
Automatic metering device for acid loading of acid vehicle and control method
CN118092302A
Data processing method and device
CN110163647A
Water consumption fluctuation abnormity identification method and device, computer device and storage medium
CN113469235A